2 # Copyright (C) 2006 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
9 include $(INCLUDE_DIR
)/kernel.mk
11 LOADADDR
= 0x81000000 # RAM start + 16M
12 KERNEL_ENTRY
= 0x80101000
13 RAMSIZE
= 0x00100000 # 1MB
18 LOADADDR
=$(LOADADDR
) \
19 KERNEL_ENTRY
=$(KERNEL_ENTRY
) \
21 IMAGE_COPY
=$(IMAGE_COPY
)
24 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean
28 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR_HOST
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
29 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean compile
32 define Image
/BuildKernel
33 $(CP
) $(KDIR
)/loader.elf
$(BIN_DIR
)/openwrt-
$(BOARD
)-vmlinux
36 define Image
/cmdline
/jffs2-64k
37 block2mtd.block2mtd
=/dev
/sda2
,65536 root
=/dev
/mtdblock0 rootfstype
=jffs2
40 define Image
/cmdline
/jffs2-128k
41 block2mtd.block2mtd
=/dev
/sda2
,131072 root
=/dev
/mtdblock0 rootfstype
=jffs2
44 define Image
/cmdline
/ext2
45 root
=/dev
/sda2 rootfstype
=ext2
48 define Image
/cmdline
/squashfs
49 block2mtd.block2mtd
=/dev
/sda2
,65536 root
=/dev
/mtdblock0 rootfstype
=squashfs
52 define Image
/cmdline
/yaffs2
53 root
=/dev
/mtdblock1 rootfstype
=yaffs2
57 $(CP
) $(KDIR
)/vmlinux.elf
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).kernel
58 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).kernel
'$(strip $(call Image/cmdline/$(1))) '
59 .
/gen_image.sh
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).bin
4 $(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).kernel
$(CONFIG_TARGET_ROOTFS_FSPART
) $(KDIR
)/root.
$(1)
62 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS
),y
)
64 $(STAGING_DIR_HOST
)/bin
/patch-cmdline
$(KDIR
)/vmlinux
'$(strip $(call Image/cmdline/yaffs2)) '
65 cat
$(KDIR
)/vmlinux |
$(STAGING_DIR_HOST
)/bin
/lzma e
-si
-so
-eos
-lc1
-lp2
-pb2
> $(KDIR
)/vmlinux.lzma
66 $(MAKE
) -C
$(GENERIC_PLATFORM_DIR
)/image
/lzma-loader
$(LOADER_MAKEOPTS
) clean compile
68 define Image
/BuildKernel
69 $(CP
) $(KDIR
)/loader.elf
$(BIN_DIR
)/openwrt-
$(BOARD
)-vmlinux
73 $(eval
$(call BuildImage
))