1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2006-2013 OpenWrt.org
5 include $(TOPDIR
)/rules.mk
6 include $(INCLUDE_DIR
)/image.mk
8 KERNEL_LOADADDR
:= 0x20008000
10 define Build
/at91-install-zImage
11 $(CP
) $(KDIR
)/zImage
$@
14 include $(SUBTARGET
).mk
16 AT91_SD_BOOT_PARTSIZE
:=64
17 FAT32_BLOCK_SIZE
:=1024
18 FAT32_BLOCKS
:=$(shell echo \
19 $$(($(AT91_SD_BOOT_PARTSIZE
)*1024*1024/$(FAT32_BLOCK_SIZE
))))
22 $(Device
/default-nand
)
24 FILESYSTEMS
:= squashfs ubifs ext4
25 DEVICE_DTS
= $(lastword
$(subst _
, ,$(1)))
28 KERNEL
:= kernel-bin | append-dtb | lzma | uImage lzma
33 KERNEL
:= kernel-bin | lzma | uImage lzma
36 define Device
/evaluation-sdimage
37 IMAGES
+= sdcard.img.gz
38 IMAGE
/sdcard.img.gz
:= at91-sdcard
41 define Device
/evaluation
43 KERNEL_SUFFIX
:= -uImage
45 IMAGE
/root.ubi
:= append-ubi
48 define Device
/evaluation-zImage
50 IMAGE
/zImage
:= at91-install-zImage
53 define Device
/evaluation-dtb
56 KERNEL_SUFFIX
:= -fit-zImage.itb
57 KERNEL
= kernel-bin | gzip | fit gzip
$$(KDIR
)/image-
$$(DEVICE_DTS
).dtb
60 define Device
/evaluation-fit
62 KERNEL_SUFFIX
:= -fit-uImage.itb
63 KERNEL
= kernel-bin | lzma | fit lzma
$$(KDIR
)/image-
$$(DEVICE_DTS
).dtb
66 define Device
/production
69 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
72 define Device
/production-dtb
75 IMAGE
/factory.bin
:= append-dtb | pad-to
$$$$(DTB_SIZE
) | \
76 append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi
79 $(eval
$(call BuildImage
))