[kernel] kmod-usb-core is buildin on etrax target
[openwrt.git] / target / linux / ppc40x / image / Makefile
1 #
2 # Copyright (C) 2008-2010 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 $(LINUX_DIR)/scripts/dtc/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)/$(IMG_PREFIX)-uImage
19 $(call Image/Build/Initramfs)
20 endef
21
22 define Image/Build
23 $(call Image/Build/$(1),$(1))
24 endef
25
26 define Image/Build/ext2
27 cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img
28 endef
29
30 define Image/Build/jffs2-128k
31 ( \
32 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
33 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
34 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
35 ) > $(BIN_DIR)/$(IMG_PREFIX)-kilauea-jffs2.img
36 endef
37
38 define Image/Build/jffs2-64k
39 ( \
40 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
41 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
42 ) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-jffs2.img
43 ( \
44 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
45 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
46 ) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-jffs2.img
47 endef
48
49 define Image/Build/squashfs
50 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
51 ( \
52 dd if=$(LINUX_DIR)/arch/powerpc/boot/uImage bs=1920k conv=sync; \
53 dd if=$(KDIR)/openwrt-kilauea.dtb bs=128k conv=sync; \
54 dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
55 ) > $(BIN_DIR)/$(IMG_PREFIX)-kilauea-$(1).img
56 ( \
57 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox bs=1280k conv=sync; \
58 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
59 ) > $(BIN_DIR)/$(IMG_PREFIX)-magicbox-$(1).img
60 ( \
61 dd if=$(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb bs=1280k conv=sync; \
62 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
63 ) > $(BIN_DIR)/$(IMG_PREFIX)-openrb-$(1).img
64 endef
65
66 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
67 define Image/Build/Initramfs
68 cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.magicbox $(BIN_DIR)/openwrt-$(BOARD)-magicbox-initramfs.bin
69 cp $(LINUX_DIR)/arch/powerpc/boot/cuImage.openrb $(BIN_DIR)/openwrt-$(BOARD)-openrb-initramfs.bin
70 endef
71 endif
72
73 $(eval $(call BuildImage))
This page took 0.046469 seconds and 5 git commands to generate.