diff options
author | Yannick Gicquel <yannick.gicquel@iot.bzh> | 2016-04-27 16:20:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-06 10:31:13 +0100 |
commit | 858ddd508b93c3940a7d2fc22a3896cb58e39544 (patch) | |
tree | 40d42d620da763a3052dd021ca399925360101cf /meta/classes/uboot-sign.bbclass | |
parent | d8ae39687ae7608b8547c2045a1ea57e79a644f9 (diff) | |
download | poky-858ddd508b93c3940a7d2fc22a3896cb58e39544.tar.gz |
u-boot: deploy u-boot-nodtb and dtb files
This enable the deployment of u-boot-nodtb.bin and u-boot.dtb files.
(From OE-Core rev: 396a3fb0f55a443f73d6ddd99d8ba83412db2d40)
Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/uboot-sign.bbclass')
-rw-r--r-- | meta/classes/uboot-sign.bbclass | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass index ad84c44c22..82cec9e3a6 100644 --- a/meta/classes/uboot-sign.bbclass +++ b/meta/classes/uboot-sign.bbclass | |||
@@ -42,6 +42,24 @@ UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}" | |||
42 | # Following is relevant only for u-boot recipes: | 42 | # Following is relevant only for u-boot recipes: |
43 | # | 43 | # |
44 | 44 | ||
45 | do_deploy_dtb () { | ||
46 | mkdir -p ${DEPLOYDIR} | ||
47 | cd ${DEPLOYDIR} | ||
48 | |||
49 | if [ -f ${B}/${UBOOT_DTB_BINARY} ]; then | ||
50 | install ${B}/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} | ||
51 | rm -f ${UBOOT_DTB_BINARY} ${UBOOT_DTB_SYMLINK} | ||
52 | ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_SYMLINK} | ||
53 | ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_BINARY} | ||
54 | fi | ||
55 | if [ -f ${B}/${UBOOT_NODTB_BINARY} ]; then | ||
56 | install ${B}/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} | ||
57 | rm -f ${UBOOT_NODTB_BINARY} ${UBOOT_NODTB_SYMLINK} | ||
58 | ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_SYMLINK} | ||
59 | ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_BINARY} | ||
60 | fi | ||
61 | } | ||
62 | |||
45 | do_concat_dtb () { | 63 | do_concat_dtb () { |
46 | # Concatenate U-Boot w/o DTB & DTB with public key | 64 | # Concatenate U-Boot w/o DTB & DTB with public key |
47 | # (cf. kernel-fitimage.bbclass for more details) | 65 | # (cf. kernel-fitimage.bbclass for more details) |
@@ -60,6 +78,10 @@ python () { | |||
60 | if d.getVar('UBOOT_SIGN_ENABLE', True) == '1' and d.getVar('PN', True) == uboot_pn: | 78 | if d.getVar('UBOOT_SIGN_ENABLE', True) == '1' and d.getVar('PN', True) == uboot_pn: |
61 | kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel', True) | 79 | kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel', True) |
62 | 80 | ||
81 | # u-boot.dtb and u-boot-nodtb.bin are deployed _before_ do_deploy | ||
82 | # Thus, do_deploy_setscene will also populate them in DEPLOY_IMAGE_DIR | ||
83 | bb.build.addtask('do_deploy_dtb', 'do_deploy', 'do_compile', d) | ||
84 | |||
63 | # do_concat_dtb is scheduled _before_ do_install as it overwrite the | 85 | # do_concat_dtb is scheduled _before_ do_install as it overwrite the |
64 | # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR. | 86 | # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR. |
65 | bb.build.addtask('do_concat_dtb', 'do_install', None, d) | 87 | bb.build.addtask('do_concat_dtb', 'do_install', None, d) |