Implement architecture speficic GPIO calls for adm5120, thanks to Gabor Juhos
[openwrt.git] / target / linux / adm5120-2.6 / 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 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define Build/Compile
11 rm -f $(KDIR)/loader.gz $(KDIR)/loader-edimax.gz
12 $(MAKE) -C lzma-loader \
13 BUILD_DIR="$(KDIR)" \
14 TARGET="$(KDIR)" \
15 install
16 echo -ne "\\x00" >> $(KDIR)/loader.gz
17 $(MAKE) -C lzma-loader \
18 BUILD_DIR="$(KDIR)" \
19 TARGET="$(KDIR)" \
20 LOADER=loader-edimax \
21 BZ_STARTUP_ORG=0x6D8 \
22 install
23 echo -ne "\\x00" >> $(KDIR)/loader-edimax.gz
24 endef
25
26 define Build/Clean
27 $(MAKE) -C lzma-loader clean
28 endef
29
30 define Image/Prepare
31 cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
32 endef
33
34 define trxalign/jffs2-128k
35 -a 0x20000
36 endef
37 define trxalign/jffs2-64k
38 -a 0x10000
39 endef
40 define trxalign/squashfs
41 -a 1024
42 endef
43
44 define Image/Build/Compex
45 $(CP) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).trx
46 endef
47
48 define Image/Build/Edimax
49 $(STAGING_DIR)/bin/mkcsysimg -B $(4) -d -w \
50 -r $(KDIR)/loader-edimax.gz \
51 -x $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-noloader.trx \
52 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).bin
53 endef
54
55 define Image/Build/MyLoader
56 $(CP) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-noloader.trx $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).trx
57 $(STAGING_DIR)/bin/mkmylofw -B $(4) \
58 -p0x20000:0x10000:ahp:0x80001000 \
59 -p0x30000:0 \
60 -b0x20000:0x10000:h:$(KDIR)/loader.gz \
61 -b0x30000:0::$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).trx \
62 $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).bin
63 endef
64
65 define Image/Build/RouterBoard
66 $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinux
67 endef
68
69 define Image/Build
70 $(STAGING_DIR)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma $(call trxalign/$(1)) -f $(KDIR)/root.$(1)
71 $(STAGING_DIR)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1)-noloader.trx -f $(KDIR)/vmlinux.lzma $(call trxalign/$(1)) -f $(KDIR)/root.$(1)
72 ifneq ($(1),jffs2-128K)
73 $(call Image/Build/Compex,$(1),wp54g-wrt,$(patsubst jffs2-%,jffs2,$(1)))
74 $(call Image/Build/Edimax,$(1),br-6104k,$(patsubst jffs2-%,jffs2,$(1)),BR-6104K)
75 $(call Image/Build/Edimax,$(1),br-6104kp,$(patsubst jffs2-%,jffs2,$(1)),BR-6104KP)
76 $(call Image/Build/Edimax,$(1),br-6114wg,$(patsubst jffs2-%,jffs2,$(1)),BR-6114WG)
77 $(call Image/Build/Edimax,$(1),br-6524k,$(patsubst jffs2-%,jffs2,$(1)),BR-6524K)
78 $(call Image/Build/Edimax,$(1),br-6524kp,$(patsubst jffs2-%,jffs2,$(1)),BR-6524KP)
79 $(call Image/Build/Edimax,$(1),br-6541k,$(patsubst jffs2-%,jffs2,$(1)),BR-6541K)
80 $(call Image/Build/Edimax,$(1),br-6541kp,$(patsubst jffs2-%,jffs2,$(1)),BR-6541KP)
81 $(call Image/Build/Edimax,$(1),ew-7207apg,$(patsubst jffs2-%,jffs2,$(1)),EW-7207APg)
82 $(call Image/Build/Edimax,$(1),ps-1205uwg,$(patsubst jffs2-%,jffs2,$(1)),PS-1205UWg)
83 $(call Image/Build/Edimax,$(1),ps-3205u,$(patsubst jffs2-%,jffs2,$(1)),PS-3205U)
84 $(call Image/Build/Edimax,$(1),ps-3205uwg,$(patsubst jffs2-%,jffs2,$(1)),PS-3205UWg)
85 $(call Image/Build/Edimax,$(1),br-6524wg,$(patsubst jffs2-%,jffs2,$(1)),BR-6524WG)
86 $(call Image/Build/Edimax,$(1),br-6524wp,$(patsubst jffs2-%,jffs2,$(1)),BR-6524WP)
87 $(call Image/Build/MyLoader,$(1),np27g,$(patsubst jffs2-%,jffs2,$(1)),NP27G)
88 $(call Image/Build/MyLoader,$(1),np28g,$(patsubst jffs2-%,jffs2,$(1)),NP28G)
89 $(call Image/Build/MyLoader,$(1),np28ghs,$(patsubst jffs2-%,jffs2,$(1)),NP28GHS)
90 $(call Image/Build/MyLoader,$(1),wp54g,$(patsubst jffs2-%,jffs2,$(1)),WP54G)
91 $(call Image/Build/MyLoader,$(1),wp54ag,$(patsubst jffs2-%,jffs2,$(1)),WP54AG)
92 $(call Image/Build/MyLoader,$(1),wpp54g,$(patsubst jffs2-%,jffs2,$(1)),WPP54G)
93 $(call Image/Build/MyLoader,$(1),wpp54ag,$(patsubst jffs2-%,jffs2,$(1)),WPP54AG)
94 endif
95 ifeq ($(1),tgz)
96 $(call Image/Build/RouterBoard)
97 endif
98 endef
99
100 $(eval $(call BuildImage))
This page took 0.050033 seconds and 5 git commands to generate.