nuke the magicbox target and incorporate a rewritten port into ppc40x - note: no...
[openwrt-10.03/.git] / target / linux / ppc40x / image / Makefile
1 #
2 # Copyright (C) 2008 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 JFFS2_BLOCKSIZE=128k
11
12 define Image/Prepare
13         cp $(LINUX_DIR)/arch/powerpc/boot/uImage $(KDIR)/uImage
14         dtc -O dtb -R 4 -S 0x20000 $(LINUX_DIR)/arch/powerpc/boot/dts/kilauea.dts > $(KDIR)/openwrt-kilauea.dtb
15 endef
16
17 define Image/BuildKernel
18         cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
19 endef
20
21 define Image/Build
22         $(call Image/Build/$(1),$(1))
23 endef
24
25 define Image/Build/jffs2-128k
26         ( \
27                 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
28                 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
29                 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
30         ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-jffs2.img
31         ( \
32                 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv1 bs=1024k conv=sync; \
33                 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
34         ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv1-jffs2.img
35         ( \
36                 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv2 bs=1024k conv=sync; \
37                 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
38         ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv2-jffs2.img
39 endef
40
41 define Image/Build/squashfs
42         $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
43         ( \
44                 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
45                 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
46                 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
47         ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-$(1).img
48         ( \
49                 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv1 bs=1024k conv=sync; \
50                 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
51         ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv1-$(1).img
52         ( \
53                 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv2 bs=1024k conv=sync; \
54                 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
55         ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv2-$(1).img
56 endef
57
58 $(eval $(call BuildImage))