[ixp4xx] refresh Avila/Cambria patches
[openwrt.git] / target / linux / avr32 / image / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/image.mk
10
11 define Build/Clean
12 $(MAKE) -C u-boot clean
13 endef
14
15 define Build/Compile
16 $(MAKE) -C u-boot compile
17 endef
18
19 define Image/Prepare
20 cp $(LINUX_DIR)/arch/avr32/boot/images/uImage $(KDIR)/uImage
21 endef
22
23 define Image/BuildKernel
24 cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
25
26 $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.lzma
27 mkimage -A avr32 -O linux -T kernel -a 0x10000000 -C lzma \
28 -e 0x90000000 \
29 -n 'OpenWrt Linux-$(LINUX_VERSION)' \
30 -d $(KDIR)/vmlinux.lzma $(KDIR)/uImage-lzma
31
32 cp $(KDIR)/uImage-lzma $(BIN_DIR)/openwrt-$(BOARD)-uImage-lzma
33 endef
34
35 define Image/Build
36 $(call Image/Build/$(1),$(1))
37 endef
38
39 define Image/Build/squashfs
40 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
41 ( \
42 dd if=$(KDIR)/uImage bs=1024k conv=sync; \
43 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
44 ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
45 endef
46
47 define Image/Build/jffs2-64k
48 ( \
49 dd if=$(KDIR)/uImage bs=1024k conv=sync; \
50 dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
51 ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
52 endef
53
54 $(eval $(call BuildImage))
This page took 0.042636 seconds and 5 git commands to generate.