From 7fbc483a76456ca7620c96c8d1dcf7b3a7cb8bc9 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 18 Nov 2011 07:59:19 +0100 Subject: [PATCH] kernel: fix ssb modules build on arm. --- config/kernel/kernel.config.armv5tel-ipfire-kirkwood | 2 +- .../kernel/kernel.config.armv5tel-ipfire-versatile | 2 +- lfs/compat-wireless | 4 ++-- lfs/linux | 3 +++ ...2.6.32.45_align_ssb_modtable_32bit_boundary.patch | 12 ++++++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch diff --git a/config/kernel/kernel.config.armv5tel-ipfire-kirkwood b/config/kernel/kernel.config.armv5tel-ipfire-kirkwood index 13a80e5fdf..bddf86bc50 100644 --- a/config/kernel/kernel.config.armv5tel-ipfire-kirkwood +++ b/config/kernel/kernel.config.armv5tel-ipfire-kirkwood @@ -1308,7 +1308,7 @@ CONFIG_NET_PCI=y CONFIG_PCNET32=m CONFIG_AMD8111_ETH=m CONFIG_ADAPTEC_STARFIRE=m -# CONFIG_B44 is not set +CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_FORCEDETH_NAPI is not set CONFIG_E100=m diff --git a/config/kernel/kernel.config.armv5tel-ipfire-versatile b/config/kernel/kernel.config.armv5tel-ipfire-versatile index 487e5e72cc..6bdf4c5d3d 100644 --- a/config/kernel/kernel.config.armv5tel-ipfire-versatile +++ b/config/kernel/kernel.config.armv5tel-ipfire-versatile @@ -1294,7 +1294,7 @@ CONFIG_NET_PCI=y CONFIG_PCNET32=m CONFIG_AMD8111_ETH=m CONFIG_ADAPTEC_STARFIRE=m -# CONFIG_B44 is not set +CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_FORCEDETH_NAPI is not set CONFIG_E100=m diff --git a/lfs/compat-wireless b/lfs/compat-wireless index 27fb02bdca..a8902f1c2a 100644 --- a/lfs/compat-wireless +++ b/lfs/compat-wireless @@ -91,8 +91,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) ifeq "$(MACHINE_TYPE)" "arm" # B43+B44 driver doesn't build on arm - cd $(DIR_APP) && sed -i -e "s|CONFIG_B43=m||g" config.mk - cd $(DIR_APP) && sed -i -e "s|CONFIG_B44=m||g" config.mk +# cd $(DIR_APP) && sed -i -e "s|CONFIG_B43=m||g" config.mk +# cd $(DIR_APP) && sed -i -e "s|CONFIG_B44=m||g" config.mk # Add libartas uAP driver cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/compat-wireless-3.0-libertas_uap.patch cd $(DIR_APP)&& echo CONFIG_LIBERTAS_UAP=m >> config.mk diff --git a/lfs/linux b/lfs/linux index 8326023ed3..b8d0dd8bec 100644 --- a/lfs/linux +++ b/lfs/linux @@ -168,6 +168,9 @@ ifeq "$(KCFG)" "-kirkwood" cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45-arm_kirkwood_setups.patch endif +ifeq "$(MACHINE_TYPE)" "arm" + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch +endif ifeq "$(HEADERS)" "1" # Install the header files diff --git a/src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch b/src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch new file mode 100644 index 0000000000..e9b8b82310 --- /dev/null +++ b/src/patches/linux-2.6.32.45_align_ssb_modtable_32bit_boundary.patch @@ -0,0 +1,12 @@ +diff -Naur linux-2.6.32.45.org/include/linux/mod_devicetable.h linux-2.6.32.45/include/linux/mod_devicetable.h +--- linux-2.6.32.45.org/include/linux/mod_devicetable.h 2011-08-16 03:57:37.000000000 +0200 ++++ linux-2.6.32.45/include/linux/mod_devicetable.h 2011-11-17 15:07:43.366023632 +0100 +@@ -364,7 +364,7 @@ + __u16 vendor; /* Vendor or SDIO_ANY_ID */ + __u16 device; /* Device ID or SDIO_ANY_ID */ + kernel_ulong_t driver_data /* Data private to the driver */ +- __attribute__((aligned(sizeof(kernel_ulong_t)))); ++ __attribute__((aligned(sizeof(__u32)))); /* align to 32bit boundary */ + }; + + /* SSB core, see drivers/ssb/ */ -- 2.39.2