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 VMLINUX
:=openwrt-
$(BOARD
)-vmlinux
12 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
13 VMLINUX
:=openwrt-
$(BOARD
)-vmlinux-initramfs
16 define Image
/BuildKernel
17 cp
$(KDIR
)/vmlinux.elf
$(BIN_DIR
)/$(VMLINUX
).elf
18 cp
$(KDIR
)/vmlinux
$(BIN_DIR
)/$(VMLINUX
).bin
19 gzip
-9 -c
$(KDIR
)/vmlinux
> $(KDIR
)/vmlinux.bin.gz
20 $(STAGING_DIR_HOST
)/bin
/lzma e
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux.bin.l7
21 dd if
=$(KDIR
)/vmlinux.bin.l7 of
=$(BIN_DIR
)/$(VMLINUX
).lzma bs
=65536 conv
=sync
22 dd if
=$(KDIR
)/vmlinux.bin.gz of
=$(BIN_DIR
)/$(VMLINUX
).gz bs
=65536 conv
=sync
23 $(STAGING_DIR_HOST
)/bin
/lzma e
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux.lzma
24 mkimage
-A mips
-O linux
-T kernel
-a
0x80060000 -C gzip
-e \
26 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
27 -d
$(KDIR
)/vmlinux.bin.gz
$(BIN_DIR
)/openwrt-
$(BOARD
)-uImage.gz
30 define Image
/Build
/squashfs
31 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
35 $(call Image
/Build
/$(1))
36 dd if
=$(KDIR
)/root.
$(1) of
=$(BIN_DIR
)/openwrt-
$(BOARD
)-root.
$(1) bs
=128k conv
=sync
40 $(eval
$(call BuildImage
))