93337097c08f31f94e0a26af4cabff331cfa6b58
[openwrt/staging/hauke.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 ifeq ($(TARGET_DEVICES),at91-sama5d4_xplained)
20 UBIFS_OPTS := -e 0x3e000 -c 2082 -m 0x1000 -x lzo
21 UBINIZE_OPTS := -m 0x1000 -p 0x40000
22 else
23 UBIFS_OPTS := -m 2048 -e 124KiB -c 2048
24 endif
25 endif
26
27 define Device/Default
28 PROFILES := Default
29 FILESYSTEMS := squashfs ubifs
30 DEVICE_DTS := $(1)
31 KERNEL_NAME := zImage
32 KERNEL_SIZE := 4096k
33 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
34 BLOCKSIZE := 128k
35 PAGESIZE := 2048
36 SUBPAGESIZE := 512
37 DTB_SIZE :=
38 endef
39
40 define Device/dtb
41 KERNEL := kernel-bin | lzma | uImage lzma
42 endef
43
44 define Device/evaluation
45 KERNEL_INSTALL := 1
46 KERNEL_SUFFIX := -uImage
47 IMAGES := root.ubi
48 IMAGE/root.ubi := append-ubi
49 endef
50
51 define Device/evaluation-zImage
52 IMAGES += zImage
53 IMAGE/zImage := install-zImage
54 endef
55
56 define Device/evaluation-dtb
57 $(Device/evaluation)
58 $(Device/dtb)
59 $(Device/evaluation-zImage)
60 IMAGES += dtb
61 IMAGE/dtb := install-dtb
62 endef
63
64 define Device/production
65 UBINIZE_OPTS := -E 5
66 IMAGES := factory.bin
67 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
68 endef
69
70 define Device/production-dtb
71 $(Device/production)
72 $(Device/dtb)
73 DTB_SIZE := 128k
74 IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
75 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
76 endef
77
78 $(eval $(call BuildImage))