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
:= rbt-832 dlan-usb-extender
14 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
15 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
16 UIMAGE
:=$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-initramfs
19 define Image
/Build
/MkuImage
20 mkimage
-A arm
-O linux
-T kernel
-a
$(LOADADDR
) -C none
-e
$(LOADADDR
) \
21 -n
'ARM OpenWrt Linux-$(LINUX_VERSION)' -d
$(1) $(2);
25 cp
$(LINUX_DIR
)/arch
/$(ARCH
)/boot
/zImage
$(KDIR
)/zImage
28 define Image
/BuildKernel
29 $(foreach dtb
,$(TARGET_DTBS
),cp
$(KDIR
)/zImage
$(KDIR
)/zImage-
$(dtb
);)
30 $(foreach dtb
,$(TARGET_DTBS
),cat
$(LINUX_DIR
)/arch
/$(ARCH
)/boot
/$(dtb
).dtb
>> $(KDIR
)/zImage-
$(dtb
);)
31 $(foreach dtb
,$(TARGET_DTBS
),$(call Image
/Build
/MkuImage
,$(KDIR
)/zImage-
$(dtb
),$(KDIR
)/uImage-
$(dtb
)))
32 $(foreach dtb
,$(TARGET_DTBS
),cp
$(KDIR
)/uImage-
$(dtb
) $(UIMAGE
)-$(dtb
);)
33 $(call Image
/Build
/Initramfs
)
37 $(call Image
/Build
/$(1))
38 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/$(IMG_PREFIX
)-root.
$(1) bs
=128k conv
=sync
41 $(eval
$(call BuildImage
))