From 76b990208f2e19af8d43dc5b5bac01485f644835 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 17 Jun 2021 01:19:53 +0800 Subject: [PATCH 01/24] download.pl: add more mirrors for SourceForge Signed-off-by: Tianling Shen --- scripts/download.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/download.pl b/scripts/download.pl index ae56fe1f98..46be8c43ab 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -190,6 +190,8 @@ sub cleanup foreach my $mirror (@ARGV) { if ($mirror =~ /^\@SF\/(.+)$/) { + push @mirrors, "https://freefr.dl.sourceforge.net/$1"; + push @mirrors, "https://netix.dl.sourceforge.net/$1"; # give sourceforge a few more tries, because it redirects to different mirrors for (1 .. 5) { push @mirrors, "https://downloads.sourceforge.net/$1"; From 4b33d667e8b4da00aa066452109db295880cd6ba Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 13 Jun 2021 23:17:30 +0800 Subject: [PATCH 02/24] download.pl: refresh mirrors list Since there are so many useless actions, just to catch up with the 'new update' ... --- scripts/download.pl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/download.pl b/scripts/download.pl index 46be8c43ab..d1e31903fa 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -199,14 +199,12 @@ foreach my $mirror (@ARGV) { } elsif ($mirror =~ /^\@OPENWRT$/) { # use OpenWrt source server directly } elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) { + push @mirrors, "https://mirrors.tencent.com/debian/$1"; push @mirrors, "https://ftp.debian.org/debian/$1"; push @mirrors, "https://mirror.leaseweb.com/debian/$1"; push @mirrors, "https://mirror.netcologne.de/debian/$1"; } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/apache/$1"; - push @mirrors, "https://mirrors.aliyun.com/apache/$1"; - push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; - push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1"; @@ -229,9 +227,6 @@ foreach my $mirror (@ARGV) { } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/gnu/$1"; - push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; - push @mirrors, "https://mirrors.cqu.edu.cn/gnu/$1"; - push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1"; push @mirrors, "https://mirror.netcologne.de/gnu/$1"; push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1"; From dd6c90f37cde6d807dabd122792b0f3cda4333ae Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 10 Jun 2021 23:09:06 +0800 Subject: [PATCH 03/24] rtl8812au-ac: update to latest git HEAD --- package/kernel/rtl8812au-ac/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/rtl8812au-ac/Makefile b/package/kernel/rtl8812au-ac/Makefile index 268d5c82fa..520be3ff1a 100644 --- a/package/kernel/rtl8812au-ac/Makefile +++ b/package/kernel/rtl8812au-ac/Makefile @@ -16,9 +16,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/aircrack-ng/rtl8812au.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-03-27 -PKG_SOURCE_VERSION:=c0ce81745eb3471a639f0efd4d556975153c666e -PKG_MIRROR_HASH:=7def015c5b4c089d1376f0d31c64b8d52cd4b3aa94448333edf3682d60f891cf +PKG_SOURCE_DATE:=2021-05-22 +PKG_SOURCE_VERSION:=0b87ed921a8682856aed5a3e68344b0087f3c93c +PKG_MIRROR_HASH:=f351622acacda52580d5983f5fa6130f625c80f9ee7500543ff8333d57ec3b74 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE From a3325e5051307bb92c2c3feaf44b0980421eb98c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 19 Jun 2021 18:30:22 +0800 Subject: [PATCH 04/24] download.pl: add some mirrors disabled by default To avoid abuse, these mirrors will not be used until you enable them manually. Signed-off-by: Tianling Shen --- scripts/download.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/download.pl b/scripts/download.pl index d1e31903fa..5b2e5ba670 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -205,6 +205,8 @@ foreach my $mirror (@ARGV) { push @mirrors, "https://mirror.netcologne.de/debian/$1"; } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/apache/$1"; + # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; + # push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1"; @@ -227,6 +229,9 @@ foreach my $mirror (@ARGV) { } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/gnu/$1"; + # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; + # push @mirrors, "https://mirrors.cqu.edu.cn/gnu/$1"; + # push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1"; push @mirrors, "https://mirror.netcologne.de/gnu/$1"; push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1"; @@ -251,8 +256,8 @@ foreach my $mirror (@ARGV) { push @extra, "$extra[0]/longterm/v$1"; } foreach my $dir (@extra) { - push @mirrors, "https://mirrors.cqu.edu.cn/kernel/$dir"; - push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir"; + # push @mirrors, "https://mirrors.cqu.edu.cn/kernel/$dir"; + # push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir"; push @mirrors, "https://cdn.kernel.org/pub/$dir"; push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir"; push @mirrors, "https://mirrors.mit.edu/kernel/$dir"; From 714dabcb637796d2a1ec6daaad49a3566e5f5bfb Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 28 Jun 2020 22:04:50 +0300 Subject: [PATCH 05/24] kernel: video: add multimedia-input driver Signed-off-by: Lucian Cristian [rebase commit, apply review recommendations] Signed-off-by: AmadeusGhost [rebase commit, only apply generic part] Signed-off-by: Tianling Shen --- package/kernel/linux/modules/video.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 9acc19d470..65d1ed877e 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -221,6 +221,24 @@ endef $(eval $(call KernelPackage,fb-tft-ili9486)) +define KernelPackage/multimedia-input + SUBMENU:=$(VIDEO_MENU) + TITLE:=Multimedia input support + KCONFIG:=CONFIG_RC_CORE \ + CONFIG_LIRC=y \ + CONFIG_RC_DECODERS=y \ + CONFIG_RC_DEVICES=y + FILES:=$(LINUX_DIR)/drivers/media/rc/rc-core.ko + AUTOLOAD:=$(call AutoProbe,rc-core) +endef + +define KernelPackage/multimedia-input/description + Enable multimedia input. +endef + +$(eval $(call KernelPackage,multimedia-input)) + + define KernelPackage/drm SUBMENU:=$(VIDEO_MENU) TITLE:=Direct Rendering Manager (DRM) support From 546f8257d4136b33867b7233e3ffadb97bff6000 Mon Sep 17 00:00:00 2001 From: ElonH Date: Sun, 20 Jun 2021 00:52:58 +0800 Subject: [PATCH 06/24] multimedia-input: missing deps Target: ipq40xx Package kmod-multimedia-input is missing dependencies for the following libraries: input-core.ko (cherry picked from commit 324306e10dbe8d76fb5190c08ab3bb165fa99324) --- package/kernel/linux/modules/video.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index 65d1ed877e..9a22583ef4 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -224,6 +224,7 @@ $(eval $(call KernelPackage,fb-tft-ili9486)) define KernelPackage/multimedia-input SUBMENU:=$(VIDEO_MENU) TITLE:=Multimedia input support + DEPENDS:=+kmod-input-core KCONFIG:=CONFIG_RC_CORE \ CONFIG_LIRC=y \ CONFIG_RC_DECODERS=y \ From 890e2f4469b4d15b878816bd29078bd49e116206 Mon Sep 17 00:00:00 2001 From: ElonH Date: Sun, 20 Jun 2021 16:51:56 +0800 Subject: [PATCH 07/24] kmod-rtc-sunxi: missing deps kmod-multimedia-input (cherry picked from commit 91deb050bb51be50c02810054528c1ad8dd049a2) --- target/linux/sunxi/modules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk index b8ea7d5cb6..43fbb65ec0 100644 --- a/target/linux/sunxi/modules.mk +++ b/target/linux/sunxi/modules.mk @@ -25,7 +25,7 @@ $(eval $(call KernelPackage,rtc-sunxi)) define KernelPackage/sunxi-ir SUBMENU:=$(OTHER_MENU) TITLE:=Sunxi SoC built-in IR support (A20) - DEPENDS:=@TARGET_sunxi +kmod-input-core + DEPENDS:=@TARGET_sunxi +kmod-multimedia-input $(call AddDepends/rtc) KCONFIG:= \ CONFIG_MEDIA_SUPPORT=y \ From 8842ed3d2730ac51597432e4b11ae9112705335f Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Wed, 16 Jun 2021 17:15:59 +0300 Subject: [PATCH 08/24] build: Config-images: fix unit of partition sizes The code interprets these config values as Mebibytes rather than Megabytes so modify the description accordingly. Signed-off-by: Paul Fertser [fix commit title prefix] Signed-off-by: Adrian Schmutzler --- config/Config-images.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index 2aec45bc48..167fcc5665 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -280,14 +280,14 @@ menu "Target Images" source "target/linux/*/image/Config.in" config TARGET_KERNEL_PARTSIZE - int "Kernel partition size (in MB)" + int "Kernel partition size (in MiB)" depends on USES_BOOT_PART default 8 if TARGET_apm821xx_sata default 64 if TARGET_bcm27xx default 16 config TARGET_ROOTFS_PARTSIZE - int "Root filesystem partition size (in MB)" + int "Root filesystem partition size (in MiB)" depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml default 160 help From 70ce83e72dfd4cbdcb1011206526048af006fe88 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 17 Jun 2021 22:55:38 -0700 Subject: [PATCH 09/24] tools/ccache: update to 4.3 Remove BUILD_PARALLEL as it's default now. Signed-off-by: Rosen Penev --- tools/ccache/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 3db6cc0818..7c85d549e9 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -8,13 +8,11 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=ccache -PKG_VERSION:=4.2.1 +PKG_VERSION:=4.3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION) -PKG_HASH:=9d6ba1cdefdc690401f404b747d81a9a1802b17af4235815866b7620d980477e - -HOST_BUILD_PARALLEL:=1 +PKG_HASH:=504a0f2184465c306826f035b4bc00bae7500308d6af4abbfb50e33a694989b4 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk From d3cf99238683657eb3a092a2da8a7471e612ce71 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 18 Jun 2021 20:35:14 -0700 Subject: [PATCH 10/24] treewide: remove BUILD_PARALLEL from CMake packages It's already default. The only exception is mt76 which has Ninja disabled. Found with: git grep BUILD_PARALLEL | cut -d ':' -f 1 | sort -u > par git grep cmake.mk | cut -d ':' -f 1 > cmake comm -1 -2 par cmake Signed-off-by: Rosen Penev --- package/libs/libjson-c/Makefile | 1 - package/libs/libpcap/Makefile | 1 - package/libs/mbedtls/Makefile | 1 - package/network/config/netifd/Makefile | 2 -- package/network/utils/umbim/Makefile | 2 -- package/network/utils/uqmi/Makefile | 2 -- package/system/opkg/Makefile | 2 -- package/system/rpcd/Makefile | 2 -- package/system/uci/Makefile | 1 - package/system/urngd/Makefile | 2 -- tools/zstd/Makefile | 1 - 11 files changed, 17 deletions(-) diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index 0ea3fe80b5..d4a16f36cb 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -21,7 +21,6 @@ PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:json-c_project:json-c PKG_FLAGS := nonshared -PKG_BUILD_PARALLEL:=1 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST) include $(INCLUDE_DIR)/package.mk diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index 6168d4c459..8c08259055 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -21,7 +21,6 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_ASLR_PIE_REGULAR:=1 -PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 1f806939ac..7e0ddadec9 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -16,7 +16,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? PKG_HASH:=96257bb03b30300b2f35f861ffe204ed957e9fd0329d80646fe57fc49f589b29 -PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt PKG_CPE_ID:=cpe:/a:arm:mbed_tls diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index c151bd4227..182555d9f0 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -13,8 +13,6 @@ PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile index 126efdbbc6..8f4d2608ae 100644 --- a/package/network/utils/umbim/Makefile +++ b/package/network/utils/umbim/Makefile @@ -13,8 +13,6 @@ PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index 68958a3729..36e5d0d554 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -13,8 +13,6 @@ PKG_MAINTAINER:=Matti Laakso PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 65bdf6dba9..9f352e83c0 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -26,8 +26,6 @@ PKG_CONFIG_DEPENDS += \ CONFIG_SIGNATURE_CHECK \ CONFIG_TARGET_INIT_PATH -PKG_BUILD_PARALLEL:=1 -HOST_BUILD_PARALLEL:=1 PKG_INSTALL:=1 HOST_BUILD_DEPENDS:=libubox/host diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index 69d7d672cf..14016af28b 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -20,8 +20,6 @@ PKG_MIRROR_HASH:=cfe44e600093a424d1133b55a141c5becb708f48ee4fc8b7a98a82495ced7c7 PKG_LICENSE:=ISC PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 4a185fe6c9..57d8b401e9 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -22,7 +22,6 @@ PKG_LICENSE_FILES:= PKG_MAINTAINER:=Felix Fietkau -PKG_BUILD_PARALLEL:=0 PKG_FLAGS := nonshared include $(INCLUDE_DIR)/package.mk diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index 9e26f222b6..dc20b0541d 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -12,8 +12,6 @@ PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f PKG_LICENSE:=GPL-2.0 BSD-3-Clause PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile index a0106f15f2..9138ae98f2 100644 --- a/tools/zstd/Makefile +++ b/tools/zstd/Makefile @@ -12,7 +12,6 @@ PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:facebook:zstandard CMAKE_SOURCE_SUBDIR:=build/cmake -HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk From 6229fcb2333cd85a1918a0738d30c1a4a08c641a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 18 Jun 2021 20:43:28 -0700 Subject: [PATCH 11/24] treewide: remove PKG_INSTALL from CMake packages It's already default with cmake.mk Found with: git grep PKG_INSTALL\: | cut -d ':' -f 1 | sort -u > ins git grep cmake.mk | cut -d ':' -f 1 > cmake comm -1 -2 ins cmake Signed-off-by: Rosen Penev --- package/libs/mbedtls/Makefile | 2 -- package/network/services/odhcpd/Makefile | 1 - package/system/opkg/Makefile | 2 -- 3 files changed, 5 deletions(-) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 7e0ddadec9..caa239430b 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -117,8 +117,6 @@ This package contains mbedtls helper programs for private key and CSR generation (gen_key, cert_req) endef -PKG_INSTALL:=1 - TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) ifneq ($(CONFIG_LIBMBEDTLS_HAVE_ARMV8CE_AES),) diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 9a4cd19bef..3a059dd82e 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -19,7 +19,6 @@ PKG_MIRROR_HASH:=631d15fd7c93529fa33433380c4811dbacca9665864e5836c6daca0c7165f25 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 -PKG_INSTALL:=1 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id PKG_ASLR_PIE_REGULAR:=1 diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 9f352e83c0..bd9fab474c 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -26,8 +26,6 @@ PKG_CONFIG_DEPENDS += \ CONFIG_SIGNATURE_CHECK \ CONFIG_TARGET_INIT_PATH -PKG_INSTALL:=1 - HOST_BUILD_DEPENDS:=libubox/host include $(INCLUDE_DIR)/package.mk From 562227aa9bfbc9c4b6afb4fbb7dcffce797a8901 Mon Sep 17 00:00:00 2001 From: lean Date: Mon, 21 Jun 2021 11:52:55 +0800 Subject: [PATCH 12/24] urngd: fix busy loop in case of ioctl cause high cpu usage Signed-off-by: Tianling Shen --- package/system/urngd/Makefile | 10 +++++----- .../100-fix-high-cpu-usage-with-docker.patch | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 package/system/urngd/patches/100-fix-high-cpu-usage-with-docker.patch diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index dc20b0541d..bfee184701 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=urngd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git @@ -15,14 +15,14 @@ PKG_LICENSE_FILES:= include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/$(PKG_NAME) +define Package/urngd SECTION:=utils CATEGORY:=Base system TITLE:=OpenWrt non-physical true random number generator based on timing jitter DEPENDS:=+libubox endef -define Package/$(PKG_NAME)/description +define Package/urngd/description urngd is OpenWrt's micro non-physical true random number generator based on timing jitter. @@ -36,11 +36,11 @@ define Package/$(PKG_NAME)/description Jitter RNGd provides a source of sufficient entropy. endef -define Package/$(PKG_NAME)/install +define Package/urngd/install $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin/$(PKG_NAME) endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,urngd)) diff --git a/package/system/urngd/patches/100-fix-high-cpu-usage-with-docker.patch b/package/system/urngd/patches/100-fix-high-cpu-usage-with-docker.patch new file mode 100644 index 0000000000..314e246d35 --- /dev/null +++ b/package/system/urngd/patches/100-fix-high-cpu-usage-with-docker.patch @@ -0,0 +1,19 @@ +diff --git a/urngd.c b/urngd.c +index 35ccdec..410d300 100644 +--- a/urngd.c ++++ b/urngd.c +@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urngd *u) + static void low_entropy_cb(struct uloop_fd *ufd, unsigned int events) + { + struct urngd *u = container_of(ufd, struct urngd, rnd_fd); ++ size_t res; + + DEBUG(2, DEV_RANDOM " signals low entropy\n"); +- gather_entropy(u); ++ res = gather_entropy(u); ++ if (!res) { ++ DEBUG(2, "gather_entropy failed, delaying further attempts\n"); ++ sleep(60); ++ } + } + From 5821e9d4f650dc6c013e6b646f8a53d803f71ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=9B=BD?= Date: Sat, 25 Jul 2020 04:04:05 +0000 Subject: [PATCH 13/24] grub2: make grub2-bios-setup as a separate package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The grub2 and grub2-efi packages should only contain boot-related code. grub-bios-setup is the same as grub-editenv, they are both grub2 tools and should be placed in a separate package. Signed-off-by: 李国 [use AUTORELEASE and update to SPDX] Signed-off-by: Paul Spooren (cherry picked from commit 5876d6a62fc0ae5799e7d9c896356f75c99a6f0a) --- config/Config-images.in | 2 ++ package/boot/grub2/Makefile | 31 +++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index 167fcc5665..c6d82da97e 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -186,6 +186,7 @@ menu "Target Images" depends on TARGET_x86 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS select PACKAGE_grub2 + select PACKAGE_grub2-bios-setup default y config GRUB_EFI_IMAGES @@ -194,6 +195,7 @@ menu "Target Images" depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS select PACKAGE_grub2 select PACKAGE_grub2-efi + select PACKAGE_grub2-bios-setup select PACKAGE_kmod-fs-vfat default y diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index a57486b91d..709253a935 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2006-2021 OpenWrt.org include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk @@ -11,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub PKG_CPE_ID:=cpe:/a:gnu:grub2 PKG_VERSION:=2.06~rc1 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub @@ -54,6 +51,20 @@ define Package/grub2-editenv/description Edit grub2 environment files. endef +define Package/grub2-bios-setup + CATEGORY:=Utilities + SECTION:=utils + SUBMENU:=Boot Loaders + TITLE:=Grub2 BIOS boot setup tool + URL:=http://www.gnu.org/software/grub/ + DEPENDS:=@TARGET_x86 + VARIANT:=pc +endef + +define Package/grub2-bios-setup/description + Set up images to bootable. +endef + HOST_BUILD_PREFIX := $(STAGING_DIR_HOST) CONFIGURE_VARS += \ @@ -93,8 +104,6 @@ define Host/Configure endef define Package/grub2/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/ $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2 $(CP) $(PKG_BUILD_DIR)/grub-core/boot.img $(STAGING_DIR_IMAGE)/grub2/ $(CP) $(PKG_BUILD_DIR)/grub-core/cdboot.img $(STAGING_DIR_IMAGE)/grub2/ @@ -152,7 +161,13 @@ define Package/grub2-editenv/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/ endef +define Package/grub2-bios-setup/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/ +endef + $(eval $(call HostBuild)) $(eval $(call BuildPackage,grub2)) $(eval $(call BuildPackage,grub2-efi)) $(eval $(call BuildPackage,grub2-editenv)) +$(eval $(call BuildPackage,grub2-bios-setup)) From 81300f2e3b9f1abc375ccc5ac0b593e42ab0c9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=9B=BD?= Date: Sat, 25 Jul 2020 04:48:36 +0000 Subject: [PATCH 14/24] grub2: make grub2 tools built in a separate variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit grub2 boot-related code and tools-related code may require different compilation parameters. We split them into different variants for compilation, so that we can accurately pass the required parameters and avoid causing problems. Signed-off-by: 李国 (cherry picked from commit ca941041366602d4da0bf2c04bb0d3c25ed4fa21) --- package/boot/grub2/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 709253a935..0610d96e90 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -44,7 +44,7 @@ define Package/grub2-editenv TITLE:=Grub2 Environment editor URL:=http://www.gnu.org/software/grub/ DEPENDS:=@TARGET_x86 - VARIANT:=pc + VARIANT:=none endef define Package/grub2-editenv/description @@ -58,7 +58,7 @@ define Package/grub2-bios-setup TITLE:=Grub2 BIOS boot setup tool URL:=http://www.gnu.org/software/grub/ DEPENDS:=@TARGET_x86 - VARIANT:=pc + VARIANT:=none endef define Package/grub2-bios-setup/description @@ -98,6 +98,10 @@ HOST_MAKE_FLAGS += \ TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS)) +ifneq ($(BUILD_VARIANT),none) + MAKE_PATH := grub-core +endif + define Host/Configure $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in $(Host/Configure/Default) From ba5d6bc792729b2533b2143df2c0a4ea7134e072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=9B=BD?= Date: Sat, 25 Jul 2020 05:14:52 +0000 Subject: [PATCH 15/24] grub2: pass compilation parameters more accurately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order for the grub2 boot-related code to compile normally, we have made many adjustments to the compilation parameters. These adjustments are not necessary for tools-related code. We apply these parameter adjustments only to the boot-related code. Signed-off-by: 李国 (cherry picked from commit e4723755f237a0e5fab132ab870d00ea82e7fb82) --- package/boot/grub2/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 0610d96e90..3cdb608cbf 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -17,8 +17,10 @@ PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484 HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=grub2/host -PKG_ASLR_PIE:=0 -PKG_SSP:=0 +ifneq ($(BUILD_VARIANT),none) + PKG_ASLR_PIE:=0 + PKG_SSP:=0 +endif PKG_FLAGS:=nonshared @@ -96,9 +98,9 @@ HOST_MAKE_FLAGS += \ TARGET_RANLIB=$(TARGET_RANLIB) \ LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a -TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS)) ifneq ($(BUILD_VARIANT),none) + TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS)) MAKE_PATH := grub-core endif From db8bdf06f45910cdcccc8fce0c9d95a1e0c25013 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sun, 20 Jun 2021 23:38:37 +0300 Subject: [PATCH 16/24] busybox: disable bzip2 bzip2 adds about 8kb of size. For tiny builds it's often disabled. It's not directly used by stock OpenWrt programs. Kernel images compressed with bzip2 are also not fully supported. Signed-off-by: Sergey Ponomarev [fix \ indention] Signed-off-by: Paul Spooren (cherry picked from commit bffee5ea192386ffeac81e7b40e9d58a93b85db8) --- package/base-files/files/lib/upgrade/common.sh | 1 - package/base-files/files/lib/upgrade/stage2 | 2 +- package/utils/busybox/Config-defaults.in | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index d3938b9996..33bb1f02e1 100755 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -82,7 +82,6 @@ get_image() { # [ ] local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" case "$magic" in 1f8b) cmd="zcat";; - 425a) cmd="bzcat";; *) cmd="cat";; esac fi diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2 index e491dda94c..043599658f 100755 --- a/package/base-files/files/lib/upgrade/stage2 +++ b/package/base-files/files/lib/upgrade/stage2 @@ -47,7 +47,7 @@ switch_to_ramfs() { for binary in \ /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ pivot_root mount_root reboot sync kill sleep \ - md5sum hexdump cat zcat bzcat dd tar \ + md5sum hexdump cat zcat dd tar \ ls basename find cp mv rm mkdir rmdir mknod touch chmod \ '[' printf wc grep awk sed cut \ mtd partx losetup mkfs.ext4 \ diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index b6e3d7f35a..91d1c418ef 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -351,10 +351,10 @@ config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS default n config BUSYBOX_DEFAULT_BUNZIP2 bool - default y + default n config BUSYBOX_DEFAULT_BZCAT bool - default y + default n config BUSYBOX_DEFAULT_UNLZMA bool default n From a9289c8d072285aa11f573b06d0f6baf26fb0cfa Mon Sep 17 00:00:00 2001 From: Chuck Fan Date: Tue, 9 Mar 2021 17:42:57 +0800 Subject: [PATCH 17/24] base-files: upgrade: use zcat command provided by busybox Calling `switch_to_ramfs()` will not copy the gzip executable (/bin/gzip) to ramfs, but `/bin/zcat` will call `/bin/gzip` when package gzip is installed, instead of the busybox-supplied zcat. This will cause `zcat` to fail to find `gzip`, then cause the sysupgrade to fail. Adding the `busybox` prefix here will solve the problem. Signed-off-by: Chuck Fan (cherry picked from commit d374e2cdb499b2a4282d84f95709b9a40d88a995) --- package/base-files/files/lib/upgrade/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 33bb1f02e1..b116f7acca 100755 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -81,7 +81,7 @@ get_image() { # [ ] if [ -z "$cmd" ]; then local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" case "$magic" in - 1f8b) cmd="zcat";; + 1f8b) cmd="busybox zcat";; *) cmd="cat";; esac fi From 0415d0fa6fd83ad3142503890d49d6bc0dd116d8 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 9 Feb 2021 16:10:10 +0100 Subject: [PATCH 18/24] base-files: redirect kill ouptut for ash, telnetd and dropbear If one of the programmes is not running, then we see the following output in the logs. `killall: telnetd: no process killed` To ensure that the log is clean, redirect the output to /dev/null Signed-off-by: Florian Eckert (cherry picked from commit 40f533b73e6cfd7376cc6a0bbef9af46c8fbed86) --- package/base-files/files/lib/upgrade/stage2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2 index 043599658f..4c06ccb30a 100755 --- a/package/base-files/files/lib/upgrade/stage2 +++ b/package/base-files/files/lib/upgrade/stage2 @@ -124,9 +124,9 @@ kill_remaining() { # [ [ ] ] indicate_upgrade -killall -9 telnetd -killall -9 dropbear -killall -9 ash +killall -9 telnetd 2>/dev/null +killall -9 dropbear 2>/dev/null +killall -9 ash 2>/dev/null kill_remaining TERM sleep 3 From 01d6882ea30174c39b932239ae6520ae19e87282 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 19 Jun 2021 14:45:11 -0700 Subject: [PATCH 19/24] tools/libressl: update to 3.3.3 Fix wrong FPIC variable usage. Fixes compilation under sparc64 host. Signed-off-by: Rosen Penev (cherry picked from commit bf4dbbb55e2b8e23f186e1334f1e9ce6a3a8ddfe) --- tools/libressl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index 2b5a33450c..e25b5661ee 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libressl -PKG_VERSION:=3.3.1 -PKG_HASH:=a6d331865e0164a13ac85a228e52517f7cf8f8488f2f95f34e7857302f97cfdb +PKG_VERSION:=3.3.3 +PKG_HASH:=a471565b36ccd1a70d0bd7d37c6e95c43a26a62829b487d9d2cdebfe58be3066 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:openbsd:libressl @@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/host-build.mk HOSTCC := $(HOSTCC_NOCACHE) HOST_CONFIGURE_ARGS += --enable-static --disable-shared --disable-tests -HOST_CFLAGS += $(FPIC) +HOST_CFLAGS += $(HOST_FPIC) ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32) HOST_CONFIGURE_ARGS += --disable-asm From 453549dd6315c977f6f68b553919a014382570bd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 19 Jun 2021 15:11:23 -0700 Subject: [PATCH 20/24] tools/e2fsprogs: update to 1.46.2 Fix wrong FPIC flag to fix compilation under sparc64 Signed-off-by: Rosen Penev (cherry picked from commit b154a2f8d37097e51099ed816a0f8142120405e6) --- tools/e2fsprogs/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index d7c994c338..408097f740 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs -PKG_VERSION:=1.45.6 -PKG_HASH:=ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256 +PKG_VERSION:=1.46.2 +PKG_HASH:=23aa093295c94e71ef1be490c4004871c5b01d216a8cb4d111fa6c0aac354168 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/host-build.mk ifneq ($(shell $(HOSTCC) --version | grep clang),) HOST_CFLAGS += -D__GNUC_PREREQ\(...\)=0 -Dloff_t=off_t endif -HOST_CFLAGS += $(FPIC) +HOST_CFLAGS += $(HOST_FPIC) HOST_CONFIGURE_ARGS += \ --disable-elf-shlibs \ From 63573c460e960b49dfc82e9f07f0dbd15761147a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 19 Jun 2021 21:31:35 -0500 Subject: [PATCH 21/24] tools/squashfskit4: fix compilation under big endian The macro used is for the wrong struct. Just byte swap manually. Refreshed patches. Tested on sparc64. Signed-off-by: Rosen Penev (cherry picked from commit 3cbdc13bc1367a6fdc9bc2afadfae21b74d7c781) --- tools/squashfskit4/Makefile | 2 +- .../0002-fix-build-failure-against-gcc-10.patch | 8 +++----- tools/squashfskit4/patches/0020-big-endian.patch | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 tools/squashfskit4/patches/0020-big-endian.patch diff --git a/tools/squashfskit4/Makefile b/tools/squashfskit4/Makefile index 9ed10ecef9..1800306d33 100644 --- a/tools/squashfskit4/Makefile +++ b/tools/squashfskit4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfskit4 PKG_VERSION:=4.14 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=squashfskit-v$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/squashfskit/squashfskit/releases/download/v$(PKG_VERSION)/ PKG_HASH:=5761aaa3aedc4f7112b708367d891c9abdc1ffea972e3fe47923ddba23984d95 diff --git a/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch index 46c6a5ea0f..de77299978 100644 --- a/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch +++ b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch @@ -28,16 +28,14 @@ Signed-off-by: Sergei Trofimovich squashfs-tools/mksquashfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h -index 1beefef7..b6503063 100644 --- a/squashfs-tools/mksquashfs.h +++ b/squashfs-tools/mksquashfs.h -@@ -143,7 +143,7 @@ struct append_file { - #endif +@@ -133,7 +133,7 @@ struct append_file { + #define BLOCK_OFFSET 2 extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache; -struct cache *bwriter_buffer, *fwriter_buffer; +extern struct cache *bwriter_buffer, *fwriter_buffer; extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer, - *to_frag, *locked_fragment, *to_process_frag; + *locked_fragment, *to_process_frag; extern struct append_file **file_mapping; diff --git a/tools/squashfskit4/patches/0020-big-endian.patch b/tools/squashfskit4/patches/0020-big-endian.patch new file mode 100644 index 0000000000..b388cb4d12 --- /dev/null +++ b/tools/squashfskit4/patches/0020-big-endian.patch @@ -0,0 +1,14 @@ +--- a/squashfs-tools/xz_wrapper.c ++++ b/squashfs-tools/xz_wrapper.c +@@ -192,7 +192,10 @@ static void xz_display_options(void *buf + if(size != sizeof(struct comp_opts)) + goto failed; + +- SQUASHFS_INSWAP_LZMA_COMP_OPTS(comp_opts); ++#if __BYTE_ORDER == __BIG_ENDIAN ++ comp_opts->dictionary_size = inswap_le32(comp_opts->dictionary_size); ++ comp_opts->flags = inswap_le32(comp_opts->flags); ++#endif + + dictionary_size = comp_opts->dictionary_size; + flags = comp_opts->flags; From 4dae22337306726eeb1a57423c662f96950128ac Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 17 Jun 2021 23:08:50 -0700 Subject: [PATCH 22/24] tools/cmake: update to 3.20.3 + build with Ninja Compile with Ninja. Ninja compiles faster and is more stable with parallel builds. Routines copied from cmake.mk. Speed improves from: Executed in 127.47 secs fish external usr time 17.02 mins 446.00 micros 17.02 mins sys time 1.18 mins 40.00 micros 1.18 mins to: Executed in 118.91 secs fish external usr time 17.28 mins 499.00 micros 17.28 mins sys time 1.13 mins 45.00 micros 1.13 mins Signed-off-by: Rosen Penev (cherry picked from commit 5cff6c1abbcb134395bbe032cb5ea9d1c74ec891) --- tools/cmake/Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 006934466a..fc7926fda5 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.19.1 +PKG_VERSION:=3.20.3 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ https://cmake.org/files/v3.19/ -PKG_HASH:=1d266ea3a76ef650cdcf16c782a317cb4a7aa461617ee941e389cb48738a3aba +PKG_HASH:=4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8 HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 @@ -29,7 +29,20 @@ HOST_CONFIGURE_VARS += \ HOST_CONFIGURE_ARGS := \ $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \ - --prefix=$(STAGING_DIR_HOST) + --prefix="$(STAGING_DIR_HOST)" \ + --generator=Ninja + +define Host/Compile/Default + +$(NINJA) -C $(HOST_BUILD_DIR) $(1) +endef + +define Host/Install/Default + +$(NINJA) -C $(HOST_BUILD_DIR) install +endef + +define Host/Uninstall/Default + +$(NINJA) -C $(HOST_BUILD_DIR) uninstall +endef ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) HOST_MAKE_FLAGS += VERBOSE=1 From cef5283d2998881d62d250745413e65a6e26bb99 Mon Sep 17 00:00:00 2001 From: Perry Melange Date: Mon, 19 Apr 2021 11:17:10 +0200 Subject: [PATCH 23/24] qos-scripts: add ifbN device before setting the link up commit 50413e1ec83dedaea44558d5f37af5454156a46a replaced ifconfig with ip. In order to set a link state to up, the interface needs to be added first. Fixes: FS#3754 Signed-off-by: Perry Melange [Add Fixes tag] Signed-off-by: Baptiste Jonglez (cherry picked from commit 23c3bab9209f984692f8206c0d97758ee223a26f) --- package/network/config/qos-scripts/Makefile | 2 +- .../network/config/qos-scripts/files/usr/lib/qos/generate.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/config/qos-scripts/Makefile b/package/network/config/qos-scripts/Makefile index 7d282b2db5..d6e7df1467 100644 --- a/package/network/config/qos-scripts/Makefile +++ b/package/network/config/qos-scripts/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qos-scripts PKG_VERSION:=1.3.1 -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh index 32f15581f8..62e7283633 100755 --- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh @@ -326,7 +326,8 @@ start_interface() { append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N" done append ${prefix}q "$(tcrules)" "$N" - export dev_${dir}="ip link set $dev up >&- 2>&- + export dev_${dir}="ip link add ${dev} type ifb >&- 2>&- +ip link set $dev up >&- 2>&- tc qdisc del dev $dev root >&- 2>&- tc qdisc add dev $dev root handle 1: hfsc default ${class_default}0 tc class add dev $dev parent 1: classid 1:1 hfsc sc rate ${rate}kbit ul rate ${rate}kbit" From a481251f47d391dbdde05310a0eb70d3c73543fa Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 20 Jun 2021 20:23:45 -1000 Subject: [PATCH 24/24] build,json: fix generation with empty profiles If the image generation doesn't add any profiles to the output the *profile merge* will fail. To avoid that set an empty profile as fallback. Signed-off-by: Paul Spooren (cherry picked from commit fd0d9909bf50f114d5e7f7cedf53e542de878a2c) --- scripts/json_overview_image_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 45c05012b1..db47fd9e42 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -42,7 +42,7 @@ for json_file in work_dir.glob("*.json"): output["profiles"][device_id]["images"].extend(profile["images"]) # make image lists unique by name, keep last/latest -for device_id, profile in output["profiles"].items(): +for device_id, profile in output.get("profiles", {}).items(): profile["images"] = list({e["name"]: e for e in profile["images"]}.values())