blob: e60401e89035e65f48f55cc30c050866840fd9b0 [file] [log] [blame]
Oshri Alkoby (NTIL)13cc41f2019-05-28 00:47:47 +03001EXTRA_DEPENDS = ""
2
3EXTRA_DEPENDS_npcm7xx = " \
4 npcm7xx-bootblock:do_deploy \
5 npcm7xx-bingo-native:do_populate_sysroot \
6 "
7
8UBOOT_BINARY := "u-boot.${UBOOT_SUFFIX}"
9
10BOOTBLOCK = "Poleg_bootblock.bin"
11
12
13FULL_SUFFIX = "full"
14MERGED_SUFFIX = "merged"
15
16UBOOT_SUFFIX_append_npcm7xx = ".${MERGED_SUFFIX}"
17
18
19do_prepare_bootloaders() {
20
21}
22
23
24# Prepare the Bootblock and U-Boot images using npcm7xx-bingo
25
26do_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
44do_prepare_bootloaders[depends] += "${EXTRA_DEPENDS}"
45
46
47addtask 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
52python 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
60do_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
68do_make_ubi[depends] += "${PN}:do_prepare_bootloaders"
69do_generate_ubi_tar[depends] += "${PN}:do_prepare_bootloaders"
70do_generate_static_tar[depends] += "${PN}:do_prepare_bootloaders"