From: Ezequiel GarcĂ­a Date: Fri, 15 Apr 2016 15:56:05 +0000 (-0300) Subject: board/minnowboard: Unify Minnowboard and Minnowboard MAX boards X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c084e951989ca18db4c36b32021727601cf8422;p=buildroot.git board/minnowboard: Unify Minnowboard and Minnowboard MAX boards 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 Signed-off-by: Peter Korsgaard --- diff --git a/board/minnowboard-max/genimage.cfg b/board/minnowboard-max/genimage.cfg deleted file mode 100644 index 6cf7874307..0000000000 --- a/board/minnowboard-max/genimage.cfg +++ /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 index f38db8f62b..0000000000 --- a/board/minnowboard-max/grub.cfg +++ /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 index abb7fdce98..0000000000 --- a/board/minnowboard-max/linux.config +++ /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 index 9f86d390f2..0000000000 --- a/board/minnowboard-max/post-build.sh +++ /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 index e90dd6b8cf..0000000000 --- a/board/minnowboard-max/post-image.sh +++ /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 index dfad2aba21..0000000000 --- a/board/minnowboard-max/readme.txt +++ /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 index 0000000000..f38db8f62b --- /dev/null +++ b/board/minnowboard/grub-minnowboard-max.cfg @@ -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 index 0000000000..33a0f4aa8d --- /dev/null +++ b/board/minnowboard/grub-minnowboard.cfg @@ -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 index 33a0f4aa8d..0000000000 --- a/board/minnowboard/grub.cfg +++ /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 index 0000000000..abb7fdce98 --- /dev/null +++ b/board/minnowboard/linux-4.4.config @@ -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 diff --git a/board/minnowboard/post-build.sh b/board/minnowboard/post-build.sh index e3f4a92ec9..f3a11e99f0 100755 --- a/board/minnowboard/post-build.sh +++ b/board/minnowboard/post-build.sh @@ -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 diff --git a/board/minnowboard/readme.txt b/board/minnowboard/readme.txt index 3a24fdc162..8cf35b79c5 100644 --- a/board/minnowboard/readme.txt +++ b/board/minnowboard/readme.txt @@ -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 diff --git a/configs/minnowboard_defconfig b/configs/minnowboard_defconfig index 25c63ccbee..f4afc86bf8 100644 --- a/configs/minnowboard_defconfig +++ b/configs/minnowboard_defconfig @@ -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 diff --git a/configs/minnowboard_max_defconfig b/configs/minnowboard_max_defconfig index dfa1b6c0fb..7c418c5c73 100644 --- a/configs/minnowboard_max_defconfig +++ b/configs/minnowboard_max_defconfig @@ -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