ramips: correct MTC WR1201 LAN ports names
[oweals/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 define Build/at91-install-zImage
13     $(CP) $(KDIR)/zImage $@
14 endef
15
16 ifeq ($(SUBTARGET),sam9x)
17 include ./sam9x.mk
18 endif
19 ifeq ($(SUBTARGET),sama5)
20 include ./sama5.mk
21 endif
22
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))))
27
28 define Device/Default
29   $(Device/default-nand)
30   PROFILES := Default
31   FILESYSTEMS := squashfs ubifs ext4
32   DEVICE_DTS := $(1)
33   KERNEL_NAME := zImage
34   KERNEL_SIZE := 4096k
35   KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
36   DTB_SIZE := 128k
37 endef
38
39 define Device/dtb
40   KERNEL := kernel-bin | lzma | uImage lzma
41 endef
42
43 define Device/evaluation-sdimage
44   IMAGES += sdcard.img.gz
45   IMAGE/sdcard.img.gz := at91-sdcard
46 endef
47
48 define Device/evaluation
49   KERNEL_INSTALL := 1
50   KERNEL_SUFFIX := -uImage
51   IMAGES := root.ubi
52   IMAGE/root.ubi := append-ubi
53 endef
54
55 define Device/evaluation-zImage
56   IMAGES += zImage
57   IMAGE/zImage := at91-install-zImage
58 endef
59
60 define Device/evaluation-dtb
61   $(Device/evaluation)
62   $(Device/dtb)
63   $(Device/evaluation-zImage)
64   IMAGES += dtb
65   IMAGE/dtb := install-dtb
66   KERNEL_SUFFIX := -fit-zImage.itb
67   KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
68 endef
69
70 define Device/evaluation-fit
71   $(Device/evaluation)
72   KERNEL_SUFFIX := -fit-uImage.itb
73   KERNEL := kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
74 endef
75
76 define Device/production
77   UBINIZE_OPTS := -E 5
78   IMAGES := factory.bin
79   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
80 endef
81
82 define Device/production-dtb
83   $(Device/production)
84   $(Device/dtb)
85   IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \
86           | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
87 endef
88
89 $(eval $(call BuildImage))