kernel bbclass: split do_compile into do_compile and do_compile_modules
PATCH v3 1/3 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 | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
classes/kernel.bbclass +5 -0
@@ -89,12 +89,17 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 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_kernelmodules after do_compile before do_install kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
Signature · 1 line
1.6.6.1
PATCH v3 2/3 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
@@ -489,12 +489,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
Re: [PATCHv3 2/3] kernel bbclass: make 'kernel-modules' meta-package use RRECOMMENDS to please insane.bbclass
2010/10/11 Koen Kooi <[email protected]>:
Quoted 20 lines
Signed-off-by Koen Kooi <[email protected]>---
classes/kernel.bbclass | 8 ++++----1 files changed, 4 insertions(+), 4 deletions(-)classes/kernel.bbclass +0
-0@@ -489,12 +489,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 inmetapkg_rdependsand not any(pkg.endswith(post) for post in depchains):
-metapkg_rdepends.append(pkg)
-bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
Quoted 8 lines
+ if not pkg in blacklist and not pkg in
metapkg_rrecommendsand 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)
--
1.6.6.1
PATCH v3 3/3 multi-kernel: adapt to kernel_do_compile_kernelmodules change in kernel.bbclass
In reply to Koen Kooi--- recipes/linux/multi-kernel.inc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
recipes/linux/multi-kernel.inc +1 -0
@@ -41,6 +41,7 @@ do_compileconfigs () { # Build and Install this alternative kernel do_configure kernel_do_compile + do_compile_kernelmodules kernel_do_install # Drop the resulting images in the deploy dir
Signature · 1 line
1.6.6.1
Re: [PATCHv3 3/3] multi-kernel: adapt to kernel_do_compile_kernelmodules change in kernel.bbclass
2010/10/11 Koen Kooi <[email protected]>:
Quoted 15 lines
---
recipes/linux/multi-kernel.inc | 1 +1 files changed, 1 insertions(+), 0 deletions(-)recipes/linux/multi-kernel.inc +0
-0@@ -41,6 +41,7 @@ do_compileconfigs () { # Build and Install this alternative kernel
do_configure
kernel_do_compile
+ do_compile_kernelmodules
kernel_do_install
Quoted 2 lines
# Drop the resulting images in the deploy dir --
This is where I found it would probably better be called kernel_do_compile_modules or so.
Still:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ping
Quoted 19 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 | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)classes/kernel.bbclass +4
-0@@ -89,12 +89,17 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
classes/kernel.bbclass kernel_do_compile() { · line 105
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_kernelmodules after do_compile before do_install kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMtBfOMkyGM64RGpERAonPAKCPzmCFS67arfwLKKL8Eb7QENuKOgCgmx++ 7TUh52+7x1OV5xjF7Pp/oFk=
=yf9t
-----END PGP SIGNATURE-----
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1ping
Haven't had time to test this yet (and won't have tonight as I have to supervise a lab). It is on the to-do list.
[...]
Quoted 4 lines
classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 4 lines
classes/kernel.bbclass +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
Is it needed/required? I'm a little bit concerned by this. (actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings here (but must say I did not dive into it, so not sure if things are arranged differently; that is also why I wanted to do a test build).
Frans
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Frans Meulenbroeks
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 4 lines
classes/kernel.bbclass +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEIs it needed/required?
It is, and it's in kernel.bbclass already:
fe938bbe (Michael Lauer 2004-12-14) kernel_do_compile() {0448ec0d (Richard Purdie 2006-11-20) unset CFLAGS CPPFLAGS CXXFLAGS
LDFLAGS MACHINEfe938bbe (Michael Lauer 2004-12-14) oe_runmakeinclude/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
Quoted 3 lines
I'm a little bit concerned by this.
(actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings here
You actually want to do that, since the kernel is bare-metal, not userspace. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMtDm/MkyGM64RGpERAuFwAKCBzAXJwVvcQ6oh2DSISA/7Hhh8zACgp9M9 muqzjUd8tGg/RCZoEKmsU/4=
=1SOi
-----END PGP SIGNATURE-----
Frans Meulenbroeks
Acked-by2010/10/12 Koen Kooi <[email protected]>:
Quoted 36 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 8 lines · Frans Meulenbroeks
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 4 lines
classes/kernel.bbclass +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEIs it needed/required?
It is, and it's in kernel.bbclass already:
fe938bbe(Michael Lauer 2004-12-14)kernel_do_compile(){0448ec0d(Richard Purdie 2006-11-20) unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEfe938bbe(Michael Lauer 2004-12-14)oe_runmakeinclude/linux/version.hCC="${KERNEL_CC}" LD="${KERNEL_LD}"Quoted 3 lines
I'm a little bit concerned by this.
(actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings hereYou actually want to do that, since the kernel is bare-metal, not userspace. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)iD8DBQFMtDm/MkyGM64RGpERAuFwAKCBzAXJwVvcQ6oh2DSISA/7Hhh8zACgp9M9 muqzjUd8tGg/RCZoEKmsU/4=
=1SOi
-----END PGP SIGNATURE-----
Quoted 5 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Thanks for the answer.
Did a quick peek on CFLAGS in the recipes, saw there is a CFLAGS_KERNEL. That one is only used on one place:
linux-wrt_2.4.30.bb:export CFLAGS_KERNEL="-fno-delayed-branch "
Haven't tested this, but my understanding on how things work is good enough and the change simple enough for to give an ack
2010/10/12 Frans Meulenbroeks <[email protected]>:
Quoted 45 lines
2010/10/12 Koen Kooi <[email protected]>:
Quoted 36 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 8 lines · Frans Meulenbroeks
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 4 lines
classes/kernel.bbclass +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEIs it needed/required?
It is, and it's in kernel.bbclass already:
fe938bbe(Michael Lauer 2004-12-14)kernel_do_compile(){0448ec0d(Richard Purdie 2006-11-20) unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEfe938bbe(Michael Lauer 2004-12-14)oe_runmakeinclude/linux/version.hCC="${KERNEL_CC}" LD="${KERNEL_LD}"Quoted 3 lines
I'm a little bit concerned by this.
(actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings hereYou actually want to do that, since the kernel is bare-metal, not userspace. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)iD8DBQFMtDm/MkyGM64RGpERAuFwAKCBzAXJwVvcQ6oh2DSISA/7Hhh8zACgp9M9 muqzjUd8tGg/RCZoEKmsU/4=
=1SOi
-----END PGP SIGNATURE-----Quoted 5 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-develThanks for the answer.
Quoted 8 lines
Did a quick peek on CFLAGS in the recipes, saw there is a
CFLAGS_KERNEL. That one is only used on one place:
linux-wrt_2.4.30.bb:export CFLAGS_KERNEL="-fno-delayed-branch "Haven't tested this, but my understanding on how things work is good enough and the change simple enough for to give an ack
Actually on 2nd thought one tiny remark left:
after seeing patch 2:
what about renaming:do_compile_kernelmodules
to something with a kernel prefix
e.g. kernel_do_compile_modules.
That makes the naming scheme somewhat more consistent.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 40 lines · Frans Meulenbroeks
2010/10/12 Frans Meulenbroeks <[email protected]>:
Quoted 1 line
2010/10/12 Koen Kooi <[email protected]>:
Quoted 8 lines · Frans Meulenbroeks
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
classes/kernel.bbclass kernel_do_compile() { · line 95
Quoted 4 lines
classes/kernel.bbclass +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEIs it needed/required?
It is, and it's in kernel.bbclass already:
fe938bbe(Michael Lauer 2004-12-14)kernel_do_compile(){0448ec0d(Richard Purdie 2006-11-20) unset CFLAGS CPPFLAGS CXXFLAGS
LDFLAGS MACHINEfe938bbe(Michael Lauer 2004-12-14)oe_runmakeinclude/linux/version.hCC="${KERNEL_CC}" LD="${KERNEL_LD}"Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
I'm a little bit concerned by this.
(actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings hereYou actually want to do that, since the kernel is bare-metal, not userspace.
Quoted 5 lines
Quoted 1 line
Thanks for the answer.
Quoted 8 lines
Did a quick peek on CFLAGS in the recipes, saw there is a
CFLAGS_KERNEL. That one is only used on one place:
linux-wrt_2.4.30.bb:export CFLAGS_KERNEL="-fno-delayed-branch "Haven't tested this, but my understanding on how things work is good enough and the change simple enough for to give an ack
Quoted 7 lines
Actually on 2nd thought one tiny remark left:
after seeing patch 2:
what about renaming:do_compile_kernelmodules
to something with a kernel prefix
e.g.kernel_do_compile_modules.
That makes the naming scheme somewhat more consistent.
Namespacing the class is only used for methods overridden from base.bbclass. Again, look at the rest of kernel.bbclass methods like uboot-mkimage, menuconfig and friends don't use that namespace.
And it doesn't actually work since _modules is a local override.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMtFxYMkyGM64RGpERArFyAKCr5HipFKmy8xsYIoF/U0NIXFfDlwCfferR yhTvF+MOCupbbMMstKVvkmk=
=6zMs
-----END PGP SIGNATURE-----
2010/10/12 Koen Kooi <[email protected]>:
Quoted 52 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 40 lines · Frans Meulenbroeks
2010/10/12 Frans Meulenbroeks <[email protected]>:
Quoted 1 line
2010/10/12 Koen Kooi <[email protected]>:
Quoted 8 lines · Frans Meulenbroeks
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
2010/10/12 Koen Kooi <[email protected]>:
Quoted 4 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEIs it needed/required?
It is, and it's in kernel.bbclass already:
fe938bbe(Michael Lauer 2004-12-14)kernel_do_compile(){0448ec0d(Richard Purdie 2006-11-20) unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEfe938bbe(Michael Lauer 2004-12-14)oe_runmakeinclude/linux/version.hCC="${KERNEL_CC}" LD="${KERNEL_LD}"Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
I'm a little bit concerned by this.
(actually this was the only worry I had after reading the patch, don't want to loose additional CFLAGS settings hereYou actually want to do that, since the kernel is bare-metal, not userspace.
Quoted 5 lines
Quoted 1 line
Thanks for the answer.
Quoted 8 lines
Did a quick peek on CFLAGS in the recipes, saw there is a
CFLAGS_KERNEL. That one is only used on one place:
linux-wrt_2.4.30.bb:export CFLAGS_KERNEL="-fno-delayed-branch "Haven't tested this, but my understanding on how things work is good enough and the change simple enough for to give an ack
Quoted 7 lines
Actually on 2nd thought one tiny remark left:
after seeing patch 2:
what about renaming:do_compile_kernelmodules
to something with a kernel prefix
e.g.kernel_do_compile_modules.
That makes the naming scheme somewhat more consistent.
Quoted 3 lines
Namespacing the class is only used for methods overridden from base.bbclass. Again, look at the rest of kernel.bbclass methods like uboot-mkimage, menuconfig and friends don't use that namespace.
Well I don't care too much about it, this just bubbled up because this:
Quoted 3 lines
kernel_do_compile
+do_compile_kernelmodules
kernel_do_install
looks a little bit better/more consistent; i did not evn consider overriding or so, just peeked at the aesthetics.
as I wrote before it is a nit (and absolutely no deal-breaker afaic)
Frans
Quoted 18 lines
And it doesn't actually work since
_modulesis a local override.-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)iD8DBQFMtFxYMkyGM64RGpERArFyAKCr5HipFKmy8xsYIoF/U0NIXFfDlwCfferR yhTvF+MOCupbbMMstKVvkmk=
=6zMs
-----END PGP SIGNATURE-----_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Am Dienstag, den 12.10.2010, 10:09 +0200 schrieb Koen Kooi:
Quoted 30 lines
ping
Quoted 27 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 | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)classes/kernel.bbclass +5
-0@@ -89,12 +89,17 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 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_kernelmodules after do_compile before do_install
Quoted 2 lines
classes/kernel.bbclass kernel_do_compile() { · line 105
Quoted 2 lines
classes/kernel.bbclass +0
-0kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
I am using MACHINE = "beagleboard".
I did
$ bitbake -c clean virtual/kernel $ bitbake virtual/kernel
with your patches applied for minimal-{libc,eglibc} and I did not see any regressions.
The build for angstrom-2010.x is still running. angstrom-2008.1 hangs right now, though. Could you test that again, please. I will take a look in a few more hours, if the build succeeded.
NOTE: Running task 892 of 911 (ID: 13, /home/paul/oe/openembedded/recipes/linux) NOTE: package linux-omap-psp-2.6.32-r90+gitra6bad4464f985fdd3bed72e1b82dcbfc004d… NOTE: package linux-omap-psp-2.6.32-r90+gitra6bad4464f985fdd3bed72e1b82dcbfc004d…
Thanks,
Paul
Paul Menzel
Tested-byAm Dienstag, den 12.10.2010, 16:26 +0200 schrieb Paul Menzel:
Quoted 44 lines
Am Dienstag, den 12.10.2010, 10:09 +0200 schrieb Koen Kooi:
Quoted 30 lines
ping
Quoted 27 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 | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)classes/kernel.bbclass +5
-0@@ -89,12 +89,17 @@ kernel_do_compile() { oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}" fi oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 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_kernelmodules after do_compile before do_installQuoted 2 lines
classes/kernel.bbclass kernel_do_compile() { · line 105
Quoted 2 lines
classes/kernel.bbclass +0
-0kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINEI am using
MACHINE = "beagleboard".I did
$ bitbake -c clean virtual/kernel $ bitbake virtual/kernelwith your patches applied for
minimal-{libc,eglibc}and I did not see any regressions.
Quoted 7 lines
The build for
angstrom-2010.xis still running.angstrom-2008.1hangs right now, though. Could you test that again, please. I will take a look in a few more hours, if the build succeeded.NOTE: Running task 892 of 911 (ID: 13, /home/paul/oe/openembedded/recipes/linux) NOTE: package linux-omap-psp-2.6.32-r90+gitra6bad4464f985fdd3bed72e1b82dcbfc004d… NOTE: package linux-omap-psp-2.6.32-r90+gitra6bad4464f985fdd3bed72e1b82dcbfc004d…
It finished just fine.
But you already committed this in 615876 [1] and onwards.
Thanks,
Paul