From b00be59bbc49535097c450b6b8c5fc10c1efd6dd Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 11 Nov 2020 18:48:27 -0600 Subject: Merge multiarch project to: added missing index file 2020 June 11 --- classes/mlinux-image.bbclass | 96 +++++++++++++++++++++---------------- classes/mlinux_metadata_scm.bbclass | 2 +- 2 files changed, 55 insertions(+), 43 deletions(-) (limited to 'classes') diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass index e3190a1..dab5e5b 100644 --- a/classes/mlinux-image.bbclass +++ b/classes/mlinux-image.bbclass @@ -37,61 +37,73 @@ mlinux_set_product_version () { ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_product_version;" # generate upgrade.bin files -- provides single file for upgrades -do_firmware () { +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 + case "${MTBSP}" in + mtbsp-at91) + rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model - 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 + 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 - case "${MACHINE}" in - mtcdt) - echo "mtcdt|mtcdtip|mtcdtiphp" >model - ;; - mtrv1) - echo "mtrv1|mths" >model - ;; - *) - echo "${MACHINE}" > model - ;; - esac + 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 - 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 -} + case "${MACHINE}" in + mtcdt) + echo "mtcdt|mtcdtip|mtcdtiphp" >model + ;; + mtrv1) + echo "mtrv1|mths" >model + ;; + *) + echo "${MACHINE}" > model + ;; + esac + 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 + ;; + *) + ;; + esac +} addtask firmware after do_image_complete 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_upgrade.bin oe_upgrade-withboot.bin" - if [ -n "${TFTPBOOT_DIR}" ]; then - install -d ${DEPLOY_DIR_IMAGE} + case "${MTBSP}" in + mtbsp-at91) + TFTPBOOT_CLEAN="oe_bootstrap.bin oe_bootstrap_pmecc_padded.bin \ + oe_u-boot.bin oe_uImage.bin oe_rootfs.jffs2 oe_images oe_upgrade.bin oe_upgrade-withboot.bin" - for f in ${TFTPBOOT_CLEAN}; do - rm -f ${TFTPBOOT_DIR}/$f - done + install -d ${DEPLOY_DIR_IMAGE} - ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap.bin ${TFTPBOOT_DIR}/oe_bootstrap.bin - if [ -f ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ]; then - ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ${TFTPBOOT_DIR}/oe_bootstrap_pmecc_padded.bin - fi - 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 + for f in ${TFTPBOOT_CLEAN}; do + rm -f ${TFTPBOOT_DIR}/$f + done + + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap.bin ${TFTPBOOT_DIR}/oe_bootstrap.bin + if [ -f ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ]; then + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ${TFTPBOOT_DIR}/oe_bootstrap_pmecc_padded.bin + fi + 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 + ;; + *) + ;; + esac fi } addtask tftpboot_links after do_firmware before do_build diff --git a/classes/mlinux_metadata_scm.bbclass b/classes/mlinux_metadata_scm.bbclass index 64da21f..b220344 100644 --- a/classes/mlinux_metadata_scm.bbclass +++ b/classes/mlinux_metadata_scm.bbclass @@ -3,7 +3,7 @@ MLINUX_METADATA_BRANCH = "${@base_get_metadata_git_branch("${OEROOT}",None).stri MLINUX_LAYERS = "${@mlinux_layers(bb,d)}" def mlinux_layers(bb, d): - layers = (bb.data.getVar("BBLAYERS", d, 1) or "").split() + layers = (d.getVar("BBLAYERS", d, 1) or "").split() layer_revs = "" for layer in layers: -- cgit v1.2.3