2 # Copyright (C) 2012 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 TARGET_DTBS
:= armada-xp-db armada-370-db armada-xp-openblocks-ax3-4 armada-370-mirabox
14 JFFS2_BLOCKSIZE
= 128k
16 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
17 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
18 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-initramfs
21 define Image
/Build
/MkuImage
22 mkimage
-A arm
-O linux
-T kernel
-a
$(LOADADDR
) -C none
-e
$(LOADADDR
) \
23 -n
'ARM OpenWrt Linux-$(LINUX_VERSION)' -d
$(1) $(2);
26 define Image
/Build
/DTB
27 cp
$(KDIR
)/zImage
$(KDIR
)/zImage-
$(1);
28 cat
$(LINUX_DIR
)/arch
/$(ARCH
)/boot
/dts
/$(1).dtb
>> $(KDIR
)/zImage-
$(1);
29 $(call Image
/Build
/MkuImage
,$(KDIR
)/zImage-
$(1),$(KDIR
)/uImage-
$(1))
30 cp
$(KDIR
)/uImage-
$(1) $(UIMAGE
)-$(1);
34 cp
$(LINUX_DIR
)/arch
/$(ARCH
)/boot
/zImage
$(KDIR
)/zImage
37 define Image
/BuildKernel
38 $(foreach dtb
,$(TARGET_DTBS
),$(call Image
/Build
/DTB
,$(dtb
)))
39 $(call Image
/Build
/Initramfs
)
42 define Image
/Build
/squashfs
43 $(STAGING_DIR_HOST
)/bin
/padjffs2
$(KDIR
)/root.squashfs
128
47 $(call Image
/Build
/$(1))
48 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
51 $(eval
$(call BuildImage
))