board/minnowboard: Unify Minnowboard and Minnowboard MAX boards
authorEzequiel García <ezequiel@vanguardiasur.com.ar>
Fri, 15 Apr 2016 15:56:05 +0000 (12:56 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 18 Apr 2016 21:19:25 +0000 (23:19 +0200)
Given Minnowboard and Minnowboard MAX boards are very similar,
it's desirable to unify the support for them.

This commit does the following:

  1) Remove Minnowboard MAX's genimage.cfg, post-build.sh
     and post-image.sh. These are identical to Minnowboard's.

  2) Move Minnowboard MAX's linux config, and rename it.

     It would be lovely to have a single kernel config file.
     The kernel size penalty involved in adding support for
     all the peripherals on both boards is small enough to
     justify this.

     However, the original Minnowboard has some GPIO buttons
     that need to be registered by the kernel. This is not
     upstreamed, and hence we need to use the yocto v3.8 kernel
     to have this support.

  3) Rename each grub config to grub-{board}.cfg.

  4) Modify (the now unique) post-build script to use
     a different grub config, according to the board.

  5) Update both defconfigs, as per the above changes.

  6) Finally, update the readme.txt.

[Peter: mention MAX in readme title]
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
14 files changed:
board/minnowboard-max/genimage.cfg [deleted file]
board/minnowboard-max/grub.cfg [deleted file]
board/minnowboard-max/linux.config [deleted file]
board/minnowboard-max/post-build.sh [deleted file]
board/minnowboard-max/post-image.sh [deleted file]
board/minnowboard-max/readme.txt [deleted file]
board/minnowboard/grub-minnowboard-max.cfg [new file with mode: 0644]
board/minnowboard/grub-minnowboard.cfg [new file with mode: 0644]
board/minnowboard/grub.cfg [deleted file]
board/minnowboard/linux-4.4.config [new file with mode: 0644]
board/minnowboard/post-build.sh
board/minnowboard/readme.txt
configs/minnowboard_defconfig
configs/minnowboard_max_defconfig

diff --git a/board/minnowboard-max/genimage.cfg b/board/minnowboard-max/genimage.cfg
deleted file mode 100644 (file)
index 6cf7874..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Create an image of the efi partition
-image efi-part.vfat {
-       vfat {
-               file startup.nsh {
-                       image = "efi-part/startup.nsh"
-               }
-               file EFI {
-                       image = "efi-part/EFI"
-               }
-               file bzImage {
-                       image = "bzImage"
-               }
-       }
-       size=10M
-}
-
-# Create the sdcard image, pulling in
-#  * the image created by buildroot
-#  * the efi-partition created above
-image sdcard.img {
-       hdimage {
-       }
-
-       partition boot {
-               partition-type = 0xEF
-               image = "efi-part.vfat"
-       }
-
-       partition rootfs {
-               partition-type = 0x83
-               image = "rootfs.ext4"
-               size = 512M
-       }
-}
diff --git a/board/minnowboard-max/grub.cfg b/board/minnowboard-max/grub.cfg
deleted file mode 100644 (file)
index f38db8f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-set default="0"
-set timeout="5"
-
-menuentry "Buildroot" {
-       linux /bzImage root=/dev/mmcblk0p2 rootwait console=tty0 console=ttyS0,115200
-}
diff --git a/board/minnowboard-max/linux.config b/board/minnowboard-max/linux.config
deleted file mode 100644 (file)
index abb7fdc..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-CONFIG_NO_HZ=y
-CONFIG_SMP=y
-CONFIG_X86_INTEL_LPSS=y
-CONFIG_MATOM=y
-CONFIG_EFI=y
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
-CONFIG_X86_INTEL_PSTATE=y
-CONFIG_X86_ACPI_CPUFREQ=y
-CONFIG_INTEL_IDLE=y
-CONFIG_IA32_EMULATION=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_ATA=y
-CONFIG_SATA_AHCI=y
-CONFIG_ATA_PIIX=y
-CONFIG_NETDEVICES=y
-CONFIG_R8169=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_DW=y
-CONFIG_I2C_I801=y
-CONFIG_I2C_DESIGNWARE_PLATFORM=y
-CONFIG_I2C_DESIGNWARE_PCI=y
-CONFIG_SPI=y
-CONFIG_SPI_PXA2XX=y
-CONFIG_SPI_DESIGNWARE=y
-CONFIG_PINCTRL_BAYTRAIL=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_SYSFS=y
-CONFIG_AGP=y
-CONFIG_DRM=y
-CONFIG_DRM_I915=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_MMC_SDHCI_ACPI=y
-CONFIG_PWM=y
-CONFIG_PWM_LPSS=y
-CONFIG_EXT4_FS=y
diff --git a/board/minnowboard-max/post-build.sh b/board/minnowboard-max/post-build.sh
deleted file mode 100755 (executable)
index 9f86d39..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-cp board/minnowboard-max/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
diff --git a/board/minnowboard-max/post-image.sh b/board/minnowboard-max/post-image.sh
deleted file mode 100755 (executable)
index e90dd6b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh -e
-
-GENIMAGE_CFG="board/minnowboard-max/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-    --rootpath "${TARGET_DIR}" \
-    --tmppath "${GENIMAGE_TMP}" \
-    --inputpath "${BINARIES_DIR}" \
-    --outputpath "${BINARIES_DIR}" \
-    --config "${GENIMAGE_CFG}"
diff --git a/board/minnowboard-max/readme.txt b/board/minnowboard-max/readme.txt
deleted file mode 100644 (file)
index dfad2ab..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-How to get started with the Minnow Board MAX
-============================================
-
-1. Build
-
-  Apply the defconfig:
-
-  $ make minnowboard_max_defconfig
-
-  Add any additional packages required and build:
-
-  $ make
-
-2. Write the SD card
-
-  The build process will create a SD card image in output/images.
-  Write the image to an mSD card, insert into the Minnowboard MAX
-  and power the board on.
-
-  $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync
-
-3. Enjoy
-
-Additional information about this board can be found at
-http://www.minnowboard.org/ or http://wiki.minnowboard.org/MinnowBoard_MAX
diff --git a/board/minnowboard/grub-minnowboard-max.cfg b/board/minnowboard/grub-minnowboard-max.cfg
new file mode 100644 (file)
index 0000000..f38db8f
--- /dev/null
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+       linux /bzImage root=/dev/mmcblk0p2 rootwait console=tty0 console=ttyS0,115200
+}
diff --git a/board/minnowboard/grub-minnowboard.cfg b/board/minnowboard/grub-minnowboard.cfg
new file mode 100644 (file)
index 0000000..33a0f4a
--- /dev/null
@@ -0,0 +1,6 @@
+set default="0"
+set timeout="5"
+
+menuentry "Buildroot" {
+       linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200
+}
diff --git a/board/minnowboard/grub.cfg b/board/minnowboard/grub.cfg
deleted file mode 100644 (file)
index 33a0f4a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-set default="0"
-set timeout="5"
-
-menuentry "Buildroot" {
-       linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200
-}
diff --git a/board/minnowboard/linux-4.4.config b/board/minnowboard/linux-4.4.config
new file mode 100644 (file)
index 0000000..abb7fdc
--- /dev/null
@@ -0,0 +1,46 @@
+CONFIG_NO_HZ=y
+CONFIG_SMP=y
+CONFIG_X86_INTEL_LPSS=y
+CONFIG_MATOM=y
+CONFIG_EFI=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_X86_INTEL_PSTATE=y
+CONFIG_X86_ACPI_CPUFREQ=y
+CONFIG_INTEL_IDLE=y
+CONFIG_IA32_EMULATION=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_ATA_PIIX=y
+CONFIG_NETDEVICES=y
+CONFIG_R8169=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_I2C_I801=y
+CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_DESIGNWARE_PCI=y
+CONFIG_SPI=y
+CONFIG_SPI_PXA2XX=y
+CONFIG_SPI_DESIGNWARE=y
+CONFIG_PINCTRL_BAYTRAIL=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_AGP=y
+CONFIG_DRM=y
+CONFIG_DRM_I915=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_PWM=y
+CONFIG_PWM_LPSS=y
+CONFIG_EXT4_FS=y
index e3f4a92ec9430548df55e5b29de70fa51ca49c58..f3a11e99f0f5d1a0642f06152fcfc47c2ec76c50 100755 (executable)
@@ -1,2 +1,5 @@
 #!/bin/sh
-cp board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
+# args from BR2_ROOTFS_POST_SCRIPT_ARGS
+# $2    board name
+
+cp -v board/minnowboard/grub-${2}.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
index 3a24fdc162b8049a91dcd4327873d70cee683c1a..8cf35b79c562c678d08fce83f7bdab73dff3e363 100644 (file)
@@ -1,5 +1,5 @@
-How to get started with the MinnowBoard
-========================================
+How to get started with the MinnowBoard (MAX)
+=============================================
 
 1. Build
 
@@ -7,6 +7,10 @@ How to get started with the MinnowBoard
 
   $ make minnowboard_defconfig
 
+  Or, for the Minnowboard MAX board:
+
+  $ make minnowboard_max_defconfig
+
   Add any additional packages required and build:
 
   $ make
index 25c63ccbeead1ca08cb5a0daed7856e69042bb6a..f4afc86bf814f383c00a0ff7f3a59df15beea59d 100644 (file)
@@ -6,6 +6,7 @@ BR2_x86_atom=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyPCH0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="minnowboard"
 
 # Linux headers same as kernel, a 3.8 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y
index dfa1b6c0fb2f3edaeadb1ec997a9b74e4494956d..7c418c5c73d573810b860c2763579f1494a09585 100644 (file)
@@ -5,8 +5,9 @@ BR2_x86_atom=y
 # Misc
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_SYSTEM_DHCP="eth0"
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard-max/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard-max/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="minnowboard-max"
 
 # Linux headers same as kernel, a 4.4 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
@@ -23,7 +24,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
-BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard-max/linux.config"
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux-4.4.config"
 
 # Bootloader
 BR2_TARGET_GRUB2=y