summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:28:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commitbb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch)
tree76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/classes/kernel.bbclass
parentfcc456ee4b8f619134abb4649db53c638074082c (diff)
downloadpoky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass60
1 files changed, 30 insertions, 30 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 846b19663b..027e66eec7 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -46,7 +46,7 @@ python __anonymous () {
46 kpn = d.getVar("KERNEL_PACKAGE_NAME") 46 kpn = d.getVar("KERNEL_PACKAGE_NAME")
47 47
48 # XXX Remove this after bug 11905 is resolved 48 # XXX Remove this after bug 11905 is resolved
49 # FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly 49 # FILES:${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly
50 if kpn == pn: 50 if kpn == pn:
51 bb.warn("Some packages (E.g. *-dev) might be missing due to " 51 bb.warn("Some packages (E.g. *-dev) might be missing due to "
52 "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)") 52 "bug 11905 (variable KERNEL_PACKAGE_NAME == PN)")
@@ -96,11 +96,11 @@ python __anonymous () {
96 continue 96 continue
97 typelower = type.lower() 97 typelower = type.lower()
98 d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower)) 98 d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
99 d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type) 99 d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
100 d.appendVar('RDEPENDS_%s-image' % kname, ' %s-image-%s' % (kname, typelower)) 100 d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s' % (kname, typelower))
101 d.setVar('PKG_%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower)) 101 d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
102 d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1') 102 d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
103 d.setVar('pkg_postinst_%s-image-%s' % (kname,typelower), """set +e 103 d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
104if [ -n "$D" ]; then 104if [ -n "$D" ]; then
105 ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1 105 ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
106else 106else
@@ -112,7 +112,7 @@ else
112fi 112fi
113set -e 113set -e
114""" % (type, type, type, type, type, type, type)) 114""" % (type, type, type, type, type, type, type))
115 d.setVar('pkg_postrm_%s-image-%s' % (kname,typelower), """set +e 115 d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
116if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then 116if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
117 rm -f ${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1 117 rm -f ${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
118fi 118fi
@@ -303,7 +303,7 @@ do_bundle_initramfs () {
303} 303}
304do_bundle_initramfs[dirs] = "${B}" 304do_bundle_initramfs[dirs] = "${B}"
305 305
306python do_devshell_prepend () { 306python do_devshell:prepend () {
307 os.environ["LDFLAGS"] = '' 307 os.environ["LDFLAGS"] = ''
308} 308}
309 309
@@ -591,7 +591,7 @@ kernel_do_configure() {
591 fi 591 fi
592 592
593 # Copy defconfig to .config if .config does not exist. This allows 593 # Copy defconfig to .config if .config does not exist. This allows
594 # recipes to manage the .config themselves in do_configure_prepend(). 594 # recipes to manage the .config themselves in do_configure:prepend().
595 if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then 595 if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
596 cp "${WORKDIR}/defconfig" "${B}/.config" 596 cp "${WORKDIR}/defconfig" "${B}/.config"
597 fi 597 fi
@@ -608,34 +608,34 @@ addtask savedefconfig after do_configure
608 608
609inherit cml1 609inherit cml1
610 610
611KCONFIG_CONFIG_COMMAND_append = " LD='${KERNEL_LD}' HOSTLDFLAGS='${BUILD_LDFLAGS}'" 611KCONFIG_CONFIG_COMMAND:append = " LD='${KERNEL_LD}' HOSTLDFLAGS='${BUILD_LDFLAGS}'"
612 612
613EXPORT_FUNCTIONS do_compile do_install do_configure 613EXPORT_FUNCTIONS do_compile do_install do_configure
614 614
615# kernel-base becomes kernel-${KERNEL_VERSION} 615# kernel-base becomes kernel-${KERNEL_VERSION}
616# kernel-image becomes kernel-image-${KERNEL_VERSION} 616# kernel-image becomes kernel-image-${KERNEL_VERSION}
617PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules" 617PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules"
618FILES_${PN} = "" 618FILES:${PN} = ""
619FILES_${KERNEL_PACKAGE_NAME}-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo" 619FILES:${KERNEL_PACKAGE_NAME}-base = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo"
620FILES_${KERNEL_PACKAGE_NAME}-image = "" 620FILES:${KERNEL_PACKAGE_NAME}-image = ""
621FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" 621FILES:${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
622FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}" 622FILES:${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
623FILES_${KERNEL_PACKAGE_NAME}-modules = "" 623FILES:${KERNEL_PACKAGE_NAME}-modules = ""
624RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base" 624RDEPENDS:${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
625# Allow machines to override this dependency if kernel image files are 625# Allow machines to override this dependency if kernel image files are
626# not wanted in images as standard 626# not wanted in images as standard
627RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image" 627RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
628PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" 628PKG:${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
629RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}" 629RDEPENDS:${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
630PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" 630PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
631RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}" 631RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
632ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1" 632ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1"
633ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-base = "1" 633ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-base = "1"
634ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-image = "1" 634ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-image = "1"
635ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-modules = "1" 635ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-modules = "1"
636DESCRIPTION_${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package" 636DESCRIPTION:${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package"
637 637
638pkg_postinst_${KERNEL_PACKAGE_NAME}-base () { 638pkg_postinst:${KERNEL_PACKAGE_NAME}-base () {
639 if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then 639 if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
640 mkdir -p $D/lib/modules/${KERNEL_VERSION} 640 mkdir -p $D/lib/modules/${KERNEL_VERSION}
641 fi 641 fi
@@ -646,7 +646,7 @@ pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
646 fi 646 fi
647} 647}
648 648
649PACKAGESPLITFUNCS_prepend = "split_kernel_packages " 649PACKAGESPLITFUNCS:prepend = "split_kernel_packages "
650 650
651python split_kernel_packages () { 651python split_kernel_packages () {
652 do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex=r'^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 652 do_split_packages(d, root='${nonarch_base_libdir}/firmware', file_regex=r'^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')