diff options
author | Mike Nicholson <mikempls@users.noreply.github.com> | 2019-06-13 11:40:14 -0500 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-20 13:26:58 +0300 |
commit | c7cd96da4b7e4ef5966a39a60c19502381a674aa (patch) | |
tree | 2cc0c184a3681ba67ad5745bb1b0ea914724910d | |
parent | e42a056889f5a629fe0e3229c933c4873b0f177c (diff) | |
download | meta-mlinux-c7cd96da4b7e4ef5966a39a60c19502381a674aa.tar.gz meta-mlinux-c7cd96da4b7e4ef5966a39a60c19502381a674aa.tar.bz2 meta-mlinux-c7cd96da4b7e4ef5966a39a60c19502381a674aa.zip |
Multi-arch initial revision
-rw-r--r-- | classes/mlinux-image.bbclass | 90 | ||||
-rw-r--r-- | recipes-core/images/mlinux-minimal-image.bb | 15 | ||||
-rw-r--r-- | recipes-core/images/mlinux-mtcap-image.bb | 3 | ||||
-rw-r--r-- | recipes-core/images/mlinux-mtr-image.bb | 1 | ||||
-rw-r--r-- | recipes-core/images/mlinux-mtrv1-image.bb | 1 |
5 files changed, 60 insertions, 50 deletions
diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass index 0ad1389..42d7853 100644 --- a/classes/mlinux-image.bbclass +++ b/classes/mlinux-image.bbclass @@ -37,58 +37,70 @@ 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 - ;; - *) - 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 + ;; + *) + 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/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb index 8090f57..78ffcf3 100644 --- a/recipes-core/images/mlinux-minimal-image.bb +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -16,10 +16,10 @@ CORE_FEATURES = "packagegroup-core-boot packagegroup-distro-base \ openssh-sftp-server \ util-linux-mount util-linux-umount \ start-stop-daemon \ - sudo \ + sudo \ ${CORE_IMAGE_EXTRA_INSTALL} \ mlinux-feed-configs \ - useradd \ + useradd \ get-eeprom-device-config \ " @@ -44,10 +44,11 @@ MULTITECH_FEATURES = "kernel-module-mts-io \ config \ mts-id-eeprom \ set-rs485 \ - radio-reset" + radio-reset \ + upgrade-reboot" - -MULTITECH_MTAC = "kernel-module-mtac \ +MULTITECH_MTAC = "" +MULTITECH_MTAC_mtcdt += "kernel-module-mtac \ kernel-module-mtac-eth \ kernel-module-mtac-gpiob \ kernel-module-mtac-lora \ @@ -55,7 +56,9 @@ MULTITECH_MTAC = "kernel-module-mtac \ kernel-module-mtac-pulse \ kernel-module-mtac-xdot" -UPGRADE_FEATURES = "upgrade-reboot mtd-utils-static" +# BSP SPECIFIC UPGRADE FEATURES +UPGRADE_FEATURES = "" +UPGRADE_FEATURES_mtbsp-at91 = "mtd-utils-static" IMAGE_INSTALL = "${CORE_FEATURES} \ ${NETWORKING_FEATURES} \ diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb index ec161bd..d3b6f65 100644 --- a/recipes-core/images/mlinux-mtcap-image.bb +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -25,9 +25,6 @@ NETWORKING_FEATURES += "bridge-utils \ busybox-ifplugd \ " -# No accessory cards for MTAC -MULTITECH_MTAC = "" - TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ tzdata-misc \ diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb index bf56719..3a99d8e 100644 --- a/recipes-core/images/mlinux-mtr-image.bb +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -3,7 +3,6 @@ DESCRIPTION = "mLinux base mtr image" LICENSE = "MIT" require mlinux-minimal-image.bb -MULTITECH_MTAC = "" FILESYSTEM_FEATURES = "dosfstools \ cifs-utils \ diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 3c10593..2e5ad58 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -3,7 +3,6 @@ DESCRIPTION = "mLinux base mtr image" LICENSE = "MIT" require mlinux-minimal-image.bb -MULTITECH_MTAC = "" FILESYSTEM_FEATURES = "dosfstools \ cifs-utils \ |