at91: Renaming subtarget sama5d3 to sama5
[openwrt/openwrt.git] / target / linux / at91 / image / Makefile
1 #
2 # Copyright (C) 2006-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 KERNEL_LOADADDR := 0x20008000
11
12 ifeq ($(SUBTARGET),legacy)
13 include ./legacy.mk
14 UBIFS_OPTS := -m 2048 -e 126KiB -c 2048
15 endif
16
17 ifeq ($(SUBTARGET),sama5)
18 include ./sama5.mk
19 UBIFS_OPTS := -m 2048 -e 124KiB -c 2048
20 endif
21
22 define Device/Default
23 PROFILES := Default
24 FILESYSTEMS := squashfs ubifs
25 DEVICE_DTS := $(1)
26 KERNEL_NAME := zImage
27 KERNEL_SIZE := 4096k
28 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
29 BLOCKSIZE := 128k
30 PAGESIZE := 2048
31 SUBPAGESIZE := 512
32 DTB_SIZE :=
33 endef
34
35 define Device/dtb
36 KERNEL := kernel-bin | lzma | uImage lzma
37 endef
38
39 define Device/evaluation
40 KERNEL_INSTALL := 1
41 KERNEL_SUFFIX := -uImage
42 IMAGES := root.ubi
43 IMAGE/root.ubi := append-ubi
44 endef
45
46 define Device/evaluation-dtb
47 $(Device/evaluation)
48 $(Device/dtb)
49 IMAGES += dtb
50 IMAGE/dtb := install-dtb
51 endef
52
53 define Device/production
54 UBINIZE_OPTS := -E 5
55 IMAGES := factory.bin
56 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
57 endef
58
59 define Device/production-dtb
60 $(Device/production)
61 $(Device/dtb)
62 DTB_SIZE := 128k
63 IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
64 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
65 endef
66
67 $(eval $(call BuildImage))