diff mbox

avr32: disable kernel headers

Message ID 1383859843-3549-1-git-send-email-spdawson@gmail.com
State Changes Requested
Headers show

Commit Message

Simon Dawson Nov. 7, 2013, 9:30 p.m. UTC
From: Simon Dawson <spdawson@gmail.com>

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.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 configs/atngw100_defconfig           | 5 ++---
 configs/atstk100x_defconfig          | 4 ++--
 package/linux-headers/Config.in.host | 9 ++++++---
 3 files changed, 10 insertions(+), 8 deletions(-)

Comments

Thomas Petazzoni Nov. 8, 2013, 7:22 a.m. UTC | #1
Simon,

On Thu,  7 Nov 2013 21:30:43 +0000, spdawson@gmail.com wrote:
> From: Simon Dawson <spdawson@gmail.com>
> 
> 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.

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
Simon Dawson Nov. 8, 2013, 9:26 a.m. UTC | #2
Hi Thomas.

On 8 November 2013 07:22, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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...?

> 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.
diff mbox

Patch

diff --git a/configs/atngw100_defconfig b/configs/atngw100_defconfig
index 5490241..bcb0073 100644
--- a/configs/atngw100_defconfig
+++ b/configs/atngw100_defconfig
@@ -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
diff --git a/configs/atstk100x_defconfig b/configs/atstk100x_defconfig
index f73497c..b35c9f4 100644
--- a/configs/atstk100x_defconfig
+++ b/configs/atstk100x_defconfig
@@ -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
diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index 2bd8b02..e9690de 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -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"