ixp4xx: don't leave zImage on the rootfs for images other than the freecom one
[openwrt.git] / target / linux / ixp4xx / 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 ifdef CONFIG_PACKAGE_apex
11 define Image/Build/Linksys
12 BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
13 -L $(BIN_DIR)/apex/apex-$(2)-armeb.bin \
14 -k $(BIN_DIR)/openwrt-$(2)-zImage \
15 -r rootfs:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img \
16 -p -o $(BIN_DIR)/openwrt-$(2)-$(1).bin
17 BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/slugimage.pl \
18 -F -L $(BIN_DIR)/apex/apex-$(2)-16mb-armeb.bin \
19 -k $(BIN_DIR)/openwrt-$(2)-zImage \
20 -r rootfs:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img \
21 -p -o $(BIN_DIR)/openwrt-$(2)-$(1)-16mb.bin
22 endef
23 endif
24
25 define Image/Build/Freecom
26 $(INSTALL_DIR) $(TARGET_DIR)/boot
27 # TODO: Add special CMDLINE shim for webupgrade image here
28 $(CP) $(BIN_DIR)/openwrt-$(2)-zImage $(TARGET_DIR)/zImage
29 rm -rf $(TARGET_DIR)/{var,jffs,rom}
30 $(INSTALL_DIR) $(TARGET_DIR)/var
31 $(TAR) cfj $(BIN_DIR)/openwrt-$(2)-$(1).img --numeric-owner --owner=0 --group=0 -C $(TARGET_DIR)/ .
32 $(STAGING_DIR_HOST)/bin/encode_crc $(BIN_DIR)/openwrt-$(2)-$(1).img $(BIN_DIR)/openwrt-$(2)-$(1)-webupgrade.img
33 rm -f $(TARGET_DIR)/zImage
34 endef
35
36 define Image/Prepare
37 cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
38 endef
39
40 define Image/BuildKernel
41 cp $(KDIR)/zImage $(BIN_DIR)/openwrt-$(BOARD)-zImage
42 BIN_DIR=$(BIN_DIR) $(TOPDIR)/scripts/arm-magic.sh
43 endef
44
45 define Image/Build
46 $(call Image/Build/$(1),$(1))
47 endef
48
49 define Image/Build/jffs2-64k
50 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync
51 endef
52
53 define Image/Build/jffs2-128k
54 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
55 $(call Image/Build/Linksys,$(1))
56 $(call Image/Build/Freecom,$(1),fsg3,$(1))
57 endef
58
59 define Image/Build/squashfs
60 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
61 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
62 $(call Image/Build/Linksys,$(1),nslu2,$(1))
63 $(call Image/Build/Freecom,$(1),fsg3,$(1))
64 endef
65
66 $(eval $(call BuildImage))
This page took 0.0473 seconds and 5 git commands to generate.