Fix rb535 revision 5 detection
[openwrt.git] / target / linux / etrax / image / 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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/image.mk
10
11 FOXBOARD:=custom MCM 416 816 832
12 FOXBOARD_4MB:=MCM 416
13 FOXBOARD_8MB:=custom 816 832
14
15 define Image/BuildKernel
16 for f in $(FOXBOARD); do \
17 cp $(KDIR)/vmlinuz_$$$$f $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-zImage_$$$$f; \
18 done
19 endef
20
21 define Image/Prepare
22 for f in $(FOXBOARD); do \
23 cp $(LINUX_DIR)/arch/cris/boot/zImage_$$$$f $(KDIR)/vmlinuz_$$$$f; \
24 done
25 $(MAKE) -C e100boot compile
26 $(MAKE) -C mkfimage compile
27 $(INSTALL_BIN) ./boot_linux $(BIN_DIR)
28 endef
29
30 define Image/Build/generic
31 for f in $(2); do \
32 mkfimage $(KDIR)/vmlinuz_$$$$f $(KDIR)/vmlinuz_$$$$f.tmp ; \
33 cat $(KDIR)/vmlinuz_$$$$f.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1)_$$$$f.tmp; \
34 dd if=$(KDIR)/fimage.$(1)_$$$$f.tmp of=$(KDIR)/fimage.$(1)_$$$$f bs=$(3) conv=sync; \
35 cp $(KDIR)/fimage.$(1)_$$$$f $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-fimage_$$$$f; \
36 done
37 endef
38
39 define Image/Build/jffs2-64k
40 $(call prepare_generic_jffs-64k,$(KDIR)/root.jff2-64k)
41 $(call Image/Build/generic,$(1),$(FOXBOARD_4MB),4194304)
42 $(call Image/Build/generic,$(1),$(FOXBOARD_8MB),8388608)
43 endef
44
45 define Image/Build/squashfs
46 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
47 $(call Image/Build/generic,$(1),$(FOXBOARD_4MB),4194304)
48 $(call Image/Build/generic,$(1),$(FOXBOARD_8MB),8388608)
49 endef
50
51 define Image/Build
52 $(call Image/Build/$(1),$(1))
53 endef
54
55 $(eval $(call BuildImage))
This page took 0.049817 seconds and 5 git commands to generate.