summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/kernel-build.mk11
-rw-r--r--mk/kernel-vars.mk31
-rw-r--r--target/config/Config.in.tools5
-rw-r--r--target/linux/config/Config.in.audio15
-rw-r--r--toolchain/kernel-headers/Makefile6
-rw-r--r--toolchain/kernel-headers/patches/3.13.6/relocs.patch30
-rw-r--r--tools/Makefile3
-rw-r--r--tools/pcre/Makefile30
8 files changed, 86 insertions, 45 deletions
diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk
index f95796950..ffb612334 100644
--- a/mk/kernel-build.mk
+++ b/mk/kernel-build.mk
@@ -37,24 +37,19 @@ $(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PK
$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(TOPDIR)/mk/modules.mk
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-configure
-for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done
-ifeq ($(ADK_USE_KERNEL_MINICONFIG),y)
$(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/mini.config
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} KCONFIG_ALLCONFIG=mini.config allnoconfig $(MAKE_TRACE)
-else
- $(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/.config
- echo N | ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} oldconfig $(MAKE_TRACE)
-endif
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} KCONFIG_ALLCONFIG=mini.config allnoconfig $(MAKE_TRACE)
touch -c $(LINUX_DIR)/.config
$(LINUX_DIR)/$(KERNEL_FILE): $(LINUX_DIR)/.config
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-compile
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} LOCALVERSION="" $(KERNEL_TARGET) modules $(MAKE_TRACE)
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} -j${ADK_MAKE_JOBS} LOCALVERSION="" $(KERNEL_TARGET) modules $(MAKE_TRACE)
touch -c $(LINUX_DIR)/$(KERNEL_FILE)
$(LINUX_BUILD_DIR)/modules: $(LINUX_DIR)/$(KERNEL_FILE)
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-modules-install
rm -rf $(LINUX_BUILD_DIR)/modules
- ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} DEPMOD=true \
+ ${KERNEL_MAKE_ENV} $(MAKE) -C "${LINUX_DIR}" ${KERNEL_MAKE_OPTS} DEPMOD=true \
INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules \
LOCALVERSION="" \
modules_install $(MAKE_TRACE)
diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk
index 3285e891d..7d8de54e3 100644
--- a/mk/kernel-vars.mk
+++ b/mk/kernel-vars.mk
@@ -1,27 +1,18 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-KERNEL_MAKE_OPTS:= -C "${LINUX_DIR}" V=1 \
- CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \
- CC="$(TARGET_CC)" HOSTCC="${CC_FOR_BUILD}" \
- HOSTCFLAGS='${CFLAGS_FOR_BUILD}' \
+KERNEL_MAKE_OPTS:= V=1 \
+ ARCH=$(ARCH) \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ CC="$(TARGET_CC)" \
+ HOSTCC="${CC_FOR_BUILD}" \
CONFIG_SHELL='${SHELL}'
-ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G},y)
-ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x400000 \
- -DBCM47XX_OVERRIDE_NVRAMSIZE=0x10000 \
- -DBCM47XX_OVERRIDE_CFESIZE=0x40000
-endif
-ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54GS},y)
-ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x800000 \
- -DBCM47XX_OVERRIDE_NVRAMSIZE=0x20000 \
- -DBCM47XX_OVERRIDE_CFESIZE=0x40000
-endif
-ifeq (${ADK_TARGET_BROADCOM_MODEL_ASUS_WL500GP},y)
-ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x800000 \
- -DBCM47XX_OVERRIDE_NVRAMSIZE=0x20000 \
- -DBCM47XX_OVERRIDE_CFESIZE=0x40000
+# regex for relocs needs pcre on Darwin
+ifeq ($(ADK_HOST_DARWIN),y)
+KERNEL_MAKE_OPTS+= HOSTCFLAGS='$(CPPFLAGS_FOR_BUILD) ${CFLAGS_FOR_BUILD}' HOSTLDFLAGS='-lpcreposix'
+else
+KERNEL_MAKE_OPTS+= HOSTCFLAGS='${CFLAGS_FOR_BUILD}'
endif
-KERNEL_MAKE_ENV+= KCPPFLAGS='${ADK_KCPPFLAGS}' \
- PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH"
+KERNEL_MAKE_ENV+= PATH="${STAGING_HOST_DIR}/usr/bin:$$PATH"
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index c4dcdace4..c2dee7e19 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -38,6 +38,11 @@ config ADK_HOST_NEED_CCACHE
boolean
default n
+config ADK_HOST_NEED_PCRE
+ boolean
+ default y if ADK_HOST_DARWIN
+ default n
+
config ADK_TOOLS_ADDPATTERN_ARGS
string
default "-p W54G -v v4.20.6" if ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G
diff --git a/target/linux/config/Config.in.audio b/target/linux/config/Config.in.audio
index d3a15d602..cc84914d2 100644
--- a/target/linux/config/Config.in.audio
+++ b/target/linux/config/Config.in.audio
@@ -13,14 +13,14 @@ config ADK_KERNEL_SND_USB
config ADK_KERNEL_SND_PXA2XX_AC97
boolean
-config ADK_KERNEL_SND_TIMER
+config ADK_KPACKAGE_KMOD_SND_TIMER
boolean
-config ADK_KERNEL_SND_PCM
+config ADK_KPACKAGE_KMOD_SND_PCM
boolean
-config ADK_KERNEL_SND_HWDEP
- boolean
+config ADK_KPACKAGE_KMOD_SND_HWDEP
+ tristate
config ADK_KPACKAGE_KMOD_SOUND
tristate
@@ -40,14 +40,15 @@ config ADK_KPACKAGE_KMOD_SND_COMPRESS
config ADK_KPACKAGE_KMOD_SND
tristate
select ADK_KPACKAGE_KMOD_SOUND
- select ADK_KERNEL_SND_TIMER
- select ADK_KERNEL_SND_PCM
- select ADK_KERNEL_SND_HWDEP
+ select ADK_KPACKAGE_KMOD_SND_PCM
+ select ADK_KPACKAGE_KMOD_SND_TIMER
+ select ADK_KPACKAGE_KMOD_SND_HWDEP
default n
config ADK_KPACKAGE_KMOD_SND_INTEL8X0
prompt "kmod-snd-intel8x0............. Intel AC97 driver"
tristate
+ select ADK_KERNEL_SND_PCI
select ADK_KPACKAGE_KMOD_SND_AC97_CODEC
select ADK_KPACKAGE_KMOD_SND
default y if ADK_TARGET_SYSTEM_IBM_X40
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 4303accdc..89ebf340f 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -4,12 +4,12 @@
include $(TOPDIR)/rules.mk
include ../rules.mk
include $(TOPDIR)/mk/linux.mk
+include ${TOPDIR}/mk/kernel-vars.mk
include ${TOPDIR}/mk/buildhlp.mk
$(WRKBUILD)/.headers:
- $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=$(ARCH) V=1 \
- headers_check
- $(MAKE) -C $(WRKBUILD) HOSTCC=$(CC_FOR_BUILD) ARCH=$(ARCH) V=1 \
+ $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} headers_check
+ $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
headers_install
@-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
diff --git a/toolchain/kernel-headers/patches/3.13.6/relocs.patch b/toolchain/kernel-headers/patches/3.13.6/relocs.patch
index 649b9e73e..69a7c88a9 100644
--- a/toolchain/kernel-headers/patches/3.13.6/relocs.patch
+++ b/toolchain/kernel-headers/patches/3.13.6/relocs.patch
@@ -1,7 +1,18 @@
-diff -Nur linux-3.11.5.orig/arch/x86/tools/relocs.h linux-3.11.5/arch/x86/tools/relocs.h
---- linux-3.11.5.orig/arch/x86/tools/relocs.h 2013-10-14 03:14:45.000000000 +0200
-+++ linux-3.11.5/arch/x86/tools/relocs.h 2013-10-20 17:41:16.000000000 +0200
-@@ -9,10 +9,14 @@
+diff -Nur linux-3.13.6.orig/arch/x86/tools/relocs.c linux-3.13.6/arch/x86/tools/relocs.c
+--- linux-3.13.6.orig/arch/x86/tools/relocs.c 2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/arch/x86/tools/relocs.c 2014-03-15 19:39:45.000000000 +0100
+@@ -126,6 +126,7 @@
+
+ if (err) {
+ regerror(err, &sym_regex_c[i], errbuf, sizeof errbuf);
++ printf("foo: %s\n", sym_regex[i]);
+ die("%s", errbuf);
+ }
+ }
+diff -Nur linux-3.13.6.orig/arch/x86/tools/relocs.h linux-3.13.6/arch/x86/tools/relocs.h
+--- linux-3.13.6.orig/arch/x86/tools/relocs.h 2014-03-07 07:07:02.000000000 +0100
++++ linux-3.13.6/arch/x86/tools/relocs.h 2014-03-15 18:48:40.000000000 +0100
+@@ -9,11 +9,19 @@
#include <string.h>
#include <errno.h>
#include <unistd.h>
@@ -13,12 +24,17 @@ diff -Nur linux-3.11.5.orig/arch/x86/tools/relocs.h linux-3.11.5/arch/x86/tools/
+#else
+#include "elf.h"
+#endif
++#ifdef __APPLE__
++#include <pcreposix.h>
++#else
#include <regex.h>
++#endif
#include <tools/le_byteshift.h>
-diff -Nur linux-3.11.5.orig/tools/include/elf.h linux-3.11.5/tools/include/elf.h
---- linux-3.11.5.orig/tools/include/elf.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.11.5/tools/include/elf.h 2013-10-20 17:42:10.000000000 +0200
+ void die(char *fmt, ...);
+diff -Nur linux-3.13.6.orig/tools/include/elf.h linux-3.13.6/tools/include/elf.h
+--- linux-3.13.6.orig/tools/include/elf.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.13.6/tools/include/elf.h 2014-03-15 18:47:36.000000000 +0100
@@ -0,0 +1,2671 @@
+#ifndef _ELF_H
+#define _ELF_H
diff --git a/tools/Makefile b/tools/Makefile
index cdbf2b4f1..bfed325e0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -32,6 +32,9 @@ endif
ifeq ($(ADK_HOST_NEED_CCACHE),y)
TARGETS+=ccache
endif
+ifeq ($(ADK_HOST_NEED_PCRE),y)
+TARGETS+=pcre
+endif
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
diff --git a/tools/pcre/Makefile b/tools/pcre/Makefile
new file mode 100644
index 000000000..f88fe230a
--- /dev/null
+++ b/tools/pcre/Makefile
@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= pcre
+PKG_VERSION:= 8.34
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 006c5e27fb78cdd14a628fdfa5aa1905
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=pcre/}
+
+include ../rules.mk
+
+install: $(WRKBUILD)/.installed
+
+$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
+ (cd ${WRKBUILD}; CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' \
+ LDFLAGS='$(LDFLAGS_FOR_BUILD)' \
+ ./configure --prefix=$(STAGING_HOST_DIR)/usr)
+ @touch $@
+
+$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
+ ${MAKE} -C ${WRKBUILD}
+ @touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+ ${MAKE} -C ${WRKBUILD} install
+ @touch $@
+
+include $(TOPDIR)/mk/tools.mk