diff options
author | Jesse Gilles <jgilles@multitech.com> | 2015-05-06 11:34:56 -0500 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2015-05-06 11:34:56 -0500 |
commit | 36a5e3cda2f4b1337e0870c3d23b13d83d05bc58 (patch) | |
tree | a3c6482d75ba2ed47f564e19ca69b6a59c993f0b | |
parent | 40f75adea4f466eae9cac82b71009c75a8710ae1 (diff) | |
download | meta-mlinux-36a5e3cda2f4b1337e0870c3d23b13d83d05bc58.tar.gz meta-mlinux-36a5e3cda2f4b1337e0870c3d23b13d83d05bc58.tar.bz2 meta-mlinux-36a5e3cda2f4b1337e0870c3d23b13d83d05bc58.zip |
mlinux-image.bbclass: generate upgrade.bin files
-rw-r--r-- | classes/mlinux-image.bbclass | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass index 4781e43..3f49a94 100644 --- a/classes/mlinux-image.bbclass +++ b/classes/mlinux-image.bbclass @@ -12,10 +12,34 @@ mlinux_set_root_password () { } ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_root_password;" +# generate upgrade.bin files -- provides single file for upgrades +do_firmware () { + cd ${DEPLOY_DIR_IMAGE} + rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model + + cp at91bootstrap_pmecc_padded.bin bstrap.bin + cp u-boot-${MACHINE}.bin uboot.bin + cp uImage-${MACHINE}.bin uImage.bin + cp ${IMAGE_BASENAME}-${MACHINE}.jffs2 rootfs.jffs2 + + cat bstrap.bin | md5sum > bstrap.bin.md5 + cat uboot.bin | md5sum > uboot.bin.md5 + cat uImage.bin | md5sum > uImage.bin.md5 + cat rootfs.jffs2 | md5sum > rootfs.jffs2.md5 + + echo "${MACHINE}" > model + + tar cvf ${IMAGE_BASENAME}-${MACHINE}-upgrade.bin uImage.bin* rootfs.jffs2* model + tar cvf ${IMAGE_BASENAME}-${MACHINE}-upgrade-withboot.bin bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model + rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model +} + +addtask firmware after do_rootfs before do_build + # make links to images in TFTPBOOT_DIR for ease of development do_tftpboot_links() { TFTPBOOT_CLEAN="oe_bootstrap.bin oe_bootstrap_pmecc_padded.bin \ - oe_u-boot.bin oe_uImage.bin oe_rootfs.jffs2 oe_images" + oe_u-boot.bin oe_uImage.bin oe_rootfs.jffs2 oe_images oe_upgrade.bin oe_upgrade-withboot.bin" if [ -n "${TFTPBOOT_DIR}" ]; then install -d ${DEPLOY_DIR_IMAGE} @@ -31,7 +55,9 @@ do_tftpboot_links() { ln -nfs ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_u-boot.bin ln -nfs ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_uImage.bin ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.jffs2 ${TFTPBOOT_DIR}/oe_rootfs.jffs2 + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}-upgrade.bin ${TFTPBOOT_DIR}/oe_upgrade.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}-upgrade-withboot.bin ${TFTPBOOT_DIR}/oe_upgrade-withboot.bin ln -nfs ${DEPLOY_DIR_IMAGE} ${TFTPBOOT_DIR}/oe_images fi } -addtask tftpboot_links after do_rootfs before do_build +addtask tftpboot_links after do_firmware before do_build |