diff --git a/config/Config-build.in b/config/Config-build.in index 8e12199cbd..a54df11566 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -182,6 +182,14 @@ menu "Global build settings" help Specifies arguments passed to the strip command when stripping binaries. + config SSTRIP_ARGS + string + prompt "Sstrip arguments" + depends on USE_SSTRIP + default "-z" + help + Specifies arguments passed to the sstrip command when stripping binaries. + config STRIP_KERNEL_EXPORTS bool "Strip unnecessary exports from the kernel image" help @@ -282,11 +290,11 @@ menu "Global build settings" bool "Strong" endchoice - config KERNEL_STACKPROTECTOR + config KERNEL_STACKPROTECTOR bool default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG - config KERNEL_STACKPROTECTOR_STRONG + config KERNEL_STACKPROTECTOR_STRONG bool default KERNEL_CC_STACKPROTECTOR_STRONG diff --git a/config/Config-devel.in b/config/Config-devel.in index 3b72a8901e..1e43048ab7 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -107,6 +107,11 @@ menuconfig DEVEL It can be a git hash or a branch name. If unused, the clone's repository HEAD will be checked-out. + config KERNEL_GIT_MIRROR_HASH + string "Enter hash of Git kernel tree source checkout tarball" if DEVEL + depends on (KERNEL_GIT_CLONE_URI != "") + default "" + config BUILD_LOG bool "Enable log files during build process" if DEVEL help diff --git a/include/cmake.mk b/include/cmake.mk index 77d85af1fa..3646c3d939 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -86,6 +86,8 @@ define Host/Configure/Default LDFLAGS="$(HOST_LDFLAGS)" \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$(HOSTCC)" \ + -DCMAKE_CXX_COMPILER="$(HOSTCXX)" \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \ diff --git a/include/host-build.mk b/include/host-build.mk index 7d84ab0f5f..4ac1405181 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -186,6 +186,8 @@ ifndef DUMP clean-build: host-clean-build endif + $(DL_DIR)/$(FILE): FORCE + $(_host_target)host-prepare: $(HOST_STAMP_PREPARED) $(_host_target)host-configure: $(HOST_STAMP_CONFIGURED) $(_host_target)host-compile: $(HOST_STAMP_BUILT) $(HOST_STAMP_INSTALLED) diff --git a/include/image-commands.mk b/include/image-commands.mk index 438f1e87e4..979eafb157 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -394,10 +394,17 @@ define Build/tplink-v2-image endef define Build/uImage - mkimage -A $(LINUX_KARCH) \ - -O linux -T kernel \ - -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' -d $@ $@.new + mkimage \ + -A $(LINUX_KARCH) \ + -O linux \ + -T kernel \ + -C $(word 1,$(1)) \ + -a $(KERNEL_LOADADDR) \ + -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \ + $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \ + $(wordlist 2,$(words $(1)),$(1)) \ + -d $@ $@.new mv $@.new $@ endef diff --git a/include/image.mk b/include/image.mk index ec04f0546f..33aa0f72bf 100644 --- a/include/image.mk +++ b/include/image.mk @@ -400,6 +400,7 @@ define Device/Init SOC := BOARD_NAME := + UIMAGE_MAGIC := UIMAGE_NAME := DEVICE_COMPAT_VERSION := 1.0 DEVICE_COMPAT_MESSAGE := @@ -419,7 +420,8 @@ DEFAULT_DEVICE_VARS := \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \ - UIMAGE_NAME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ + UIMAGE_MAGIC UIMAGE_NAME \ + SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ UBOOT_PATH IMAGE_SIZE \ DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \ diff --git a/include/kernel-version.mk b/include/kernel-version.mk index dfffb5c0ce..f28543e2e5 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .79 +LINUX_VERSION-5.4 = .80 -LINUX_KERNEL_HASH-5.4.79 = a59091fb08ff66a344a7842b7c891f36cef609eed1d2944edf475cca8d91ce25 +LINUX_KERNEL_HASH-5.4.80 = 49da425c1f3c530fd3ff31d85a0461f6b6dc6e459f7faf3eee23e49a98ce64c7 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index 0bca8ae84d..a92d692121 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -218,8 +218,8 @@ $(_endef) ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),) (cd $$(IDIR_$(1)); \ ( \ - find . -type f \! -path ./CONTROL/\* -exec sha256sum \{\} \; 2> /dev/null | \ - sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \ + find . -type f \! -path ./CONTROL/\* -exec mkhash sha256 -n \{\} \; 2> /dev/null | \ + sed 's|\([[:blank:]]\)\./| \1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \ ) || true \ ) endif diff --git a/include/package.mk b/include/package.mk index 50bd838180..5eb4460db8 100644 --- a/include/package.mk +++ b/include/package.mk @@ -189,6 +189,8 @@ define Build/CoreTargets $(call Build/Autoclean) $(call DefaultTargets) + $(DL_DIR)/$(FILE): FORCE + download: $(foreach hook,$(Hooks/Download), $(call $(hook))$(sep) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 8181812599..e7314b253b 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -149,6 +149,7 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ $(eval $(call CleanupPython2)) $(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \ + python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ @@ -156,6 +157,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \ python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?')) $(eval $(call SetupHostCommand,python3,Please install Python >= 3.5, \ + python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ diff --git a/include/subdir.mk b/include/subdir.mk index 6512e24c2e..f01cd55f30 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -23,7 +23,7 @@ define subtarget endef define ERROR - ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt)) + ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt;) $(if $(3),, exit 1;)) endef lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1))) @@ -66,7 +66,7 @@ define subdir $(foreach btype,$(buildtypes-$(bd)), $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype)))) $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \ - $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) [$(btype)] failed to build.)) + || $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target)))) $(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target))) ) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))) @@ -74,7 +74,7 @@ define subdir $(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant))) $(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)))) $(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \ - $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).)) + || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target)))) ) $(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),, # aliases diff --git a/package/base-files/Makefile b/package/base-files/Makefile index e13578860f..c06b534bea 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=237 +PKG_RELEASE:=238 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 7da0c872fa..ee4ad1af83 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -108,7 +108,7 @@ config_unset() { # config_get