diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2019-10-22 23:54:16 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2019-10-22 23:54:16 +0300 |
commit | 9722c6ee87766a45a337c094d1293de81cdcb106 (patch) | |
tree | 08b57716ae3c02fef2bc870b634019e692fd70e6 /meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass | |
parent | 35e295e2a161fcf146ea031de53431b2888521fa (diff) | |
parent | 5b6cc97bf138293b6af12d5d3003bb66c700c48a (diff) | |
download | openbmc-9722c6ee87766a45a337c094d1293de81cdcb106.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into HEAD
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass b/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass new file mode 100644 index 000000000..16112e638 --- /dev/null +++ b/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass @@ -0,0 +1,46 @@ +UBOOT_BINARY := "u-boot.${UBOOT_SUFFIX}" +BOOTBLOCK = "Poleg_bootblock.bin" +FULL_SUFFIX = "full" +MERGED_SUFFIX = "merged" +UBOOT_SUFFIX_append = ".${MERGED_SUFFIX}" + +# Prepare the Bootblock and U-Boot images using npcm7xx-bingo +do_prepare_bootloaders() { + local olddir="$(pwd)" + cd ${DEPLOY_DIR_IMAGE} + bingo ${STAGING_DIR_NATIVE}/${bindir}/BootBlockAndHeader_EB.xml \ + -o ${DEPLOY_DIR_IMAGE}/${BOOTBLOCK}.${FULL_SUFFIX} + + bingo ${STAGING_DIR_NATIVE}/${bindir}/UbootHeader_EB.xml \ + -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${FULL_SUFFIX} + + bingo ${STAGING_DIR_NATIVE}/${bindir}/mergedBootBlockAndUboot.xml \ + -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${MERGED_SUFFIX} + cd "$olddir" +} + +do_prepare_bootloaders[depends] += " \ + npcm7xx-bootblock:do_deploy \ + npcm7xx-bingo-native:do_populate_sysroot \ + " + +addtask do_prepare_bootloaders before do_generate_static after do_generate_rwfs_static + +# Include the full bootblock and u-boot in the final static image +python do_generate_static_append() { + _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), + 'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)), + int(d.getVar('FLASH_UBOOT_OFFSET', True)), + int(d.getVar('FLASH_KERNEL_OFFSET', True))) +} + +do_make_ubi_append() { + # Concatenate the uboot and ubi partitions + dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \ + if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \ + of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd +} + +do_make_ubi[depends] += "${PN}:do_prepare_bootloaders" +do_generate_ubi_tar[depends] += "${PN}:do_prepare_bootloaders" +do_generate_static_tar[depends] += "${PN}:do_prepare_bootloaders" |