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),sam9x)
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 Device/evaluation-sdimage
44 IMAGES += sdcard.img.gz
45 IMAGE/sdcard.img.gz := at91-sdcard
48 define Device/evaluation
50 KERNEL_SUFFIX := -uImage
52 IMAGE/root.ubi := append-ubi
55 define Device/evaluation-zImage
57 IMAGE/zImage := at91-install-zImage
60 define Device/evaluation-dtb
63 $(Device/evaluation-zImage)
65 IMAGE/dtb := install-dtb
66 KERNEL_SUFFIX := -fit-zImage.itb
67 KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
70 define Device/evaluation-fit
72 KERNEL_SUFFIX := -fit-uImage.itb
73 KERNEL := kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
76 define Device/production
79 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
82 define Device/production-dtb
85 IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
86 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
89 $(eval $(call BuildImage))