olimex_imx233_olinuxino_defconfig: genimage support
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
* add a post-image.sh script
* update defconfig for genimage
* update readme.txt
--- .../imx233_olinuxino/genimage-imx233_olinuxino.cfg | 28 ++++++++++++++++++++++ board/olimex/imx233_olinuxino/post-image.sh | 20 ++++++++++++++++ board/olimex/imx233_olinuxino/readme.txt | 22 +++++++++++++++++ configs/olimex_imx233_olinuxino_defconfig | 6 +++++ 4 files changed, 76 insertions(+) create mode 100644 board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg create mode 100755 board/olimex/imx233_olinuxino/post-image.sh
board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg new file +28 -0
@@ -0,0 +1,28 @@ +image kernel.vfat { + vfat { + files = { + "uImage" + } + } + size = 5M +} + +image sdcard.img { + hdimage { + } + partition boot { + partition-type = 0x53 + image = "u-boot.sd" + size = 16M + } + + partition kernel { + partition-type = 0xC + image = "kernel.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +}
board/olimex/imx233_olinuxino/post-image.sh new file +20 -0
@@ -0,0 +1,20 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +# Create symlink to "rename" kernel image +ln -sf uImage.imx23-olinuxino ${BINARIES_DIR}/uImage + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $?
board/olimex/imx233_olinuxino/readme.txt +22 -0
@@ -5,6 +5,28 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. +=== Output files after building ============================================== + +output/images ++-- kernel.vfat (VFAT kernel partition image generated by genimage) ++-- rootfs.ext2 (Root file system) ++-- sdcard.img (Complete SD card image generated by genimage) ++-- u-boot.sd (U-Boot image) ++-- uImage -> uImage.imx23-olinuxino (To copy kernel as "uImage" to kernel.vfat) ++-- uImage.imx23-olinuxino (Kernel uImage) + +=== Use of generated SD card image =========================================== + +Just write sdcard.img directly to the SD card + +***** WARNING: Double check that /dev/sdc is your MicroSD card ***** +***** It might be /dev/sdb or some other device name ***** +***** Failure to do so may result in you wiping your hard disk ***** + + # dd if=output/images/sdcard.img of=/dev/sdc bs=512 + +=== Manual creation of SD card image ========================================= + You'll need a spare MicroSD card with Freescale's special partition layout. This is basically three partitions:
configs/olimex_imx233_olinuxino_defconfig +6 -0
@@ -39,3 +39,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" BR2_TARGET_UBOOT_FORMAT_SD=y + +# To generate SD Image +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/imx233_olinuxino/post-image.sh" +
Signature · 1 line
2.1.4
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
* add a
post-image.shscript
* update defconfig for genimage
* update readme.txtSigned-off-by Phil Eichinger <[email protected]>
Thanks!
board/olimex/imx233_olinuxino/post-image.sh line 20
Quoted 8 lines
board/olimex/imx233_olinuxino/post-image.sh new file +8
-0+genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $?
I know other post-image scripts do this as well, but there's really no need for this 'exit $?'.
Quoted 4 lines
+=== Manual creation of SD card image ========================================= +
You'll need a spare MicroSD card with Freescale's special partition layout. This is basically three partitions:
I'm not sure there's any reason to still document the manual approach, but ok - I've left it for now.
configs/olimex_imx233_olinuxino_defconfig BR2_TARGET_UBOOT_CUSTOM_VERSION=y · line 45
Quoted 12 lines
configs/olimex_imx233_olinuxino_defconfig +4
-0@@ -39,3 +39,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" BR2_TARGET_UBOOT_FORMAT_SD=y + +# To generate SD Image +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
The vfat handling also uses mkdosfs, so we need to add BR2_PACKAGE_HOST_DOSFSTOOLS=y as well.
I noticed that we are missing it from some of the other defconfigs as well, so I'll fix that.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
Quoted 1 line · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
[snip]
Quoted 9 lines
configs/olimex_imx233_olinuxino_defconfig BR2_TARGET_UBOOT_CUSTOM_VERSION=y · line 45
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +3
-0+# To generate SD Image +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=yThe vfat handling also uses mkdosfs, so we need to add BR2_PACKAGE_HOST_DOSFSTOOLS=y as well.
I noticed that we are missing it from some of the other defconfigs as well, so I'll fix that.
So, why doesn't Travis detect that?
Regards,
Arnout
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
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 1 line · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
[snip]
Quoted 7 lines
configs/olimex_imx233_olinuxino_defconfig BR2_TARGET_UBOOT_CUSTOM_VERSION=y · line 45
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +3
-0+# To generate SD Image +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=yThe vfat handling also uses mkdosfs, so we need to add BR2_PACKAGE_HOST_DOSFSTOOLS=y as well.
Quoted 4 lines
Quoted 2 lines
I noticed that we are missing it from some of the other defconfigs as well, so I'll fix that.
So, why doesn't Travis detect that?
Presumably because the Ubuntu container has mkdosfs installed?
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
Quoted 12 lines · Peter Korsgaard
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 1 line · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
[snip]
Quoted 7 lines
configs/olimex_imx233_olinuxino_defconfig BR2_TARGET_UBOOT_CUSTOM_VERSION=y · line 45
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +3
-0+# To generate SD Image +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=yThe vfat handling also uses mkdosfs, so we need to add BR2_PACKAGE_HOST_DOSFSTOOLS=y as well.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I noticed that we are missing it from some of the other defconfigs as well, so I'll fix that.
So, why doesn't Travis detect that?
Presumably because the Ubuntu container has mkdosfs installed?
I looked into it, on my system mkdosfs was installed, that's why I was able to generate the image.
Is a fallback to system mkdosfs considered a feature or should genimage only use Buildroot's mkdosfs?
Cheers, Phil
PATCH 1/1 olimex_imx233_olinuxino_defconfig: genimage support
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
Hi,
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
So, why doesn't Travis detect that?
Presumably because the Ubuntu container has mkdosfs installed?
I looked into it, on my system mkdosfs was installed, that's why I was able to generate the image.
Is a fallback to system mkdosfs considered a feature or should genimage only use Buildroot's mkdosfs?
We want the builds to be reproducible on other machines, so we should be able to build with only the programs available we check for in dependencies.sh
Signature · 2 lines
Venlig hilsen, Peter Korsgaard