2020-09-22 02:48:37 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2007-10-03 19:22:51 +00:00
|
|
|
#
|
2008-05-08 22:57:12 +00:00
|
|
|
# Copyright (C) 2007-2008 OpenWrt.org
|
2016-04-06 19:53:19 +00:00
|
|
|
# Copyright (C) 2016 LEDE Project
|
2006-06-21 14:02:29 +00:00
|
|
|
|
2007-11-14 23:11:07 +00:00
|
|
|
ifneq ($(__target_inc),1)
|
|
|
|
__target_inc=1
|
|
|
|
|
|
|
|
# default device type
|
|
|
|
DEVICE_TYPE?=router
|
|
|
|
|
|
|
|
# Default packages - the really basic set
|
2020-08-27 21:47:07 +00:00
|
|
|
DEFAULT_PACKAGES:=\
|
|
|
|
base-files \
|
|
|
|
ca-bundle \
|
|
|
|
dropbear \
|
|
|
|
fstools \
|
|
|
|
libc \
|
|
|
|
libgcc \
|
|
|
|
libustream-wolfssl \
|
|
|
|
logd \
|
|
|
|
mtd \
|
|
|
|
netifd \
|
|
|
|
opkg \
|
|
|
|
uci \
|
|
|
|
uclient-fetch \
|
|
|
|
urandom-seed \
|
|
|
|
urngd
|
2020-10-19 15:55:39 +00:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_SELINUX),)
|
|
|
|
DEFAULT_PACKAGES+=busybox-selinux procd-selinux
|
|
|
|
else
|
|
|
|
DEFAULT_PACKAGES+=busybox procd
|
|
|
|
endif
|
|
|
|
|
2020-05-29 16:40:03 +00:00
|
|
|
# For the basic set
|
|
|
|
DEFAULT_PACKAGES.basic:=
|
2014-11-26 08:59:49 +00:00
|
|
|
# For nas targets
|
2020-08-27 21:47:07 +00:00
|
|
|
DEFAULT_PACKAGES.nas:=\
|
|
|
|
block-mount \
|
|
|
|
fdisk \
|
|
|
|
lsblk \
|
|
|
|
mdadm
|
2007-11-14 23:11:07 +00:00
|
|
|
# For router targets
|
2020-08-27 21:47:07 +00:00
|
|
|
DEFAULT_PACKAGES.router:=\
|
|
|
|
dnsmasq \
|
|
|
|
firewall \
|
|
|
|
ip6tables \
|
|
|
|
iptables \
|
|
|
|
kmod-ipt-offload \
|
|
|
|
odhcp6c \
|
|
|
|
odhcpd-ipv6only \
|
|
|
|
ppp \
|
|
|
|
ppp-mod-pppoe
|
2007-11-14 23:11:07 +00:00
|
|
|
|
2007-09-08 19:55:42 +00:00
|
|
|
ifneq ($(DUMP),)
|
|
|
|
all: dumpinfo
|
|
|
|
endif
|
|
|
|
|
|
|
|
target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
|
|
|
|
ifeq ($(DUMP),)
|
|
|
|
PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD)
|
|
|
|
SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
|
|
|
|
else
|
|
|
|
PLATFORM_DIR:=${CURDIR}
|
2011-07-03 17:38:23 +00:00
|
|
|
ifeq ($(SUBTARGETS),)
|
|
|
|
SUBTARGETS:=$(strip $(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)))
|
|
|
|
endif
|
2007-09-08 19:55:42 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
TARGETID:=$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))
|
|
|
|
PLATFORM_SUBDIR:=$(PLATFORM_DIR)$(if $(SUBTARGET),/$(SUBTARGET))
|
|
|
|
|
|
|
|
ifneq ($(TARGET_BUILD),1)
|
2009-03-03 13:54:29 +00:00
|
|
|
ifndef DUMP
|
|
|
|
include $(PLATFORM_DIR)/Makefile
|
|
|
|
ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
|
|
|
|
include $(PLATFORM_SUBDIR)/target.mk
|
|
|
|
endif
|
2007-09-08 19:55:42 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifneq ($(SUBTARGET),)
|
|
|
|
-include ./$(SUBTARGET)/target.mk
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2011-07-03 17:38:23 +00:00
|
|
|
# Add device specific packages (here below to allow device type set from subtarget)
|
|
|
|
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
|
|
|
|
2014-03-09 12:16:08 +00:00
|
|
|
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
|
2020-03-24 23:02:08 +00:00
|
|
|
extra_packages = $(if $(filter wpad wpad-% nas,$(1)),iwinfo)
|
2014-03-09 12:16:08 +00:00
|
|
|
|
2016-02-26 20:47:10 +00:00
|
|
|
define ProfileDefault
|
2007-09-08 19:55:42 +00:00
|
|
|
NAME:=
|
2016-05-10 12:43:46 +00:00
|
|
|
PRIORITY:=
|
2007-09-08 19:55:42 +00:00
|
|
|
PACKAGES:=
|
|
|
|
endef
|
|
|
|
|
2007-11-14 23:11:07 +00:00
|
|
|
ifndef Profile
|
2007-09-08 19:55:42 +00:00
|
|
|
define Profile
|
2016-02-26 20:47:10 +00:00
|
|
|
$(eval $(call ProfileDefault))
|
2007-09-08 19:55:42 +00:00
|
|
|
$(eval $(call Profile/$(1)))
|
2014-10-22 08:57:25 +00:00
|
|
|
dumpinfo : $(call shexport,Profile/$(1)/Description)
|
2018-01-16 22:46:44 +00:00
|
|
|
PACKAGES := $(filter-out -%,$(PACKAGES))
|
2007-09-08 19:55:42 +00:00
|
|
|
DUMPINFO += \
|
|
|
|
echo "Target-Profile: $(1)"; \
|
2016-05-10 12:43:46 +00:00
|
|
|
$(if $(PRIORITY), echo "Target-Profile-Priority: $(PRIORITY)"; ) \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo "Target-Profile-Name: $(NAME)"; \
|
2014-03-09 12:16:08 +00:00
|
|
|
echo "Target-Profile-Packages: $(PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES) $(PACKAGES))"; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo "Target-Profile-Description:"; \
|
2014-10-22 08:57:25 +00:00
|
|
|
echo "$$$$$$$$$(call shvar,Profile/$(1)/Description)"; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo "@@"; \
|
|
|
|
echo;
|
2007-03-02 23:13:52 +00:00
|
|
|
endef
|
2007-11-14 23:11:07 +00:00
|
|
|
endif
|
2007-03-02 23:13:52 +00:00
|
|
|
|
2007-10-03 19:22:51 +00:00
|
|
|
ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
|
|
|
|
define IncludeProfiles
|
2012-04-23 16:10:25 +00:00
|
|
|
-include $(sort $(wildcard $(PLATFORM_DIR)/profiles/*.mk))
|
|
|
|
-include $(sort $(wildcard $(PLATFORM_SUBDIR)/profiles/*.mk))
|
2007-10-03 19:22:51 +00:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define IncludeProfiles
|
2012-04-23 16:10:25 +00:00
|
|
|
-include $(sort $(wildcard $(PLATFORM_DIR)/profiles/*.mk))
|
2007-10-03 19:22:51 +00:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2016-07-21 11:27:12 +00:00
|
|
|
PROFILE?=$(call qstrip,$(CONFIG_TARGET_PROFILE))
|
2016-05-11 18:13:58 +00:00
|
|
|
|
2007-10-03 19:22:51 +00:00
|
|
|
ifeq ($(TARGET_BUILD),1)
|
2016-05-11 18:13:58 +00:00
|
|
|
ifneq ($(DUMP),)
|
2007-10-03 19:22:51 +00:00
|
|
|
$(eval $(call IncludeProfiles))
|
2007-09-28 01:23:56 +00:00
|
|
|
endif
|
2007-09-08 20:04:43 +00:00
|
|
|
endif
|
2007-09-08 19:55:42 +00:00
|
|
|
|
2009-03-03 13:54:29 +00:00
|
|
|
ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)
|
|
|
|
include $(INCLUDE_DIR)/kernel-version.mk
|
|
|
|
endif
|
2007-09-08 19:55:42 +00:00
|
|
|
|
2010-06-26 20:42:58 +00:00
|
|
|
GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic
|
2016-12-25 19:11:34 +00:00
|
|
|
GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
|
|
|
|
GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
|
|
|
|
GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
|
2008-10-18 21:43:30 +00:00
|
|
|
GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
|
2007-09-08 19:55:42 +00:00
|
|
|
|
2011-04-06 14:48:55 +00:00
|
|
|
__config_name_list = $(1)/config-$(KERNEL_PATCHVER) $(1)/config-default
|
|
|
|
__config_list = $(firstword $(wildcard $(call __config_name_list,$(1))))
|
|
|
|
find_kernel_config=$(if $(__config_list),$(__config_list),$(lastword $(__config_name_list)))
|
|
|
|
|
2011-04-17 21:47:44 +00:00
|
|
|
GENERIC_LINUX_CONFIG = $(call find_kernel_config,$(GENERIC_PLATFORM_DIR))
|
|
|
|
LINUX_TARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_DIR))
|
2011-04-06 14:48:55 +00:00
|
|
|
ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
|
2011-04-17 21:47:44 +00:00
|
|
|
LINUX_SUBTARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_SUBDIR))
|
2007-09-08 19:55:42 +00:00
|
|
|
endif
|
2011-04-06 14:48:55 +00:00
|
|
|
|
|
|
|
# config file list used for compiling
|
2011-04-17 21:47:44 +00:00
|
|
|
LINUX_KCONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(TOPDIR)/env/kernel-config)
|
2011-04-06 14:48:55 +00:00
|
|
|
|
|
|
|
# default config list for reconfiguring
|
|
|
|
# defaults to subtarget if subtarget exists and target does not
|
|
|
|
# defaults to target otherwise
|
2011-04-17 21:47:44 +00:00
|
|
|
USE_SUBTARGET_CONFIG = $(if $(wildcard $(LINUX_TARGET_CONFIG)),,$(if $(LINUX_SUBTARGET_CONFIG),1))
|
|
|
|
|
|
|
|
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG)))
|
|
|
|
LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG))
|
2011-04-06 14:48:55 +00:00
|
|
|
|
2012-02-05 18:15:18 +00:00
|
|
|
# select the config file to be changed by kernel_menuconfig/kernel_oldconfig
|
2011-04-06 14:48:55 +00:00
|
|
|
ifeq ($(CONFIG_TARGET),platform)
|
2011-04-17 21:47:44 +00:00
|
|
|
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG))
|
|
|
|
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
|
2011-04-06 14:48:55 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TARGET),subtarget)
|
2011-04-17 21:47:44 +00:00
|
|
|
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG))
|
|
|
|
LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG)
|
2011-04-06 14:48:55 +00:00
|
|
|
endif
|
2013-08-21 00:36:52 +00:00
|
|
|
ifeq ($(CONFIG_TARGET),subtarget_platform)
|
|
|
|
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG))
|
|
|
|
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
|
|
|
|
endif
|
2011-04-06 14:48:55 +00:00
|
|
|
ifeq ($(CONFIG_TARGET),env)
|
2011-04-17 21:47:44 +00:00
|
|
|
LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST)
|
|
|
|
LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config
|
2011-04-06 14:48:55 +00:00
|
|
|
endif
|
|
|
|
|
2020-10-20 19:36:52 +00:00
|
|
|
__linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
|
2011-04-06 14:48:55 +00:00
|
|
|
|
2020-10-20 19:36:52 +00:00
|
|
|
LINUX_CONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_KCONFIG_LIST))
|
|
|
|
LINUX_RECONF_CMD = $(SCRIPT_DIR)/kconfig.pl $(call __linux_confcmd,$(LINUX_RECONFIG_LIST))
|
|
|
|
LINUX_RECONF_DIFF = $(SCRIPT_DIR)/kconfig.pl - '>' $(call __linux_confcmd,$(filter-out $(LINUX_RECONFIG_TARGET),$(LINUX_RECONFIG_LIST))) $(1) $(GENERIC_PLATFORM_DIR)/config-filter
|
2007-09-08 19:55:42 +00:00
|
|
|
|
|
|
|
ifeq ($(DUMP),1)
|
|
|
|
BuildTarget=$(BuildTargets/DumpCurrent)
|
|
|
|
|
2013-09-26 17:53:09 +00:00
|
|
|
CPU_CFLAGS = -Os -pipe
|
|
|
|
ifneq ($(findstring mips,$(ARCH)),)
|
|
|
|
ifneq ($(findstring mips64,$(ARCH)),)
|
|
|
|
CPU_TYPE ?= mips64
|
|
|
|
else
|
|
|
|
CPU_TYPE ?= mips32
|
|
|
|
endif
|
|
|
|
CPU_CFLAGS += -mno-branch-likely
|
|
|
|
CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
|
|
|
|
CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
|
2020-08-14 05:11:22 +00:00
|
|
|
CPU_CFLAGS_mips64r2 = -mips64r2 -mtune=mips64r2 -mabi=64
|
2020-10-19 12:47:45 +00:00
|
|
|
CPU_CFLAGS_4kec = -mips32r2 -mtune=4kec
|
2015-10-31 09:30:03 +00:00
|
|
|
CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
|
2014-06-07 17:36:02 +00:00
|
|
|
CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
|
2018-06-19 06:44:54 +00:00
|
|
|
CPU_CFLAGS_octeonplus = -march=octeon+ -mabi=64
|
2013-09-26 17:53:09 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),i386)
|
2020-01-12 04:44:34 +00:00
|
|
|
CPU_TYPE ?= pentium-mmx
|
|
|
|
CPU_CFLAGS_pentium-mmx = -march=pentium-mmx
|
2015-07-12 19:26:48 +00:00
|
|
|
CPU_CFLAGS_pentium4 = -march=pentium4
|
2013-09-26 17:53:09 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(findstring arm,$(ARCH)),)
|
|
|
|
CPU_TYPE ?= xscale
|
|
|
|
endif
|
2013-09-26 17:53:28 +00:00
|
|
|
ifeq ($(ARCH),powerpc)
|
|
|
|
CPU_CFLAGS_603e:=-mcpu=603e
|
|
|
|
CPU_CFLAGS_8540:=-mcpu=8540
|
|
|
|
CPU_CFLAGS_405:=-mcpu=405
|
|
|
|
CPU_CFLAGS_440:=-mcpu=440
|
2016-07-20 13:44:50 +00:00
|
|
|
CPU_CFLAGS_464fp:=-mcpu=464fp
|
2013-09-26 17:53:28 +00:00
|
|
|
endif
|
2016-11-03 14:54:19 +00:00
|
|
|
ifeq ($(ARCH),powerpc64)
|
|
|
|
CPU_TYPE ?= powerpc64
|
|
|
|
CPU_CFLAGS_powerpc64:=-mcpu=powerpc64
|
|
|
|
endif
|
2013-09-26 17:53:09 +00:00
|
|
|
ifeq ($(ARCH),sparc)
|
|
|
|
CPU_TYPE = sparc
|
|
|
|
CPU_CFLAGS_ultrasparc = -mcpu=ultrasparc
|
|
|
|
endif
|
2014-11-24 06:33:13 +00:00
|
|
|
ifeq ($(ARCH),aarch64)
|
2017-04-19 09:34:18 +00:00
|
|
|
CPU_TYPE ?= generic
|
|
|
|
CPU_CFLAGS_generic = -mcpu=generic
|
2016-11-03 18:16:28 +00:00
|
|
|
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
|
2014-11-24 06:33:13 +00:00
|
|
|
endif
|
2015-11-10 12:03:59 +00:00
|
|
|
ifeq ($(ARCH),arc)
|
|
|
|
CPU_TYPE ?= arc700
|
2016-01-18 17:52:03 +00:00
|
|
|
CPU_CFLAGS += -matomic
|
2017-02-08 17:52:08 +00:00
|
|
|
CPU_CFLAGS_arc700 = -mcpu=arc700
|
|
|
|
CPU_CFLAGS_archs = -mcpu=archs
|
2015-11-10 12:03:59 +00:00
|
|
|
endif
|
2017-01-04 01:15:15 +00:00
|
|
|
ifneq ($(CPU_TYPE),)
|
|
|
|
ifndef CPU_CFLAGS_$(CPU_TYPE)
|
|
|
|
$(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
|
|
|
|
endif
|
|
|
|
endif
|
2013-09-26 17:53:14 +00:00
|
|
|
DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE)))
|
2016-07-05 07:49:12 +00:00
|
|
|
|
|
|
|
ifneq ($(BOARD),)
|
|
|
|
TMP_CONFIG:=$(TMP_DIR)/.kconfig-$(call target_conf,$(TARGETID))
|
|
|
|
$(TMP_CONFIG): $(LINUX_KCONFIG_LIST)
|
|
|
|
$(LINUX_CONF_CMD) > $@ || rm -f $@
|
|
|
|
-include $(TMP_CONFIG)
|
|
|
|
.SILENT: $(TMP_CONFIG)
|
|
|
|
.PRECIOUS: $(TMP_CONFIG)
|
|
|
|
|
2019-04-27 17:13:07 +00:00
|
|
|
ifdef KERNEL_TESTING_PATCHVER
|
2020-07-07 08:32:09 +00:00
|
|
|
ifneq ($(KERNEL_TESTING_PATCHVER),$(KERNEL_PATCHVER))
|
|
|
|
FEATURES += testing-kernel
|
|
|
|
endif
|
2019-04-27 17:13:07 +00:00
|
|
|
endif
|
2016-07-05 07:49:12 +00:00
|
|
|
ifneq ($(CONFIG_OF),)
|
|
|
|
FEATURES += dt
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_GENERIC_GPIO)$(CONFIG_GPIOLIB),)
|
|
|
|
FEATURES += gpio
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_PCI),)
|
|
|
|
FEATURES += pci
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_PCIEPORTBUS),)
|
|
|
|
FEATURES += pcie
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_USB)$(CONFIG_USB_SUPPORT),)
|
|
|
|
ifneq ($(CONFIG_USB_ARCH_HAS_HCD)$(CONFIG_USB_EHCI_HCD),)
|
|
|
|
FEATURES += usb
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_PCMCIA)$(CONFIG_PCCARD),)
|
|
|
|
FEATURES += pcmcia
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_VGA_CONSOLE)$(CONFIG_FB),)
|
|
|
|
FEATURES += display
|
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_RTC_CLASS),)
|
|
|
|
FEATURES += rtc
|
|
|
|
endif
|
2016-06-22 13:15:10 +00:00
|
|
|
ifneq ($(CONFIG_VIRTIO),)
|
|
|
|
FEATURES += virtio
|
|
|
|
endif
|
2017-01-24 11:40:00 +00:00
|
|
|
ifneq ($(CONFIG_CPU_MIPS32_R2),)
|
2018-02-02 22:06:14 +00:00
|
|
|
FEATURES += mips16
|
2017-01-24 11:40:00 +00:00
|
|
|
endif
|
2016-07-14 13:41:22 +00:00
|
|
|
FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
|
2016-07-05 07:49:12 +00:00
|
|
|
|
|
|
|
# remove duplicates
|
|
|
|
FEATURES:=$(sort $(FEATURES))
|
|
|
|
endif
|
2007-09-08 19:55:42 +00:00
|
|
|
endif
|
|
|
|
|
2016-05-09 16:51:00 +00:00
|
|
|
CUR_SUBTARGET:=$(SUBTARGET)
|
|
|
|
ifeq ($(SUBTARGETS),)
|
2016-05-15 15:44:10 +00:00
|
|
|
CUR_SUBTARGET := default
|
2016-05-09 16:51:00 +00:00
|
|
|
endif
|
|
|
|
|
2007-09-08 19:55:42 +00:00
|
|
|
define BuildTargets/DumpCurrent
|
2007-10-20 19:10:06 +00:00
|
|
|
.PHONY: dumpinfo
|
2014-10-22 08:57:25 +00:00
|
|
|
dumpinfo : export DESCRIPTION=$$(Target/Description)
|
2007-09-08 19:55:42 +00:00
|
|
|
dumpinfo:
|
|
|
|
@echo 'Target: $(TARGETID)'; \
|
|
|
|
echo 'Target-Board: $(BOARD)'; \
|
2009-08-03 11:44:28 +00:00
|
|
|
echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),$(if $(SUBTARGET),))'; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo 'Target-Arch: $(ARCH)'; \
|
2016-04-17 17:50:53 +00:00
|
|
|
echo 'Target-Arch-Packages: $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(ARCH)$(if $(CPU_TYPE),_$(CPU_TYPE))$(if $(CPU_SUBTYPE),_$(CPU_SUBTYPE)))'; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo 'Target-Features: $(FEATURES)'; \
|
2007-10-05 21:44:43 +00:00
|
|
|
echo 'Target-Depends: $(DEPENDS)'; \
|
2009-03-14 03:17:06 +00:00
|
|
|
echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
|
2013-09-26 17:53:32 +00:00
|
|
|
echo 'CPU-Type: $(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))'; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo 'Linux-Version: $(LINUX_VERSION)'; \
|
2019-04-27 17:13:07 +00:00
|
|
|
$(if $(LINUX_TESTING_VERSION),echo 'Linux-Testing-Version: $(LINUX_TESTING_VERSION)';) \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
|
|
|
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
2014-10-22 08:57:25 +00:00
|
|
|
$(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; )) \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo 'Target-Description:'; \
|
2014-10-22 08:57:25 +00:00
|
|
|
echo "$$$$DESCRIPTION"; \
|
2007-09-08 19:55:42 +00:00
|
|
|
echo '@@'; \
|
2014-03-09 12:16:08 +00:00
|
|
|
echo 'Default-Packages: $(DEFAULT_PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES))'; \
|
2007-09-08 19:55:42 +00:00
|
|
|
$(DUMPINFO)
|
2016-05-09 16:51:00 +00:00
|
|
|
$(if $(CUR_SUBTARGET),$(SUBMAKE) -r --no-print-directory -C image -s DUMP=1 SUBTARGET=$(CUR_SUBTARGET))
|
2007-10-20 19:10:06 +00:00
|
|
|
$(if $(SUBTARGET),,@$(foreach SUBTARGET,$(SUBTARGETS),$(SUBMAKE) -s DUMP=1 SUBTARGET=$(SUBTARGET); ))
|
2007-09-08 19:55:42 +00:00
|
|
|
endef
|
2007-03-02 23:36:59 +00:00
|
|
|
|
2007-09-08 19:55:42 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
ifeq ($(TARGET_BUILD),1)
|
|
|
|
include $(INCLUDE_DIR)/kernel-build.mk
|
|
|
|
BuildTarget?=$(BuildKernel)
|
2007-01-10 21:52:28 +00:00
|
|
|
endif
|
2006-06-21 14:02:29 +00:00
|
|
|
|
2007-09-08 19:55:42 +00:00
|
|
|
endif #__target_inc
|