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
10 ifneq ($(CONFIG_AVR32_UBOOT
),)
12 $(MAKE
) -C u-boot
clean
16 $(MAKE
) -C u-boot compile
20 define Image
/BuildKernel
21 cp
$(KDIR
)/uImage
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage
23 $(STAGING_DIR_HOST
)/bin
/lzma e
$(LINUX_DIR
)/arch
/avr32
/boot
/images
/vmlinux.bin
$(KDIR
)/vmlinux.lzma
24 mkimage
-A avr32
-O linux
-T kernel
-a
0x10000000 -C lzma \
26 -n
'OpenWrt Linux-$(LINUX_VERSION)' \
27 -d
$(KDIR
)/vmlinux.lzma
$(KDIR
)/uImage-lzma
29 cp
$(KDIR
)/uImage-lzma
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-lzma
33 $(call Image
/Build
/$(1),$(1))
36 define Image
/Build
/squashfs
37 $(call prepare_generic_squashfs
,$(KDIR
)/root.squashfs
)
39 dd if
=$(KDIR
)/uImage-lzma bs
=1024k conv
=sync
; \
40 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
41 ) > $(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img
44 define Image
/Build
/jffs2-64k
46 dd if
=$(KDIR
)/uImage-lzma bs
=1024k conv
=sync
; \
47 dd if
=$(KDIR
)/root.
$(1) bs
=64k conv
=sync
; \
48 ) > $(BIN_DIR
)/$(IMG_PREFIX
)-$(1).img
51 $(eval
$(call BuildImage
))