Skip to contentSkip to conversation

kernel.bbclass: stage more include files for x86 in 2.6.27+

PATCH In review Michael Smith 2 participants 5 messages May 6, 2009 – Aug 21, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: stage more include files for x86 in 2.6.27+

Some packages include <linux/types.h>, which requires <asm/types.h>. Supplement b6220af33a70d96345dea130005ce842eeadfdf5 to copy files from arch/x86/include/asm to include/asm-x86.

---
 classes/kernel.bbclass |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
classes/kernel.bbclass +8 -1
index 954c407..2153424 100644
@@ -102,8 +102,15 @@ kernel_do_stage() {
 		cp -fR arch/${ARCH}/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
 		install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}/include
 		cp -fR arch/${ARCH}/* ${STAGING_KERNEL_DIR}/arch/${ARCH}/	
+
+	# Check for arch/x86 on i386
+	elif [ -d arch/x86/include/asm/ ]; then
+		cp -fR arch/x86/include/asm/* ${STAGING_KERNEL_DIR}/include/asm-x86/
+		install -d ${STAGING_KERNEL_DIR}/arch/x86/include
+		cp -fR arch/x86/* ${STAGING_KERNEL_DIR}/arch/x86/
 	fi
-	rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+
+	rm -f ${STAGING_KERNEL_DIR}/include/asm
 	ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
 
 	mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic
Signature · 1 line
1.5.6.5
#1 lore raw

OK to commit?

Quoted 33 lines · Michael Smith

Some packages include <linux/types.h>, which requires <asm/types.h>. Supplement b6220af33a70d96345dea130005ce842eeadfdf5 to copy files from arch/x86/include/asm to include/asm-x86.

---
 classes/kernel.bbclass |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
classes/kernel.bbclass +8 -1
index 954c407..2153424 100644
@@ -102,8 +102,15 @@ kernel_do_stage() {
 		cp -fR arch/${ARCH}/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
 		install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}/include
 		cp -fR arch/${ARCH}/* ${STAGING_KERNEL_DIR}/arch/${ARCH}/	
+
+	# Check for arch/x86 on i386
+	elif [ -d arch/x86/include/asm/ ]; then
+		cp -fR arch/x86/include/asm/* ${STAGING_KERNEL_DIR}/include/asm-x86/
+		install -d ${STAGING_KERNEL_DIR}/arch/x86/include
+		cp -fR arch/x86/* ${STAGING_KERNEL_DIR}/arch/x86/
 	fi
-	rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+
+	rm -f ${STAGING_KERNEL_DIR}/include/asm
 	ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
 
 	mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic
Signature · 1 line
1.5.6.5
#2 lore raw

В сообщении от Пятница 21 августа 2009 05:46:11 автор Michael Smith написал:

Quoted 5 lines

OK to commit?

classes/kernel.bbclass kernel_do_stage() { · line 113

Quoted 3 lines
classes/kernel.bbclass +2 -1
-	rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+
+	rm -f ${STAGING_KERNEL_DIR}/include/asm

Not sure why this is needed, though you copy to asm-x86 and mine was to $ASMDIR:

http://lists.linuxtogo.org/pipermail/openembedded-devel/2009-June/011945.html

#3 lore raw
Quoted 6 lines · Roman I Khimov
Quoted 4 lines

OK to commit?

classes/kernel.bbclass kernel_do_stage() { · line 113

Quoted 3 lines
classes/kernel.bbclass +2 -1
-	rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+
+	rm -f ${STAGING_KERNEL_DIR}/include/asm

Not sure why this is needed

$ASMDIR is a directory name like "asm-x86" meant to be relative to "include". It doesn't exist under the work directory, so "rm -f $ASMDIR" tries to remove a file that isn't there. Doesn't hurt anything, but I had to stare at it for a bit, so I took it out. :)

Quoted 2 lines

though you copy to asm-x86 and mine was to $ASMDIR:
http://lists.linuxtogo.org/pipermail/openembedded-devel/2009-June/011945.html

Yeah, I think in your patch you did:

cp -fR arch/x86/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/

But on another platform, let's say arm, wouldn't that copy arch/x86/include/* to include/asm-arm? The x86 files should only go to asm-x86.

Mike

#4 lore raw

В сообщении от Пятница 21 августа 2009 16:47:20 автор Michael Smith написал:

Quoted 18 lines · Roman I Khimov
Quoted 7 lines
Quoted 5 lines

OK to commit?

classes/kernel.bbclass kernel_do_stage() { · line 113

Quoted 3 lines
classes/kernel.bbclass +2 -1
-	rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+
+	rm -f ${STAGING_KERNEL_DIR}/include/asm

Not sure why this is needed

$ASMDIR is a directory name like "asm-x86" meant to be relative to "include". It doesn't exist under the work directory, so "rm -f $ASMDIR" tries to remove a file that isn't there. Doesn't hurt anything, but I had to stare at it for a bit, so I took it out. :)

Quoted 3 lines

though you copy to asm-x86 and mine was to $ASMDIR:
http://lists.linuxtogo.org/pipermail/openembedded-devel/2009-June/011945.
html

Quoted 7 lines

Yeah, I think in your patch you did:

cp -fR arch/x86/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/

But on another platform, let's say arm, wouldn't that copy arch/x86/include/* to include/asm-arm? The x86 files should only go to asm-x86.

OK.