ab63ff619f1d3a12648982e6b9b5c1227bc0787a
[openwrt.git] / target / linux / etrax-2.6 / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 ARCH:=cris
10 BOARD:=etrax
11 BOARDNAME:=Foxboard (ETRAX 100LX)
12 FEATURES:=squashfs jffs2
13 LINUX_VERSION:=2.6.19.2
14
15 include $(INCLUDE_DIR)/kernel-build.mk
16
17 define Target/Description
18         Build fimware images for the FOXBOARD made by acmesystems.it
19 endef
20
21 define Kernel/Prepare/Fox
22         bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
23         if [ -d ./files ]; then $(CP) ./files/* $(LINUX_DIR)/; fi
24         if [ -d ./patches/generic_2.6 ]; then $(PATCH) $(LINUX_DIR) ./patches/generic_2.6; fi
25         if [ -d ./patches/cris ]; then $(PATCH) $(LINUX_DIR) ./patches/cris; fi
26         ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/include/asm-cris/arch-v10 $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/include/asm-cris/arch
27         ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/arch/cris/arch-v10 $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/arch/cris/arch
28 endef
29
30 define Kernel/Prepare
31         $(call Kernel/Prepare/Fox)
32 endef
33
34 $(eval $(call RequireCommand,/usr/local/cris/gcc-cris, \
35         Please install the binary cris toolchain. \
36 ))
37
38 #include the profiles
39 -include profiles/*.mk
40
41 KERNELNAME:="zImage"
42 $(eval $(call BuildKernel))