2 # Copyright (C) 2006-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 LOADADDR
= 0x81000000 # RAM start + 16M
11 KERNEL_ENTRY
= 0x80101000
12 RAMSIZE
= 0x00100000 # 1MB
17 LOADADDR
=$(LOADADDR
) \
18 KERNEL_ENTRY
=$(KERNEL_ENTRY
) \
20 IMAGE_COPY
=$(IMAGE_COPY
)
23 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean
27 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR_HOST
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
28 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean compile
31 VMLINUX
:=$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux-kernel
32 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
33 VMLINUX
:=$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux-initramfs
36 define Image
/BuildKernel
37 $(CP
) $(KDIR
)/loader.elf
$(VMLINUX
)
40 define Image
/cmdline
/jffs2-64k
41 block2mtd.block2mtd
=/dev
/sda2
,65536 root
=/dev
/mtdblock0 rootfstype
=jffs2
44 define Image
/cmdline
/jffs2-128k
45 block2mtd.block2mtd
=/dev
/sda2
,131072 root
=/dev
/mtdblock0 rootfstype
=jffs2
48 define Image
/cmdline
/ext2
49 root
=/dev
/sda2 rootfstype
=ext2
52 define Image
/cmdline
/squashfs
53 block2mtd.block2mtd
=/dev
/sda2
,65536 root
=/dev
/mtdblock0 rootfstype
=squashfs
56 define Image
/cmdline
/yaffs2
57 root
=/dev
/mtdblock1 rootfstype
=yaffs2
61 $(CP
) $(KDIR
)/vmlinux.elf
$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).kernel
62 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).kernel
'$(strip $(call Image/cmdline/$(1))) '
63 .
/gen_image.sh
$(BIN_DIR
)/$(IMG_PREFIX
)-combined-
$(1).bin
4 $(BIN_DIR
)/$(IMG_PREFIX
)-$(1).kernel
$(CONFIG_TARGET_ROOTFS_PARTSIZE
) $(KDIR
)/root.
$(1)
66 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
68 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux
'$(strip $(call Image/cmdline/yaffs2)) '
69 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR_HOST
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
70 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean compile
74 $(eval
$(call BuildImage
))