2 # Copyright (C) 2006-2013 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 KERNEL_LOADADDR
:= 0x20008000
12 define Build
/at91-install-zImage
13 $(CP
) $(KDIR
)/zImage
$@
16 ifeq ($(SUBTARGET
),legacy
)
19 ifeq ($(SUBTARGET
),sama5
)
23 AT91_SD_BOOT_PARTSIZE
:=64
24 FAT32_BLOCK_SIZE
:=1024
25 FAT32_BLOCKS
:=$(shell echo \
26 $$(($(AT91_SD_BOOT_PARTSIZE
)*1024*1024/$(FAT32_BLOCK_SIZE
))))
29 $(Device
/default-nand
)
31 FILESYSTEMS
:= squashfs ubifs ext4
35 KERNEL
:= kernel-bin | append-dtb | lzma | uImage lzma
40 KERNEL
:= kernel-bin | lzma | uImage lzma
43 define Build
/at91-sdcard
44 $(if
$(findstring ext4
,$@
), \
46 mkfs.fat
-C
$@.boot
$(FAT32_BLOCKS
)
48 mcopy
-i
$@.boot
$(KDIR
)/zImage
::zImage
50 $(foreach dts
,$(DEVICE_DTS
), \
51 mcopy
-i
$@.boot
$(DTS_DIR
)/$(dts
).dtb \
55 $(BIN_DIR
)/u-boot-
$(DEVICE_NAME
:at91-
%=%)_mmc
/u-boot.bin \
59 $(BIN_DIR
)/at91bootstrap-
$(DEVICE_NAME
:at91-
%=%)sd
*/at91bootstrap.bin \
62 .
/gen_at91_sdcard_img.sh \
66 $(AT91_SD_BOOT_PARTSIZE
) \
67 $(CONFIG_TARGET_ROOTFS_PARTSIZE
)
71 rm -f
$@.img
$@.boot
)
74 define Device
/evaluation-sdimage
75 IMAGES
+= sdcard.img.gz
76 IMAGE
/sdcard.img.gz
:= at91-sdcard
79 define Device
/evaluation
81 KERNEL_SUFFIX
:= -uImage
83 IMAGE
/root.ubi
:= append-ubi
86 define Device
/evaluation-zImage
88 IMAGE
/zImage
:= at91-install-zImage
91 define Device
/evaluation-dtb
94 $(Device
/evaluation-zImage
)
96 IMAGE
/dtb
:= install-dtb
99 define Device
/evaluation-fit
101 KERNEL_SUFFIX
:= -fit-uImage.itb
102 KERNEL
:= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
105 define Device
/production
107 IMAGES
:= factory.bin
108 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
111 define Device
/production-dtb
114 IMAGE
/factory.bin
:= append-dtb | pad-to
$$$$(DTB_SIZE
) \
115 | append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
118 $(eval
$(call BuildImage
))