board: add support for Intel Galileo Gen 2
Kinsella
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
Delta's from v6:-
* Changed spaces for tabs in efi-part, genimage, grub & S09modload
Board support package includes:-
* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.
--- board/intel/galileo/efi-part.cfg | 9 + board/intel/galileo/genimage.cfg | 15 + board/intel/galileo/grub.cfg | 11 + board/intel/galileo/linux-3.8.config | 310 +++++++++++++++++++++ board/intel/galileo/post-build.sh | 2 + board/intel/galileo/post-image.sh | 26 ++ .../galileo/rootfs_overlay/etc/init.d/S09modload | 35 +++ .../etc/modules-load.galileo/galileo.conf | 6 + .../etc/modules-load.galileo/galileo_gen2.conf | 7 + configs/galileo_defconfig | 25 ++ 10 files changed, 446 insertions(+) create mode 100644 board/intel/galileo/efi-part.cfg create mode 100644 board/intel/galileo/genimage.cfg create mode 100644 board/intel/galileo/grub.cfg create mode 100644 board/intel/galileo/linux-3.8.config create mode 100755 board/intel/galileo/post-build.sh create mode 100755 board/intel/galileo/post-image.sh create mode 100755 board/intel/galileo/rootfs_overlay/etc/init.d/S09modload create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf create mode 100644 configs/galileo_defconfig
board/intel/galileo/efi-part.cfg new file +9 -0
@@ -0,0 +1,9 @@ +image efi-part.vfat { + vfat { + files = { + "startup.nsh", + "EFI", + } + } + size=512K +}
board/intel/galileo/genimage.cfg new file +15 -0
@@ -0,0 +1,15 @@ +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + image = "efi-part.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 512M + } +}
board/intel/galileo/grub.cfg new file +11 -0
@@ -0,0 +1,11 @@ +set default="0" +set timeout="0" + +menuentry "Buildroot" { + # Grub2 supports ext2, load the kernel from the Linux rootfs partition + # Set root tells grub to search the 2nd partition for the bzImage + set root=(hd0,msdos2) + + # Set Linux to boot from the 2nd partition, SD/MMC support is baked into the kernel + linux /boot/bzImage root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 reboot=efi,warm apic=debug rw +}
board/intel/galileo/linux-3.8.config new file +310 -0
310 lines not on this page · raw message
board/intel/galileo/post-build.sh new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +cp board/intel/galileo/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
board/intel/galileo/post-image.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +EFI_IMAGE_CFG="board/intel/galileo/efi-part.cfg" +GENIMAGE_CFG="board/intel/galileo/genimage.cfg" +EFI_PART_DIR="${BINARIES_DIR}/efi-part" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +mkimage () { + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "$1" \ + --outputpath "${BINARIES_DIR}" \ + --config "$2" +} + +# Create the EFI Partition +mkimage "${EFI_PART_DIR}" "${EFI_IMAGE_CFG}" + +# Create the SD Card Image +mkimage "${BINARIES_DIR}" "${GENIMAGE_CFG}" + +RET=${?} +exit ${RET}
board/intel/galileo/rootfs_overlay/etc/init.d/S09modload new file +35 -0
@@ -0,0 +1,35 @@ +#!/bin/sh +# + +load_drivers() +{ + while IFS= read -r line; do + modprobe $line + done < "/etc/modules-load.galileo/$1.conf" +} + +do_board() +{ + board=$(cat /sys/devices/virtual/dmi/id/board_name) + case "$board" in + *"GalileoGen2" ) + load_drivers "galileo_gen2" ;; + *"Galileo" ) + load_drivers "galileo" ;; + esac +} + +case "$1" in + start) + do_board + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $?
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file +6 -0
@@ -0,0 +1,6 @@ +intel_qrk_gip +cy8c9540a +i2c_dev +industrialio +ad7298 +stmmac
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf new file +7 -0
@@ -0,0 +1,7 @@ +intel_qrk_gip +gpio-pca953x +pca9685 +i2c_dev +industrialio +adc1x8s102 +stmmac
configs/galileo_defconfig new file +25 -0
@@ -0,0 +1,25 @@ +BR2_x86_x1000=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y +BR2_BINUTILS_VERSION_2_25_X=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mdr78/Linux-x1000.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d1a51d55dc67022be6c2d15163ce6dd28540042f" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.8.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_2r1=y +BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2" +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_I386_EFI=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.1.0
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
Quoted 8 lines · Ray
Delta's from v6:-
* Changed spaces for tabs in efi-part, genimage, grub & S09modloadBoard support package includes:-
* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
There is now a v1.2 BSP at Intel that is based on 3.14. Unfortunately, it's in
a 7z-packed tarball so not exactly easy to integrate...
Quoted 7 lines
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.Signed-off-by Ray Kinsella <[email protected]>---
[snip]
Quoted 21 lines
board/intel/galileo/efi-part.cfg new file +9
-0@@ -0,0 +1,9 @@ +image efi-part.vfat { + vfat { + files = { + "startup.nsh", + "EFI", + } + } + size=512K +}board/intel/galileo/genimage.cfg new file +0
-0
board/intel/galileo/genimage.cfg line 7
Quoted 7 lines
board/intel/galileo/genimage.cfg new file +7
-0@@ -0,0 +1,15 @@ +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + image = "efi-part.vfat"
Doesn't genimage allow to specify this in a single file?
Quoted 8 lines
board/intel/galileo/genimage.cfg new file +8
-0+ } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 512M + } +}
[snip]
Quoted 6 lines
board/intel/galileo/linux-3.8.config new file +0
-0@@ -0,0 +1,310 @@
[snip]
Quoted 1 line
+CONFIG_EXT2_FS=y
ext2 is completely useless.
board/intel/galileo/linux-3.8.config line 275
Quoted 4 lines
board/intel/galileo/linux-3.8.config new file +4
-0+CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y
ext3 could be replaced by ext4.
Quoted 23 lines
board/intel/galileo/linux-3.8.config new file +23
-0+CONFIG_VFAT_FS=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_HUGETLBFS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +CONFIG_FRAME_WARN=2048 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_HEADERS_CHECK=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_TIMER_STATS=y +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_FTRACE is not set +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_X86_PTDUMP=y
board/intel/galileo/linux-3.8.config line 308
Quoted 10 lines
board/intel/galileo/linux-3.8.config new file +10
-0+# CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_DEBUG_SET_MODULE_RONX=y +# CONFIG_DOUBLEFAULT is not set +CONFIG_DEBUG_BOOT_PARAMS=y +CONFIG_OPTIMIZE_INLINING=y +CONFIG_KEYS=y +CONFIG_KEYS_DEBUG_PROC_KEYS=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +CONFIG_CRYPTO_CRC32C=y
That's probably a leftover of some option you disabled.
board/intel/galileo/linux-3.8.config line 310
Quoted 2 lines
board/intel/galileo/linux-3.8.config new file +2
-0+# CONFIG_VIRTUALIZATION is not set +CONFIG_CRC_T10DIF=y
This one too.
Quoted 14 lines
board/intel/galileo/post-build.sh new file +2
-0@@ -0,0 +1,2 @@ +#!/bin/sh +cp board/intel/galileo/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfgboard/intel/galileo/post-image.sh new file +0
-0
board/intel/galileo/post-image.sh line 1
Quoted 1 line
board/intel/galileo/post-image.sh new file +1
-0@@ -0,0 +1,26 @@ +#!/bin/bash
No bashisms here, so /bin/sh
Perhaps add a -e to exit on failure.
Quoted 15 lines
board/intel/galileo/post-image.sh new file +15
-0+ +EFI_IMAGE_CFG="board/intel/galileo/efi-part.cfg" +GENIMAGE_CFG="board/intel/galileo/genimage.cfg" +EFI_PART_DIR="${BINARIES_DIR}/efi-part" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +mkimage () { + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "$1" \ + --outputpath "${BINARIES_DIR}" \ + --config "$2"
board/intel/galileo/post-image.sh line 26
Quoted 10 lines
board/intel/galileo/post-image.sh new file +10
-0+} + +# Create the EFI Partition +mkimage "${EFI_PART_DIR}" "${EFI_IMAGE_CFG}" + +# Create the SD Card Image +mkimage "${BINARIES_DIR}" "${GENIMAGE_CFG}" + +RET=${?} +exit ${RET}
These two lines are redundant.
Quoted 47 lines
board/intel/galileo/rootfs_overlay/etc/init.d/S09modload new file +35
-0@@ -0,0 +1,35 @@ +#!/bin/sh +# + +load_drivers() +{ + while IFS= read -r line; do + modprobe $line + done < "/etc/modules-load.galileo/$1.conf" +} + +do_board() +{ + board=$(cat /sys/devices/virtual/dmi/id/board_name) + case "$board" in + *"GalileoGen2" ) + load_drivers "galileo_gen2" ;; + *"Galileo" ) + load_drivers "galileo" ;; + esac +} + +case "$1" in + start) + do_board + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $?board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file +0
-0
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf line 6
Quoted 6 lines
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file +6
-0@@ -0,0 +1,6 @@ +intel_qrk_gip +cy8c9540a +i2c_dev +industrialio +ad7298 +stmmac
Why not just hard link all of these instead of loading them as modules? The
drivers that differ between the two modules are so small that it's not going to make a significant difference in kernel size.
Quoted 19 lines
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf new file +7
-0@@ -0,0 +1,7 @@ +intel_qrk_gip +gpio-pca953x +pca9685 +i2c_dev +industrialio +adc1x8s102 +stmmacconfigs/galileo_defconfig new file +0
-0
configs/galileo_defconfig line 5
Quoted 5 lines
configs/galileo_defconfig new file +5
-0@@ -0,0 +1,25 @@ +BR2_x86_x1000=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y +BR2_BINUTILS_VERSION_2_25_X=y
Perhaps add a comment here that this version is needed for the -Wl,... option.
Quoted 5 lines
configs/galileo_defconfig new file +5
-0+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh"
configs/galileo_defconfig line 20
Quoted 10 lines
configs/galileo_defconfig new file +10
-0+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mdr78/Linux-x1000.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d1a51d55dc67022be6c2d15163ce6dd28540042f" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.8.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_2r1=y
Can we use ext4 instead?
configs/galileo_defconfig line 21
Quoted 1 line
configs/galileo_defconfig new file +1
-0+BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2"
That's not needed.
Regards,
Arnout
Quoted 5 lines
configs/galileo_defconfig new file +4
-0+BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_I386_EFI=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Kinsella
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
Hi Arnout,
Humblest apologies for the delay in responding to your email.
Quoted 2 lines
There is now a v1.2 BSP at Intel that is based on 3.14. Unfortunately, it's in
a 7z-packed tarball so not exactly easy to integrate...
There is - I am very familiar with it. There is more yocto specific stuff to strip from this, so I will integrate after I get the base enabling upstream based on 3.8.7.
Quoted 1 line
Doesn't genimage allow to specify this in a single file?
I tried putting them together - can't remember the issues I had, will look at it again.
Quoted 1 line
ext2 is completely useless.
Agreed.
Quoted 1 line
ext3 could be replaced by ext4.
Agreed.
Quoted 3 lines
Quoted 1 line
+CONFIG_CRYPTO_CRC32C=y
That's probably a leftover of some option you disabled.
Ok - will investigate.
Quoted 3 lines
board/intel/galileo/linux-3.8.config line 310
Quoted 2 lines
board/intel/galileo/linux-3.8.config new file +2
-0+# CONFIG_VIRTUALIZATION is not set +CONFIG_CRC_T10DIF=yThis one too.
Ok - will investigate.
Quoted 1 line
No bashisms here, so
/bin/sh
Agreed
Quoted 2 lines
Perhaps add a -e to exit on failure.
Agreed
Quoted 4 lines
board/intel/galileo/post-image.sh line 26
Quoted 2 lines
board/intel/galileo/post-image.sh new file +2
-0+RET=${?} +exit ${RET}These two lines are redundant.
Agreed
Quoted 3 lines
Why not just hard link all of these instead of loading them as modules? The
drivers that differ between the two modules are so small that it's not going to make a significant difference in kernel size.
Ok I will figure out which ones are not model specific and hard link them. I seem to have some memory the model specific ones are mutually exclusive, they shouldn't be loaded at the same time, will need to verify.
Quoted 1 line
Perhaps add a comment here that this version is needed for the -Wl,... option.
Agreed,
Quoted 1 line
Can we use ext4 instead?
Agreed,
Quoted 4 lines
Quoted 2 lines
+BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2"
That's not needed.
Ok.
Ray K
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
On 10-11-15 18:10, Kinsella, Ray wrote:
[snip]
Quoted 8 lines
Quoted 3 lines
Why not just hard link all of these instead of loading them as modules? The
drivers that differ between the two modules are so small that it's not going to make a significant difference in kernel size.Ok I will figure out which ones are not model specific and hard link them. I seem to have some memory the model specific ones are mutually exclusive, they shouldn't be loaded at the same time, will need to verify.
If that's the case, please mention it in the commit log.
Regards,
Arnout
Quoted 15 lines
Quoted 2 lines
Perhaps add a comment here that this version is needed for the -Wl,... option.
Agreed,
Quoted 1 line
Can we use ext4 instead?
Agreed,
Quoted 4 lines
Quoted 2 lines
+BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2"
That's not needed.
Ok.
Ray K
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Kinsella
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
In reply to Arnout VandecappelleQuoted 7 lines
Quoted 7 lines
board/intel/galileo/genimage.cfg new file +1
-0@@ -0,0 +1,15 @@ +image sdcard.img {
Quoted 8 lines
board/intel/galileo/genimage.cfg line 7
Quoted 6 lines
board/intel/galileo/genimage.cfg new file +6
-0+ hdimage { + } + + partition boot { + partition-type = 0xC + image = "efi-part.vfat"Doesn't genimage allow to specify this in a single file?
Hi Arnout,
Needed to do a bit of investigation to refresh my memory here - on why I implemented this way. To understand what genimage does requires a bit of understanding of what tools it is using under the hood. Typically using hdimage and vfat are mutually exclusive.
* hdimage - typically I use hdimage where I have 1 or more partitions I
want to aggregate into a single image ... so I want pull the ext3/ext4 image created by buildroot as a partition.
* vfat - typically I use vfat where I want to use an overlay fs, i.e. a
sdcard that has been formatted as vfat with a EFI, Kernel, Ext3 overlay image and perhaps also an initramfs.
So you are usually doing one or the other. The constraint with Galileo Gen 2 is that it's UEFI BIOS can only read VFAT or EFI partitions when looking for bootloader EFI binaries like grub-efi or gummiboot. So this leaves me with a couple of options:-
* I can use hdimage - I can create the VFAT/EFI partition myself
calling mtools, and then use hdimage above to aggregate this partition into an image along with the rootfs image produced by buildroot
* I can use vfat with the overlay fs approach, however this typically
comes with a boottime performance penalty.
So my approach is as follows ...
* Use genimage vfat instead to create my first 'image' as vfat, under
the hood genimage uses dd + mkfs.vfat to create the image and then uses mtools (mmd + mcopy) to copy in the EFI binaries.
* I then use hdimage to pull in the vfat image above as an EFI parition
and the ext3 image created by buildroot as the rootfs partition.
For me this was simplest approach to layout the sdcard image as the Galileo requires, much simpler than rewriting lots of mtools logic that already exists in genimage. Make sense ?
Ray K
Kinsella
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
ignore this - in working out my reasoning below, I have worked out an alternative that allows the consolidation into a single file.
Ray K
Quoted 58 lines · Ray
Quoted 7 lines
Quoted 7 lines
board/intel/galileo/genimage.cfg new file +1
-0@@ -0,0 +1,15 @@ +image sdcard.img {Quoted 8 lines
board/intel/galileo/genimage.cfg line 7
Quoted 6 lines
board/intel/galileo/genimage.cfg new file +6
-0+ hdimage { + } + + partition boot { + partition-type = 0xC + image = "efi-part.vfat"Doesn't genimage allow to specify this in a single file?
Hi Arnout,
Needed to do a bit of investigation to refresh my memory here - on why I implemented this way. To understand what genimage does requires a bit of understanding of what tools it is using under the hood. Typically using hdimage and vfat are mutually exclusive.
* hdimage - typically I use hdimage where I have 1 or more partitions I
want to aggregate into a single image ... so I want pull the ext3/ext4 image created by buildroot as a partition.
* vfat - typically I use vfat where I want to use an overlay fs, i.e. a
sdcard that has been formatted as vfat with a EFI, Kernel, Ext3 overlay image and perhaps also an initramfs.So you are usually doing one or the other. The constraint with Galileo Gen 2 is that it's UEFI BIOS can only read VFAT or EFI partitions when looking for bootloader EFI binaries like grub-efi or gummiboot. So this leaves me with a couple of options:-
* I can use hdimage - I can create the VFAT/EFI partition myself
calling mtools, and then use hdimage above to aggregate this partition into an image along with the rootfs image produced by buildroot
* I can use vfat with the overlay fs approach, however this typically
comes with a boottime performance penalty.So my approach is as follows ...
* Use genimage vfat instead to create my first 'image' as vfat, under
the hood genimage uses dd + mkfs.vfat to create the image and then uses mtools (mmd + mcopy) to copy in the EFI binaries.
* I then use hdimage to pull in the vfat image above as an EFI parition
and the ext3 image created by buildroot as the rootfs partition.For me this was simplest approach to layout the sdcard image as the Galileo requires, much simpler than rewriting lots of mtools logic that already exists in genimage. Make sense ?
Ray K
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
In reply to KinsellaDear Kinsella, Ray,
Quoted 13 lines · Ray
Delta's from v6:-
* Changed spaces for tabs in efi-part, genimage, grub & S09modloadBoard support package includes:-
* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.
Quoted 1 line
Signed-off-by Ray Kinsella <[email protected]>
Arnout did a review of this patch, and made a number of comments. Could you address them and post an updated version?
In the mean time, I'll mark your patch as Changes Requested in patchwork.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Kinsella
PATCH v7 1/1 board: add support for Intel Galileo Gen 2
Hi Thomas,
Yes - I saw the comments they where much appreciated. Patch addressing comments expected early next week!
Thanks,
Ray K
Quoted 27 lines · Thomas Petazzoni
Dear Kinsella, Ray,
Quoted 13 lines · Ray
Delta's from v6:-
* Changed spaces for tabs in efi-part, genimage, grub & S09modloadBoard support package includes:-
* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.Quoted 1 line
Signed-off-by Ray Kinsella <[email protected]>Arnout did a review of this patch, and made a number of comments. Could you address them and post an updated version?
In the mean time, I'll mark your patch as Changes Requested in patchwork.
Thanks a lot!
Thomas