Skip to contentSkip to conversation

conf/kernel.bbclass: staging for linux >= 2.6.24 on x86 needs fixing

DISCUSSION Jeremy Lainé 2 participants 3 messages Feb 19, 2008

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Up until linux 2.6.23, for x86 archs we put arch/i386/Makefile* into staging, but it looks as though from 2.6.24 onwards we should be staging arch/x86/Makefile* instead.

The attached patch works for me, but I am not sure this is the proper way to fix this as it introduces some arch-specific code in an otherwise generic bbclass. Any ideas?

- --
Jeremy LAINE
Bolloré telecom | 11bis, rue Scribe | F-75009 Paris -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHupAhCL1n3lVB9EYRAmRUAKCR+/e08cu/urfTF95EnozeCR8jSACfRyp5 jZZL3udH5hCT9qJfPazNSrY=
=U720
-----END PGP SIGNATURE-----

#

# old_revision [8b854b2b358a134500f7b4e1826c4fab2dc417ed]
# 
# patch "classes/kernel.bbclass"
#  from [3aa638c9a8de8e90342e08b530a40c8c2f120497]
#    to [7b688b82d6be204068a4bdbb29bd16cfb63d7b2f]
# 
============================================================
--- classes/kernel.bbclass	3aa638c9a8de8e90342e08b530a40c8c2f120497
+++ classes/kernel.bbclass	7b688b82d6be204068a4bdbb29bd16cfb63d7b2f
@@ -128,6 +128,9 @@ kernel_do_stage() {
 	if [ -e arch/${ARCH}/Makefile ]; then
 		install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}
 		install -m 0644 arch/${ARCH}/Makefile* ${STAGING_KERNEL_DIR}/arch/${ARCH}
+	elif [ "${ARCH}" = "i386" -a -e arch/x86/Makefile ]; then
+		install -d ${STAGING_KERNEL_DIR}/arch/x86
+		install -m 0644 arch/x86/Makefile* ${STAGING_KERNEL_DIR}/arch/x86
 	fi
 	cp -fR include/config* ${STAGING_KERNEL_DIR}/include/	
 	install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
#1 lore raw
Quoted 12 lines · Jeremy Lainé

Up until linux 2.6.23, for x86 archs we put arch/i386/Makefile* into staging, but it looks as though from 2.6.24 onwards we should be staging arch/x86/Makefile* instead.

The attached patch works for me, but I am not sure this is the proper way to fix this as it introduces some arch-specific code in an otherwise generic bbclass. Any ideas?

============================================================

kernel.bbclass 7b688b82d6be204068a4bdbb29bd16cfb63d7b2f kernel_do_stage() { · line 136

Quoted 9 lines
kernel.bbclass 7b688b82d6be204068a4bdbb29bd16cfb63d7b2f renamed from kernel.bbclass 3aa638c9a8de8e90342e08b530a40c8c2f120497 +3 -0
@@ -128,6 +128,9 @@ kernel_do_stage() {
        if [ -e arch/${ARCH}/Makefile ]; then
                install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}
                install -m 0644 arch/${ARCH}/Makefile* ${STAGING_KERNEL_DIR}/arch/${ARCH}
+       elif [ "${ARCH}" = "i386" -a -e arch/x86/Makefile ]; then
+               install -d ${STAGING_KERNEL_DIR}/arch/x86
+               install -m 0644 arch/x86/Makefile* ${STAGING_KERNEL_DIR}/arch/x86
        fi
        cp -fR include/config* ${STAGING_KERNEL_DIR}/include/   
        install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}

That solution looks fine to me. As mentioned on irc we also need to deal with ARCH = x86_64 and rather than a big complex if clause I think its simply easiest to use x86 as a fallback so:

elif [ -e arch/x86/Makefile ]; then

shouldn't cause any problems.

Maybe just add a comment about this being to catch the ARCH = i386 and x86_64 cases so we remember why we did this in a years time :).

Cheers,

Richard

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines

That solution looks fine to me. As mentioned on irc we also need to deal with ARCH = x86_64 and rather than a big complex if clause I think its simply easiest to use x86 as a fallback so:

elif [ -e arch/x86/Makefile ]; then

shouldn't cause any problems.

Maybe just add a comment about this being to catch the ARCH = i386 and x86_64 cases so we remember why we did this in a years time :).

OK, commited with the appropriate comment.

- --
Jeremy LAINE
Bolloré telecom | 11bis, rue Scribe | F-75009 Paris -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHuqJYCL1n3lVB9EYRAnM3AJ9XKfRmshzGcve6DFF5F9XgT6orWQCZAZtT 681tDeYXGOG6G+mtb9WcJ8I=
=PcK2
-----END PGP SIGNATURE-----