summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-03-03 15:46:47 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-03-07 20:44:04 +0100
commit9bb871a0bb4c239239944d28bd4d5cfa19d84f62 (patch)
treeb1c2eee95a3b475748c89d0075f604bb159a3271 /toolchain
parenta4767b13763b91dfb0aa75d2985d63d7ed9cb64c (diff)
add support for waldux
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Makefile4
-rw-r--r--toolchain/linux-headers/Makefile (renamed from toolchain/kernel-headers/Makefile)4
-rw-r--r--toolchain/waldux-headers/Makefile43
3 files changed, 47 insertions, 4 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 2502d3f15..09b02c743 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -57,7 +57,7 @@ ifeq (${ADK_PRELINK},y)
TARGETS+=prelink-cross
endif
-DOWNLOAD:=kernel-headers-download $(patsubst %,%-download,$(TARGETS))
+DOWNLOAD:=$(ADK_TARGET_OS)-headers-download $(patsubst %,%-download,$(TARGETS))
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
FINAL:=$(patsubst %,%-final,$(COMPILER))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
@@ -77,7 +77,7 @@ endif
ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
$(CLIB)-install: $(COMPILER)-configure
else
-$(CLIB)-install: $(COMPILER)-configure kernel-headers-configure
+$(CLIB)-install: $(COMPILER)-configure $(ADK_TARGET_OS)-headers-configure
endif
$(COMPILER)-install: $(ELF2FLT) $(CLIB)-install
$(COMPILER)-final: $(COMPILER)-install $(GDB)
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/linux-headers/Makefile
index ee4c8079c..6ed1a0d55 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/linux-headers/Makefile
@@ -3,8 +3,8 @@
include $(ADK_TOPDIR)/rules.mk
include ../rules.mk
-include $(ADK_TOPDIR)/mk/kernel-ver.mk
-include $(ADK_TOPDIR)/mk/linux.mk
+include $(ADK_TOPDIR)/mk/$(ADK_TARGET_OS)-ver.mk
+include $(ADK_TOPDIR)/mk/$(ADK_TARGET_OS).mk
include $(ADK_TOPDIR)/mk/buildhlp.mk
# override linux dir here, as build_bla_bla/linux does not exist yet
diff --git a/toolchain/waldux-headers/Makefile b/toolchain/waldux-headers/Makefile
new file mode 100644
index 000000000..d75dc5135
--- /dev/null
+++ b/toolchain/waldux-headers/Makefile
@@ -0,0 +1,43 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include ../rules.mk
+include $(ADK_TOPDIR)/mk/waldux-ver.mk
+include $(ADK_TOPDIR)/mk/waldux.mk
+include $(ADK_TOPDIR)/mk/buildhlp.mk
+
+LINUX_DIR=${WRKBUILD}
+
+include $(ADK_TOPDIR)/mk/kernel-vars.mk
+
+$(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(ADK_TARGET_OS)-$(KERNEL_FILE_VER)/.patched:
+ifeq ($(ADK_TARGET_SYSTEM_PCENGINES_APU),y)
+ifeq ($(ADK_KERNEL_ROOT_NFS),y)
+ cd $(DL_DIR) && wget http://distfiles.openadk.org/realtek-firmware-1.1.tar.xz
+ tar xf $(DL_DIR)/realtek-firmware-1.1.tar.xz \
+ --strip-components=2 -C $(WRKSRC)/firmware realtek-firmware-1.1
+endif
+endif
+ifeq ($(ADK_TARGET_ARCH_XTENSA),y)
+ tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_$(ADK_TARGET_CPU_TYPE).tar \
+ --strip-components=1 -C $(WRKSRC) linux
+endif
+ touch $@
+
+$(WRKBUILD)/.configured: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(ADK_TARGET_OS)-$(KERNEL_FILE_VER)/.patched
+ $(KERNEL_MAKE_ENV) $(MAKE) -C "${LINUX_DIR}" $(KERNEL_MAKE_OPTS) \
+ INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
+ headers_install
+ifeq ($(ADK_TARGET_ARCH_CRIS),y)
+ifeq ($(ADK_TARGET_CPU_ARCH),crisv32)
+ cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v32/arch arch
+else
+ cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v10/arch arch
+endif
+endif
+ @-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
+ @-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
+ touch $@
+
+include ${ADK_TOPDIR}/mk/toolchain.mk