Skip to contentSkip to conversation

avr32: disable kernel headers

PATCH New spdawson at gmail.com 2 participants 3 messages Nov 7, 2013 – Nov 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avr32: disable kernel headers

From: Simon Dawson <[email protected]>

Using kernel headers newer than 3.6.x, uclibc fails to build:

In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,

                 from libc/inet/netlinkaccess.h:34,
                 from libc/inet/if_index.c:36:

output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2

Disable kernel headers newer than 3.6.x on avr32, and update atngw100 and atstk100x defconfigs to use kernel headers that avoid the uclibc build problem.

---
 configs/atngw100_defconfig           | 5 ++---
 configs/atstk100x_defconfig          | 4 ++--
 package/linux-headers/Config.in.host | 9 ++++++---
 3 files changed, 10 insertions(+), 8 deletions(-)
configs/atngw100_defconfig +2 -3
index 5490241..bcb0073 100644
@@ -1,10 +1,9 @@
 # Architecture
 BR2_avr32=y
 
-# Lock down kernel headers version, to match the kernel version used
-# below.
+# Lock down kernel headers to a version for which uclibc will build.
 BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="3.9.11"
+BR2_DEFAULT_KERNEL_VERSION="3.4.68"
 
 # Filesystems
 BR2_TARGET_ROOTFS_JFFS2=y
configs/atstk100x_defconfig +2 -2
index f73497c..b35c9f4 100644
@@ -1,9 +1,9 @@
 # Architecture
 BR2_avr32=y
 
-# Lock to same version as kernel
+# Lock down kernel headers to a version for which uclibc will build.
 BR2_KERNEL_HEADERS_VERSION=y
-BR2_DEFAULT_KERNEL_VERSION="3.9.11"
+BR2_DEFAULT_KERNEL_VERSION="3.4.68"
 
 # U-Boot
 BR2_TARGET_UBOOT=y
package/linux-headers/Config.in.host +6 -3
index 2bd8b02..e9690de 100644
@@ -44,24 +44,27 @@ choice
 
 	config BR2_KERNEL_HEADERS_3_7
 		bool "Linux 3.7.x kernel headers"
-		depends on BR2_DEPRECATED && !BR2_arc
+		depends on BR2_DEPRECATED && !BR2_arc && !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_3_8
 		bool "Linux 3.8.x kernel headers"
-		depends on BR2_DEPRECATED && !BR2_arc
+		depends on BR2_DEPRECATED && !BR2_arc && !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_3_9
 		bool "Linux 3.9.x kernel headers"
-		depends on BR2_DEPRECATED
+		depends on BR2_DEPRECATED && !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_3_10
 		bool "Linux 3.10.x kernel headers"
+		depends on !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_3_11
 		bool "Linux 3.11.x kernel headers"
+		depends on !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_3_12
 		bool "Linux 3.12.x kernel headers"
+		depends on !BR2_avr32
 
 	config BR2_KERNEL_HEADERS_VERSION
 		bool "Manually specified Linux version"
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 avr32: disable kernel headers

Simon,

Quoted 7 lines · spdawson at gmail.com

From: Simon Dawson <[email protected]>

Using kernel headers newer than 3.6.x, uclibc fails to build:

In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,

                 from libc/inet/netlinkaccess.h:34,
                 from libc/inet/if_index.c:36:
Quoted 8 lines

output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2

Disable kernel headers newer than 3.6.x on avr32, and update atngw100 and atstk100x defconfigs to use kernel headers that avoid the uclibc build problem.

How much effort is it to instead fix uClibc to not break with more recent kernel headers? It seems a little bit annoying to me that we need to carry this !BR2_avr32 dependency for all new kernel headers version. If the fix is one or two simple patches for uClibc 0.9.31, it might be worthwhile.

And if it's not the case, I believe I'd prefer the dependency to be on the uClibc version (i.e 'depends on !BR2_PACKAGE_UCLIBC_0_9_31') instead of on the architecture, because the problem seem more related to the uClibc version rather than the architecture.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 avr32: disable kernel headers

Hi Thomas.

Quoted 5 lines · Thomas Petazzoni

How much effort is it to instead fix uClibc to not break with more recent kernel headers? It seems a little bit annoying to me that we need to carry this !BR2_avr32 dependency for all new kernel headers version. If the fix is one or two simple patches for uClibc 0.9.31, it might be worthwhile.

I did actually submit a patch to fix this some time ago; see

http://patchwork.ozlabs.org/patch/213384/

However, the patch was not accepted, and the discussion degenerated into a debate about gcc versions. I can revive that patch if you think it appropriate...?

Quoted 4 lines

And if it's not the case, I believe I'd prefer the dependency to be on the uClibc version (i.e 'depends on !BR2_PACKAGE_UCLIBC_0_9_31') instead of on the architecture, because the problem seem more related to the uClibc version rather than the architecture.

Yes, agreed.

Simon.