u-boot ready initrds
Initrds need to be prepared with mkimage to be usable from u-boot. The following patch introduces an additional IMAGE_FSTYPE .cpio.gz.u-boot for this (at the moment just for hipox machine).
Is this the way it should be done?
Should this better become part of conf/bitbake.conf?
Steffen
PATCH 1/1 hipox: introducing IMAGE_FSTYPES cpio.gz.u-boot for hipox machine
* initrd images need to be prepared with mkimage to be usable from u-boot
--- conf/machine/hipox.conf | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
conf/machine/hipox.conf +3 -0
@@ -17,4 +17,7 @@ UBOOT_LOADADDRESS = "0x48008000" UBOOT_ENTRYPOINT = "0x48008000" UBOOT_ARCH = "arm" +IMAGE_CMD_cpio.gz.u-boot = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A arm -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot" +IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native" + require conf/machine/include/tune-arm926ejs.inc
Signature · 1 line
1.6.4.2
Quoted 7 lines · Steffen Sledz
Initrds need to be prepared with mkimage to be usable from u-boot. The following patch introduces an additional
IMAGE_FSTYPE.cpio.gz.u-boot for this (at the moment just for hipox machine).Is this the way it should be done?
Should this better become part of
conf/bitbake.conf?
Ping
Quoted 10 lines · Steffen Sledz
Quoted 7 lines · Steffen Sledz
Initrds need to be prepared with mkimage to be usable from u-boot. The following patch introduces an additional
IMAGE_FSTYPE.cpio.gz.u-boot for this (at the moment just for hipox machine).Is this the way it should be done?
Should this better become part of
conf/bitbake.conf?Ping
I don't know why patchwork didn't see this. That said, mkimage -A arm is bad. UBOOT_ARCH is right, and comes from kernel-arch.bbclass. So, I think a full patch would need to add in changes to image.bbclass to inherit kernel-arch so that UBOOT_ARCH will be evaluated.
And yes, this I think should be in bitbake.conf with the rest of the image magics
Signature · 2 lines
Tom Rini <[email protected]> Mentor Graphics Corporation
Quoted 9 lines · Tom Rini
Quoted 7 lines
Initrds need to be prepared with mkimage to be usable from u-boot. The following patch introduces an additional
IMAGE_FSTYPE.cpio.gz.u-boot for this (at the moment just for hipox machine).Is this the way it should be done?
Should this better become part of
conf/bitbake.conf?I don't know why patchwork didn't see this.
That's really crazy. None of my patches occurs in the patch queue. I started an extra thread for this [1]. It would be really great if somebody can fix this problem (or tell me what i'm doing wrong).
Quoted 1 line
That said, mkimage -A arm is bad.
UBOOT_ARCHis right,
Good point. Total agreement.
Quoted 6 lines
and comes from kernel-arch.bbclass. So, I
think a full patch would need to add in changes to image.bbclass to inherit kernel-arch so thatUBOOT_ARCHwill be evaluated.And yes, this I think should be in bitbake.conf with the rest of the image magics
I've too much respect and to little knowledge to make changes inside these core components.
Can someone take me by the hand and guide me. ;-)
Steffen
PS: And another little question: is '.u-boot' a good extension for this? Or is the shorter '.u' better?
[1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/30693
Quoted 1 line · Steffen Sledz
Tom Rini wrote:
[snip]
Quoted 8 lines
Quoted 1 line
That said, mkimage -A arm is bad.
UBOOT_ARCHis right,Good point. Total agreement.
Quoted 4 lines
and comes from kernel-arch.bbclass. So, I
think a full patch would need to add in changes to image.bbclass to inherit kernel-arch so thatUBOOT_ARCHwill be evaluated.
Quoted 7 lines
Quoted 2 lines
And yes, this I think should be in bitbake.conf with the rest of the image magics
I've too much respect and to little knowledge to make changes inside these core components.
Can someone take me by the hand and guide me. ;-)
It's easy. Just add 'inherit kernel-arch' to image.bbclass, up near the top, test your changes a bit and post :)
Quoted 2 lines
PS: And another little question: is '.u-boot' a good extension for this? Or is the shorter '.u' better?
Since the recipe is u-boot (and u-boot-blah-native), .u-boot is fine over .uboot. .u is I think too short / nondescript.
Signature · 2 lines
Tom Rini <[email protected]> Mentor Graphics Corporation
PATCH 1/1 bitbake.conf: introducing new image fstype .cpio.gz.u-boot
* initrd images need to be prepared with mkimage to be usable from u-boot
--- classes/image.bbclass | 1 + conf/bitbake.conf | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
classes/image.bbclass +1 -0
@@ -1,4 +1,5 @@ inherit rootfs_${IMAGE_PKGTYPE} +inherit kernel-arch LICENSE = "MIT" PACKAGES = ""
conf/bitbake.conf +2 -0
@@ -374,6 +374,7 @@ IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_ IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}" IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}" +IMAGE_CMD_cpio.gz.u-boot = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot" IMAGE_CMD_cpio.lzma = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | lzma -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}" IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
@@ -397,6 +398,7 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native" IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" +IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native" IMAGE_DEPENDS_cpio.lzma = "lzma-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
Signature · 1 line
1.6.4.2
Re: [PATCH] bitbake.conf: introducing new image fstype .cpio.gz.u-boot
OK, here's my try.
Any chance to get the necessary ACKs? :)
Re: [PATCH] bitbake.conf: introducing new image fstype .cpio.gz.u-boot
In reply to Steffen SledzQuoted 4 lines · Steffen Sledz
* initrd images need to be prepared with mkimage to be usable from u-boot
Signed-off-by Steffen Sledz <[email protected]>
Works for me on a PowerPC board:
Quoted 36 lines
--- classes/image.bbclass | 1 + conf/bitbake.conf | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)classes/image.bbclass +1
-0@@ -1,4 +1,5 @@ inherit rootfs_${IMAGE_PKGTYPE} +inherit kernel-arch LICENSE = "MIT" PACKAGES = ""conf/bitbake.conf +2
-0@@ -374,6 +374,7 @@ IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_ IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}" IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}" +IMAGE_CMD_cpio.gz.u-boot = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot" IMAGE_CMD_cpio.lzma = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | lzma -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}" IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"@@ -397,6 +398,7 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native" IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" +IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native" IMAGE_DEPENDS_cpio.lzma = "lzma-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
Signature · 4 lines
Martyn Welch (Principal Software Engineer) | Registered in England and GE Intelligent Platforms | Wales (3828642) at 100 T +44(0)127322748 | Barbirolli Square, Manchester, E [email protected] | M2 3AB VAT:GB 927559189
Re: [PATCH] bitbake.conf: introducing new image fstype .cpio.gz.u-boot
In reply to Steffen SledzQuoted 3 lines · Steffen Sledz
* initrd images need to be prepared with mkimage to be usable from u-boot
Signed-off-by Steffen Sledz <[email protected]>
Quoted 35 lines
--- classes/image.bbclass | 1 + conf/bitbake.conf | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)classes/image.bbclass +1
-0@@ -1,4 +1,5 @@ inherit rootfs_${IMAGE_PKGTYPE} +inherit kernel-arch LICENSE = "MIT" PACKAGES = ""conf/bitbake.conf +2
-0@@ -374,6 +374,7 @@ IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_ IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}" IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}" +IMAGE_CMD_cpio.gz.u-boot = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot" IMAGE_CMD_cpio.lzma = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | lzma -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}" IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"@@ -397,6 +398,7 @@ IMAGE_DEPENDS_ext2 = "genext2fs-native" IMAGE_DEPENDS_ext2.gz = "genext2fs-native" IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" +IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native" IMAGE_DEPENDS_cpio.lzma = "lzma-native" IMAGE_DEPENDS_squashfs = "squashfs-tools-native" IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
Signature · 2 lines
Tom Rini <[email protected]> Mentor Graphics Corporation
Re: [PATCH] bitbake.conf: introducing new image fstype .cpio.gz.u-boot
Quoted 6 lines · Tom Rini
Quoted 3 lines · Steffen Sledz
* initrd images need to be prepared with mkimage to be usable from u-boot
Signed-off-by Steffen Sledz <[email protected]>Acked-by Tom Rini <[email protected]>
OK, thx.
As soon as git.openembedded.org is online again, i'll push the patch.
Steffen
Quoted 15 lines · Tom Rini
Quoted 6 lines · Steffen Sledz
Quoted 4 lines · Steffen Sledz
Initrds need to be prepared with mkimage to be usable from u-boot. The following patch introduces an additional
IMAGE_FSTYPE.cpio.gz.u-boot for this (at the moment just for hipox machine).Quoted 6 lines
Quoted 4 lines
Is this the way it should be done?
Should this better become part of
conf/bitbake.conf?Ping
Quoted 8 lines
I don't know why patchwork didn't see this. That said, mkimage -A arm is bad.
UBOOT_ARCHis right, and comes from kernel-arch.bbclass. So, I think a full patch would need to add in changes to image.bbclass to inherit kernel-arch so thatUBOOT_ARCHwill be evaluated.And yes, this I think should be in bitbake.conf with the rest of the image magics
We'd like to see this as well. We have a class which we inherit to do the same thing that I have been meaning to try and push, but this is a much better way of doing it.
Martyn
Signature · 4 lines
Martyn Welch (Principal Software Engineer) | Registered in England and GE Intelligent Platforms | Wales (3828642) at 100 T +44(0)127322748 | Barbirolli Square, Manchester, E [email protected] | M2 3AB VAT:GB 927559189