2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/image.mk
11 ifneq ($(CONFIG_AVR32_UBOOT
),)
13 $(MAKE
) -C u-boot
clean
17 $(MAKE
) -C u-boot compile
22 cp
$(LINUX_DIR
)/arch
/avr32
/boot
/images
/uImage
$(KDIR
)/uImage
25 define Image
/BuildKernel
26 cp
$(KDIR
)/uImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-uImage
28 $(STAGING_DIR_HOST
)/bin
/lzma e
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux.lzma
29 mkimage
-A avr32
-O linux
-T kernel
-a
0x10000000 -C lzma \
31 -n
'OpenWrt Linux-$(LINUX_VERSION)' \
32 -d
$(KDIR
)/vmlinux.lzma
$(KDIR
)/uImage-lzma
34 cp
$(KDIR
)/uImage-lzma
$(BIN_DIR
)/openwrt-
$(BOARD
)-uImage-lzma
38 $(call Image
/Build
/$(1),$(1))
41 define Image
/Build
/squashfs
42 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
44 dd if
=$(KDIR
)/uImage bs
=1024k conv
=sync
; \
45 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
46 ) > $(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img
49 define Image
/Build
/jffs2-64k
51 dd if
=$(KDIR
)/uImage bs
=1024k conv
=sync
; \
52 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
53 ) > $(BIN_DIR
)/openwrt-
$(BOARD
)-$(1).img
56 $(eval
$(call BuildImage
))