tegra-bup.bbclass: move logic to bbclass for reuse

Signed-off-by: Chad McQuillen <chad.mcquillen@lexmark.com>
This commit is contained in:
Chad McQuillen
2023-06-30 09:37:11 -04:00
committed by Matt Madison
parent ba71ce69ba
commit e7a0c101cd
2 changed files with 14 additions and 13 deletions

13
classes/tegra-bup.bbclass Normal file
View File

@@ -0,0 +1,13 @@
inherit kernel-artifact-names
def bupfile_basename(d):
if bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')):
return "${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}"
return "${INITRAMFS_IMAGE}-${MACHINE}"
def bup_dependency(d):
if bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')):
return "kernel-bup-payload:do_deploy"
return "${INITRAMFS_IMAGE}:do_image_complete"
BUPFILENAME = "${@bupfile_basename(d)}"