Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede: (21 commits)
  kernel: test for kernel version greater 5.13 to fix mmc-spi
  toolchain/gcc: revert to version 11 by default
  ramips: MT7620 add Support HiWiFi R33(C312B B52) (coolsnowwolf#10812)
  Revert "elfutils: fix gcc8 compile"
  elfutils: fix gcc8 compile
  linux-firmware: update to 20230117
  ipq60xx: disable ath11k wireless temporarily
  igb-intel: drop package
  rockchip: fix dts patch for Ariaboard Photonicat
  treewide: sync with upstream (coolsnowwolf#10750)
  arm-trusted-firmware-sunxi: Use common trusted-firmware-a.mk (coolsnowwolf#10804)
  kernel: bump to 5.4.230, 5.10.165, 5.15.90 (coolsnowwolf#10803)
  kernel: bump 6.1 to 6.1.8 (coolsnowwolf#10802)
  layerscape: sync with official source (coolsnowwolf#10801)
  rockchip: add support for Ariaboard Photonicat
  rfkill: enable for rockchip by default
  rockchip: set network for MPC1903 (coolsnowwolf#10794)
  intel-microcode: update to 20221108 (coolsnowwolf#10797)
  ipset: update to 7.17
  uboot-rockchip: fixes spl mode for rk3568
  ...
  • Loading branch information
github-actions[bot] committed Jan 28, 2023
2 parents d5763da + fec4f5d commit 4410bb3
Show file tree
Hide file tree
Showing 1,107 changed files with 25,919 additions and 303,962 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir
world:

DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)

ifneq ($(OPENWRT_BUILD),1)
_SINGLE=export MAKEFLAGS=$(space);
Expand Down
7 changes: 3 additions & 4 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ menu "Target Images"
bool "lzma"

config TARGET_INITRAMFS_COMPRESSION_LZO
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lzo"

config TARGET_INITRAMFS_COMPRESSION_LZ4
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lz4"

config TARGET_INITRAMFS_COMPRESSION_XZ
Expand Down Expand Up @@ -301,13 +299,14 @@ menu "Target Images"
depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx
default 64 if TARGET_rockchip
default 32 if TARGET_rockchip
default 16

config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MiB)"
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
default 400
default 400 if TARGET_x86
default 160
help
Select the root filesystem partition size.

Expand Down
1 change: 1 addition & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ config KERNEL_CRASH_DUMP

config USE_RFKILL
bool "Enable rfkill support"
default y if TARGET_rockchip
default RFKILL_SUPPORT

config USE_SPARSE
Expand Down
2 changes: 1 addition & 1 deletion include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ BPF_CFLAGS := \
-O2 -emit-llvm -Xclang -disable-llvm-passes

ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
ifeq ($(DUMP),)
ifeq ($(DUMP)$(filter download refresh,$(MAKECMDGOALS)),)
CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
ifeq ($(CLANG_VER_VALID),)
Expand Down
6 changes: 5 additions & 1 deletion include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,9 @@ endif

define HostBuild
$(HostBuild/Core)
$(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
$(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,
$(if $(and $(CONFIG_AUTOREMOVE), $(wildcard $(HOST_STAMP_INSTALLED), $(wildcard $(HOST_STAMP_BUILT)))),,
$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))
)
)
endef
11 changes: 11 additions & 0 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ endef
define Build/initrd_compression
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),.lz4) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),.lzma) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),.lzo) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),.xz) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd)
endef
Expand Down Expand Up @@ -316,6 +318,15 @@ define Build/gzip
@mv $@.new $@
endef

define Build/gzip-filename
@mkdir -p $@.tmp
@cp $@ $@.tmp/$(word 1,$(1))
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $@.tmp/$(word 1,$(1)) $(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/gzip -f -9 -N -c $@.tmp/$(word 1,$(1)) $(word 2,$(1)) > $@.new
@mv $@.new $@
@rm -rf $@.tmp
endef

define Build/install-dtb
$(call locked, \
$(foreach dts,$(DEVICE_DTS), \
Expand Down
42 changes: 41 additions & 1 deletion include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ define Device/InitProfile
DEVICE_ALT0_TITLE = $$(DEVICE_ALT0_VENDOR) $$(DEVICE_ALT0_MODEL)$$(if $$(DEVICE_ALT0_VARIANT), $$(DEVICE_ALT0_VARIANT))
DEVICE_ALT1_TITLE = $$(DEVICE_ALT1_VENDOR) $$(DEVICE_ALT1_MODEL)$$(if $$(DEVICE_ALT1_VARIANT), $$(DEVICE_ALT1_VARIANT))
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
DEVICE_ALT3_TITLE = $$(DEVICE_ALT3_VENDOR) $$(DEVICE_ALT3_MODEL)$$(if $$(DEVICE_ALT3_VARIANT), $$(DEVICE_ALT3_VARIANT))
DEVICE_ALT4_TITLE = $$(DEVICE_ALT4_VENDOR) $$(DEVICE_ALT4_MODEL)$$(if $$(DEVICE_ALT4_VARIANT), $$(DEVICE_ALT4_VARIANT))
DEVICE_VENDOR :=
DEVICE_MODEL :=
DEVICE_VARIANT :=
Expand All @@ -345,6 +347,12 @@ define Device/InitProfile
DEVICE_ALT2_VENDOR :=
DEVICE_ALT2_MODEL :=
DEVICE_ALT2_VARIANT :=
DEVICE_ALT3_VENDOR :=
DEVICE_ALT3_MODEL :=
DEVICE_ALT3_VARIANT :=
DEVICE_ALT4_VENDOR :=
DEVICE_ALT4_MODEL :=
DEVICE_ALT4_VARIANT :=
DEVICE_PACKAGES :=
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
endef
Expand All @@ -359,6 +367,7 @@ define Device/Init
ARTIFACTS :=
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
FACTORY_IMG_NAME :=
IMAGE_SIZE :=
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
KERNEL_SUFFIX := -kernel.bin
Expand Down Expand Up @@ -418,11 +427,14 @@ DEFAULT_DEVICE_VARS := \
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \
FACTORY_IMG_NAME FACTORY_SIZE \
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT \
DEVICE_ALT3_VENDOR DEVICE_ALT3_MODEL DEVICE_ALT3_VARIANT \
DEVICE_ALT4_VENDOR DEVICE_ALT4_MODEL DEVICE_ALT4_VARIANT

define Device/ExportVar
$(1) : $(2):=$$($(2))
Expand Down Expand Up @@ -505,6 +517,12 @@ define Device/Build/initramfs
DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
Expand Down Expand Up @@ -613,6 +631,12 @@ define Device/Build/image
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
Expand Down Expand Up @@ -658,6 +682,12 @@ define Device/Build/artifact
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
Expand Down Expand Up @@ -699,6 +729,8 @@ $(if $(strip $(DEVICE_ALT0_TITLE)),Alternative device titles:
- $(DEVICE_ALT0_TITLE))
$(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE))
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
$(if $(strip $(DEVICE_ALT3_TITLE)),- $(DEVICE_ALT3_TITLE))
$(if $(strip $(DEVICE_ALT4_TITLE)),- $(DEVICE_ALT4_TITLE))
@@

endef
Expand All @@ -716,6 +748,14 @@ ifneq ($$(strip $$(DEVICE_ALT2_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT2_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1)))
endif
ifneq ($$(strip $$(DEVICE_ALT3_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT3_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1)))
endif
ifneq ($$(strip $$(DEVICE_ALT4_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT4_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1)))
endif
DEVICE_DISPLAY = $$(DEVICE_TITLE)
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
endef
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.10
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .164
LINUX_KERNEL_HASH-5.10.164 = 0c7eaaa87b012c6662440f4ce2ea6e1bb961c1845cafd102eab08a57efeb8278
LINUX_VERSION-5.10 = .165
LINUX_KERNEL_HASH-5.10.165 = 971defc48f19ed0a2a7ffd4b48234619cac28895c985c6d747f5b707ba47af0d
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .89
LINUX_KERNEL_HASH-5.15.89 = e7311b874e014bb6d37c051319bd6a4a4e3d05a1c32546522deabbfd2d752fe8
LINUX_VERSION-5.15 = .90
LINUX_KERNEL_HASH-5.15.90 = e6fd430022686753af7516fe7544f96aab379509dc5b7829017bdcd92b393b42
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .229
LINUX_KERNEL_HASH-5.4.229 = c5c592071195efef62082febe10efe6c793412670dfce89e476383d0493fa7af
LINUX_VERSION-5.4 = .230
LINUX_KERNEL_HASH-5.4.230 = a74fd32ccc1025b72f3ba7183208761f7c6190fb96e8f484f6d543a5a183e62f
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .7
LINUX_KERNEL_HASH-6.1.7 = 4ab048bad2e7380d3b827f1fad5ad2d2fc4f2e80e1c604d85d1f8781debe600f
LINUX_VERSION-6.1 = .8
LINUX_KERNEL_HASH-6.1.8 = b60bb53ab8ba370a270454b11e93d41af29126fc72bd6ede517673e2e57b816d
6 changes: 3 additions & 3 deletions include/kernel-defaults.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Kernel/Patch:=$(Kernel/Patch/Default)
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
LINUX_CAT:=xzcat
else
LINUX_CAT:=gzip -dc
LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc
endif

ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
Expand Down Expand Up @@ -180,10 +180,10 @@ endif
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),$(STAGING_DIR_HOST)/bin/lz4c -l -c1 -fz --favor-decSpeed $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),$(STAGING_DIR_HOST)/bin/lzop -9 -f $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
endif
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
Expand Down
19 changes: 16 additions & 3 deletions include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ $(eval $(call TestHostCommand,working-g++, \
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
$(TMP_DIR)/a.out))

$(eval $(call TestHostCommand,ncurses, \
$(eval $(call RequireCHeader,ncurses.h, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
initscr(), -lncurses))

$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
Expand Down Expand Up @@ -205,6 +204,20 @@ $(eval $(call SetupHostCommand,which,Please install 'which', \
/bin/which which, \
which which))

ifeq ($(HOST_OS),Linux)
$(eval $(call RequireCHeader,argp.h, \
Missing argp.h Please install the argp-standalone package if musl libc))

$(eval $(call RequireCHeader,fts.h, \
Missing fts.h Please install the musl-fts-dev package if musl libc))

$(eval $(call RequireCHeader,obstack.h, \
Missing obstack.h Please install the musl-obstack-dev package if musl libc))

$(eval $(call RequireCHeader,libintl.h, \
Missing libintl.h Please install the musl-libintl package if musl libc))
endif

$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
mkdir -p $(dir $@)
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
Expand Down
12 changes: 12 additions & 0 deletions include/prereq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ define RequireHeader
$$(eval $$(call Require,$(1),$(2)))
endef

# 1: header to test
# 2: failure message
# 3: optional compile time test
# 4: optional link library test (example -lncurses)
define RequireCHeader
define Require/$(1)
echo 'int main(int argc, char **argv) { $(3); return 0; }' | gcc -include $(1) -x c -o $(TMP_DIR)/a.out - $(4)
endef

$$(eval $$(call Require,$(1),$(2)))
endef

define CleanupPython2
define Require/python2-cleanup
if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
Expand Down
2 changes: 1 addition & 1 deletion include/scan.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp
FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE)
OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)

export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
export PATH:=$(STAGING_DIR_HOST)/bin:$(PATH)

define feedname
$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
Expand Down
16 changes: 8 additions & 8 deletions include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ path:=$(subst :,$(space),$(PATH))
path:=$(filter-out .%,$(path))
path:=$(subst $(space),:,$(path))
export PATH:=$(path)
export STAGING_DIR_HOST:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host),$(TOPDIR)/staging_dir/host)

unexport TAR_OPTIONS

ifeq ($(FORCE),)
.config scripts/config/conf scripts/config/mconf: staging_dir/host/.prereq-build
.config scripts/config/conf scripts/config/mconf: $(STAGING_DIR_HOST)/.prereq-build
endif

SCAN_COOKIE?=$(shell echo $$$$)
export SCAN_COOKIE
export STAGING_DIR_HOST=$(TOPDIR)/staging_dir/host

SUBMAKE:=umask 022; $(SUBMAKE)

ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;

prepare-mk: staging_dir/host/.prereq-build FORCE ;
prepare-mk: $(STAGING_DIR_HOST)/.prereq-build FORCE ;

ifdef SDK
IGNORE_PACKAGES = linux
Expand All @@ -75,7 +75,7 @@ endif
_ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))

prepare-tmpinfo: FORCE
@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK)
@+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK)
mkdir -p tmp/info
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
Expand Down Expand Up @@ -152,7 +152,7 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE

prepare_kernel_conf: .config toolchain/install FORCE

ifeq ($(wildcard staging_dir/host/bin/quilt),)
ifeq ($(wildcard $(STAGING_DIR_HOST)/bin/quilt),)
prepare_kernel_conf:
@+$(SUBMAKE) -r tools/quilt/compile
else
Expand All @@ -176,7 +176,7 @@ kernel_nconfig: prepare_kernel_conf
kernel_xconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig

staging_dir/host/.prereq-build: include/prereq-build.mk
$(STAGING_DIR_HOST)/.prereq-build: include/prereq-build.mk
mkdir -p tmp
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
echo "Prerequisite check failed. Use FORCE=1 to override."; \
Expand All @@ -199,7 +199,7 @@ else
DOWNLOAD_DIRS = package/download
endif

download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile)
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)

clean dirclean: .config
Expand Down Expand Up @@ -263,7 +263,7 @@ distclean:
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean

ifeq ($(findstring v,$(DEBUG)),)
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig staging_dir/host/.prereq-build tmp/.prereq-package prepare-tmpinfo
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig $(STAGING_DIR_HOST)/.prereq-build tmp/.prereq-package prepare-tmpinfo
endif
.PHONY: help FORCE
.NOTPARALLEL:
Expand Down
2 changes: 1 addition & 1 deletion include/trusted-firmware-a.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ define Build/Compile/Trusted-Firmware-A
$(if $(DTC),DTC="$(DTC)") \
PLAT=$(PLAT) \
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
$(if $(CONFIG_BINUTILS_VERSION_2_39),LDFLAGS="-no-warn-rwx-segments") \
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
$(TFA_MAKE_FLAGS)
endef

Expand Down
Loading

0 comments on commit 4410bb3

Please sign in to comment.