2 # Copyright (C) 2008-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 JFFS2_BLOCKSIZE
=128k
64k
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
17 define Image
/BuildKernel
18 cp
$(KDIR
)/uImage
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
19 $(call Image
/Build
/Initramfs
)
23 $(call Image
/Build
/$(1),$(1))
26 define Image
/Build
/ext2
27 cp
$(KDIR
)/root.
$(1) $(BIN_DIR
)/$(IMG_PREFIX
)-ext2.img
30 define Image
/Build
/jffs2-128k
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
38 define Image
/Build
/jffs2-64k
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
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
49 define Image
/Build
/squashfs
50 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
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
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
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
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
73 $(eval
$(call BuildImage
))