2 # Copyright (C) 2008 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 IMGNAME
:=$(BIN_DIR
)/openwrt-
$(BOARD
)
13 $(IMGNAME
)-$(2)-$(patsubst jffs2-
%,jffs2
,$(1))
16 VMLINUX
:=$(IMGNAME
)-vmlinux
17 UIMAGE
:=$(IMGNAME
)-uImage
18 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
19 VMLINUX
:=$(IMGNAME
)-vmlinux-initramfs
20 UIMAGE
:=$(IMGNAME
)-uImage-initramfs
23 ifeq ($(CONFIG_RALINK_RT305X
),y
)
25 -a
0x80000000 -e
0x80000000
29 -a
0x88000000 -e
0x88000000
33 define Image
/BuildKernel
34 cp
$(KDIR
)/vmlinux.elf
$(VMLINUX
).elf
35 cp
$(KDIR
)/vmlinux
$(VMLINUX
).bin
36 $(STAGING_DIR_HOST
)/bin
/lzma e
$(KDIR
)/vmlinux
-lc1
-lp2
-pb2
$(KDIR
)/vmlinux.lzma
37 mkimage
-A mips
-O linux
-T kernel
-C lzma
$(call kernel_entry
) \
38 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
39 -d
$(KDIR
)/vmlinux.lzma
$(KDIR
)/uImage.lzma
40 cp
$(KDIR
)/uImage.lzma
$(UIMAGE
).bin
43 define Image
/Build
/squashfs
44 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
48 $(call Image
/Build
/$(1))
50 dd if
=$(KDIR
)/uImage.lzma bs
=1024k conv
=sync
; \
51 dd if
=$(KDIR
)/root.
$(1) bs
=65536 conv
=sync
; \
52 ) > $(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img
55 $(eval
$(call BuildImage
))