[ppc40x] allow creating of ext2 filesystems
[openwrt.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 64k
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/ext2
26 cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-ext2.img
27 endef
28
29 define Image/Build/jffs2-128k
30 ( \
31 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
32 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
33 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
34 ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-jffs2.img
35 endef
36
37 define Image/Build/jffs2-64k
38 ( \
39 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv1 bs=1152k conv=sync; \
40 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
41 ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv1-jffs2.img
42 ( \
43 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv2 bs=1152k conv=sync; \
44 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
45 ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv2-jffs2.img
46 ( \
47 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb-light bs=1152k conv=sync; \
48 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
49 ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-light-jffs2.img
50 ( \
51 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb-medium bs=1152k conv=sync; \
52 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
53 ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-medium-jffs2.img
54 endef
55
56 define Image/Build/squashfs
57 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
58 ( \
59 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
60 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
61 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
62 ) > $(BIN_DIR)/openwrt-$(BOARD)-kilauea-$(1).img
63 ( \
64 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv1 bs=1152k conv=sync; \
65 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
66 ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv1-$(1).img
67 ( \
68 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicboxv2 bs=1152k conv=sync; \
69 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
70 ) > $(BIN_DIR)/openwrt-$(BOARD)-magicboxv2-$(1).img
71 ( \
72 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb-light bs=1152k conv=sync; \
73 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
74 ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-light-$(1).img
75 ( \
76 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb-medium bs=1152k conv=sync; \
77 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
78 ) > $(BIN_DIR)/openwrt-$(BOARD)-openrb-medium-$(1).img
79 endef
80
81 $(eval $(call BuildImage))
This page took 0.047169 seconds and 5 git commands to generate.