diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:28:15 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:10 +0100 |
| commit | bb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch) | |
| tree | 76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/classes/kernel.bbclass | |
| parent | fcc456ee4b8f619134abb4649db53c638074082c (diff) | |
| download | poky-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.bbclass | 60 |
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 |
| 104 | if [ -n "$D" ]; then | 104 | if [ -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 |
| 106 | else | 106 | else |
| @@ -112,7 +112,7 @@ else | |||
| 112 | fi | 112 | fi |
| 113 | set -e | 113 | set -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 |
| 116 | if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then | 116 | if [ -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 |
| 118 | fi | 118 | fi |
| @@ -303,7 +303,7 @@ do_bundle_initramfs () { | |||
| 303 | } | 303 | } |
| 304 | do_bundle_initramfs[dirs] = "${B}" | 304 | do_bundle_initramfs[dirs] = "${B}" |
| 305 | 305 | ||
| 306 | python do_devshell_prepend () { | 306 | python 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 | ||
| 609 | inherit cml1 | 609 | inherit cml1 |
| 610 | 610 | ||
| 611 | KCONFIG_CONFIG_COMMAND_append = " LD='${KERNEL_LD}' HOSTLDFLAGS='${BUILD_LDFLAGS}'" | 611 | KCONFIG_CONFIG_COMMAND:append = " LD='${KERNEL_LD}' HOSTLDFLAGS='${BUILD_LDFLAGS}'" |
| 612 | 612 | ||
| 613 | EXPORT_FUNCTIONS do_compile do_install do_configure | 613 | EXPORT_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} |
| 617 | PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules" | 617 | PACKAGES = "${KERNEL_PACKAGE_NAME} ${KERNEL_PACKAGE_NAME}-base ${KERNEL_PACKAGE_NAME}-vmlinux ${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-dev ${KERNEL_PACKAGE_NAME}-modules" |
| 618 | FILES_${PN} = "" | 618 | FILES:${PN} = "" |
| 619 | FILES_${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" | 619 | FILES:${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" |
| 620 | FILES_${KERNEL_PACKAGE_NAME}-image = "" | 620 | FILES:${KERNEL_PACKAGE_NAME}-image = "" |
| 621 | FILES_${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" | 621 | FILES:${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" |
| 622 | FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}" | 622 | FILES:${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}" |
| 623 | FILES_${KERNEL_PACKAGE_NAME}-modules = "" | 623 | FILES:${KERNEL_PACKAGE_NAME}-modules = "" |
| 624 | RDEPENDS_${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base" | 624 | RDEPENDS:${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 |
| 627 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image" | 627 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image" |
| 628 | PKG_${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" | 628 | PKG:${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" |
| 629 | RDEPENDS_${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}" | 629 | RDEPENDS:${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}" |
| 630 | PKG_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" | 630 | PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}" |
| 631 | RPROVIDES_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}" | 631 | RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}" |
| 632 | ALLOW_EMPTY_${KERNEL_PACKAGE_NAME} = "1" | 632 | ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1" |
| 633 | ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-base = "1" | 633 | ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-base = "1" |
| 634 | ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-image = "1" | 634 | ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-image = "1" |
| 635 | ALLOW_EMPTY_${KERNEL_PACKAGE_NAME}-modules = "1" | 635 | ALLOW_EMPTY:${KERNEL_PACKAGE_NAME}-modules = "1" |
| 636 | DESCRIPTION_${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package" | 636 | DESCRIPTION:${KERNEL_PACKAGE_NAME}-modules = "Kernel modules meta package" |
| 637 | 637 | ||
| 638 | pkg_postinst_${KERNEL_PACKAGE_NAME}-base () { | 638 | pkg_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 | ||
| 649 | PACKAGESPLITFUNCS_prepend = "split_kernel_packages " | 649 | PACKAGESPLITFUNCS:prepend = "split_kernel_packages " |
| 650 | 650 | ||
| 651 | python split_kernel_packages () { | 651 | python 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='') |
