* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
@ 2016-03-10 21:34 Phil Eichinger
2016-03-11 12:14 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Phil Eichinger @ 2016-03-10 21:34 UTC (permalink / raw)
To: buildroot
* add a post-image.sh script
* update defconfig for genimage
* update readme.txt
Signed-off-by: Phil Eichinger <phil@zankapfel.net>
---
.../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
diff --git a/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg b/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg
new file mode 100644
index 0000000..78979dc
--- /dev/null
+++ b/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg
@@ -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"
+ }
+}
diff --git a/board/olimex/imx233_olinuxino/post-image.sh b/board/olimex/imx233_olinuxino/post-image.sh
new file mode 100755
index 0000000..703cbe7
--- /dev/null
+++ b/board/olimex/imx233_olinuxino/post-image.sh
@@ -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 $?
diff --git a/board/olimex/imx233_olinuxino/readme.txt b/board/olimex/imx233_olinuxino/readme.txt
index a545f7b..4b24ac2 100644
--- a/board/olimex/imx233_olinuxino/readme.txt
+++ b/board/olimex/imx233_olinuxino/readme.txt
@@ -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:
diff --git a/configs/olimex_imx233_olinuxino_defconfig b/configs/olimex_imx233_olinuxino_defconfig
index 9951284..87684fc 100644
--- a/configs/olimex_imx233_olinuxino_defconfig
+++ b/configs/olimex_imx233_olinuxino_defconfig
@@ -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"
+
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
2016-03-10 21:34 [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support Phil Eichinger
@ 2016-03-11 12:14 ` Peter Korsgaard
2016-03-12 9:31 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-03-11 12:14 UTC (permalink / raw)
To: buildroot
>>>>> "Phil" == Phil Eichinger <phil.eichinger@gmail.com> writes:
> * add a post-image.sh script
> * update defconfig for genimage
> * update readme.txt
> Signed-off-by: Phil Eichinger <phil@zankapfel.net>
Thanks!
> +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 $?'.
> +=== 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.
> diff --git a/configs/olimex_imx233_olinuxino_defconfig b/configs/olimex_imx233_olinuxino_defconfig
> index 9951284..87684fc 100644
> --- a/configs/olimex_imx233_olinuxino_defconfig
> +++ b/configs/olimex_imx233_olinuxino_defconfig
> @@ -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.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
2016-03-11 12:14 ` Peter Korsgaard
@ 2016-03-12 9:31 ` Arnout Vandecappelle
2016-03-12 9:52 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2016-03-12 9:31 UTC (permalink / raw)
To: buildroot
On 03/11/16 13:14, Peter Korsgaard wrote:
>>>>>> "Phil" == Phil Eichinger <phil.eichinger@gmail.com> writes:
[snip]
> > +# 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.
So, why doesn't Travis detect that?
Regards,
Arnout
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
2016-03-12 9:31 ` Arnout Vandecappelle
@ 2016-03-12 9:52 ` Peter Korsgaard
2016-03-12 13:52 ` Phil Eichinger
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-03-12 9:52 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
> On 03/11/16 13:14, Peter Korsgaard wrote:
>>>>>>> "Phil" == Phil Eichinger <phil.eichinger@gmail.com> writes:
> [snip]
>> > +# 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.
> So, why doesn't Travis detect that?
Presumably because the Ubuntu container has mkdosfs installed?
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
2016-03-12 9:52 ` Peter Korsgaard
@ 2016-03-12 13:52 ` Phil Eichinger
2016-03-12 14:55 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Phil Eichinger @ 2016-03-12 13:52 UTC (permalink / raw)
To: buildroot
On 12 March 2016 at 10:52, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>
> > On 03/11/16 13:14, Peter Korsgaard wrote:
> >>>>>>> "Phil" == Phil Eichinger <phil.eichinger@gmail.com> writes:
> > [snip]
> >> > +# 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.
>
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support
2016-03-12 13:52 ` Phil Eichinger
@ 2016-03-12 14:55 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2016-03-12 14:55 UTC (permalink / raw)
To: buildroot
>>>>> "Phil" == Phil Eichinger <phil.eichinger@gmail.com> writes:
Hi,
>> > 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
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-03-12 14:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 21:34 [Buildroot] [PATCH 1/1] olimex_imx233_olinuxino_defconfig: genimage support Phil Eichinger
2016-03-11 12:14 ` Peter Korsgaard
2016-03-12 9:31 ` Arnout Vandecappelle
2016-03-12 9:52 ` Peter Korsgaard
2016-03-12 13:52 ` Phil Eichinger
2016-03-12 14:55 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox