kernel bbclass: split do_compile into do_compile and do_compile_modules
PATCH 1/2 kernel bbclass: split do_compile into do_compile and do_compile_modules
This allows recipes to insert a custom task in between building *Image and modules
--- classes/kernel.bbclass | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
classes/kernel.bbclass +4 -0
@@ -89,12 +89,16 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +kernel_do_compile_modules() { if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" else oenote "no modules to compile" fi } +addtask compile_modules after do_compile before do_install kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
Signature · 1 line
1.6.6.1
PATCH 2/2 kernel bbclass: make 'kernel-modules' meta-package use RRECOMMENDS to please insane.bbclass
--- classes/kernel.bbclass | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
classes/kernel.bbclass +4 -4
@@ -488,12 +488,12 @@ python populate_packages_prepend () { for i in l: pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) blacklist.append(pkg) - metapkg_rdepends = [] + metapkg_rrecommends = [] packages = bb.data.getVar('PACKAGES', d, 1).split() for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and not any(pkg.endswith(post) for post in depchains): - metapkg_rdepends.append(pkg) - bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d) + if not pkg in blacklist and not pkg in metapkg_rrecommends and not any(pkg.endswith(post) for post in depchains): + metapkg_rrecommends.append(pkg) + bb.data.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rrecommends), d) bb.data.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package', d) packages.append(metapkg) bb.data.setVar('PACKAGES', ' '.join(packages), d)
Signature · 1 line
1.6.6.1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A word of warning:
If you have rm_work enabled you need to clean the kernel since bitbake doesn't know that the source is gone when trying to run the new compile_modules task
Quoted 18 lines · Koen Kooi
This allows recipes to insert a custom task in between building *Image and modules
Signed-off-by Koen Kooi <[email protected]>--- classes/kernel.bbclass | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)classes/kernel.bbclass +3
-0@@ -89,12 +89,16 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +kernel_do_compile_modules() {
classes/kernel.bbclass kernel_do_compile() { · line 104
Quoted 10 lines
classes/kernel.bbclass +1
-0if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" else oenote "no modules to compile" fi } +addtask compile_modules after do_compile before do_install kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMsFDhMkyGM64RGpERAgtDAJ9UAObRieVcn+AkuqyVaKma/+6UQACgtUtd EwXwC1DrKgNnjk5FKxzx++M=
=qAhm
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
disregard this one, _modules is a local override, v2 will fix that
Quoted 18 lines · Koen Kooi
This allows recipes to insert a custom task in between building *Image and modules
Signed-off-by Koen Kooi <[email protected]>--- classes/kernel.bbclass | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)classes/kernel.bbclass +3
-0@@ -89,12 +89,16 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +kernel_do_compile_modules() {
classes/kernel.bbclass kernel_do_compile() { · line 104
Quoted 10 lines
classes/kernel.bbclass +1
-0if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" else oenote "no modules to compile" fi } +addtask compile_modules after do_compile before do_install kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMsGZTMkyGM64RGpERAlpLAKCDoOp5yV1METuyM5r7XbA53MhZKACffYr2 4zygv+VrY75MAdL4gHdTFx8=
=jrRu
-----END PGP SIGNATURE-----