Add the infrastructure to support different flash sizes/address
[openwrt.git] / target / linux / rdc-2.6 / image / Makefile
1 #
2 # Copyright (C) 2006 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 define Image/Prepare
11 $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
12 endef
13
14 define trxalign/jffs2-128k
15 -a 0x20000
16 endef
17 define trxalign/jffs2-64k
18 -a 0x10000
19 endef
20 define trxalign/squashfs
21 -a 1024
22 endef
23
24 define Image/Build/Airlink
25 touch $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
26 ifneq ($(1),squashfs)
27 $(STAGING_DIR)/bin/airlink -b 1 -j 64 $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
28 else
29 $(STAGING_DIR)/bin/airlink -b 1 $(KDIR)/bzImage $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(3)-$(2).img
30 endif
31 endef
32
33 define Image/Build
34 $(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).bzImage
35 ifneq ($(1),jffs2-128K)
36 $(call Image/Build/Airlink,$(1),ar525w,$(patsubst jffs2-%,jffs2,$(1)))
37 endif
38 endef
39
40 $(eval $(call BuildImage))
This page took 0.043335 seconds and 5 git commands to generate.