finally move buildroot-ng to trunk
[openwrt.git] / target / image / aruba / 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 LOADADDR = 0x81000000           # RAM start + 16M 
11 KERNEL_ENTRY = 0x80100000
12 RAMSIZE = 0x00100000            # 1MB
13
14 LOADER_MAKEOPTS= \
15                 KDIR=$(KDIR) \
16                 LOADADDR=$(LOADADDR) \
17                 KERNEL_ENTRY=$(KERNEL_ENTRY) \
18                 RAMSIZE=$(RAMSIZE)
19
20 define Build/Clean
21         $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean
22 endef
23
24 define Image/Prepare
25         cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
26         $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean compile
27 endef
28
29 define Image/BuildKernel
30         ./addVersion -n ArubaOS $(KDIR)/loader.elf $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari version
31 endef
32
33 define Image/Build/jffs2-64k
34         @dd if=$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL).ari of=$(KDIR)/image.tmp bs=655360 conv=sync
35         @cat $(KDIR)/root.$(1) >> $(KDIR)/image.tmp
36         mv $(KDIR)/image.tmp $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(patsubst jffs2-%,jffs2,$(1)).bin
37 endef
38
39 define Image/Build
40         $(call Image/Build/$(1),$(1))
41 endef
42
43 $(eval $(call BuildImage))