linux: add support of Synopsys ARCHS38-based boards
[openwrt/openwrt.git] / target / linux / archs38 / image / Makefile
1 #
2 # Copyright (C) 2016 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_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
19 KERNEL_SUFFIX := .elf
20 KERNEL_INITRAMFS := kernel-bin | patch-dtb
21 KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf
22 DEVICE_PROFILE :=
23 DEVICE_DTS :=
24 endef
25 DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
26
27 define add_archs38
28 define Device/$(1)
29 DEVICE_PROFILE := $(1)
30 DEVICE_DTS := $(1)
31 endef
32 TARGET_DEVICES += $(1)
33 endef
34
35 # DesignWare AXS103
36 $(eval $(call add_archs38,axs103_idu))
37
38 # nSIM with ARCHS38
39 $(eval $(call add_archs38,nsim_hs_idu))
40
41 $(eval $(call BuildImage))