2 # Copyright (C) 2007-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
12 ifneq ($(CONFIG_AVR32_UBOOT
),)
14 $(MAKE
) -C u-boot
clean
18 $(MAKE
) -C u-boot compile
22 define Image
/BuildKernel
24 cp
$(KDIR
)/uImage
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
26 $(STAGING_DIR_HOST
)/bin
/lzma e
$(LINUX_DIR
)/arch
/avr32
/boot
/images
/vmlinux.bin
$(KDIR
)/vmlinux.lzma
27 mkimage
-A avr32
-O linux
-T kernel
-a
0x10000000 -C lzma \
29 -n
'OpenWrt Linux-$(LINUX_VERSION)' \
30 -d
$(KDIR
)/vmlinux.lzma
$(KDIR
)/uImage-lzma
32 cp
$(KDIR
)/uImage-lzma
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-lzma
36 $(call Image
/Build
/$(1),$(1))
39 define Image
/Build
/squashfs
41 cat
$(KDIR
)/uImage-lzma
; \
42 cat
$(KDIR
)/root.squashfs
; \
43 ) > $(KDIR_TMP
)/avr32-squahsfs.img
44 padjffs2
$(KDIR_TMP
)/avr32-squahsfs.img
64
45 dd if
=$(KDIR_TMP
)/avr32-squahsfs.img of
=$(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img bs
=64k conv
=sync
48 define Image
/Build
/jffs2-64k
50 dd if
=$(KDIR
)/uImage-lzma bs
=64k conv
=sync
; \
51 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
52 ) > $(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img
55 $(eval
$(call BuildImage
))