2 # Copyright (C) 2006,2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 IMGNAME
= $(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)
11 LOADER_MAKE
= $(MAKE
) -C lzma-loader KDIR
=$(KDIR
)
13 define Image
/Build
/Loader
14 $(LOADER_MAKE
) LOADER
=loader-
$(1).
$(2) LOADER_DATA
="" \
15 LZMA_TEXT_START
=$(3) LZMA_STARTUP_ORG
=$(4) \
16 CONFIG_PASS_KARGS
=$(5) CONFIG_BOARD
=$(6) \
25 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
28 define trxalign
/jffs2-128k
31 define trxalign
/jffs2-64k
34 define trxalign
/squashfs
38 define Image
/Build
/TRX
39 $(STAGING_DIR
)/bin
/trx
-o
$(1) -f
$(3) -f
$(KDIR
)/vmlinux.lzma \
40 $(call trxalign
/$(2)) -f
$(KDIR
)/root.
$(2)
43 define Image
/Build
/TRXNoloader
44 $(STAGING_DIR
)/bin
/trx
-o
$(1) -f
$(KDIR
)/vmlinux.lzma \
45 $(call trxalign
/$(2)) -f
$(KDIR
)/root.
$(2)
48 define Image
/Build
/Compex
49 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0,y
,$(2))
50 $(call Image
/Build
/TRX
,$(IMGNAME
)-$(3)-$(2).trx
,$(1),$(KDIR
)/loader-
$(2).gz
)
53 define Image
/Build
/Edimax
54 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0x6D8,y
,$(2))
55 $(call Image
/Build
/TRXNoloader
,$(IMGNAME
)-$(3)-$(2).trx
,$(1))
56 $(STAGING_DIR
)/bin
/mkcsysimg
-B
$(4) -d
-w \
57 -r
$(KDIR
)/loader-
$(2).gz \
58 -x
$(IMGNAME
)-$(3)-$(2).trx \
59 $(IMGNAME
)-$(3)-$(2).bin
62 define Image
/Build
/Infineon
63 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0x6D8,y
,$(2))
64 $(call Image
/Build
/TRXNoloader
,$(IMGNAME
)-$(3)-$(2).trx
,$(1))
65 dd if
=$(KDIR
)/loader-
$(2).gz of
=$(IMGNAME
)-$(3)-$(2).img bs
=64k conv
=sync
66 cat
$(IMGNAME
)-$(3)-$(2).trx
>>$(IMGNAME
)-$(3)-$(2).img
69 define Image
/Build
/MyLoader
70 $(call Image
/Build
/Loader
,$(2),gz
,0x80500000,0)
71 $(call Image
/Build
/TRXNoloader
,$(IMGNAME
)-$(3)-$(2).trx
,$(1))
72 $(STAGING_DIR
)/bin
/mkmylofw
-B
$(4) \
73 -p0x20000
:0x10000:ahp
:0x80001000 \
75 -b0x20000
:0x10000:h
:$(KDIR
)/loader-
$(2).gz \
76 -b0x30000
:0::$(IMGNAME
)-$(3)-$(2).trx \
77 $(IMGNAME
)-$(3)-$(2).bin
80 define Image
/cmdline
/yaffs2
81 root
=/dev
/mtdblock1 rootfstype
=yaffs2 init
=/etc
/preinit
84 define Image
/Build
/RouterBoard
85 $(CP
) $(KDIR
)/vmlinux.elf
$(IMGNAME
)-vmlinux
86 $(STAGING_DIR
)/bin
/patch-cmdline
$(KDIR
)/vmlinux.elf
'$(strip $(call Image/cmdline/yaffs2)) '
90 # this line is here intentionally
91 ifneq ($(1),jffs2-256k
)
92 ifneq ($(1),jffs2-128k
)
93 $(call Image
/Build
/Compex
,$(1),wp54g-wrt
,$(patsubst jffs2-
%,jffs2
,$(1)),WP54G-WRT
)
94 $(call Image
/Build
/Edimax
,$(1),br-6104k
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6104K
)
95 $(call Image
/Build
/Edimax
,$(1),br-6104kp
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6104KP
)
96 $(call Image
/Build
/Edimax
,$(1),br-6114wg
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6114WG
)
97 $(call Image
/Build
/Edimax
,$(1),br-6524k
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6524K
)
98 $(call Image
/Build
/Edimax
,$(1),br-6524kp
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6524KP
)
99 $(call Image
/Build
/Edimax
,$(1),br-6541k
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6541K
)
100 $(call Image
/Build
/Edimax
,$(1),br-6541kp
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6541KP
)
101 $(call Image
/Build
/Edimax
,$(1),ew-7207apg
,$(patsubst jffs2-
%,jffs2
,$(1)),EW-7207APg
)
102 $(call Image
/Build
/Edimax
,$(1),ps-1205uwg
,$(patsubst jffs2-
%,jffs2
,$(1)),PS-1205UWg
)
103 $(call Image
/Build
/Edimax
,$(1),ps-3205u
,$(patsubst jffs2-
%,jffs2
,$(1)),PS-3205U
)
104 $(call Image
/Build
/Edimax
,$(1),ps-3205uwg
,$(patsubst jffs2-
%,jffs2
,$(1)),PS-3205UWg
)
105 $(call Image
/Build
/Edimax
,$(1),br-6524wg
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6524WG
)
106 $(call Image
/Build
/Edimax
,$(1),br-6524wp
,$(patsubst jffs2-
%,jffs2
,$(1)),BR-6524WP
)
107 $(call Image
/Build
/Infineon
,$(1),easy-5120
,$(patsubst jffs2-
%,jffs2
,$(1)))
108 $(call Image
/Build
/Infineon
,$(1),easy-5120-rt
,$(patsubst jffs2-
%,jffs2
,$(1)))
109 $(call Image
/Build
/Infineon
,$(1),easy-5120p-ata
,$(patsubst jffs2-
%,jffs2
,$(1)))
110 $(call Image
/Build
/Infineon
,$(1),easy-83000
,$(patsubst jffs2-
%,jffs2
,$(1)))
111 $(call Image
/Build
/MyLoader
,$(1),np27g
,$(patsubst jffs2-
%,jffs2
,$(1)),NP27G
)
112 $(call Image
/Build
/MyLoader
,$(1),np28g
,$(patsubst jffs2-
%,jffs2
,$(1)),NP28G
)
113 $(call Image
/Build
/MyLoader
,$(1),np28ghs
,$(patsubst jffs2-
%,jffs2
,$(1)),NP28GHS
)
114 $(call Image
/Build
/MyLoader
,$(1),wp54g
,$(patsubst jffs2-
%,jffs2
,$(1)),WP54G
)
115 $(call Image
/Build
/MyLoader
,$(1),wp54ag
,$(patsubst jffs2-
%,jffs2
,$(1)),WP54AG
)
116 $(call Image
/Build
/MyLoader
,$(1),wpp54g
,$(patsubst jffs2-
%,jffs2
,$(1)),WPP54G
)
117 $(call Image
/Build
/MyLoader
,$(1),wpp54ag
,$(patsubst jffs2-
%,jffs2
,$(1)),WPP54AG
)
121 $(call Image
/Build
/RouterBoard
)
125 define Image
/Build
/LZMAKernel
126 $(LOADER_MAKE
) TARGET_DIR
=$(BIN_DIR
) \
127 LOADER
=openwrt-
$(BOARD
)-$(KERNEL
)-ramfs-lzma-
$(1).
$(2) \
128 LOADER_DATA
=$(KDIR
)/vmlinux.lzma \
129 LZMA_TEXT_START
=$(3) LZMA_STARTUP_ORG
=$(4) \
130 CONFIG_PASS_KARGS
=$(5) CONFIG_BOARD
=$(6) \
134 define Image
/Build
/LZMAKernel
/Compex
135 $(call Image
/Build
/LZMAKernel
,$(1),$(2),0x80500000,0,y
,$(1))
138 define Image
/Build
/LZMAKernel
/Generic
139 $(call Image
/Build
/LZMAKernel
,$(1),$(2),0x80500000,0)
142 define Image
/Build
/LZMAKernel
/Admboot
143 $(call Image
/Build
/LZMAKernel
,$(1),$(2),0x80500000,0x6D8,y
,$(1))
146 define Image
/Build
/Initramfs
147 $(call Image
/Build
/LZMAKernel
/Generic
,generic
,bin
)
148 $(call Image
/Build
/LZMAKernel
/Generic
,rb-100
,elf
)
149 $(call Image
/Build
/LZMAKernel
/Generic
,np27g
,bin
)
150 $(call Image
/Build
/LZMAKernel
/Generic
,wp54g
,bin
)
151 $(call Image
/Build
/LZMAKernel
/Compex
,wp54g-wrt
,bin
)
152 $(call Image
/Build
/LZMAKernel
/Admboot
,br-6104k
,gz
)
153 $(call Image
/Build
/LZMAKernel
/Admboot
,easy-5120
,gz
)
154 $(call Image
/Build
/LZMAKernel
/Admboot
,easy-83000
,gz
)
155 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-630
,gz
)
156 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-670
,gz
)
157 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-700
,gz
)
158 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-771
,gz
)
159 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-790
,gz
)
160 $(call Image
/Build
/LZMAKernel
/Admboot
,cas-861
,gz
)
163 $(eval
$(call BuildImage
))
This page took 0.065819 seconds and 5 git commands to generate.