linux: add support of Synopsys ARC770-based boards
[openwrt/openwrt.git] / target / linux / arc770 / image / Makefile
1 #
2 # Copyright (C) 2015 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 define Build/patch-dtb
11 $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
12 $(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb
13 endef
14
15 # Shared device definition: applies to every defined device
16 define Device/Default
17 PROFILES = Default $$(DEVICE_PROFILE)
18 KERNEL_SUFFIX := .elf
19 KERNEL_INITRAMFS := kernel-bin | patch-dtb
20 KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf
21 DEVICE_PROFILE :=
22 DEVICE_DTS :=
23 endef
24 DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
25
26 define add_arc770
27 define Device/$(1)
28 DEVICE_PROFILE := $(1)
29 DEVICE_DTS := $(1)
30 endef
31 TARGET_DEVICES += $(1)
32 endef
33
34 # DesignWare AXS101
35 $(eval $(call add_arc770,axs101))
36
37 # nSIM with ARC770
38 $(eval $(call add_arc770,nsim_700))
39
40 $(eval $(call BuildImage))