source: branches/backfire/target/linux/ixp4xx/image/Makefile @ 21208

Last change on this file since 21208 was 21208, checked in by nico, 7 years ago

[backfire] merge r20834, r20840, r20854 & r20855

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7include $(TOPDIR)/rules.mk
8include $(INCLUDE_DIR)/image.mk
9
10ifdef 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)/$(IMG_PREFIX)-$(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)/$(IMG_PREFIX)-$(1).img \
21                -p -o $(BIN_DIR)/openwrt-$(2)-$(1)-16mb.bin
22  endef
23endif
24
25define 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        $(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
31        rm -f $(TARGET_DIR)/zImage
32endef
33
34define Image/Prepare
35        cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
36endef
37
38define Image/BuildKernel
39        cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
40        BIN_DIR=$(BIN_DIR) IMG_PREFIX="$(IMG_PREFIX)" $(TOPDIR)/scripts/arm-magic.sh
41endef
42
43define Image/Build
44        $(call Image/Build/$(1),$(1))
45endef
46
47define Image/Build/jffs2-64k
48        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=65536 conv=sync
49endef
50
51define Image/Build/jffs2-128k
52        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
53        $(call Image/Build/Linksys,$(1))
54        $(call Image/Build/Freecom,$(1),fsg3,$(1))
55endef
56
57define Image/Build/squashfs
58        $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
59        dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=131072 conv=sync
60        $(call Image/Build/Linksys,$(1),nslu2,$(1))
61        $(call Image/Build/Freecom,$(1),fsg3,$(1))
62endef
63
64$(eval $(call BuildImage))
Note: See TracBrowser for help on using the repository browser.