[ep93xx] add support for 2.6.36 kernel
[openwrt.git] / target / linux / rb532 / image / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 LOADADDR = 0x81000000 # RAM start + 16M
11 KERNEL_ENTRY = 0x80101000
12 RAMSIZE = 0x00100000 # 1MB
13 IMAGE_COPY = 1
14
15 LOADER_MAKEOPTS= \
16 KDIR=$(KDIR) \
17 LOADADDR=$(LOADADDR) \
18 KERNEL_ENTRY=$(KERNEL_ENTRY) \
19 RAMSIZE=$(RAMSIZE) \
20 IMAGE_COPY=$(IMAGE_COPY)
21
22 define Build/Clean
23 $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean
24 endef
25
26 define Image/Prepare
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
29 endef
30
31 define Image/BuildKernel
32 $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
33 endef
34
35 define Image/cmdline/jffs2-64k
36 block2mtd.block2mtd=/dev/sda2,65536 root=/dev/mtdblock0 rootfstype=jffs2
37 endef
38
39 define Image/cmdline/jffs2-128k
40 block2mtd.block2mtd=/dev/sda2,131072 root=/dev/mtdblock0 rootfstype=jffs2
41 endef
42
43 define Image/cmdline/ext2
44 root=/dev/sda2 rootfstype=ext2
45 endef
46
47 define Image/cmdline/squashfs
48 block2mtd.block2mtd=/dev/sda2,65536 root=/dev/mtdblock0 rootfstype=squashfs
49 endef
50
51 define Image/cmdline/yaffs2
52 root=/dev/mtdblock1 rootfstype=yaffs2
53 endef
54
55 define Image/Build
56 $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
57 $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
58 ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
59 endef
60
61 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
62 define Image/Prepare
63 $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux '$(strip $(call Image/cmdline/yaffs2)) '
64 cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
65 $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
66 endef
67 define Image/BuildKernel
68 $(CP) $(KDIR)/loader.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
69 endef
70 endif
71
72 $(eval $(call BuildImage))
This page took 0.040524 seconds and 5 git commands to generate.