DEVICE_TYPE?=router
# Default packages - the really basic set
-DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch
+DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
# For nas targets
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
# For router targets
define ProfileDefault
NAME:=
+ PRIORITY:=
PACKAGES:=
endef
define Profile
$(eval $(call ProfileDefault))
$(eval $(call Profile/$(1)))
- dumpinfo : $(call shexport,Profile/$(1)/Config)
dumpinfo : $(call shexport,Profile/$(1)/Description)
DUMPINFO += \
echo "Target-Profile: $(1)"; \
+ $(if $(PRIORITY), echo "Target-Profile-Priority: $(PRIORITY)"; ) \
echo "Target-Profile-Name: $(NAME)"; \
echo "Target-Profile-Packages: $(PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES) $(PACKAGES))"; \
- if [ -f ./config/profile-$(1) ]; then \
- echo "Target-Profile-Kconfig: yes"; \
- fi; \
- echo "Target-Profile-Config: "; \
- echo "$$$$$$$$$(call shvar,Profile/$(1)/Config)"; \
- echo "@@"; \
echo "Target-Profile-Description:"; \
echo "$$$$$$$$$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
- ifeq ($(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(if $(SUBTARGET),$(SUBTARGET)_))$(1)),y)
- PROFILE=$(1)
- endif
endef
endif
endef
endif
+PROFILE:=$(call qstrip,$(CONFIG_TARGET_PROFILE))
+
ifeq ($(TARGET_BUILD),1)
- $(eval $(call IncludeProfiles))
-else
- ifeq ($(DUMP),)
+ ifneq ($(DUMP),)
$(eval $(call IncludeProfiles))
endif
endif
CPU_CFLAGS_24kec = -mips32r2 -mtune=24kec
CPU_CFLAGS_34kc = -mips32r2 -mtune=34kc
CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
+ CPU_CFLAGS_1004kc = -mips32r2 -mtune=1004kc
CPU_CFLAGS_octeon = -march=octeon -mabi=64
CPU_CFLAGS_dsp = -mdsp
CPU_CFLAGS_dsp2 = -mdspr2
DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE)))
endif
+CUR_SUBTARGET:=$(SUBTARGET)
+ifeq ($(SUBTARGETS),)
+ CUR_SUBTARGET := default
+endif
+
define BuildTargets/DumpCurrent
.PHONY: dumpinfo
dumpinfo : export DESCRIPTION=$$(Target/Description)
@echo 'Target: $(TARGETID)'; \
echo 'Target-Board: $(BOARD)'; \
echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),$(if $(SUBTARGET),))'; \
- echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
echo 'Target-Arch: $(ARCH)'; \
echo 'Target-Arch-Packages: $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(ARCH)$(if $(CPU_TYPE),_$(CPU_TYPE))$(if $(CPU_SUBTYPE),_$(CPU_SUBTYPE)))'; \
echo 'Target-Features: $(FEATURES)'; \
echo '@@'; \
echo 'Default-Packages: $(DEFAULT_PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES))'; \
$(DUMPINFO)
+ $(if $(CUR_SUBTARGET),$(SUBMAKE) -r --no-print-directory -C image -s DUMP=1 SUBTARGET=$(CUR_SUBTARGET))
$(if $(SUBTARGET),,@$(foreach SUBTARGET,$(SUBTARGETS),$(SUBMAKE) -s DUMP=1 SUBTARGET=$(SUBTARGET); ))
endef