]> code.ossystems Code Review - openembedded-core.git/commitdiff
uboot-sign: Refactor do_deploy prefunc to do_deploy_prepend
authorDaniel Klauer <daniel.klauer@gin.de>
Tue, 30 Jun 2020 11:38:53 +0000 (13:38 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Jun 2020 22:02:11 +0000 (23:02 +0100)
When inherited by the u-boot recipe (UBOOT_PN), uboot-sign.bbclass adds
a concat_dtb step, which places additional files into ${DEPLOYDIR}
before do_deploy. By turning this from a prefunc into a part of the normal
do_deploy function, it becomes possible to use
  do_deploy[cleandirs] = "${DEPLOYDIR}"
in the future, without deleting the files produced by concat_dtb.

As before, care is taken to not interfere with the kernel's do_deploy
definition, since concat_dtb was only needed for u-boot.

Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/uboot-sign.bbclass

index 982ed46d01372925871c2b41a920dc23b8abbfdf..713196df41604949b8c8662a4c7aa38dfd334410 100644 (file)
@@ -117,15 +117,16 @@ do_install_append() {
        fi
 }
 
+do_deploy_prepend_pn-${UBOOT_PN}() {
+       if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ]; then
+               concat_dtb
+       fi
+}
+
 python () {
     if d.getVar('UBOOT_SIGN_ENABLE') == '1' and d.getVar('PN') == d.getVar('UBOOT_PN') and d.getVar('UBOOT_DTB_BINARY'):
         kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel')
 
         # Make "bitbake u-boot -cdeploy" deploys the signed u-boot.dtb
         d.appendVarFlag('do_deploy', 'depends', ' %s:do_deploy' % kernel_pn)
-
-        # kernerl's do_deploy is a litle special, so we can't use
-        # do_deploy_append, otherwise it would override
-        # kernel_do_deploy.
-        d.appendVarFlag('do_deploy', 'prefuncs', ' concat_dtb')
 }