2 # Copyright (C) 2006 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 define Image
/Build
/Linksys
11 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/slugimage.pl \
12 -L
$(BIN_DIR
)/apex-
$(2)-armeb.bin \
13 -k
$(BIN_DIR
)/openwrt-
$(2)-zImage \
14 -r rootfs
:$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img \
15 -p
-o
$(BIN_DIR
)/openwrt-
$(2)-$(1).bin
16 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/slugimage.pl \
17 -F
-L
$(BIN_DIR
)/apex-
$(2)-16mb-armeb.bin \
18 -k
$(BIN_DIR
)/openwrt-
$(2)-zImage \
19 -r rootfs
:$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img \
20 -p
-o
$(BIN_DIR
)/openwrt-
$(2)-$(1)-16mb.bin
23 define Image
/Build
/Freecom
24 $(INSTALL_DIR
) $(TARGET_DIR
)/boot
25 # TODO: Add special CMDLINE shim for webupgrade image here
26 $(CP
) $(BIN_DIR
)/openwrt-
$(2)-zImage
$(TARGET_DIR
)/zImage
27 rm -rf
$(TARGET_DIR
)/{var
,jffs
,rom
}
28 $(INSTALL_DIR
) $(TARGET_DIR
)/var
29 $(TAR
) cfj
$(BIN_DIR
)/openwrt-
$(2)-$(1).img
--numeric-owner
--owner
=0 --group
=0 -C
$(TARGET_DIR
)/ .
30 $(STAGING_DIR_HOST
)/bin
/encode_crc
$(BIN_DIR
)/openwrt-
$(2)-$(1).img
$(BIN_DIR
)/openwrt-
$(2)-$(1)-webupgrade.img
46 cp
$(LINUX_DIR
)/arch
/arm
/boot
/zImage
$(KDIR
)/zImage
49 define Image
/BuildKernel
50 cp
$(KDIR
)/zImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-zImage
51 BIN_DIR
=$(BIN_DIR
) $(TOPDIR
)/scripts
/arm-magic.sh
55 $(call Image
/Build
/$(1),$(1))
58 define Image
/Build
/jffs2-64k
59 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img bs
=65536 conv
=sync
62 define Image
/Build
/jffs2-128k
63 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img bs
=131072 conv
=sync
64 $(call Image
/Build
/Linksys
,$(1))
65 $(call Image
/Build
/Freecom
,$(1),fsg3
,$(1))
68 define Image
/Build
/squashfs
69 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
70 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img bs
=131072 conv
=sync
71 $(call Image
/Build
/Linksys
,$(1),nslu2
,$(1))
72 $(call Image
/Build
/Freecom
,$(1),fsg3
,$(1))
75 $(eval
$(call BuildImage
))