Oshri Alkoby (NTIL) | 13cc41f | 2019-05-28 00:47:47 +0300 | [diff] [blame] | 1 | EXTRA_DEPENDS = "" |
| 2 | |
| 3 | EXTRA_DEPENDS_npcm7xx = " \ |
| 4 | npcm7xx-bootblock:do_deploy \ |
| 5 | npcm7xx-bingo-native:do_populate_sysroot \ |
| 6 | " |
| 7 | |
| 8 | UBOOT_BINARY := "u-boot.${UBOOT_SUFFIX}" |
| 9 | |
| 10 | BOOTBLOCK = "Poleg_bootblock.bin" |
| 11 | |
| 12 | |
| 13 | FULL_SUFFIX = "full" |
| 14 | MERGED_SUFFIX = "merged" |
| 15 | |
| 16 | UBOOT_SUFFIX_append_npcm7xx = ".${MERGED_SUFFIX}" |
| 17 | |
| 18 | |
| 19 | do_prepare_bootloaders() { |
| 20 | |
| 21 | } |
| 22 | |
| 23 | |
| 24 | # Prepare the Bootblock and U-Boot images using npcm7xx-bingo |
| 25 | |
| 26 | do_prepare_bootloaders_npcm7xx() { |
| 27 | |
| 28 | currdir=`pwd` |
| 29 | cd ${DEPLOY_DIR_IMAGE} |
| 30 | |
| 31 | bingo ${STAGING_DIR_NATIVE}/${bindir}/BootBlockAndHeader_EB.xml \ |
| 32 | -o ${DEPLOY_DIR_IMAGE}/${BOOTBLOCK}.${FULL_SUFFIX} |
| 33 | |
| 34 | bingo ${STAGING_DIR_NATIVE}/${bindir}/UbootHeader_EB.xml \ |
| 35 | -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${FULL_SUFFIX} |
| 36 | |
| 37 | bingo ${STAGING_DIR_NATIVE}/${bindir}/mergedBootBlockAndUboot.xml \ |
| 38 | -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${MERGED_SUFFIX} |
| 39 | |
| 40 | cd $currdir |
| 41 | } |
| 42 | |
| 43 | |
| 44 | do_prepare_bootloaders[depends] += "${EXTRA_DEPENDS}" |
| 45 | |
| 46 | |
| 47 | addtask do_prepare_bootloaders before do_generate_static after do_generate_rwfs_static |
| 48 | |
| 49 | |
| 50 | # Include the full bootblock and u-boot in the final static image |
| 51 | |
| 52 | python do_generate_static_append_npcm7xx() { |
| 53 | |
| 54 | _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), |
| 55 | 'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)), |
| 56 | int(d.getVar('FLASH_UBOOT_OFFSET', True)), |
| 57 | int(d.getVar('FLASH_KERNEL_OFFSET', True))) |
| 58 | } |
| 59 | |
| 60 | do_make_ubi_append_npcm7xx() { |
| 61 | |
| 62 | # Concatenate the uboot and ubi partitions |
| 63 | dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \ |
| 64 | if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \ |
| 65 | of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd |
| 66 | } |
| 67 | |
| 68 | do_make_ubi[depends] += "${PN}:do_prepare_bootloaders" |
| 69 | do_generate_ubi_tar[depends] += "${PN}:do_prepare_bootloaders" |
| 70 | do_generate_static_tar[depends] += "${PN}:do_prepare_bootloaders" |