23.05: update patches

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-07-16 17:46:21 +02:00
parent d9f237b450
commit 73d949cf3f
163 changed files with 301126 additions and 249977 deletions

View File

@@ -1,7 +1,7 @@
From c4ce94a22a0e084bbbf9a787f078ec6f313f48da Mon Sep 17 00:00:00 2001 From 9a11ccbc33db5068b1f567c3f7e45533c63c8b9a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 19 Jun 2020 10:45:22 +0200 Date: Fri, 19 Jun 2020 10:45:22 +0200
Subject: [PATCH 001/114] pending: scripts: add gen_config.py Subject: [PATCH 01/43] pending: scripts: add gen_config.py
This script is used to setup the tree based on the profiles/. This script is used to setup the tree based on the profiles/.

View File

@@ -1,7 +1,7 @@
From 2abc67a0fbfbf50f4af2baaee07eb10d214973e4 Mon Sep 17 00:00:00 2001 From d314f454cd4e7c4eec66c155d348eb6e421eb2fd Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 19 Jun 2020 13:25:27 +0200 Date: Fri, 19 Jun 2020 13:25:27 +0200
Subject: [PATCH 04/43] scripts: update feed script Subject: [PATCH 02/43] scripts: update feed script
gen_config.py requires the latest version of the feeds script. gen_config.py requires the latest version of the feeds script.
@@ -11,10 +11,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 77 insertions(+) 1 file changed, 77 insertions(+)
diff --git a/scripts/feeds b/scripts/feeds diff --git a/scripts/feeds b/scripts/feeds
index eee0a50717..9d66ea5d98 100755 index aee73e793f..94d6d91283 100755
--- a/scripts/feeds --- a/scripts/feeds
+++ b/scripts/feeds +++ b/scripts/feeds
@@ -647,6 +647,35 @@ sub refresh_config { @@ -667,6 +667,35 @@ sub refresh_config {
} }
} }
@@ -50,7 +50,7 @@ index eee0a50717..9d66ea5d98 100755
sub install { sub install {
my $name; my $name;
my %opts; my %opts;
@@ -679,6 +708,8 @@ sub install { @@ -699,6 +728,8 @@ sub install {
install_src($feed, $name, exists($opts{f})) == 0 or $ret = 1; install_src($feed, $name, exists($opts{f})) == 0 or $ret = 1;
get_feed($f->[1]); get_feed($f->[1]);
} }
@@ -59,7 +59,7 @@ index eee0a50717..9d66ea5d98 100755
} }
} }
} else { } else {
@@ -849,6 +880,47 @@ sub update { @@ -856,6 +887,47 @@ sub update {
return $failed; return $failed;
} }
@@ -107,7 +107,7 @@ index eee0a50717..9d66ea5d98 100755
sub feed_config() { sub feed_config() {
foreach my $feed (@feeds) { foreach my $feed (@feeds) {
my $installed = (-f "feeds/$feed->[1].index"); my $installed = (-f "feeds/$feed->[1].index");
@@ -900,6 +972,10 @@ Commands: @@ -907,6 +979,10 @@ Commands:
-i : Recreate the index only. No feed update from repository is performed. -i : Recreate the index only. No feed update from repository is performed.
-f : Force updating feeds even if there are changed, uncommitted files. -f : Force updating feeds even if there are changed, uncommitted files.
@@ -118,14 +118,14 @@ index eee0a50717..9d66ea5d98 100755
clean: Remove downloaded/generated files. clean: Remove downloaded/generated files.
EOF EOF
@@ -913,6 +989,7 @@ my %commands = ( @@ -920,6 +996,7 @@ my %commands = (
'search' => \&search, 'search' => \&search,
'uninstall' => \&uninstall, 'uninstall' => \&uninstall,
'feed_config' => \&feed_config, 'feed_config' => \&feed_config,
+ 'setup' => \&setup, + 'setup' => \&setup,
'clean' => sub { 'clean' => sub {
system("rm -rf ./feeds ./package/feeds"); system("rm -rf ./feeds ./package/feeds ./target/linux/feeds");
} }
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 41347924799ff4f16a12d8f740f5c66b10eb8c43 Mon Sep 17 00:00:00 2001 From 8b71b30bb2bb5c6a98ae16b358887826246c444a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Sun, 9 Aug 2020 20:58:52 +0200 Date: Sat, 15 Jul 2023 10:44:03 +0200
Subject: [PATCH 05/43] scripts/ubinize-image.sh: allow setting the rootfs name Subject: [PATCH 03/43] scripts/ubinize-image.sh: allow setting the rootfs name
This patch allows us to use a different rootfs name. Some QCA boards will This patch allows us to use a different rootfs name. Some QCA boards will
require the in ubi rfs to be called ubi_rootfs. require the in ubi rfs to be called ubi_rootfs.
@@ -13,19 +13,19 @@ Signed-off-by: John Crispin <john@phrozen.org>
2 files changed, 9 insertions(+), 1 deletion(-) 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk diff --git a/include/image-commands.mk b/include/image-commands.mk
index c6e8eb0293..d4bce80e68 100644 index dc6ee6e7c1..08adbb6454 100644
--- a/include/image-commands.mk --- a/include/image-commands.mk
+++ b/include/image-commands.mk +++ b/include/image-commands.mk
@@ -86,6 +86,7 @@ define Build/append-ubi @@ -137,6 +137,7 @@ define Build/append-ubi
sh $(TOPDIR)/scripts/ubinize-image.sh \ sh $(TOPDIR)/scripts/ubinize-image.sh \
$(if $(UBOOTENV_IN_UBI),--uboot-env) \ $(if $(UBOOTENV_IN_UBI),--uboot-env) \
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \ $(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
+ $(if $(ROOTFSNAME_IN_UBI),--rootfs_name $(ROOTFSNAME_IN_UBI)) \ + $(if $(ROOTFSNAME_IN_UBI),--rootfs_name $(ROOTFSNAME_IN_UBI)) \
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \ $(foreach part,$(UBINIZE_PARTS),--part $(part)) \
$(IMAGE_ROOTFS) \ --rootfs $(IMAGE_ROOTFS) \
$@.tmp \ $@.tmp \
diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh
index c6f8bcefe5..707cd38d47 100755 index 323eae547a..6af035c1b1 100755
--- a/scripts/ubinize-image.sh --- a/scripts/ubinize-image.sh
+++ b/scripts/ubinize-image.sh +++ b/scripts/ubinize-image.sh
@@ -7,6 +7,7 @@ ubootenv="" @@ -7,6 +7,7 @@ ubootenv=""
@@ -36,16 +36,16 @@ index c6f8bcefe5..707cd38d47 100755
outfile="" outfile=""
err="" err=""
ubinize_seq="" ubinize_seq=""
@@ -76,7 +77,7 @@ ubilayout() { @@ -77,7 +78,7 @@ ubilayout() {
rootsize="$( round_up "$( stat -c%s "$2" )" 1024 )" rootsize="$( round_up "$( stat -c%s "$2" )" 1024 )"
;; ;;
esac esac
- ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize" - ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize"
+ ubivol $vol_id $rootfs_name "$2" "$autoresize" "$rootsize" + ubivol $vol_id $rootfs_name "$2" "$autoresize" "$rootsize"
vol_id=$(( $vol_id + 1 )) vol_id=$(( $vol_id + 1 ))
[ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1 [ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1
@@ -101,6 +102,12 @@ while [ "$1" ]; do @@ -109,6 +110,12 @@ while [ "$1" ]; do
shift shift
continue continue
;; ;;
@@ -59,5 +59,5 @@ index c6f8bcefe5..707cd38d47 100755
parts="$parts $2" parts="$parts $2"
shift shift
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From a53506fd073dd451840c3c1974e579a8861f9205 Mon Sep 17 00:00:00 2001 From 72d075fc52486aed50b107907999eab5a9be19ef Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Tue, 4 May 2021 16:48:48 +0200 Date: Sat, 15 Jul 2023 10:48:09 +0200
Subject: [PATCH 33/43] feeds.conf.default: drop luci Subject: [PATCH 04/43] feeds.conf.default: drop luci
we require luci-trunk for the gateway images. we require luci-trunk for the gateway images.
@@ -11,15 +11,14 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/feeds.conf.default b/feeds.conf.default diff --git a/feeds.conf.default b/feeds.conf.default
index 98bf97232d..3d24cb7c27 100644 index d467db5627..6fb7a14535 100644
--- a/feeds.conf.default --- a/feeds.conf.default
+++ b/feeds.conf.default +++ b/feeds.conf.default
@@ -1,5 +1,4 @@ @@ -1,4 +1,3 @@
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
-src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 -src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05
#src-link custom /usr/src/openwrt/custom-feed
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 5c54120d8b707a1022052edd562cea1a358a9bce Mon Sep 17 00:00:00 2001 From 050a312f34d425abc7ddb303f14913d737b45142 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Tue, 28 Jul 2020 09:21:04 +0200 Date: Sat, 15 Jul 2023 10:46:42 +0200
Subject: [PATCH 11/43] busybox: enable the watchdog tool Subject: [PATCH 05/43] busybox: enable the watchdog tool
procd can currently only handle the main wdt. Enable the busybox procd can currently only handle the main wdt. Enable the busybox
applet until procd can handle multiple devices. applet until procd can handle multiple devices.
@@ -12,12 +12,12 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index 168c73b24c..d35ce0b7b8 100644 index b3c3f9a0b2..c22b20d8f2 100644
--- a/package/utils/busybox/Config-defaults.in --- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in
@@ -2182,7 +2182,7 @@ config BUSYBOX_DEFAULT_VOLNAME @@ -2236,7 +2236,7 @@ config BUSYBOX_DEFAULT_WATCHDOG
default n default n
config BUSYBOX_DEFAULT_WATCHDOG config BUSYBOX_DEFAULT_FEATURE_WATCHDOG_OPEN_TWICE
bool bool
- default n - default n
+ default y + default y
@@ -25,5 +25,5 @@ index 168c73b24c..d35ce0b7b8 100644
bool bool
default y if IPV6 default y if IPV6
-- --
2.25.1 2.34.1

View File

@@ -1,6 +1,6 @@
From 73116492498c07a2f9c45a7a66a4b03ac103d37d Mon Sep 17 00:00:00 2001 From 23d6181abeb100726f2185077318eb5983111c00 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 30 Jul 2020 16:51:04 +0200 Date: Sat, 15 Jul 2023 10:45:06 +0200
Subject: [PATCH 06/43] base-files: set default password to "openwifi" Subject: [PATCH 06/43] base-files: set default password to "openwifi"
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
@@ -11,10 +11,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
3 files changed, 3 insertions(+), 3 deletions(-) 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index 596fcf41fa..30e7c119f7 100755 index be21d0079a..f494fe2de8 100755
--- a/package/base-files/files/bin/config_generate --- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate
@@ -303,7 +303,7 @@ generate_static_system() { @@ -313,7 +313,7 @@ generate_static_system() {
add system system add system system
set system.@system[-1].hostname='OpenWrt' set system.@system[-1].hostname='OpenWrt'
set system.@system[-1].timezone='UTC' set system.@system[-1].timezone='UTC'
@@ -24,11 +24,11 @@ index 596fcf41fa..30e7c119f7 100755
set system.@system[-1].urandom_seed='0' set system.@system[-1].urandom_seed='0'
diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
index 4b4154f21f..5b3f32ce64 100644 index 39bdb9c90a..5b3f32ce64 100644
--- a/package/base-files/files/etc/shadow --- a/package/base-files/files/etc/shadow
+++ b/package/base-files/files/etc/shadow +++ b/package/base-files/files/etc/shadow
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-root::0:0:99999:7::: -root:::0:99999:7:::
+root:$1$Ev771IIe$RHpqhCLW3U6c5tg9MrkQD/:18473:0:99999:7::: +root:$1$Ev771IIe$RHpqhCLW3U6c5tg9MrkQD/:18473:0:99999:7:::
daemon:*:0:0:99999:7::: daemon:*:0:0:99999:7:::
ftp:*:0:0:99999:7::: ftp:*:0:0:99999:7:::
@@ -45,5 +45,5 @@ index 1fff39c6a0..2e8dbc0d90 100755
exec /bin/login exec /bin/login
-- --
2.25.1 2.34.1

View File

@@ -1,4 +1,4 @@
From a819600041c0fade872c023637ba0c6c5890de78 Mon Sep 17 00:00:00 2001 From fc2a78a9e8714989530e399d833407df472edd3e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 31 Jul 2020 17:15:13 +0200 Date: Fri, 31 Jul 2020 17:15:13 +0200
Subject: [PATCH 07/43] base-files: update banner Subject: [PATCH 07/43] base-files: update banner
@@ -30,5 +30,5 @@ index f3af3c014f..f73423bad4 100644
- ----------------------------------------------------- - -----------------------------------------------------
+ --------------------------------------------------- + ---------------------------------------------------
-- --
2.25.1 2.34.1

View File

@@ -1,4 +1,4 @@
From f887c60cee77011e009d87639560079b828a452a Mon Sep 17 00:00:00 2001 From f36cff29ac40469f2a11065b4c4a00329dfab47e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Sat, 29 Aug 2020 08:25:41 +0200 Date: Sat, 29 Aug 2020 08:25:41 +0200
Subject: [PATCH 08/43] base-files: add the wlan-ap repo hash Subject: [PATCH 08/43] base-files: add the wlan-ap repo hash
@@ -14,13 +14,12 @@ Signed-off-by: John Crispin <john@phrozen.org>
package/base-files/files/etc/openwrt_release | 2 ++ package/base-files/files/etc/openwrt_release | 2 ++
package/base-files/files/etc/openwrt_version | 1 + package/base-files/files/etc/openwrt_version | 1 +
...p-revision-info-to-system.board-call.patch | 28 +++++++++++++++++++ ...p-revision-info-to-system.board-call.patch | 28 +++++++++++++++++++
scripts/gen_config.py | 2 +-
scripts/getver.sh | 12 ++++++++ scripts/getver.sh | 12 ++++++++
8 files changed, 53 insertions(+), 1 deletion(-) 7 files changed, 52 insertions(+)
create mode 100644 package/system/procd/patches/0001-procd-add-tip-revision-info-to-system.board-call.patch create mode 100644 package/system/procd/patches/0001-procd-add-tip-revision-info-to-system.board-call.patch
diff --git a/include/version.mk b/include/version.mk diff --git a/include/version.mk b/include/version.mk
index a4b47c8a57..214f32974b 100644 index 924bf83541..af7d9a1e32 100644
--- a/include/version.mk --- a/include/version.mk
+++ b/include/version.mk +++ b/include/version.mk
@@ -56,6 +56,11 @@ VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic) @@ -56,6 +56,11 @@ VERSION_PRODUCT:=$(if $(VERSION_PRODUCT),$(VERSION_PRODUCT),Generic)
@@ -44,10 +43,10 @@ index a4b47c8a57..214f32974b 100644
-e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g' -e 's,%h,$(call sed_escape,$(VERSION_HWREV)),g'
diff --git a/package/base-files/Makefile b/package/base-files/Makefile diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 9db4812981..99cb5476f7 100644 index 8732f82fb9..dc89de2035 100644
--- a/package/base-files/Makefile --- a/package/base-files/Makefile
+++ b/package/base-files/Makefile +++ b/package/base-files/Makefile
@@ -209,6 +209,7 @@ define Package/base-files/install @@ -239,6 +239,7 @@ endif
$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \ $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
rm -f $(1)/etc/banner.failsafe,) rm -f $(1)/etc/banner.failsafe,)
@@ -118,7 +117,7 @@ index 0000000000..4e8f05a700
+2.25.1 +2.25.1
+ +
diff --git a/scripts/getver.sh b/scripts/getver.sh diff --git a/scripts/getver.sh b/scripts/getver.sh
index dc3d1bb1c3..cd4d7aedf4 100755 index 49260a2260..8e8ee46f21 100755
--- a/scripts/getver.sh --- a/scripts/getver.sh
+++ b/scripts/getver.sh +++ b/scripts/getver.sh
@@ -3,6 +3,18 @@ export LANG=C @@ -3,6 +3,18 @@ export LANG=C
@@ -141,5 +140,5 @@ index dc3d1bb1c3..cd4d7aedf4 100755
try_version() { try_version() {
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 60cf08fa4ce44d7c3d3c6264a933f4c6e5b2e831 Mon Sep 17 00:00:00 2001 From 1e236f0c048be74a2ba83f7a8b469bfd8ee1b984 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 23 Jan 2023 09:47:54 +0100 Date: Mon, 23 Jan 2023 09:47:54 +0100
Subject: [PATCH] base-files: sysupgrade: always assume -n if -f is not Subject: [PATCH 09/43] base-files: sysupgrade: always assume -n if -f is not
provided provided
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 1 insertion(+), 4 deletions(-) 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 5a2d459013..f55237b935 100755 index 9315091302..3fc4fcf25c 100755
--- a/package/base-files/files/sbin/sysupgrade --- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade
@@ -9,7 +9,7 @@ export MTD_ARGS="" @@ -9,7 +9,7 @@ export MTD_ARGS=""
@@ -22,7 +22,7 @@ index 5a2d459013..f55237b935 100755
export SAVE_OVERLAY=0 export SAVE_OVERLAY=0
export SAVE_OVERLAY_PATH= export SAVE_OVERLAY_PATH=
export SAVE_PARTITIONS=1 export SAVE_PARTITIONS=1
@@ -345,9 +345,6 @@ if [ -n "$CONF_IMAGE" ]; then @@ -349,9 +349,6 @@ if [ -n "$CONF_IMAGE" ]; then
esac esac
get_image "$CONF_IMAGE" "cat" > "$CONF_TAR" get_image "$CONF_IMAGE" "cat" > "$CONF_TAR"
export SAVE_CONFIG=1 export SAVE_CONFIG=1

View File

@@ -1,7 +1,7 @@
From bc2e9052af84664a2caae0581aa745d09240b160 Mon Sep 17 00:00:00 2001 From 9bb541b1e6fab8cc3b1e59f823c6fb66cc341c0a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 19 Apr 2021 13:49:20 +0200 Date: Mon, 19 Apr 2021 13:49:20 +0200
Subject: [PATCH 29/43] base-files: add a turnoff command to the led script Subject: [PATCH 10/43] base-files: add a turnoff command to the led script
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -9,7 +9,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 29 insertions(+) 1 file changed, 29 insertions(+)
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index 8d97515d52..c402428e40 100755 index 08a1e6df3b..3b3b934586 100755
--- a/package/base-files/files/etc/init.d/led --- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led
@@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@
@@ -23,7 +23,7 @@ index 8d97515d52..c402428e40 100755
load_led() { load_led() {
local name local name
local sysfs local sysfs
@@ -122,7 +126,32 @@ load_led() { @@ -125,7 +129,32 @@ load_led() {
} }
} }
@@ -57,5 +57,5 @@ index 8d97515d52..c402428e40 100755
[ -s /var/run/led.state ] && { [ -s /var/run/led.state ] && {
local led trigger brightness local led trigger brightness
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 47e7917bed8c23b1d2a92ea225aaee371bc8964a Mon Sep 17 00:00:00 2001 From 6a1c3236fe645bced0af9f1394cfb71b1820c56a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Sun, 5 Dec 2021 10:43:34 +0100 Date: Sun, 5 Dec 2021 10:43:34 +0100
Subject: [PATCH 38/38] base-files: add wifi scanning radio support to Subject: [PATCH 11/43] base-files: add wifi scanning radio support to
board_detect board_detect
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
@@ -12,7 +12,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
3 files changed, 13 insertions(+) 3 files changed, 13 insertions(+)
diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect
index 840bd0178d..dd28bc44dd 100755 index 94f45bec53..86edc5be0c 100755
--- a/package/base-files/files/bin/board_detect --- a/package/base-files/files/bin/board_detect
+++ b/package/base-files/files/bin/board_detect +++ b/package/base-files/files/bin/board_detect
@@ -12,3 +12,4 @@ CFG=$1 @@ -12,3 +12,4 @@ CFG=$1
@@ -21,10 +21,10 @@ index 840bd0178d..dd28bc44dd 100755
[ -s "$CFG" ] || return 1 [ -s "$CFG" ] || return 1
+wifi config +wifi config
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 02882f43ca..ff3433a0a2 100644 index a37e8cf824..c831469a24 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh --- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -617,6 +617,16 @@ ucidef_set_hostname() { @@ -634,6 +634,16 @@ ucidef_set_hostname() {
json_select .. json_select ..
} }
@@ -42,7 +42,7 @@ index 02882f43ca..ff3433a0a2 100644
local server local server
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 6b9662fe93..b080e22770 100755 index a3d3206ee7..861feb72e6 100755
--- a/package/base-files/files/sbin/wifi --- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@@ -55,5 +55,5 @@ index 6b9662fe93..b080e22770 100755
. /usr/share/libubox/jshn.sh . /usr/share/libubox/jshn.sh
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From db79fb81502c935be1295c258fb4738dfb2351bd Mon Sep 17 00:00:00 2001 From ddaa9e7bb9ff4fe5e5d44a2b154fe9e2cdc6b140 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Wed, 23 Sep 2020 17:34:44 +0200 Date: Wed, 23 Sep 2020 17:34:44 +0200
Subject: [PATCH 10/43] base-files: add support for v4.4 style netdev led Subject: [PATCH 12/43] base-files: add support for v4.4 style netdev led
triggers triggers
Current owrt scripting cant handle the old v4.4 style sysfs API of led Current owrt scripting cant handle the old v4.4 style sysfs API of led
@@ -13,10 +13,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index 277fb4e76f..8d97515d52 100755 index 3b3b934586..db1cc4a3f1 100755
--- a/package/base-files/files/etc/init.d/led --- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led
@@ -71,6 +71,8 @@ load_led() { @@ -80,6 +80,8 @@ load_led() {
"netdev") "netdev")
[ -n "$dev" ] && { [ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name echo $dev > /sys/class/leds/${sysfs}/device_name
@@ -26,5 +26,5 @@ index 277fb4e76f..8d97515d52 100755
[ -e "/sys/class/leds/${sysfs}/$m" ] && \ [ -e "/sys/class/leds/${sysfs}/$m" ] && \
echo 1 > /sys/class/leds/${sysfs}/$m echo 1 > /sys/class/leds/${sysfs}/$m
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From f057826fed0208c369ca9483092c706bf5c9ae9e Mon Sep 17 00:00:00 2001 From 53f86d4cd4399473090fec41d689ec8675d691ee Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 12 May 2022 09:31:11 +0200 Date: Thu, 12 May 2022 09:31:11 +0200
Subject: [PATCH] iwinfo: add 6E support Subject: [PATCH 13/43] iwinfo: add 6E support
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -29,5 +29,5 @@ index 0000000000..45472e8ccf
+ return (freq - 5000) / 5; + return (freq - 5000) / 5;
+ } + }
-- --
2.25.1 2.34.1

View File

@@ -1,18 +1,18 @@
From 65e3d7cb239d85ed3b3ac142a9a53523b7343fe2 Mon Sep 17 00:00:00 2001 From db5e1b92b1537f2f38b016233d3de72c8a6ee96e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 13 Jun 2022 13:33:31 +0200 Date: Mon, 13 Jun 2022 13:33:31 +0200
Subject: [PATCH] dnsmasq: ignore dhcp on the ifb-dhcp interface Subject: [PATCH 14/43] dnsmasq: ignore dhcp on the ifb-dhcp interface
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
package/network/services/dnsmasq/files/dnsmasq.init | 2 ++ package/network/services/dnsmasq/files/dnsmasq.init | 3 +++
1 file changed, 2 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 205bfb4cf6..415a6b013d 100644 index 2a3327b0c6..c6576b6f27 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init --- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1106,6 +1106,9 @@ dnsmasq_start() @@ -1167,6 +1167,9 @@ dnsmasq_start()
[ -n "$BOOT" ] || config_foreach filter_dnsmasq dhcp dhcp_add "$cfg" [ -n "$BOOT" ] || config_foreach filter_dnsmasq dhcp dhcp_add "$cfg"
fi fi
@@ -23,5 +23,5 @@ index 205bfb4cf6..415a6b013d 100644
echo >> $CONFIGFILE_TMP echo >> $CONFIGFILE_TMP
config_foreach filter_dnsmasq cname dhcp_cname_add "$cfg" config_foreach filter_dnsmasq cname dhcp_cname_add "$cfg"
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From fcea0e786c9311e3fc6ff256ba320aaa07b6ae05 Mon Sep 17 00:00:00 2001 From 33d4a794f51e0f2f6ba4ef00cd403d9fb7ba7547 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 13 Jun 2022 13:37:17 +0200 Date: Mon, 13 Jun 2022 13:37:17 +0200
Subject: [PATCH] wireguard-tools: do not select the kernel module Subject: [PATCH 15/43] wireguard-tools: do not select the kernel module
unetd will select the correct kernel module. unetd will select the correct kernel module.
@@ -11,10 +11,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 1 insertion(+), 2 deletions(-) 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile
index 5f8da147c1..e0df0a6c67 100644 index 5b1fab057d..2e5e1a7ed6 100644
--- a/package/network/utils/wireguard-tools/Makefile --- a/package/network/utils/wireguard-tools/Makefile
+++ b/package/network/utils/wireguard-tools/Makefile +++ b/package/network/utils/wireguard-tools/Makefile
@@ -38,8 +38,7 @@ define Package/wireguard-tools @@ -36,8 +36,7 @@ define Package/wireguard-tools
TITLE:=WireGuard userspace control program (wg) TITLE:=WireGuard userspace control program (wg)
DEPENDS:= \ DEPENDS:= \
+@BUSYBOX_CONFIG_IP \ +@BUSYBOX_CONFIG_IP \
@@ -25,5 +25,5 @@ index 5f8da147c1..e0df0a6c67 100644
define Package/wireguard-tools/description define Package/wireguard-tools/description
-- --
2.25.1 2.34.1

View File

@@ -1,8 +1,8 @@
From 2d1e4a5142af4f82c4becb58cb7bedcec9067b41 Mon Sep 17 00:00:00 2001 From cc8027b53b5cc7547d91eb93ac76d885274bad14 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Wed, 7 Sep 2022 11:08:14 +0200 Date: Wed, 7 Sep 2022 11:08:14 +0200
Subject: [PATCH] libubox: do not clear the cancled flag when a runqueue task Subject: [PATCH 16/43] libubox: do not clear the cancled flag when a runqueue
is aborted task is aborted
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -29,5 +29,5 @@ index 0000000000..623a474aca
+ t->complete(q, t); + t->complete(q, t);
+ runqueue_start_next(q); + runqueue_start_next(q);
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 11a8e36bf029d575ff7bfafe6226f91abc74ff5a Mon Sep 17 00:00:00 2001 From 870473cd263bb21b37734765c091fd50e9cb6fde Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 27 Jan 2023 13:42:32 +0100 Date: Fri, 27 Jan 2023 13:42:32 +0100
Subject: [PATCH] ugps: update to latest HEAD Subject: [PATCH 17/43] ugps: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -11,10 +11,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
3 files changed, 6 insertions(+), 4 deletions(-) 3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile
index c70a7b7ea6..ab3f852b0d 100644 index 5afba4e0b0..0cd95576fb 100644
--- a/package/utils/ugps/Makefile --- a/package/utils/ugps/Makefile
+++ b/package/utils/ugps/Makefile +++ b/package/utils/ugps/Makefile
@@ -12,9 +12,8 @@ PKG_RELEASE:=$(AUTORELEASE) @@ -12,9 +12,8 @@ PKG_RELEASE:=2
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git

View File

@@ -1,7 +1,7 @@
From 58242d355b483e105affd0c69c681e46e88ad84c Mon Sep 17 00:00:00 2001 From e0e35c5b940e2e821c6143ce995e7fe842b8b0c9 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 4 Dec 2020 16:29:35 +0100 Date: Sat, 15 Jul 2023 15:40:38 +0200
Subject: [PATCH 19/43] lldp: add TIP tweaks Subject: [PATCH 18/43] lldp: add TIP tweaks
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -11,25 +11,25 @@ Signed-off-by: John Crispin <john@phrozen.org>
3 files changed, 14 insertions(+), 37 deletions(-) 3 files changed, 14 insertions(+), 37 deletions(-)
diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile
index 74d6791091..fd55c94cf4 100644 index 289adc55c9..f90bf0ad3d 100644
--- a/package/network/services/lldpd/Makefile --- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile
@@ -8,12 +8,12 @@ @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=lldpd PKG_NAME:=lldpd
-PKG_VERSION:=1.0.7 -PKG_VERSION:=1.0.17
+PKG_VERSION:=1.0.5 +PKG_VERSION:=1.0.5
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://media.luffy.cx/files/lldpd PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/
-PKG_HASH:=1df79179d489c841b49265f2ab5ff05f284a647e95862d2f3c02b3fb079a87e1 -PKG_HASH:=89ae691a4917ac9e0ec3b8b2c1e634cc402d43b804f98850c73bd1c7df380882
+PKG_HASH:=2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99 +PKG_HASH:=2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be> PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
PKG_LICENSE:=ISC PKG_LICENSE:=ISC
@@ -97,6 +97,7 @@ CONFIGURE_ARGS += \ @@ -99,6 +99,7 @@ CONFIGURE_ARGS += \
--disable-hardening \ --disable-hardening \
--without-xml \ --without-xml \
--disable-doxygen-doc \ --disable-doxygen-doc \
@@ -63,7 +63,7 @@ index 5e7c51ba7e..b37dda87bf 100644
- list interface "loopback" - list interface "loopback"
- list interface "lan" - list interface "lan"
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 7a5b25e016..e587bd7ebd 100644 index 5b39144921..2650dcb329 100644
--- a/package/network/services/lldpd/files/lldpd.init --- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init
@@ -10,6 +10,10 @@ LLDPSOCKET=/var/run/lldpd.socket @@ -10,6 +10,10 @@ LLDPSOCKET=/var/run/lldpd.socket
@@ -86,7 +86,7 @@ index 7a5b25e016..e587bd7ebd 100644
append ifnames "${ifname:-$iface}" "," append ifnames "${ifname:-$iface}" ","
fi fi
done done
@@ -58,6 +62,7 @@ write_lldpd_conf() @@ -62,6 +66,7 @@ service_triggers() {
start_service() { start_service() {
@@ -94,7 +94,7 @@ index 7a5b25e016..e587bd7ebd 100644
local enable_cdp local enable_cdp
local enable_fdp local enable_fdp
local enable_sonmp local enable_sonmp
@@ -68,6 +73,10 @@ start_service() { @@ -72,6 +77,10 @@ start_service() {
local agentxsocket local agentxsocket
config_load 'lldpd' config_load 'lldpd'
@@ -105,7 +105,7 @@ index 7a5b25e016..e587bd7ebd 100644
config_get_bool enable_cdp 'config' 'enable_cdp' 0 config_get_bool enable_cdp 'config' 'enable_cdp' 0
config_get_bool enable_fdp 'config' 'enable_fdp' 0 config_get_bool enable_fdp 'config' 'enable_fdp' 0
config_get_bool enable_sonmp 'config' 'enable_sonmp' 0 config_get_bool enable_sonmp 'config' 'enable_sonmp' 0
@@ -101,24 +110,7 @@ start_service() { @@ -104,24 +113,7 @@ start_service() {
} }
reload_service() { reload_service() {
@@ -132,5 +132,5 @@ index 7a5b25e016..e587bd7ebd 100644
} }
-- --
2.25.1 2.34.1

View File

@@ -0,0 +1,47 @@
From a360344ee35b1a2fe56a703f5e192c928f7108bd Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 15:50:22 +0200
Subject: [PATCH 19/43] firewall3/4: enable ssh on wan during early boot stage
Signed-off-by: John Crispin <john@phrozen.org>
---
.../network/config/firewall/files/firewall.config | 2 +-
.../firewall4/patches/100-allow-input-wan.patch | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 package/network/config/firewall4/patches/100-allow-input-wan.patch
diff --git a/package/network/config/firewall/files/firewall.config b/package/network/config/firewall/files/firewall.config
index b90ac7af0a..e332bcc7ca 100644
--- a/package/network/config/firewall/files/firewall.config
+++ b/package/network/config/firewall/files/firewall.config
@@ -17,7 +17,7 @@ config zone
option name wan
list network 'wan'
list network 'wan6'
- option input REJECT
+ option input ACCEPT
option output ACCEPT
option forward REJECT
option masq 1
diff --git a/package/network/config/firewall4/patches/100-allow-input-wan.patch b/package/network/config/firewall4/patches/100-allow-input-wan.patch
new file mode 100644
index 0000000000..f44a2987cf
--- /dev/null
+++ b/package/network/config/firewall4/patches/100-allow-input-wan.patch
@@ -0,0 +1,13 @@
+Index: firewall4-2023-03-23-04a06bd7/root/etc/config/firewall
+===================================================================
+--- firewall4-2023-03-23-04a06bd7.orig/root/etc/config/firewall
++++ firewall4-2023-03-23-04a06bd7/root/etc/config/firewall
+@@ -17,7 +17,7 @@ config zone
+ option name wan
+ list network 'wan'
+ list network 'wan6'
+- option input REJECT
++ option input ACCEPT
+ option output ACCEPT
+ option forward REJECT
+ option masq 1
--
2.34.1

View File

@@ -1,7 +1,7 @@
From 4b7e51305fcbf27d8c447e165484f513f9ec7185 Mon Sep 17 00:00:00 2001 From 5bc48fcccc56914a1231a4315852866831df33d5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Wed, 4 Aug 2021 08:36:30 +0200 Date: Wed, 4 Aug 2021 08:36:30 +0200
Subject: [PATCH 39/43] netifd: fix compile on older kernels Subject: [PATCH 20/43] netifd: fix compile on older kernels
The ethtool features do not exist on ancient qualcomm kernels. The ethtool features do not exist on ancient qualcomm kernels.
Disable that feature if running on QCA. Disable that feature if running on QCA.
@@ -50,5 +50,5 @@ index 0000000000..6aee86283e
+ +
+ int system_if_up(struct device *dev) + int system_if_up(struct device *dev)
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 61a2e46d47dcd76dfd4b8d18036794dae4f4f212 Mon Sep 17 00:00:00 2001 From d2bd7480d1306eecf97118487109de0ba5bff1ad Mon Sep 17 00:00:00 2001
From: Tanya Singh <tanya_singh@accton.com> From: Tanya Singh <tanya_singh@accton.com>
Date: Tue, 28 Jun 2022 17:11:52 +0800 Date: Tue, 28 Jun 2022 17:11:52 +0800
Subject: [PATCH] Support DHCP option 138 and store values in Subject: [PATCH 21/43] netifd: Support DHCP option 138 and store values in
/tmp/capwap/dhcp_opt.txt /tmp/capwap/dhcp_opt.txt
Signed-off-by: Tanya Singh <tanya_singh@accton.com> Signed-off-by: Tanya Singh <tanya_singh@accton.com>
@@ -13,7 +13,7 @@ Signed-off-by: Tanya Singh <tanya_singh@accton.com>
create mode 100644 package/utils/busybox/patches/531-dhcp_opt_capwap.patch create mode 100644 package/utils/busybox/patches/531-dhcp_opt_capwap.patch
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 6fcf139beb..d7c1324184 100755 index 6fcf139beb..29de85f221 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script --- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script +++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -4,6 +4,24 @@ @@ -4,6 +4,24 @@
@@ -53,7 +53,7 @@ index 6fcf139beb..d7c1324184 100755
[ -f /etc/udhcpc.user ] && . /etc/udhcpc.user "$@" [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user "$@"
for f in /etc/udhcpc.user.d/*; do for f in /etc/udhcpc.user.d/*; do
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 3034b2ba68..89908e5ca4 100755 index 636b4654ff..18a9aaf2a3 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -61,6 +61,7 @@ proto_dhcp_setup() { @@ -61,6 +61,7 @@ proto_dhcp_setup() {
@@ -66,7 +66,7 @@ index 3034b2ba68..89908e5ca4 100755
proto_run_command "$config" udhcpc \ proto_run_command "$config" udhcpc \
diff --git a/package/utils/busybox/patches/531-dhcp_opt_capwap.patch b/package/utils/busybox/patches/531-dhcp_opt_capwap.patch diff --git a/package/utils/busybox/patches/531-dhcp_opt_capwap.patch b/package/utils/busybox/patches/531-dhcp_opt_capwap.patch
new file mode 100644 new file mode 100644
index 0000000000..c705c0e40e index 0000000000..6c60159555
--- /dev/null --- /dev/null
+++ b/package/utils/busybox/patches/531-dhcp_opt_capwap.patch +++ b/package/utils/busybox/patches/531-dhcp_opt_capwap.patch
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
@@ -89,4 +89,5 @@ index 0000000000..c705c0e40e
+ "tzdbstr" "\0" /* DHCP_TCODE */ + "tzdbstr" "\0" /* DHCP_TCODE */
+ #if ENABLE_FEATURE_UDHCP_RFC3397 + #if ENABLE_FEATURE_UDHCP_RFC3397
-- --
2.17.1 2.34.1

View File

@@ -1,7 +1,7 @@
From aa0404504cff8bcdac40d8e9b3ec708d2079d705 Mon Sep 17 00:00:00 2001 From d8e5a9690a26149b66bad9e97aa25f3deb63e48a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 22 Sep 2022 15:12:20 +0200 Date: Thu, 22 Sep 2022 15:12:20 +0200
Subject: [PATCH] base-files: add ucidef_set_wifi_country Subject: [PATCH 22/43] base-files: add ucidef_set_wifi_country
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -9,10 +9,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index ff3433a0a2..3bc8e6bb1c 100644 index c831469a24..133181ed18 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh --- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -627,6 +627,12 @@ ucidef_set_wifi_scanning() { @@ -644,6 +644,12 @@ ucidef_set_wifi_scanning() {
json_select .. json_select ..
} }
@@ -26,5 +26,5 @@ index ff3433a0a2..3bc8e6bb1c 100644
local server local server
-- --
2.25.1 2.34.1

View File

@@ -1,15 +1,19 @@
From 7b703f7557779fa47bb17dc692bd6140d89a3cdc Mon Dec 5 02:58:36 2022 +0000 From 132f222fe8bf0c0506db93ffc13a253bec0d8bce Mon Sep 17 00:00:00 2001
From: Sohail Ahmad <sohail@indionetworks.com> From: Sohail Ahmad <sohail@indionetworks.com>
Date: Mon Dec 5 02:58:36 2022 +0000 Date: Mon, 5 Dec 2022 02:58:36 +0000
Subject: [PATCH] dnsmasq: enabled EDNS configuration options- CPE ID and subnet Subject: [PATCH 23/43] dnsmasq: enabled EDNS configuration options- CPE ID and
subnet
Signed-off-by: Sohail Ahmad <sohail@indionetworks.com> Signed-off-by: Sohail Ahmad <sohail@indionetworks.com>
---
package/network/services/dnsmasq/files/dnsmasq.init | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index d154d2566d..bacb9cc669 100644 index c6576b6f27..3df7950f4c 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init --- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -964,6 +964,10 @@ dnsmasq_start() @@ -1023,6 +1023,10 @@ dnsmasq_start()
append_parm "$cfg" "max_cache_ttl" "--max-cache-ttl" append_parm "$cfg" "max_cache_ttl" "--max-cache-ttl"
append_parm "$cfg" "pxe_prompt" "--pxe-prompt" append_parm "$cfg" "pxe_prompt" "--pxe-prompt"
append_parm "$cfg" "tftp_unique_root" "--tftp-unique-root" append_parm "$cfg" "tftp_unique_root" "--tftp-unique-root"
@@ -20,3 +24,6 @@ index d154d2566d..bacb9cc669 100644
config_list_foreach "$cfg" "pxe_service" append_pxe_service config_list_foreach "$cfg" "pxe_service" append_pxe_service
config_get DOMAIN "$cfg" domain config_get DOMAIN "$cfg" domain
--
2.34.1

View File

@@ -0,0 +1,26 @@
From 5b61c5de9334f24302741c2c964580023ee3c611 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 16 Jul 2023 17:15:05 +0200
Subject: [PATCH 24/43] elfutils: GCC5 compile fix
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/elfutils/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index f7364c36be..1e7e86771f 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -87,7 +87,7 @@ TARGET_CFLAGS += \
-Wno-unused-result \
-Wno-format-nonliteral
-ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
+ifneq ($(CONFIG_GCC_USE_VERSION_11)$(CONFIG_GCC_VERSION_5),y)
TARGET_CFLAGS += \
-Wno-error=use-after-free
endif
--
2.34.1

View File

@@ -0,0 +1,47 @@
From 033837cb7e161710d2d1c2d0dfce504c75284888 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 11:58:50 +0200
Subject: [PATCH 25/43] generic: enable pstore support
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/generic/config-5.15 | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index 637b845ac4..4bb77e224a 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -4838,21 +4838,21 @@ CONFIG_PROC_SYSCTL=y
# CONFIG_PSAMPLE is not set
# CONFIG_PSB6970_PHY is not set
# CONFIG_PSI is not set
-# CONFIG_PSTORE is not set
+CONFIG_PSTORE=y
# CONFIG_PSTORE_842_COMPRESS is not set
# CONFIG_PSTORE_BLK is not set
-# CONFIG_PSTORE_COMPRESS is not set
+CONFIG_PSTORE_COMPRESS=y
+CONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
# CONFIG_PSTORE_CONSOLE is not set
-CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
-# CONFIG_PSTORE_DEFLATE_COMPRESS is not set
-# CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT is not set
-# CONFIG_PSTORE_FTRACE is not set
+CONFIG_PSTORE_DEFLATE_COMPRESS=y
+CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
+# CONFIG_PSTORE_ZSTD_COMPRESS is not set
# CONFIG_PSTORE_LZ4HC_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_PMSG is not set
-# CONFIG_PSTORE_RAM is not set
-# CONFIG_PSTORE_ZSTD_COMPRESS is not set
+CONFIG_PSTORE_RAM=y
+CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
# CONFIG_PTDUMP_DEBUGFS is not set
# CONFIG_PTP_1588_CLOCK is not set
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
--
2.34.1

View File

@@ -1,18 +1,26 @@
From be7c703e5078abb5f39b9ad435c47db2f9c1f0ec Mon Sep 17 00:00:00 2001 From 359d3bf3923274b1489c8a5b83fd774e091915e3 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Tue, 4 Jan 2022 05:22:04 +0100 Date: Sat, 15 Jul 2023 17:49:12 +0200
Subject: [PATCH] Revert "gpio-button-hotplug: convert to gpio descriptor Subject: [PATCH 26/43] gpio-button-hotplug: use ancient version of the driver
(gpiod_) API"
This reverts commit 6fe4b7aa2b00b4e93871454e6a6fc41eb192c784. Signed-off-by: John Crispin <john@phrozen.org>
--- ---
.../src/gpio-button-hotplug.c | 142 ++++++++++-------- .../src/gpio-button-hotplug.c | 149 ++++++++++--------
1 file changed, 79 insertions(+), 63 deletions(-) 1 file changed, 79 insertions(+), 70 deletions(-)
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index fcaf7f59de..9575c6245b 100644 index 522085bb2f..9575c6245b 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -107,7 +107,7 @@ static struct bh_map button_map[] = {
static __printf(3, 4)
int bh_event_add_var(struct bh_event *event, int argv, const char *format, ...)
{
- char buf[128];
+ static char buf[128];
char *s;
va_list args;
int len;
@@ -242,11 +242,11 @@ static int gpio_button_get_value(struct gpio_keys_button_data *bdata) @@ -242,11 +242,11 @@ static int gpio_button_get_value(struct gpio_keys_button_data *bdata)
int val; int val;
@@ -131,7 +139,7 @@ index fcaf7f59de..9575c6245b 100644
int i; int i;
if (!pdata) { if (!pdata) {
@@ -483,67 +514,46 @@ static int gpio_keys_button_probe(struct platform_device *pdev, @@ -483,74 +514,46 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
for (i = 0; i < pdata->nbuttons; i++) { for (i = 0; i < pdata->nbuttons; i++) {
struct gpio_keys_button *button = &buttons[i]; struct gpio_keys_button *button = &buttons[i];
struct gpio_keys_button_data *bdata = &bdev->data[i]; struct gpio_keys_button_data *bdata = &bdev->data[i];
@@ -160,8 +168,14 @@ index fcaf7f59de..9575c6245b 100644
- dev_err(dev, "only supports buttons or switches\n"); - dev_err(dev, "only supports buttons or switches\n");
- error = -EINVAL; - error = -EINVAL;
- goto out; - goto out;
- }
-
- if (button->irq) {
- dev_err(dev, "skipping button %s (only gpio buttons supported)\n",
- button->desc);
- bdata->b = &pdata->buttons[i];
+ dev_warn(dev, "only supports buttons or switches\n"); + dev_warn(dev, "only supports buttons or switches\n");
+ continue; continue;
} }
- if (gpio_is_valid(button->gpio)) { - if (gpio_is_valid(button->gpio)) {
@@ -221,7 +235,7 @@ index fcaf7f59de..9575c6245b 100644
bdata->last_state = -1; /* Unknown state on boot */ bdata->last_state = -1; /* Unknown state on boot */
if (bdev->polled) { if (bdev->polled) {
@@ -574,11 +584,8 @@ static int gpio_keys_button_probe(struct platform_device *pdev, @@ -581,11 +584,8 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
platform_set_drvdata(pdev, bdev); platform_set_drvdata(pdev, bdev);
*_bdev = bdev; *_bdev = bdev;
@@ -234,7 +248,7 @@ index fcaf7f59de..9575c6245b 100644
} }
static int gpio_keys_probe(struct platform_device *pdev) static int gpio_keys_probe(struct platform_device *pdev)
@@ -587,7 +594,9 @@ static int gpio_keys_probe(struct platform_device *pdev) @@ -594,7 +594,9 @@ static int gpio_keys_probe(struct platform_device *pdev)
struct gpio_keys_button_dev *bdev; struct gpio_keys_button_dev *bdev;
int ret, i; int ret, i;
@@ -244,7 +258,7 @@ index fcaf7f59de..9575c6245b 100644
if (ret) if (ret)
return ret; return ret;
@@ -599,8 +608,12 @@ static int gpio_keys_probe(struct platform_device *pdev) @@ -606,8 +608,12 @@ static int gpio_keys_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&bdata->work, gpio_keys_irq_work_func); INIT_DELAYED_WORK(&bdata->work, gpio_keys_irq_work_func);
@@ -258,7 +272,7 @@ index fcaf7f59de..9575c6245b 100644
if (bdata->irq < 0) { if (bdata->irq < 0) {
dev_err(&pdev->dev, "failed to get irq for gpio:%d\n", dev_err(&pdev->dev, "failed to get irq for gpio:%d\n",
button->gpio); button->gpio);
@@ -618,6 +631,7 @@ static int gpio_keys_probe(struct platform_device *pdev) @@ -625,6 +631,7 @@ static int gpio_keys_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(&pdev->dev, ret = devm_request_threaded_irq(&pdev->dev,
bdata->irq, NULL, button_handle_irq, bdata->irq, NULL, button_handle_irq,
irqflags, dev_name(&pdev->dev), bdata); irqflags, dev_name(&pdev->dev), bdata);
@@ -266,7 +280,7 @@ index fcaf7f59de..9575c6245b 100644
if (ret < 0) { if (ret < 0) {
bdata->irq = 0; bdata->irq = 0;
dev_err(&pdev->dev, "failed to request irq:%d for gpio:%d\n", dev_err(&pdev->dev, "failed to request irq:%d for gpio:%d\n",
@@ -639,12 +653,14 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) @@ -646,12 +653,14 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
int ret; int ret;
ret = gpio_keys_button_probe(pdev, &bdev, 1); ret = gpio_keys_button_probe(pdev, &bdev, 1);
@@ -282,5 +296,5 @@ index fcaf7f59de..9575c6245b 100644
pdata->enable(bdev->dev); pdata->enable(bdev->dev);
-- --
2.25.1 2.34.1

View File

@@ -1,97 +1,24 @@
From bda0e566a474677412cc3097e93b954b628c626b Mon Sep 17 00:00:00 2001 From d79526cea79b1d38eaa2ea151835096bb6791856 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 25 Mar 2021 08:03:48 +0100 Date: Thu, 25 Mar 2021 08:03:48 +0100
Subject: [PATCH 01/31] ipq40xx: add ath10k-ct fw.cfg stubs Subject: [PATCH 27/43] ipq40xx: add ath10k-ct fw.cfg stubs
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
...the-dst-buffer-to-of_get_mac_address.patch | 29 -----------------
...ss-the-dst-buffer-to-of_get_mac_addr.patch | 26 ---------------
.../etc/hotplug.d/firmware/40-ct-fw-cfg | 32 +++++++++++++++++++ .../etc/hotplug.d/firmware/40-ct-fw-cfg | 32 +++++++++++++++++++
.../lib/firmware/ath10k/fwcfg-ipq4019.txt | 15 +++++++++ .../lib/firmware/ath10k/fwcfg-ipq4019.txt | 15 +++++++++
.../lib/firmware/ath10k/fwcfg-qca9888.txt | 16 ++++++++++ .../lib/firmware/ath10k/fwcfg-qca9888.txt | 16 ++++++++++
.../lib/firmware/ath10k/fwcfg-qca9984.txt | 16 ++++++++++ .../lib/firmware/ath10k/fwcfg-qca9984.txt | 16 ++++++++++
.../etc/hotplug.d/firmware/40-ct-fw-cfg | 32 +++++++++++++++++++
.../lib/firmware/ath10k/fwcfg-qca9888.txt | 16 ++++++++++ .../lib/firmware/ath10k/fwcfg-qca9888.txt | 16 ++++++++++
.../lib/firmware/ath10k/fwcfg-qca9984.txt | 16 ++++++++++ .../lib/firmware/ath10k/fwcfg-qca9984.txt | 16 ++++++++++
9 files changed, 143 insertions(+), 55 deletions(-) 6 files changed, 111 insertions(+)
delete mode 100644 package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
delete mode 100644 package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch
create mode 100644 target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg create mode 100644 target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-ipq4019.txt
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt create mode 100644 target/linux/ipq40xx/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt
create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
create mode 100644 target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt create mode 100644 target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
create mode 100644 target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt create mode 100644 target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9984.txt
diff --git a/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
deleted file mode 100644
index 26af6a2fb9..0000000000
--- a/package/kernel/mac80211/patches/subsys/782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/backport-include/linux/of_net.h
-+++ /dev/null
-@@ -1,26 +0,0 @@
--#ifndef _BP_OF_NET_H
--#define _BP_OF_NET_H
--#include_next <linux/of_net.h>
--#include <linux/version.h>
--#include <linux/etherdevice.h>
--
--/* The behavior of of_get_mac_address() changed in kernel 5.2, it now
-- * returns an error code and not NULL in case of an error.
-- */
--#if LINUX_VERSION_IS_LESS(5,13,0)
--static inline int backport_of_get_mac_address(struct device_node *np, u8 *mac_out)
--{
-- const void *mac = of_get_mac_address(np);
--
-- if (!mac)
-- return -ENODEV;
-- if (IS_ERR(mac))
-- return PTR_ERR(mac);
-- ether_addr_copy(mac_out, mac);
--
-- return 0;
--}
--#define of_get_mac_address LINUX_BACKPORT(of_get_mac_address)
--#endif /* < 5.2 */
--
--#endif /* _BP_OF_NET_H */
diff --git a/package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch b/package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch
deleted file mode 100644
index 24b1240548..0000000000
--- a/package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Tue, 23 Nov 2021 17:01:45 +0100
-Subject: [PATCH] Revert "of: net: pass the dst buffer to of_get_mac_address()"
-
-This reverts commit 4932c5d80153c336c77dbe8d7af9f8fdd879d01f.
----
-
---- a/eeprom.c
-+++ b/eeprom.c
-@@ -105,9 +105,15 @@ mt76_eeprom_override(struct mt76_phy *ph
- {
- struct mt76_dev *dev = phy->dev;
-
-+#ifdef CONFIG_OF
- struct device_node *np = dev->dev->of_node;
-+ const u8 *mac = NULL;
-
-- of_get_mac_address(np, phy->macaddr);
-+ if (np)
-+ mac = of_get_mac_address(np);
-+ if (!IS_ERR_OR_NULL(mac))
-+ ether_addr_copy(phy->macaddr, mac);
-+#endif
-
- if (!is_valid_ether_addr(phy->macaddr)) {
- eth_random_addr(phy->macaddr);
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
new file mode 100644 new file mode 100644
index 0000000000..7e22cbd4f5 index 0000000000..7e22cbd4f5
@@ -195,44 +122,6 @@ index 0000000000..924a689000
+tids = 450 +tids = 450
+skid_limit = 360 +skid_limit = 360
+max_amsdus = 3 +max_amsdus = 3
diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
new file mode 100644
index 0000000000..c33bbea506
--- /dev/null
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/40-ct-fw-cfg
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+
+fwcfg_symlink() {
+ local chip=$1
+ local path=$2
+
+ ln -s /lib/firmware/ath10k/fwcfg-${chip}.txt /lib/firmware/${FIRMWARE}
+}
+
+case "$FIRMWARE" in
+ath10k/fwcfg-pci-0001:01:00.0.txt)
+ case "$(board_name)" in
+ edgecore,ssw2ac2600|\
+ edgecore,ecw5410)
+ fwcfg_symlink qca9984
+ ;;
+ esac
+ ;;
+ath10k/fwcfg-pci-0002:01:00.0.txt)
+ case "$(board_name)" in
+ edgecore,ssw2ac2600|\
+ edgecore,ecw5410)
+ fwcfg_symlink qca9984
+ ;;
+ esac
+ ;;
+esac
+
+exit 0
diff --git a/target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt b/target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt diff --git a/target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt b/target/linux/ipq806x/base-files/lib/firmware/ath10k/fwcfg-qca9888.txt
new file mode 100644 new file mode 100644
index 0000000000..560c8103d7 index 0000000000..560c8103d7
@@ -278,5 +167,5 @@ index 0000000000..924a689000
+skid_limit = 360 +skid_limit = 360
+max_amsdus = 3 +max_amsdus = 3
-- --
2.25.1 2.34.1

View File

@@ -0,0 +1,37 @@
From 951b9e4887b17cfab12402e941e3f732284028f3 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 11:46:58 +0200
Subject: [PATCH 28/43] ipq40xx: enable pstore support
Signed-off-by: John Crispin <john@phrozen.org>
---
.../linux/ipq40xx/patches-5.15/900-pstore.patch | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 target/linux/ipq40xx/patches-5.15/900-pstore.patch
diff --git a/target/linux/ipq40xx/patches-5.15/900-pstore.patch b/target/linux/ipq40xx/patches-5.15/900-pstore.patch
new file mode 100644
index 0000000000..940ee02020
--- /dev/null
+++ b/target/linux/ipq40xx/patches-5.15/900-pstore.patch
@@ -0,0 +1,17 @@
+Index: linux-5.15.120/arch/arm/boot/dts/qcom-ipq4019.dtsi
+===================================================================
+--- linux-5.15.120.orig/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ linux-5.15.120/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -32,6 +32,12 @@
+ reg = <0x87e80000 0x180000>;
+ no-map;
+ };
++
++ ramoops@87f00000 {
++ compatible = "ramoops";
++ reg = <0x87df0000 0x10000>;
++ record-size = <0x1000>;
++ };
+ };
+
+ aliases {
--
2.34.1

View File

@@ -1,26 +1,24 @@
From 86dc0a3f51da3440bc216d988c04b225ba169247 Mon Sep 17 00:00:00 2001 From 97f0b48681010e9b6c4b224da5e28101dd9dd5a5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 16 Jun 2022 12:46:08 +0200 Date: Sat, 15 Jul 2023 11:59:02 +0200
Subject: [PATCH] ipq40xx: add dual boot support for ecw5211 Subject: [PATCH] ipq40xx: enable dualboot on ecw5211
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
.../ipq40xx/base-files/etc/init.d/bootcount | 17 ++++++++++++++--- .../ipq40xx/base-files/etc/init.d/bootcount | 11 +++++++++++
.../base-files/lib/upgrade/platform.sh | 19 ++++++++++++++++++- .../base-files/lib/upgrade/platform.sh | 19 ++++++++++++++++++-
.../arm/boot/dts/qcom-ipq4018-ecw5211.dts | 10 ++++++++++ .../arm/boot/dts/qcom-ipq4018-ecw5211.dts | 10 ++++++++++
3 files changed, 42 insertions(+), 4 deletions(-) 3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
index 36b5d56d0c..5cda1fc245 100755 index df656c9b85..f6921089bd 100755
--- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount --- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount
+++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount +++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
@@ -13,13 +13,24 @@ boot() { @@ -8,6 +8,17 @@ boot() {
linksys,mr8300) [ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
mtd resetbc s_env || true echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
;; ;;
- edgecore,spw2ac1200|\ + edgecore,ecw5211)
- edgecore,spw2ac1200-lan-poe|\
edgecore,ecw5211)
+ part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | cut -d " " -f1)" + part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | cut -d " " -f1)"
+ case "$part" in + case "$part" in
+ rootfs1|\ + rootfs1|\
@@ -31,31 +29,23 @@ index 36b5d56d0c..5cda1fc245 100755
+ ;; + ;;
+ esac + esac
+ ;; + ;;
+ edgecore,spw2ac1200|\ linksys,ea6350v3|\
+ edgecore,spw2ac1200-lan-poe) linksys,ea8300|\
avail=$(fw_printenv -n upgrade_available) linksys,mr8300|\
[ ${avail} -eq 0 ] || {
- fw_setenv bootcount 0
fw_setenv upgrade_available 0
+ fw_setenv bootcount 0
}
+ ;;
esac
}
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index d44a57c62a..6f2bff527c 100644 index e6e99b9d21..651ddb8177 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -66,7 +66,6 @@ platform_do_upgrade() { @@ -110,7 +110,6 @@ platform_do_upgrade() {
avm,fritzrepeater-3000 |\ avm,fritzrepeater-3000 |\
buffalo,wtr-m2133hp |\ buffalo,wtr-m2133hp |\
cilab,meshpoint-one |\ cilab,meshpoint-one |\
- edgecore,ecw5211 |\ - edgecore,ecw5211 |\
edgecore,oap100 |\ edgecore,oap100 |\
engenius,eap2200 |\ engenius,eap2200 |\
glinet,gl-ap1300 |\ glinet,gl-a1300 |\
@@ -78,6 +77,24 @@ platform_do_upgrade() { @@ -157,6 +156,24 @@ platform_do_upgrade() {
tp-link,ec420-g1) compex,wpj419)
nand_do_upgrade "$1" nand_do_upgrade "$1"
;; ;;
+ edgecore,ecw5211) + edgecore,ecw5211)
@@ -76,14 +66,14 @@ index d44a57c62a..6f2bff527c 100644
+ esac + esac
+ nand_do_upgrade "$1" + nand_do_upgrade "$1"
+ ;; + ;;
alfa-network,ap120c-ac) google,wifi)
mkdir -p /var/lock/ export_bootdevice
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" export_partdevice CI_ROOTDEV 0
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
index 0ee8d1a52e..d8c0853c58 100644 index 3060b7bd1c..e3e1785e1f 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
@@ -258,6 +258,16 @@ @@ -255,6 +255,16 @@
label = "rootfs"; label = "rootfs";
reg = <0x00000000 0x04000000>; reg = <0x00000000 0x04000000>;
}; };
@@ -101,5 +91,5 @@ index 0ee8d1a52e..d8c0853c58 100644
}; };
}; };
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From bd7e19e3cc30bda8d0b0ae6f3d0c44425c6b7541 Mon Sep 17 00:00:00 2001 From 1311b98f29ac98669ae243f4d793ad6500cf0b8b Mon Sep 17 00:00:00 2001
From: Rohan Nathi <rohan.nathi@indionetworks.com> From: John Crispin <john@phrozen.org>
Date: Thu, 24 Jun 2021 13:48:45 +0000 Date: Sat, 15 Jul 2023 12:05:30 +0200
Subject: [PATCH 01/22] ath79: add Support for Indio 305AC Subject: [PATCH 30/43] ath79: add Support for Indio 305AC
Signed-off-by: Rohan Nathi <rohan.nathi@indionetworks.com> Signed-off-by: Rohan Nathi <rohan.nathi@indionetworks.com>
--- ---
@@ -13,7 +13,7 @@ Signed-off-by: Rohan Nathi <rohan.nathi@indionetworks.com>
diff --git a/target/linux/ath79/dts/qca9531_indio_um-305ac.dts b/target/linux/ath79/dts/qca9531_indio_um-305ac.dts diff --git a/target/linux/ath79/dts/qca9531_indio_um-305ac.dts b/target/linux/ath79/dts/qca9531_indio_um-305ac.dts
new file mode 100755 new file mode 100755
index 0000000000..3952c4ad2c index 0000000000..63633b7ecb
--- /dev/null --- /dev/null
+++ b/target/linux/ath79/dts/qca9531_indio_um-305ac.dts +++ b/target/linux/ath79/dts/qca9531_indio_um-305ac.dts
@@ -0,0 +1,121 @@ @@ -0,0 +1,121 @@
@@ -139,22 +139,22 @@ index 0000000000..3952c4ad2c
+ mtd-cal-data = <&art 0x1000>; + mtd-cal-data = <&art 0x1000>;
+}; +};
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 783895525b..80f755b343 100644 index f0a3755de9..d822f0bab8 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -44,6 +44,7 @@ case "$FIRMWARE" in @@ -25,6 +25,7 @@ case "$FIRMWARE" in
ubnt,powerbeam-5ac-500|\ comfast,cf-wr650ac-v2|\
ubnt,powerbeam-5ac-gen2|\ devolo,dlan-pro-1200plus-ac|\
ubnt,unifiac-pro|\ devolo,magic-2-wifi|\
+ indio,um-305ac|\ + indio,um-305ac|\
yuncore,a770) joyit,jt-or750i|\
caldata_extract "art" 0x5000 0x844 qxwlan,e1700ac-v2-8m|\
;; qxwlan,e1700ac-v2-16m|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index ce4e462a40..24778e8f1c 100644 index 1a558c30a0..5882feafcb 100644
--- a/target/linux/ath79/image/generic.mk --- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk
@@ -2209,6 +2209,17 @@ define Device/yuncore_a770 @@ -2991,6 +2991,17 @@ define Device/yuncore_a770
endef endef
TARGET_DEVICES += yuncore_a770 TARGET_DEVICES += yuncore_a770
@@ -173,5 +173,5 @@ index ce4e462a40..24778e8f1c 100644
SOC := qca9563 SOC := qca9563
DEVICE_VENDOR := YunCore DEVICE_VENDOR := YunCore
-- --
2.25.1 2.34.1

View File

@@ -0,0 +1,25 @@
From 3fcc5230cb60daa8bd01bb1b781a9685643e8a49 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 12:08:40 +0200
Subject: [PATCH 31/43] ath79: enable bridge vlan
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ath79/generic/base-files/etc/board.d/02_network | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 4f535f8a64..5b98d50183 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -818,6 +818,7 @@ ath79_setup_macs()
board_config_update
board=$(board_name)
+ucidef_set_bridge_device bridge
ath79_setup_interfaces $board
ath79_setup_macs $board
board_config_flush
--
2.34.1

View File

@@ -0,0 +1,50 @@
From b3177e08af3db3ddee379869450e35f810362d5c Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 15:16:57 +0200
Subject: [PATCH 01/15] ramips: add certificates partitions
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ramips/dts/mt7621_yuncore_ax820.dts | 7 ++++++-
target/linux/ramips/dts/mt7621_yuncore_fap640.dts | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
index 1aba94a912..51fd358095 100644
--- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
+++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
@@ -120,7 +120,12 @@
partition@90000 {
compatible = "denx,uimage";
label = "firmware";
- reg = <0x90000 0xf70000>;
+ reg = <0x90000 0xf60000>;
+ };
+
+ partition@ff0000 {
+ label = "certificates";
+ reg = <0xff0000 0x10000>;
};
};
};
diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
index d525dde385..754b7c23ea 100644
--- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
+++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
@@ -128,7 +128,12 @@
partition@90000 {
compatible = "denx,uimage";
label = "firmware";
- reg = <0x90000 0xf70000>;
+ reg = <0x90000 0xf60000>;
+ };
+
+ partition@ff0000 {
+ label = "certificates";
+ reg = <0xff0000 0x10000>;
};
};
};
--
2.34.1

View File

@@ -1,18 +1,58 @@
From abd6918dc1af8d411aacc333bbddbfdcce25d439 Mon Sep 17 00:00:00 2001 From eeec43439f2f53cd88c03b73a6092d342d56bff6 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Wed, 20 Apr 2022 09:13:33 +0200 Date: Sat, 15 Jul 2023 15:25:59 +0200
Subject: [PATCH 01/35] ramips: add mt7621_indio_um-305ax Subject: [PATCH 33/43] ramips: add mt7621_indio_um-305ax
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
target/linux/ath79/image/generic.mk | 22 +--
.../ramips/dts/mt7621_indio_um-305ax.dts | 146 ++++++++++++++++++ .../ramips/dts/mt7621_indio_um-305ax.dts | 146 ++++++++++++++++++
target/linux/ramips/image/mt7621.mk | 12 ++ target/linux/ramips/image/mt7621.mk | 11 ++
.../mt7621/base-files/etc/board.d/02_network | 6 + .../mt7621/base-files/etc/board.d/02_network | 6 +
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 +
target/linux/ramips/mt7621/config-5.4 | 11 +- 5 files changed, 180 insertions(+), 11 deletions(-)
5 files changed, 176 insertions(+), 5 deletions(-)
create mode 100644 target/linux/ramips/dts/mt7621_indio_um-305ax.dts create mode 100644 target/linux/ramips/dts/mt7621_indio_um-305ax.dts
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 5882feafcb..a98a5e816f 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1627,6 +1627,17 @@ define Device/hiwifi_hc6361
endef
TARGET_DEVICES += hiwifi_hc6361
+define Device/indio_um-305ac
+ SOC := qca9531
+ DEVICE_VENDOR := Indio Network
+ DEVICE_MODEL := UM-305AC
+ DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887
+ IMAGE_SIZE := 16000k
+ IMAGES += tftp.bin
+ IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
+endef
+TARGET_DEVICES += indio_um-305ac
+
define Device/iodata_etg3-r
SOC := ar9342
DEVICE_VENDOR := I-O DATA
@@ -2991,17 +3002,6 @@ define Device/yuncore_a770
endef
TARGET_DEVICES += yuncore_a770
-define Device/indio_um-305ac
- SOC := qca9531
- DEVICE_VENDOR := Indio Network
- DEVICE_MODEL := UM-305AC
- DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887
- IMAGE_SIZE := 16000k
- IMAGES += tftp.bin
- IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m
-endef
-TARGET_DEVICES += indio_um-305ac
-
define Device/yuncore_a782
SOC := qca9563
DEVICE_VENDOR := YunCore
diff --git a/target/linux/ramips/dts/mt7621_indio_um-305ax.dts b/target/linux/ramips/dts/mt7621_indio_um-305ax.dts diff --git a/target/linux/ramips/dts/mt7621_indio_um-305ax.dts b/target/linux/ramips/dts/mt7621_indio_um-305ax.dts
new file mode 100644 new file mode 100644
index 0000000000..79cffbdec2 index 0000000000..79cffbdec2
@@ -166,14 +206,13 @@ index 0000000000..79cffbdec2
+}; +};
+ +
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 81ef6bbd14..9e1eed024b 100644 index fa4c83dbe1..97505c3504 100644
--- a/target/linux/ramips/image/mt7621.mk --- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk
@@ -1736,3 +1736,15 @@ define Device/zyxel_wap6805 @@ -1136,6 +1136,17 @@ define Device/huasifei_ws1208v2
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef endef
TARGET_DEVICES += zyxel_wap6805 TARGET_DEVICES += huasifei_ws1208v2
+
+define Device/indio_um-305ax +define Device/indio_um-305ax
+ $(Device/dsa-migration) + $(Device/dsa-migration)
+ DEVICE_VENDOR := INDIO + DEVICE_VENDOR := INDIO
@@ -185,21 +224,24 @@ index 81ef6bbd14..9e1eed024b 100644
+endef +endef
+TARGET_DEVICES += indio_um-305ax +TARGET_DEVICES += indio_um-305ax
+ +
define Device/iodata_wn-ax1167gr
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index b88fac6f59..c0a6bc884a 100755 index 6057c17192..405da43bdb 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -33,6 +33,7 @@ ramips_setup_interfaces() @@ -58,6 +58,7 @@ ramips_setup_interfaces()
;; ;;
actiontec,web7200|\
asiarf,ap7621-001|\ asiarf,ap7621-001|\
humax,e10|\
+ indio,um-305ax|\ + indio,um-305ax|\
wavlink,ws-wn572hp3-4g|\
winstars,ws-wn583a6) winstars,ws-wn583a6)
ucidef_set_interfaces_lan_wan "lan" "wan" ucidef_set_interfaces_lan_wan "lan" "wan"
;; @@ -146,6 +147,11 @@ ramips_setup_interfaces()
@@ -173,6 +174,11 @@ ramips_setup_macs() *)
wan_mac=$label_mac ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
lan_mac=$(macaddr_add $label_mac 1)
;; ;;
+ indio,um-305ax) + indio,um-305ax)
+ label_mac=$(mtd_get_mac_binary factory 0x4) + label_mac=$(mtd_get_mac_binary factory 0x4)
@@ -207,15 +249,15 @@ index b88fac6f59..c0a6bc884a 100755
+ lan_mac=$label_mac + lan_mac=$label_mac
+ ;; + ;;
esac esac
}
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 7109a4647e..157e706534 100644 index 3467e783f0..d5bd50fdf7 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -15,6 +15,12 @@ case "$board" in @@ -60,6 +60,12 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $wan_mac 2 > /sys${DEVPATH}/macaddress macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $wan_mac 3 > /sys${DEVPATH}/macaddress fi
;; ;;
+ indio,um-305ax) + indio,um-305ax)
+ [ "$PHYNBR" = "0" ] && \ + [ "$PHYNBR" = "0" ] && \
@@ -226,56 +268,6 @@ index 7109a4647e..157e706534 100644
glinet,gl-mt1300) glinet,gl-mt1300)
[ "$PHYNBR" = "1" ] && \ [ "$PHYNBR" = "1" ] && \
macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4
index eada0ff602..809baf5441 100644
--- a/target/linux/ramips/mt7621/config-5.4
+++ b/target/linux/ramips/mt7621/config-5.4
@@ -43,6 +43,7 @@ CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
@@ -53,17 +54,12 @@ CONFIG_DEBUG_PINCTRL=y
CONFIG_DIMLIB=y
CONFIG_DMA_NONCOHERENT=y
CONFIG_DMA_NONCOHERENT_CACHE_SYNC=y
-# CONFIG_DMA_RALINK is not set
# CONFIG_DTB_GNUBEE1 is not set
# CONFIG_DTB_GNUBEE2 is not set
CONFIG_DTB_RT_NONE=y
CONFIG_DTC=y
CONFIG_EARLY_PRINTK=y
-CONFIG_EFI_EARLYCON=y
CONFIG_FIXED_PHY=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_AUTOSELECT=y
-CONFIG_FONT_SUPPORT=y
CONFIG_FW_LOADER_PAGED_BUF=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_GENERIC_CLOCKEVENTS=y
@@ -209,6 +205,7 @@ CONFIG_PHYLIB=y
CONFIG_PHYLINK=y
# CONFIG_PHY_RALINK_USB is not set
CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AW9523=y
CONFIG_PINCTRL_RT2880=y
# CONFIG_PINCTRL_SINGLE is not set
CONFIG_PINCTRL_SX150X=y
@@ -222,7 +219,11 @@ CONFIG_RALINK=y
CONFIG_RATIONAL=y
CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_RCU_STALL_COMMON=y
+CONFIG_REED_SOLOMON=y
+CONFIG_REED_SOLOMON_DEC8=y
+CONFIG_REED_SOLOMON_ENC8=y
CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 08d64888eca2337cd7562f7c84bebde3f8eca858 Mon Sep 17 00:00:00 2001 From 87846201a8a268ac76f27a81830523d1ea75e56c Mon Sep 17 00:00:00 2001
From: Johann Hoffmann <johann.hoffmann@mailbox.org> From: Johann Hoffmann <johann.hoffmann@mailbox.org>
Date: Mon, 11 Apr 2022 17:25:43 +0000 Date: Mon, 11 Apr 2022 17:25:43 +0000
Subject: [PATCH] Set eth0 as WAN interface by default for x86 Subject: [PATCH 34/43] x86: Set eth0 as WAN interface by default for x86
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org> Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
--- ---
@@ -9,10 +9,10 @@ Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network
index 21f054019a..40b0bba9f5 100755 index e00e8c04dd..d924fa93e0 100644
--- a/target/linux/x86/base-files/etc/board.d/02_network --- a/target/linux/x86/base-files/etc/board.d/02_network
+++ b/target/linux/x86/base-files/etc/board.d/02_network +++ b/target/linux/x86/base-files/etc/board.d/02_network
@@ -22,6 +22,9 @@ traverse-technologies-geos) @@ -75,6 +75,9 @@ traverse-technologies-geos)
macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
[ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr" [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
;; ;;
@@ -23,5 +23,5 @@ index 21f054019a..40b0bba9f5 100755
board_config_flush board_config_flush
-- --
2.25.1 2.34.1

View File

@@ -1,7 +1,7 @@
From 398ceb5dee1a6e1e7e30e02d4f77316a83fdc5b1 Mon Sep 17 00:00:00 2001 From 633632f950423d7fcc588bb9d79fe6ca9d0fa516 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Sun, 22 May 2022 16:56:10 +0200 Date: Sun, 22 May 2022 16:56:10 +0200
Subject: [PATCH] include/image-commands.mk: build mmc qdsk images Subject: [PATCH 35/43] include/image-commands.mk: build mmc qdsk images
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -9,10 +9,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/include/image-commands.mk b/include/image-commands.mk diff --git a/include/image-commands.mk b/include/image-commands.mk
index d4bce80e68..541ec4f575 100644 index 08adbb6454..bd20f9608c 100644
--- a/include/image-commands.mk --- a/include/image-commands.mk
+++ b/include/image-commands.mk +++ b/include/image-commands.mk
@@ -354,6 +354,13 @@ define Build/qsdk-ipq-factory-nor @@ -499,6 +499,13 @@ define Build/qsdk-ipq-factory-nor
@mv $@.new $@ @mv $@.new $@
endef endef
@@ -27,5 +27,5 @@ index d4bce80e68..541ec4f575 100644
$(STAGING_DIR_HOST)/bin/seama -i $@ \ $(STAGING_DIR_HOST)/bin/seama -i $@ \
-m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware" -m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
-- --
2.25.1 2.34.1

View File

@@ -1,102 +1,108 @@
From 2947f1c2ac5e300d209b952979da30e92330a01f Mon Sep 17 00:00:00 2001 From 5eb23f252c2d3cf754d98120f30c6b8a4e054671 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 25 Jan 2021 06:40:20 +0100 Date: Sat, 15 Jul 2023 16:00:29 +0200
Subject: [PATCH 02/43] Revert "toolchain: gcc: Remove support for GCC 5" Subject: [PATCH 36/43] ipq807x: add gcc-5 support
This reverts commit 080dc619d4780a1f7b14082b77b28686e694f72d. Signed-off-by: John Crispin <john@phrozen.org>
--- ---
toolchain/gcc/Config.in | 5 + toolchain/gcc/Config.in | 9 +
toolchain/gcc/Config.version | 7 +- toolchain/gcc/Config.version | 6 +
toolchain/gcc/common.mk | 4 + toolchain/gcc/common.mk | 4 +
.../001-revert_register_mode_search.patch | 65 + .../001-revert_register_mode_search.patch | 65 +
.../patches/5.5.0/002-case_insensitive.patch | 14 + .../patches-5.x/002-case_insensitive.patch | 14 +
.../gcc/patches/5.5.0/010-documentation.patch | 23 + toolchain/gcc/patches-5.x/003-build_fix.patch | 11 +
.../patches/5.5.0/020-no-plt-backport.patch | 28 + .../gcc/patches-5.x/010-documentation.patch | 23 +
.../5.5.0/040-fix-mips-ICE-PR-68400.patch | 23 + .../gcc/patches-5.x/020-no-plt-backport.patch | 28 +
.../040-fix-mips-ICE-PR-68400.patch | 23 +
...efine-__always_inline-in-local_atomi.patch | 1092 +++++++++++++++++ ...efine-__always_inline-in-local_atomi.patch | 1092 +++++++++++++++++
.../gcc/patches/5.5.0/200-musl_config.patch | 309 +++++ .../gcc/patches-5.x/200-musl_config.patch | 309 +++++
.../gcc/patches/5.5.0/201-musl_arm.patch | 43 + toolchain/gcc/patches-5.x/201-musl_arm.patch | 43 +
.../gcc/patches/5.5.0/202-musl_mips.patch | 35 + toolchain/gcc/patches-5.x/202-musl_mips.patch | 35 +
.../gcc/patches/5.5.0/203-musl_powerpc.patch | 209 ++++ .../gcc/patches-5.x/203-musl_powerpc.patch | 209 ++++
toolchain/gcc/patches/5.5.0/204-musl_sh.patch | 39 + toolchain/gcc/patches-5.x/204-musl_sh.patch | 39 +
.../gcc/patches/5.5.0/205-musl_x86.patch | 41 + toolchain/gcc/patches-5.x/205-musl_x86.patch | 41 +
.../gcc/patches/5.5.0/206-musl_aarch64.patch | 31 + .../gcc/patches-5.x/206-musl_aarch64.patch | 31 +
.../patches/5.5.0/207-musl_fixincludes.patch | 30 + .../patches-5.x/207-musl_fixincludes.patch | 30 +
.../patches/5.5.0/209-musl_libstdc++.patch | 72 ++ .../gcc/patches-5.x/209-musl_libstdc++.patch | 72 ++
.../gcc/patches/5.5.0/230-musl_libssp.patch | 13 + .../gcc/patches-5.x/230-musl_libssp.patch | 13 +
.../patches/5.5.0/240-musl-libitm-fixes.patch | 61 + .../patches-5.x/240-musl-libitm-fixes.patch | 61 +
.../gcc/patches/5.5.0/250-add-musl.patch | 120 ++ toolchain/gcc/patches-5.x/250-add-musl.patch | 120 ++
.../5.5.0/260-musl-add-unwind-fix.patch | 34 + .../patches-5.x/260-musl-add-unwind-fix.patch | 34 +
.../270-musl-add-powerpc-softfloat-fix.patch | 24 + .../270-musl-add-powerpc-softfloat-fix.patch | 24 +
.../280-musl-disable-ifunc-by-default.patch | 36 + .../280-musl-disable-ifunc-by-default.patch | 36 +
.../300-mips_Os_cpu_rtx_cost_model.patch | 14 + .../300-mips_Os_cpu_rtx_cost_model.patch | 14 +
.../5.5.0/800-arm_v5te_no_ldrd_strd.patch | 11 + .../800-arm_v5te_no_ldrd_strd.patch | 11 +
.../5.5.0/810-arm-softfloat-libgcc.patch | 25 + .../810-arm-softfloat-libgcc.patch | 25 +
.../gcc/patches/5.5.0/820-libgcc_pic.patch | 36 + .../gcc/patches-5.x/820-libgcc_pic.patch | 36 +
.../5.5.0/830-arm_unbreak_armv4t.patch | 13 + .../patches-5.x/830-arm_unbreak_armv4t.patch | 13 +
.../5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 + .../840-armv4_pass_fix-v4bx_to_ld.patch | 19 +
.../patches/5.5.0/850-use_shared_libgcc.patch | 47 + .../patches-5.x/850-use_shared_libgcc.patch | 47 +
.../patches/5.5.0/851-libgcc_no_compat.patch | 12 + .../patches-5.x/851-libgcc_no_compat.patch | 12 +
.../patches/5.5.0/870-ppc_no_crtsavres.patch | 11 + .../patches-5.x/870-ppc_no_crtsavres.patch | 11 +
.../patches/5.5.0/880-no_java_section.patch | 11 + .../gcc/patches-5.x/880-no_java_section.patch | 11 +
.../gcc/patches/5.5.0/881-no_tm_section.patch | 11 + .../gcc/patches-5.x/881-no_tm_section.patch | 11 +
.../patches/5.5.0/900-bad-mips16-crt.patch | 9 + .../gcc/patches-5.x/900-bad-mips16-crt.patch | 9 +
.../gcc/patches/5.5.0/910-mbsd_multi.patch | 222 ++++ .../gcc/patches-5.x/910-mbsd_multi.patch | 222 ++++
.../5.5.0/920-specs_nonfatal_getenv.patch | 15 + .../920-specs_nonfatal_getenv.patch | 15 +
.../5.5.0/930-fix-mips-noexecstack.patch | 111 ++ .../930-fix-mips-noexecstack.patch | 111 ++
.../931-fix-MIPS-softfloat-build-issue.patch | 167 +++ .../931-fix-MIPS-softfloat-build-issue.patch | 167 +++
.../5.5.0/940-no-clobber-stamp-bits.patch | 11 + .../940-no-clobber-stamp-bits.patch | 11 +
.../5.5.0/950-cpp_file_path_translation.patch | 182 +++ .../950-cpp_file_path_translation.patch | 182 +++
toolchain/gcc/patches/5.5.0/960-go_libm.patch | 11 + toolchain/gcc/patches-5.x/960-go_libm.patch | 11 +
.../gcc/patches/5.5.0/970-warn_bug.patch | 11 + toolchain/gcc/patches-5.x/970-warn_bug.patch | 11 +
44 files changed, 3306 insertions(+), 1 deletion(-) 45 files changed, 3321 insertions(+)
create mode 100644 toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches-5.x/001-revert_register_mode_search.patch
create mode 100644 toolchain/gcc/patches/5.5.0/002-case_insensitive.patch create mode 100644 toolchain/gcc/patches-5.x/002-case_insensitive.patch
create mode 100644 toolchain/gcc/patches/5.5.0/010-documentation.patch create mode 100644 toolchain/gcc/patches-5.x/003-build_fix.patch
create mode 100644 toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch create mode 100644 toolchain/gcc/patches-5.x/010-documentation.patch
create mode 100644 toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch create mode 100644 toolchain/gcc/patches-5.x/020-no-plt-backport.patch
create mode 100644 toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch create mode 100644 toolchain/gcc/patches-5.x/040-fix-mips-ICE-PR-68400.patch
create mode 100644 toolchain/gcc/patches/5.5.0/200-musl_config.patch create mode 100644 toolchain/gcc/patches-5.x/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch
create mode 100644 toolchain/gcc/patches/5.5.0/201-musl_arm.patch create mode 100644 toolchain/gcc/patches-5.x/200-musl_config.patch
create mode 100644 toolchain/gcc/patches/5.5.0/202-musl_mips.patch create mode 100644 toolchain/gcc/patches-5.x/201-musl_arm.patch
create mode 100644 toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch create mode 100644 toolchain/gcc/patches-5.x/202-musl_mips.patch
create mode 100644 toolchain/gcc/patches/5.5.0/204-musl_sh.patch create mode 100644 toolchain/gcc/patches-5.x/203-musl_powerpc.patch
create mode 100644 toolchain/gcc/patches/5.5.0/205-musl_x86.patch create mode 100644 toolchain/gcc/patches-5.x/204-musl_sh.patch
create mode 100644 toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch create mode 100644 toolchain/gcc/patches-5.x/205-musl_x86.patch
create mode 100644 toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch create mode 100644 toolchain/gcc/patches-5.x/206-musl_aarch64.patch
create mode 100644 toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch create mode 100644 toolchain/gcc/patches-5.x/207-musl_fixincludes.patch
create mode 100644 toolchain/gcc/patches/5.5.0/230-musl_libssp.patch create mode 100644 toolchain/gcc/patches-5.x/209-musl_libstdc++.patch
create mode 100644 toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch create mode 100644 toolchain/gcc/patches-5.x/230-musl_libssp.patch
create mode 100644 toolchain/gcc/patches/5.5.0/250-add-musl.patch create mode 100644 toolchain/gcc/patches-5.x/240-musl-libitm-fixes.patch
create mode 100644 toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch create mode 100644 toolchain/gcc/patches-5.x/250-add-musl.patch
create mode 100644 toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch create mode 100644 toolchain/gcc/patches-5.x/260-musl-add-unwind-fix.patch
create mode 100644 toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch create mode 100644 toolchain/gcc/patches-5.x/270-musl-add-powerpc-softfloat-fix.patch
create mode 100644 toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain/gcc/patches-5.x/280-musl-disable-ifunc-by-default.patch
create mode 100644 toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain/gcc/patches-5.x/300-mips_Os_cpu_rtx_cost_model.patch
create mode 100644 toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain/gcc/patches-5.x/800-arm_v5te_no_ldrd_strd.patch
create mode 100644 toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch create mode 100644 toolchain/gcc/patches-5.x/810-arm-softfloat-libgcc.patch
create mode 100644 toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch create mode 100644 toolchain/gcc/patches-5.x/820-libgcc_pic.patch
create mode 100644 toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain/gcc/patches-5.x/830-arm_unbreak_armv4t.patch
create mode 100644 toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch create mode 100644 toolchain/gcc/patches-5.x/840-armv4_pass_fix-v4bx_to_ld.patch
create mode 100644 toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch create mode 100644 toolchain/gcc/patches-5.x/850-use_shared_libgcc.patch
create mode 100644 toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches-5.x/851-libgcc_no_compat.patch
create mode 100644 toolchain/gcc/patches/5.5.0/880-no_java_section.patch create mode 100644 toolchain/gcc/patches-5.x/870-ppc_no_crtsavres.patch
create mode 100644 toolchain/gcc/patches/5.5.0/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches-5.x/880-no_java_section.patch
create mode 100644 toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch create mode 100644 toolchain/gcc/patches-5.x/881-no_tm_section.patch
create mode 100644 toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch create mode 100644 toolchain/gcc/patches-5.x/900-bad-mips16-crt.patch
create mode 100644 toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain/gcc/patches-5.x/910-mbsd_multi.patch
create mode 100644 toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain/gcc/patches-5.x/920-specs_nonfatal_getenv.patch
create mode 100644 toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch create mode 100644 toolchain/gcc/patches-5.x/930-fix-mips-noexecstack.patch
create mode 100644 toolchain/gcc/patches/5.5.0/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches-5.x/931-fix-MIPS-softfloat-build-issue.patch
create mode 100644 toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch create mode 100644 toolchain/gcc/patches-5.x/940-no-clobber-stamp-bits.patch
create mode 100644 toolchain/gcc/patches/5.5.0/960-go_libm.patch create mode 100644 toolchain/gcc/patches-5.x/950-cpp_file_path_translation.patch
create mode 100644 toolchain/gcc/patches/5.5.0/970-warn_bug.patch create mode 100644 toolchain/gcc/patches-5.x/960-go_libm.patch
create mode 100644 toolchain/gcc/patches-5.x/970-warn_bug.patch
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index f0fc31d567..1aadae6839 100644 index 9156f9c263..0e017bb0ad 100644
--- a/toolchain/gcc/Config.in --- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in
@@ -6,6 +6,10 @@ choice @@ -3,17 +3,25 @@
choice
prompt "GCC compiler Version" if TOOLCHAINOPTS
default GCC_USE_VERSION_12
+ default GCC_USE_VERSION_5 if LINUX_4_4
help help
Select the version of gcc you wish to use. Select the version of gcc you wish to use.
@@ -104,49 +110,54 @@ index f0fc31d567..1aadae6839 100644
+ bool "gcc 5.x" + bool "gcc 5.x"
+ depends on !arc + depends on !arc
+ +
config GCC_USE_VERSION_7 config GCC_USE_VERSION_11
bool "gcc 7.x" bool "gcc 11.x"
depends on !arc + depends on !LINUX_4_4
@@ -34,6 +38,7 @@ config EXTRA_GCC_CONFIG_OPTIONS
config GCC_USE_VERSION_12
bool "gcc 12.x"
+ depends on !LINUX_4_4
config GCC_USE_VERSION_13
bool "gcc 13.x"
+ depends on !LINUX_4_4
endchoice
config GCC_USE_GRAPHITE
@@ -30,6 +38,7 @@ config EXTRA_GCC_CONFIG_OPTIONS
config GCC_DEFAULT_PIE config GCC_DEFAULT_PIE
bool bool
prompt "Build executable with PIE enabled by default" if TOOLCHAINOPTS prompt "Build executable with PIE enabled by default" if TOOLCHAINOPTS
+ depends on !GCC_USE_VERSION_5 + depends on !GCC_USE_VERSION_5
default n
help help
Use gcc configure option --enable-default-pie to turn on -fPIE and -pie by default. Use gcc configure option --enable-default-pie to turn on -fPIE and -pie by default.
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 967ce9e489..09deae3bf1 100644 index 7126a0c883..e29c5b9aa8 100644
--- a/toolchain/gcc/Config.version --- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version
@@ -1,3 +1,7 @@ @@ -1,3 +1,8 @@
+config GCC_VERSION_5 +config GCC_VERSION_5
+ default y if GCC_USE_VERSION_5 + default y if GCC_USE_VERSION_5
+ default y if LINUX_4_4
+ bool + bool
+ +
config GCC_VERSION_7 config GCC_VERSION_11
default y if GCC_USE_VERSION_7 default y if GCC_USE_VERSION_11
bool bool
@@ -12,6 +16,7 @@ config GCC_VERSION_10 @@ -8,6 +13,7 @@ config GCC_VERSION_13
config GCC_VERSION config GCC_VERSION
string string
+ default "5.5.0" if GCC_VERSION_5 + default "5.5.0" if GCC_VERSION_5
default "7.5.0" if GCC_VERSION_7 default "11.3.0" if GCC_VERSION_11
default "9.3.0" if GCC_VERSION_9 default "13.1.0" if GCC_VERSION_13
default "10.2.0" if GCC_VERSION_10 default "12.3.0"
@@ -19,5 +24,5 @@ config GCC_VERSION
config GCC_USE_IREMAP
bool
- default y if GCC_USE_VERSION_7
+ default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 )
default n
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 55fad1fcc4..d9372f9961 100644 index 677fb25381..00c908dd60 100644
--- a/toolchain/gcc/common.mk --- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk
@@ -28,6 +28,10 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) @@ -29,6 +29,10 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -154,14 +165,14 @@ index 55fad1fcc4..d9372f9961 100644
+ PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87 + PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87
+endif +endif
+ +
ifeq ($(PKG_VERSION),7.5.0) ifeq ($(PKG_VERSION),11.3.0)
PKG_HASH:=b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661 PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39
endif endif
diff --git a/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch diff --git a/toolchain/gcc/patches-5.x/001-revert_register_mode_search.patch b/toolchain/gcc/patches-5.x/001-revert_register_mode_search.patch
new file mode 100644 new file mode 100644
index 0000000000..06373eb6a0 index 0000000000..06373eb6a0
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch +++ b/toolchain/gcc/patches-5.x/001-revert_register_mode_search.patch
@@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
+Revert of: +Revert of:
+ +
@@ -228,11 +239,11 @@ index 0000000000..06373eb6a0
+ found_mode = mode; + found_mode = mode;
+ +
+ if (found_mode != VOIDmode) + if (found_mode != VOIDmode)
diff --git a/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch b/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch diff --git a/toolchain/gcc/patches-5.x/002-case_insensitive.patch b/toolchain/gcc/patches-5.x/002-case_insensitive.patch
new file mode 100644 new file mode 100644
index 0000000000..b3d2dbe291 index 0000000000..b3d2dbe291
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch +++ b/toolchain/gcc/patches-5.x/002-case_insensitive.patch
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+--- a/include/filenames.h +--- a/include/filenames.h
++++ b/include/filenames.h ++++ b/include/filenames.h
@@ -248,11 +259,28 @@ index 0000000000..b3d2dbe291
+ # define HAS_DRIVE_SPEC(f) (0) + # define HAS_DRIVE_SPEC(f) (0)
+ # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) + # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
+ # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) + # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
diff --git a/toolchain/gcc/patches/5.5.0/010-documentation.patch b/toolchain/gcc/patches/5.5.0/010-documentation.patch diff --git a/toolchain/gcc/patches-5.x/003-build_fix.patch b/toolchain/gcc/patches-5.x/003-build_fix.patch
new file mode 100644
index 0000000000..9602cd3b1c
--- /dev/null
+++ b/toolchain/gcc/patches-5.x/003-build_fix.patch
@@ -0,0 +1,11 @@
+--- a/gcc/reload.h
++++ b/gcc/reload.h
+@@ -168,7 +168,7 @@ struct target_reload {
+ value indicates the level of indirect addressing supported, e.g., two
+ means that (MEM (MEM (REG n))) is also valid if (REG n) does not get
+ a hard register. */
+- bool x_spill_indirect_levels;
++ unsigned char x_spill_indirect_levels;
+
+ /* True if caller-save has been reinitialized. */
+ bool x_caller_save_initialized_p;
diff --git a/toolchain/gcc/patches-5.x/010-documentation.patch b/toolchain/gcc/patches-5.x/010-documentation.patch
new file mode 100644 new file mode 100644
index 0000000000..d7166b24e7 index 0000000000..d7166b24e7
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/010-documentation.patch +++ b/toolchain/gcc/patches-5.x/010-documentation.patch
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
+--- a/gcc/Makefile.in +--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in ++++ b/gcc/Makefile.in
@@ -277,11 +305,11 @@ index 0000000000..d7166b24e7
+ +
+ doc/cpp.dvi: $(TEXI_CPP_FILES) + doc/cpp.dvi: $(TEXI_CPP_FILES)
+ doc/gcc.dvi: $(TEXI_GCC_FILES) + doc/gcc.dvi: $(TEXI_GCC_FILES)
diff --git a/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch b/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch diff --git a/toolchain/gcc/patches-5.x/020-no-plt-backport.patch b/toolchain/gcc/patches-5.x/020-no-plt-backport.patch
new file mode 100644 new file mode 100644
index 0000000000..b9702c9520 index 0000000000..b9702c9520
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch +++ b/toolchain/gcc/patches-5.x/020-no-plt-backport.patch
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+--- a/gcc/calls.c +--- a/gcc/calls.c
++++ b/gcc/calls.c ++++ b/gcc/calls.c
@@ -311,11 +339,11 @@ index 0000000000..b9702c9520
+ fplugin= + fplugin=
+ Common Joined RejectNegative Var(common_deferred_options) Defer + Common Joined RejectNegative Var(common_deferred_options) Defer
+ Specify a plugin to load + Specify a plugin to load
diff --git a/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch b/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch diff --git a/toolchain/gcc/patches-5.x/040-fix-mips-ICE-PR-68400.patch b/toolchain/gcc/patches-5.x/040-fix-mips-ICE-PR-68400.patch
new file mode 100644 new file mode 100644
index 0000000000..e88af34032 index 0000000000..e88af34032
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch +++ b/toolchain/gcc/patches-5.x/040-fix-mips-ICE-PR-68400.patch
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
+--- a/gcc/config/mips/mips.c +--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c
@@ -340,11 +368,11 @@ index 0000000000..e88af34032
+ } + }
+ +
+ /* The canonical form of a mask-low-and-shift-left operation is + /* The canonical form of a mask-low-and-shift-left operation is
diff --git a/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch b/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch diff --git a/toolchain/gcc/patches-5.x/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch b/toolchain/gcc/patches-5.x/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch
new file mode 100644 new file mode 100644
index 0000000000..5ec93f5247 index 0000000000..5ec93f5247
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch +++ b/toolchain/gcc/patches-5.x/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch
@@ -0,0 +1,1092 @@ @@ -0,0 +1,1092 @@
+From 55f12fce4ccf77513644a247f9c401a5b1fa2402 Mon Sep 17 00:00:00 2001 +From 55f12fce4ccf77513644a247f9c401a5b1fa2402 Mon Sep 17 00:00:00 2001
+From: torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> +From: torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
@@ -1438,11 +1466,11 @@ index 0000000000..5ec93f5247
+-- +--
+2.19.2 +2.19.2
+ +
diff --git a/toolchain/gcc/patches/5.5.0/200-musl_config.patch b/toolchain/gcc/patches/5.5.0/200-musl_config.patch diff --git a/toolchain/gcc/patches-5.x/200-musl_config.patch b/toolchain/gcc/patches-5.x/200-musl_config.patch
new file mode 100644 new file mode 100644
index 0000000000..178c25ce34 index 0000000000..178c25ce34
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/200-musl_config.patch +++ b/toolchain/gcc/patches-5.x/200-musl_config.patch
@@ -0,0 +1,309 @@ @@ -0,0 +1,309 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) +Date: Fri, 8 May 2015 08:25:47 +0000 (+0000)
@@ -1753,11 +1781,11 @@ index 0000000000..178c25ce34
+ @item -mbionic + @item -mbionic
+ @opindex mbionic + @opindex mbionic
+ Use Bionic C library. This is the default on + Use Bionic C library. This is the default on
diff --git a/toolchain/gcc/patches/5.5.0/201-musl_arm.patch b/toolchain/gcc/patches/5.5.0/201-musl_arm.patch diff --git a/toolchain/gcc/patches-5.x/201-musl_arm.patch b/toolchain/gcc/patches-5.x/201-musl_arm.patch
new file mode 100644 new file mode 100644
index 0000000000..27a26afc05 index 0000000000..27a26afc05
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/201-musl_arm.patch +++ b/toolchain/gcc/patches-5.x/201-musl_arm.patch
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) +Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
@@ -1802,11 +1830,11 @@ index 0000000000..27a26afc05
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */ + use the GNU/Linux version, not the generic BPABI version. */
+ #undef LINK_SPEC + #undef LINK_SPEC
diff --git a/toolchain/gcc/patches/5.5.0/202-musl_mips.patch b/toolchain/gcc/patches/5.5.0/202-musl_mips.patch diff --git a/toolchain/gcc/patches-5.x/202-musl_mips.patch b/toolchain/gcc/patches-5.x/202-musl_mips.patch
new file mode 100644 new file mode 100644
index 0000000000..816dd8d101 index 0000000000..816dd8d101
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/202-musl_mips.patch +++ b/toolchain/gcc/patches-5.x/202-musl_mips.patch
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) +Date: Fri, 8 May 2015 15:16:50 +0000 (+0000)
@@ -1843,11 +1871,11 @@ index 0000000000..816dd8d101
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+- BIONIC_DYNAMIC_LINKERN32) +- BIONIC_DYNAMIC_LINKERN32)
++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch b/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch diff --git a/toolchain/gcc/patches-5.x/203-musl_powerpc.patch b/toolchain/gcc/patches-5.x/203-musl_powerpc.patch
new file mode 100644 new file mode 100644
index 0000000000..073c834ce1 index 0000000000..073c834ce1
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch +++ b/toolchain/gcc/patches-5.x/203-musl_powerpc.patch
@@ -0,0 +1,209 @@ @@ -0,0 +1,209 @@
+ +
+gcc/Changelog: +gcc/Changelog:
@@ -2058,11 +2086,11 @@ index 0000000000..073c834ce1
+ if test x${enable_secureplt} = xyes; then + if test x${enable_secureplt} = xyes; then
+ tm_file="rs6000/secureplt.h ${tm_file}" + tm_file="rs6000/secureplt.h ${tm_file}"
+ fi + fi
diff --git a/toolchain/gcc/patches/5.5.0/204-musl_sh.patch b/toolchain/gcc/patches/5.5.0/204-musl_sh.patch diff --git a/toolchain/gcc/patches-5.x/204-musl_sh.patch b/toolchain/gcc/patches-5.x/204-musl_sh.patch
new file mode 100644 new file mode 100644
index 0000000000..8c3753d530 index 0000000000..8c3753d530
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/204-musl_sh.patch +++ b/toolchain/gcc/patches-5.x/204-musl_sh.patch
@@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
+gcc/Changelog: +gcc/Changelog:
+ +
@@ -2103,11 +2131,11 @@ index 0000000000..8c3753d530
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+ +
+ #undef SUBTARGET_LINK_EMUL_SUFFIX + #undef SUBTARGET_LINK_EMUL_SUFFIX
diff --git a/toolchain/gcc/patches/5.5.0/205-musl_x86.patch b/toolchain/gcc/patches/5.5.0/205-musl_x86.patch diff --git a/toolchain/gcc/patches-5.x/205-musl_x86.patch b/toolchain/gcc/patches-5.x/205-musl_x86.patch
new file mode 100644 new file mode 100644
index 0000000000..8772328d64 index 0000000000..8772328d64
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/205-musl_x86.patch +++ b/toolchain/gcc/patches-5.x/205-musl_x86.patch
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) +Date: Fri, 15 May 2015 13:20:01 +0000 (+0000)
@@ -2150,11 +2178,11 @@ index 0000000000..8772328d64
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
++#undef MUSL_DYNAMIC_LINKERX32 ++#undef MUSL_DYNAMIC_LINKERX32
++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
diff --git a/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch b/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch diff --git a/toolchain/gcc/patches-5.x/206-musl_aarch64.patch b/toolchain/gcc/patches-5.x/206-musl_aarch64.patch
new file mode 100644 new file mode 100644
index 0000000000..6925a026e7 index 0000000000..6925a026e7
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch +++ b/toolchain/gcc/patches-5.x/206-musl_aarch64.patch
@@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
+From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4> +From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) +Date: Wed, 27 May 2015 16:46:39 +0000 (+0000)
@@ -2187,11 +2215,11 @@ index 0000000000..6925a026e7
+ #undef ASAN_CC1_SPEC + #undef ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+ +
diff --git a/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch b/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch diff --git a/toolchain/gcc/patches-5.x/207-musl_fixincludes.patch b/toolchain/gcc/patches-5.x/207-musl_fixincludes.patch
new file mode 100644 new file mode 100644
index 0000000000..0ff33d39d8 index 0000000000..0ff33d39d8
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch +++ b/toolchain/gcc/patches-5.x/207-musl_fixincludes.patch
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) +Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000)
@@ -2223,11 +2251,11 @@ index 0000000000..0ff33d39d8
+ # IF there is no include fixing, + # IF there is no include fixing,
+ # THEN create a no-op fixer and exit + # THEN create a no-op fixer and exit
+ (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch b/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch diff --git a/toolchain/gcc/patches-5.x/209-musl_libstdc++.patch b/toolchain/gcc/patches-5.x/209-musl_libstdc++.patch
new file mode 100644 new file mode 100644
index 0000000000..d2414d0232 index 0000000000..d2414d0232
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch +++ b/toolchain/gcc/patches-5.x/209-musl_libstdc++.patch
@@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) +Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
@@ -2301,11 +2329,11 @@ index 0000000000..d2414d0232
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+ if [ "$uclibc" = "yes" ]; then + if [ "$uclibc" = "yes" ]; then
+ os_include_dir="os/uclibc" + os_include_dir="os/uclibc"
diff --git a/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch b/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches-5.x/230-musl_libssp.patch b/toolchain/gcc/patches-5.x/230-musl_libssp.patch
new file mode 100644 new file mode 100644
index 0000000000..30f42e9f7c index 0000000000..30f42e9f7c
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch +++ b/toolchain/gcc/patches-5.x/230-musl_libssp.patch
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
+--- a/gcc/gcc.c +--- a/gcc/gcc.c
++++ b/gcc/gcc.c ++++ b/gcc/gcc.c
@@ -2320,11 +2348,11 @@ index 0000000000..30f42e9f7c
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit:}" + "|fstack-protector-strong|fstack-protector-explicit:}"
+ #else + #else
diff --git a/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch b/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch diff --git a/toolchain/gcc/patches-5.x/240-musl-libitm-fixes.patch b/toolchain/gcc/patches-5.x/240-musl-libitm-fixes.patch
new file mode 100644 new file mode 100644
index 0000000000..533cb68499 index 0000000000..533cb68499
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch +++ b/toolchain/gcc/patches-5.x/240-musl-libitm-fixes.patch
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) +Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
@@ -2387,11 +2415,11 @@ index 0000000000..533cb68499
++#endif ++#endif
+ +
+ #endif // LIBITM_X86_TLS_H + #endif // LIBITM_X86_TLS_H
diff --git a/toolchain/gcc/patches/5.5.0/250-add-musl.patch b/toolchain/gcc/patches/5.5.0/250-add-musl.patch diff --git a/toolchain/gcc/patches-5.x/250-add-musl.patch b/toolchain/gcc/patches-5.x/250-add-musl.patch
new file mode 100644 new file mode 100644
index 0000000000..8cbeddea33 index 0000000000..8cbeddea33
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/250-add-musl.patch +++ b/toolchain/gcc/patches-5.x/250-add-musl.patch
@@ -0,0 +1,120 @@ @@ -0,0 +1,120 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) +Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
@@ -2513,11 +2541,11 @@ index 0000000000..8cbeddea33
+ #endif + #endif
+ +
+ /* Determine what functions are present at the runtime; + /* Determine what functions are present at the runtime;
diff --git a/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch b/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch diff --git a/toolchain/gcc/patches-5.x/260-musl-add-unwind-fix.patch b/toolchain/gcc/patches-5.x/260-musl-add-unwind-fix.patch
new file mode 100644 new file mode 100644
index 0000000000..a3b83e2074 index 0000000000..a3b83e2074
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch +++ b/toolchain/gcc/patches-5.x/260-musl-add-unwind-fix.patch
@@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) +Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000)
@@ -2553,11 +2581,11 @@ index 0000000000..a3b83e2074
+ && (defined(__DragonFly__) || defined(__FreeBSD__)) + && (defined(__DragonFly__) || defined(__FreeBSD__))
+ # define ElfW __ElfN + # define ElfW __ElfN
+ # define USE_PT_GNU_EH_FRAME + # define USE_PT_GNU_EH_FRAME
diff --git a/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch b/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch diff --git a/toolchain/gcc/patches-5.x/270-musl-add-powerpc-softfloat-fix.patch b/toolchain/gcc/patches-5.x/270-musl-add-powerpc-softfloat-fix.patch
new file mode 100644 new file mode 100644
index 0000000000..bdebf6c01f index 0000000000..bdebf6c01f
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch +++ b/toolchain/gcc/patches-5.x/270-musl-add-powerpc-softfloat-fix.patch
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
+--- a/gcc/config/rs6000/linux64.h +--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h
@@ -2583,11 +2611,11 @@ index 0000000000..bdebf6c01f
+ #if DEFAULT_LIBC == LIBC_UCLIBC + #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+ #elif DEFAULT_LIBC == LIBC_MUSL + #elif DEFAULT_LIBC == LIBC_MUSL
diff --git a/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch b/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch diff --git a/toolchain/gcc/patches-5.x/280-musl-disable-ifunc-by-default.patch b/toolchain/gcc/patches-5.x/280-musl-disable-ifunc-by-default.patch
new file mode 100644 new file mode 100644
index 0000000000..9a043eed3c index 0000000000..9a043eed3c
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch +++ b/toolchain/gcc/patches-5.x/280-musl-disable-ifunc-by-default.patch
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 +From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001
+From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4> +From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
@@ -2625,11 +2653,11 @@ index 0000000000..9a043eed3c
+ ;; + ;;
+ *) + *)
+ default_gnu_indirect_function=yes + default_gnu_indirect_function=yes
diff --git a/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches-5.x/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-5.x/300-mips_Os_cpu_rtx_cost_model.patch
new file mode 100644 new file mode 100644
index 0000000000..1743658ac6 index 0000000000..1743658ac6
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch +++ b/toolchain/gcc/patches-5.x/300-mips_Os_cpu_rtx_cost_model.patch
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+Use the proper rtx cost model for the selected CPU, even when optimizing +Use the proper rtx cost model for the selected CPU, even when optimizing
+for size. This generates better code. +for size. This generates better code.
@@ -2645,11 +2673,11 @@ index 0000000000..1743658ac6
+ mips_cost = &mips_rtx_cost_optimize_size; + mips_cost = &mips_rtx_cost_optimize_size;
+ else + else
+ mips_cost = &mips_rtx_cost_data[mips_tune]; + mips_cost = &mips_rtx_cost_data[mips_tune];
diff --git a/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches-5.x/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches-5.x/800-arm_v5te_no_ldrd_strd.patch
new file mode 100644 new file mode 100644
index 0000000000..0edeb13c75 index 0000000000..0edeb13c75
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch +++ b/toolchain/gcc/patches-5.x/800-arm_v5te_no_ldrd_strd.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/gcc/config/arm/arm.h +--- a/gcc/config/arm/arm.h
++++ b/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h
@@ -2662,11 +2690,11 @@ index 0000000000..0edeb13c75
+ && !TARGET_THUMB1) + && !TARGET_THUMB1)
+ +
+ #define TARGET_CRC32 (arm_arch_crc) + #define TARGET_CRC32 (arm_arch_crc)
diff --git a/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches-5.x/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-5.x/810-arm-softfloat-libgcc.patch
new file mode 100644 new file mode 100644
index 0000000000..1d06f5b2ec index 0000000000..1d06f5b2ec
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch +++ b/toolchain/gcc/patches-5.x/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
+--- a/libgcc/config/arm/t-linux +--- a/libgcc/config/arm/t-linux
++++ b/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux
@@ -2693,11 +2721,11 @@ index 0000000000..1d06f5b2ec
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+ +
+ #define LINUX_TARGET_LINK_SPEC "%{h*} \ + #define LINUX_TARGET_LINK_SPEC "%{h*} \
diff --git a/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch b/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches-5.x/820-libgcc_pic.patch b/toolchain/gcc/patches-5.x/820-libgcc_pic.patch
new file mode 100644 new file mode 100644
index 0000000000..42bf0c8ccc index 0000000000..42bf0c8ccc
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch +++ b/toolchain/gcc/patches-5.x/820-libgcc_pic.patch
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+--- a/libgcc/Makefile.in +--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in ++++ b/libgcc/Makefile.in
@@ -2735,11 +2763,11 @@ index 0000000000..42bf0c8ccc
+ $(subst @multilib_dir@,$(MULTIDIR),$(subst \ + $(subst @multilib_dir@,$(MULTIDIR),$(subst \
+ @shlib_base_name@,libgcc_s,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \
+ @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
diff --git a/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch diff --git a/toolchain/gcc/patches-5.x/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches-5.x/830-arm_unbreak_armv4t.patch
new file mode 100644 new file mode 100644
index 0000000000..37f8f2a54d index 0000000000..37f8f2a54d
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch +++ b/toolchain/gcc/patches-5.x/830-arm_unbreak_armv4t.patch
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
+ +
@@ -2754,11 +2782,11 @@ index 0000000000..37f8f2a54d
+ +
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in + /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ config.gcc for big endian configurations. */ + config.gcc for big endian configurations. */
diff --git a/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches-5.x/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-5.x/840-armv4_pass_fix-v4bx_to_ld.patch
new file mode 100644 new file mode 100644
index 0000000000..cb1fb98235 index 0000000000..cb1fb98235
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ b/toolchain/gcc/patches-5.x/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+--- a/gcc/config/arm/linux-eabi.h +--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h
@@ -2779,11 +2807,11 @@ index 0000000000..cb1fb98235
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+ +
diff --git a/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches-5.x/850-use_shared_libgcc.patch b/toolchain/gcc/patches-5.x/850-use_shared_libgcc.patch
new file mode 100644 new file mode 100644
index 0000000000..5818cf4da0 index 0000000000..5818cf4da0
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch +++ b/toolchain/gcc/patches-5.x/850-use_shared_libgcc.patch
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
+--- a/gcc/config/arm/linux-eabi.h +--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h
@@ -2832,11 +2860,11 @@ index 0000000000..5818cf4da0
+ #undef LINK_SHLIB_SPEC + #undef LINK_SHLIB_SPEC
+ #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" + #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
+ +
diff --git a/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches-5.x/851-libgcc_no_compat.patch b/toolchain/gcc/patches-5.x/851-libgcc_no_compat.patch
new file mode 100644 new file mode 100644
index 0000000000..80c3476841 index 0000000000..80c3476841
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch +++ b/toolchain/gcc/patches-5.x/851-libgcc_no_compat.patch
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
+--- a/libgcc/config/t-libunwind +--- a/libgcc/config/t-libunwind
++++ b/libgcc/config/t-libunwind ++++ b/libgcc/config/t-libunwind
@@ -2850,11 +2878,11 @@ index 0000000000..80c3476841
+ LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ +
+ # Override the default value from t-slibgcc-elf-ver and mention -lunwind + # Override the default value from t-slibgcc-elf-ver and mention -lunwind
diff --git a/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch diff --git a/toolchain/gcc/patches-5.x/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-5.x/870-ppc_no_crtsavres.patch
new file mode 100644 new file mode 100644
index 0000000000..d06673efc2 index 0000000000..d06673efc2
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch +++ b/toolchain/gcc/patches-5.x/870-ppc_no_crtsavres.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/gcc/config/rs6000/rs6000.c +--- a/gcc/config/rs6000/rs6000.c
++++ b/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c
@@ -2867,11 +2895,11 @@ index 0000000000..d06673efc2
+ { + {
+ strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; + strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
+ strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; + strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
diff --git a/toolchain/gcc/patches/5.5.0/880-no_java_section.patch b/toolchain/gcc/patches/5.5.0/880-no_java_section.patch diff --git a/toolchain/gcc/patches-5.x/880-no_java_section.patch b/toolchain/gcc/patches-5.x/880-no_java_section.patch
new file mode 100644 new file mode 100644
index 0000000000..def6c9f4a0 index 0000000000..def6c9f4a0
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/880-no_java_section.patch +++ b/toolchain/gcc/patches-5.x/880-no_java_section.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/gcc/defaults.h +--- a/gcc/defaults.h
++++ b/gcc/defaults.h ++++ b/gcc/defaults.h
@@ -2884,11 +2912,11 @@ index 0000000000..def6c9f4a0
+ #ifndef JCR_SECTION_NAME + #ifndef JCR_SECTION_NAME
+ #define JCR_SECTION_NAME ".jcr" + #define JCR_SECTION_NAME ".jcr"
+ #endif + #endif
diff --git a/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch b/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches-5.x/881-no_tm_section.patch b/toolchain/gcc/patches-5.x/881-no_tm_section.patch
new file mode 100644 new file mode 100644
index 0000000000..fab5db3be5 index 0000000000..fab5db3be5
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch +++ b/toolchain/gcc/patches-5.x/881-no_tm_section.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/libgcc/crtstuff.c +--- a/libgcc/crtstuff.c
++++ b/libgcc/crtstuff.c ++++ b/libgcc/crtstuff.c
@@ -2901,11 +2929,11 @@ index 0000000000..fab5db3be5
+ #endif + #endif
+ +
+ /* We do not want to add the weak attribute to the declarations of these + /* We do not want to add the weak attribute to the declarations of these
diff --git a/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches-5.x/900-bad-mips16-crt.patch b/toolchain/gcc/patches-5.x/900-bad-mips16-crt.patch
new file mode 100644 new file mode 100644
index 0000000000..dd6e9dc889 index 0000000000..dd6e9dc889
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch +++ b/toolchain/gcc/patches-5.x/900-bad-mips16-crt.patch
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
+--- a/libgcc/config/mips/t-mips16 +--- a/libgcc/config/mips/t-mips16
++++ b/libgcc/config/mips/t-mips16 ++++ b/libgcc/config/mips/t-mips16
@@ -2916,11 +2944,11 @@ index 0000000000..dd6e9dc889
++ ++
++CRTSTUFF_T_CFLAGS += -mno-mips16 ++CRTSTUFF_T_CFLAGS += -mno-mips16
++CRTSTUFF_T_CFLAGS_S += -mno-mips16 ++CRTSTUFF_T_CFLAGS_S += -mno-mips16
diff --git a/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch b/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch diff --git a/toolchain/gcc/patches-5.x/910-mbsd_multi.patch b/toolchain/gcc/patches-5.x/910-mbsd_multi.patch
new file mode 100644 new file mode 100644
index 0000000000..88905f6f2f index 0000000000..88905f6f2f
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch +++ b/toolchain/gcc/patches-5.x/910-mbsd_multi.patch
@@ -0,0 +1,222 @@ @@ -0,0 +1,222 @@
+ +
+ This patch brings over a few features from MirBSD: + This patch brings over a few features from MirBSD:
@@ -3144,11 +3172,11 @@ index 0000000000..88905f6f2f
+ err = do_spec (jvgenmain_spec); + err = do_spec (jvgenmain_spec);
+ if (err == 0) + if (err == 0)
+ { + {
diff --git a/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches-5.x/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-5.x/920-specs_nonfatal_getenv.patch
new file mode 100644 new file mode 100644
index 0000000000..4c705ad86b index 0000000000..4c705ad86b
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch +++ b/toolchain/gcc/patches-5.x/920-specs_nonfatal_getenv.patch
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
+--- a/gcc/gcc.c +--- a/gcc/gcc.c
++++ b/gcc/gcc.c ++++ b/gcc/gcc.c
@@ -3165,11 +3193,11 @@ index 0000000000..4c705ad86b
+ +
+ /* We have to escape every character of the environment variable so + /* We have to escape every character of the environment variable so
+ they are not interpreted as active spec characters. A + they are not interpreted as active spec characters. A
diff --git a/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches-5.x/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches-5.x/930-fix-mips-noexecstack.patch
new file mode 100644 new file mode 100644
index 0000000000..c05844d2e4 index 0000000000..c05844d2e4
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch +++ b/toolchain/gcc/patches-5.x/930-fix-mips-noexecstack.patch
@@ -0,0 +1,111 @@ @@ -0,0 +1,111 @@
+From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 +From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001
+From: Andrew McDonnell <bugs@andrewmcdonnell.net> +From: Andrew McDonnell <bugs@andrewmcdonnell.net>
@@ -3282,11 +3310,11 @@ index 0000000000..c05844d2e4
+ .set nomips16 + .set nomips16
+ +
+ #define DIV \ + #define DIV \
diff --git a/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches-5.x/931-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches-5.x/931-fix-MIPS-softfloat-build-issue.patch
new file mode 100644 new file mode 100644
index 0000000000..9ac0939eb0 index 0000000000..9ac0939eb0
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch +++ b/toolchain/gcc/patches-5.x/931-fix-MIPS-softfloat-build-issue.patch
@@ -0,0 +1,167 @@ @@ -0,0 +1,167 @@
+From 2b46f9187b6f994fc450628a7cd97fc703dd23e0 Mon Sep 17 00:00:00 2001 +From 2b46f9187b6f994fc450628a7cd97fc703dd23e0 Mon Sep 17 00:00:00 2001
+From: BangLang Huang <banglang.huang@foxmail.com> +From: BangLang Huang <banglang.huang@foxmail.com>
@@ -3455,11 +3483,11 @@ index 0000000000..9ac0939eb0
+ 1: + 1:
+ REG_L $3, V1_OFF2($fp) + REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp) + REG_L $2, V0_OFF2($fp)
diff --git a/toolchain/gcc/patches/5.5.0/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/5.5.0/940-no-clobber-stamp-bits.patch diff --git a/toolchain/gcc/patches-5.x/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches-5.x/940-no-clobber-stamp-bits.patch
new file mode 100644 new file mode 100644
index 0000000000..21463a3055 index 0000000000..21463a3055
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/940-no-clobber-stamp-bits.patch +++ b/toolchain/gcc/patches-5.x/940-no-clobber-stamp-bits.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/libstdc++-v3/include/Makefile.in +--- a/libstdc++-v3/include/Makefile.in
++++ b/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in
@@ -3472,11 +3500,11 @@ index 0000000000..21463a3055
+ @$(STAMP) stamp-bits-sup + @$(STAMP) stamp-bits-sup
+ +
+ stamp-c_base: ${c_base_headers} + stamp-c_base: ${c_base_headers}
diff --git a/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch diff --git a/toolchain/gcc/patches-5.x/950-cpp_file_path_translation.patch b/toolchain/gcc/patches-5.x/950-cpp_file_path_translation.patch
new file mode 100644 new file mode 100644
index 0000000000..b67940897e index 0000000000..b67940897e
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch +++ b/toolchain/gcc/patches-5.x/950-cpp_file_path_translation.patch
@@ -0,0 +1,182 @@ @@ -0,0 +1,182 @@
+Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 +Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047
+ +
@@ -3660,11 +3688,11 @@ index 0000000000..b67940897e
+ } + }
+ break; + break;
+ +
diff --git a/toolchain/gcc/patches/5.5.0/960-go_libm.patch b/toolchain/gcc/patches/5.5.0/960-go_libm.patch diff --git a/toolchain/gcc/patches-5.x/960-go_libm.patch b/toolchain/gcc/patches-5.x/960-go_libm.patch
new file mode 100644 new file mode 100644
index 0000000000..d16b0200c0 index 0000000000..d16b0200c0
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/960-go_libm.patch +++ b/toolchain/gcc/patches-5.x/960-go_libm.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/gcc/go/Make-lang.in +--- a/gcc/go/Make-lang.in
++++ b/gcc/go/Make-lang.in ++++ b/gcc/go/Make-lang.in
@@ -3677,11 +3705,11 @@ index 0000000000..d16b0200c0
+ +
+ # Documentation. + # Documentation.
+ +
diff --git a/toolchain/gcc/patches/5.5.0/970-warn_bug.patch b/toolchain/gcc/patches/5.5.0/970-warn_bug.patch diff --git a/toolchain/gcc/patches-5.x/970-warn_bug.patch b/toolchain/gcc/patches-5.x/970-warn_bug.patch
new file mode 100644 new file mode 100644
index 0000000000..2c5cf9be20 index 0000000000..2c5cf9be20
--- /dev/null --- /dev/null
+++ b/toolchain/gcc/patches/5.5.0/970-warn_bug.patch +++ b/toolchain/gcc/patches-5.x/970-warn_bug.patch
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+--- a/libgo/runtime/mprof.goc +--- a/libgo/runtime/mprof.goc
++++ b/libgo/runtime/mprof.goc ++++ b/libgo/runtime/mprof.goc
@@ -3695,5 +3723,5 @@ index 0000000000..2c5cf9be20
+ sp = runtime_getcallersp(&b); + sp = runtime_getcallersp(&b);
+ pc = (byte*)(uintptr)runtime_getcallerpc(&b); + pc = (byte*)(uintptr)runtime_getcallerpc(&b);
-- --
2.25.1 2.34.1

View File

@@ -0,0 +1,257 @@
From 9cfa8a26ef07293733d2d606d6e7b0912aba4ec5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 16:10:26 +0200
Subject: [PATCH 37/43] ipq807x: add uboot-envtools support
Signed-off-by: John Crispin <john@phrozen.org>
---
package/base-files/files/lib/functions.sh | 13 ++++
package/boot/uboot-envtools/Makefile | 6 --
package/boot/uboot-envtools/files/ipq50xx | 37 +++++++++++
package/boot/uboot-envtools/files/ipq60xx | 53 ++++++++++++++++
package/boot/uboot-envtools/files/ipq807x | 76 +++++++++++------------
5 files changed, 141 insertions(+), 44 deletions(-)
create mode 100644 package/boot/uboot-envtools/files/ipq50xx
create mode 100644 package/boot/uboot-envtools/files/ipq60xx
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 4b1b838572..87e2edee7a 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -32,6 +32,19 @@ xor() {
printf "%0${retlen}x" "$ret"
}
+find_mmc_part() {
+ local DEVNAME PARTNAME
+ if grep -q "$1" /proc/mtd; then
+ echo "" && return 0
+ fi
+
+ for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do
+ PARTNAME=$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')
+ [ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0
+ done
+}
+
+
append() {
local var="$1"
local value="$2"
diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
index 2e4c1ac39e..b9d8895e76 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -58,12 +58,6 @@ MAKE_FLAGS += \
no-dot-config-targets=envtools \
envtools
-define Package/uboot-envtools/conffiles
-/etc/config/ubootenv
-/etc/fw_env.config
-/etc/fw_sys.config
-endef
-
define Package/uboot-envtools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
diff --git a/package/boot/uboot-envtools/files/ipq50xx b/package/boot/uboot-envtools/files/ipq50xx
new file mode 100644
index 0000000000..84ed73f288
--- /dev/null
+++ b/package/boot/uboot-envtools/files/ipq50xx
@@ -0,0 +1,37 @@
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+ubootenv_mtdinfo () {
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
+
+ if [ -n "$nor_flash" ]; then
+ ubootenv_size=$mtd_size
+ else
+ # size is fixed to 0x40000 in u-boot
+ ubootenv_size=0x40000
+ fi
+
+ sectors=$(( $ubootenv_size / $mtd_erase ))
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
+}
+
+case "$board" in
+*)
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
diff --git a/package/boot/uboot-envtools/files/ipq60xx b/package/boot/uboot-envtools/files/ipq60xx
new file mode 100644
index 0000000000..8863df4225
--- /dev/null
+++ b/package/boot/uboot-envtools/files/ipq60xx
@@ -0,0 +1,53 @@
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+ubootenv_mtdinfo () {
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
+ found_emmc=0
+
+ if [ -z "$UBOOTENV_PART" ]; then
+ mtd_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
+ if [ -n "$mtd_dev" ]; then
+ EMMC_UBOOTENV_PART=$(cat /proc/partitions | grep $mtd_dev)
+ #convert block to bytes
+ emmc_ubootenv_size=`expr $(echo $EMMC_UBOOTENV_PART | awk '{print $3}') \* 1024`
+ ubootenv_size=0x`printf "%x" $emmc_ubootenv_size`
+ found_emmc=1
+ fi
+ mtd_erase=""
+
+ elif [ -n "$nor_flash" ]; then
+ ubootenv_size=$mtd_size
+ else
+ # size is fixed to 0x40000 in u-boot
+ ubootenv_size=0x40000
+ fi
+ if [ $found_emmc -eq 0 ]; then
+ sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
+ else
+ echo /dev/$mtd_dev 0x0 $ubootenv_size
+ fi
+
+}
+
+case "$board" in
+*)
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
index 2064bfc6f2..8863df4225 100644
--- a/package/boot/uboot-envtools/files/ipq807x
+++ b/package/boot/uboot-envtools/files/ipq807x
@@ -1,4 +1,4 @@
-[ -e /etc/config/ubootenv ] && exit 0
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
touch /etc/config/ubootenv
@@ -7,47 +7,47 @@ touch /etc/config/ubootenv
board=$(board_name)
+ubootenv_mtdinfo () {
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
+ found_emmc=0
+
+ if [ -z "$UBOOTENV_PART" ]; then
+ mtd_dev=$(echo $(find_mmc_part "0:APPSBLENV") | sed 's/^.\{5\}//')
+ if [ -n "$mtd_dev" ]; then
+ EMMC_UBOOTENV_PART=$(cat /proc/partitions | grep $mtd_dev)
+ #convert block to bytes
+ emmc_ubootenv_size=`expr $(echo $EMMC_UBOOTENV_PART | awk '{print $3}') \* 1024`
+ ubootenv_size=0x`printf "%x" $emmc_ubootenv_size`
+ found_emmc=1
+ fi
+ mtd_erase=""
+
+ elif [ -n "$nor_flash" ]; then
+ ubootenv_size=$mtd_size
+ else
+ # size is fixed to 0x40000 in u-boot
+ ubootenv_size=0x40000
+ fi
+ if [ $found_emmc -eq 0 ]; then
+ sectors=$(printf '0x%x' $(( $ubootenv_size / $mtd_erase )))
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
+ else
+ echo /dev/$mtd_dev 0x0 $ubootenv_size
+ fi
+
+}
+
case "$board" in
-dynalink,dl-wrx36|\
-netgear,wax218)
- idx="$(find_mtd_index 0:appsblenv)"
- [ -n "$idx" ] && \
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
- ;;
-edgecore,eap102|\
-zyxel,nbg7815)
- idx="$(find_mtd_index 0:appsblenv)"
- [ -n "$idx" ] && \
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
- ;;
-edimax,cax1800)
- idx="$(find_mtd_index 0:appsblenv)"
- [ -n "$idx" ] && \
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
- ;;
-redmi,ax6|\
-xiaomi,ax3600|\
-xiaomi,ax9000)
- idx="$(find_mtd_index 0:appsblenv)"
- [ -n "$idx" ] && \
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
- idx2="$(find_mtd_index bdata)"
- [ -n "$idx2" ] && \
- ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
- ;;
-prpl,haze)
- mmcpart="$(find_mmc_part 0:APPSBLENV)"
- [ -n "$mmcpart" ] && \
- ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
- ;;
-qnap,301w)
- idx="$(find_mtd_index 0:appsblenv)"
- [ -n "$idx" ] && \
- ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
+*)
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
;;
esac
config_load ubootenv
-config_foreach ubootenv_add_app_config
+config_foreach ubootenv_add_app_config ubootenv
exit 0
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
From aebe1b77a68ee3e438651185916b6e6fe093bed9 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 16 Jul 2023 17:15:23 +0200
Subject: [PATCH 40/43] ipq807x: package/linux hack
Signed-off-by: John Crispin <john@phrozen.org>
---
package/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/Makefile b/package/Makefile
index 4b8df7f484..128a0814a0 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -11,7 +11,11 @@ include $(INCLUDE_DIR)/feeds.mk
include $(INCLUDE_DIR)/rootfs.mk
-include $(TMP_DIR)/.packagedeps
+ifeq ($(CONFIG_TARGET_ipq807x_ipq807x)$(CONFIG_TARGET_ipq807x_ipq60xx)$(CONFIG_TARGET_ipq807x_ipq50xx),y)
+package-y +=feeds/ipq807x/linux
+else
package-y += kernel/linux
+endif
$(curdir)/autoremove:=1
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
--
2.34.1

View File

@@ -1,65 +1,14 @@
From dfc5ca4495315d293ccdb1c52d7d29a133ba596b Mon Sep 17 00:00:00 2001 From 3dd22aa711f2f8c8e968d21cbac85beb713760af Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Mon, 22 Jun 2020 14:32:45 +0200 Date: Sun, 16 Jul 2023 17:21:04 +0200
Subject: [PATCH 09/43] base-files: make sysupgrade work on qcom AX Subject: [PATCH 41/43] ipq807x: add ubi force detach patch
The qsdk v4.4 ubi layer does not detach the rootfs properly during
sysupgrade. Pull in the ubu force detach patch from owrt-15.05.
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
package/base-files/files/lib/upgrade/nand.sh | 14 +-
.../patches/131-add_ubi_force_detach.patch | 185 ++++++++++++++++++ .../patches/131-add_ubi_force_detach.patch | 185 ++++++++++++++++++
2 files changed, 195 insertions(+), 4 deletions(-) 1 file changed, 185 insertions(+)
create mode 100644 package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch create mode 100644 package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index e335d940ed..ab3db4cdf2 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -12,6 +12,9 @@ CI_UBIPART="${CI_UBIPART:-ubi}"
# 'rootfs' UBI volume on NAND contains the rootfs
CI_ROOTPART="${CI_ROOTPART:-rootfs}"
+# ipq807x qsdk kernel misbehaves
+CI_IPQ807X=0
+
ubi_mknod() {
local dir="$1"
local dev="/dev/$(basename $dir)"
@@ -131,6 +134,8 @@ nand_upgrade_prepare_ubi() {
return 1
fi
+ [ "$CI_IPQ807X" = 1 ] && ubidetach -f -m $mtdnum
+
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
if [ ! "$ubidev" ]; then
ubiattach -m "$mtdnum"
@@ -213,7 +218,6 @@ nand_upgrade_prepare_ubi() {
nand_do_upgrade_success() {
local conf_tar="/tmp/sysupgrade.tgz"
-
sync
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
@@ -292,10 +296,12 @@ nand_upgrade_tar() {
local has_kernel=1
local has_env=0
- [ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && {
- tar xf "$tar_file" ${board_dir}/kernel -O | mtd write - $CI_KERNPART
+ [ "$CI_IPQ807X" = 0 -a "$kernel_length" != 0 -a -n "$kernel_mtd" ] && {
+ tar xf $tar_file ${board_dir}/kernel -O | mtd write - $CI_KERNPART
+ }
+ [ "$CI_IPQ807X" = 0 ] && {
+ [ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=
}
- [ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "${has_kernel:+$kernel_length}" "$has_env"
diff --git a/package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch b/package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch diff --git a/package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch b/package/utils/mtd-utils/patches/131-add_ubi_force_detach.patch
new file mode 100644 new file mode 100644
index 0000000000..f3cd6a6b28 index 0000000000..f3cd6a6b28
@@ -252,5 +201,5 @@ index 0000000000..f3cd6a6b28
+ sys_errmsg("cannot detach mtd%d", args.mtdn); + sys_errmsg("cannot detach mtd%d", args.mtdn);
+ goto out_libubi; + goto out_libubi;
-- --
2.25.1 2.34.1

View File

@@ -0,0 +1,38 @@
From 2a53eaa80156c56a8ea7881ba6b4295613faf399 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 16 Jul 2023 17:30:49 +0200
Subject: [PATCH 42/43] ipq807x: drop nand.sh from base-files
Signed-off-by: John Crispin <john@phrozen.org>
---
package/base-files/Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index dc89de2035..dd1d0760f8 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -138,6 +138,12 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
endef
endif
+ifeq ($(CONFIG_TARGET_ipq807x),y)
+ define Package/base-files/ipq807x-support
+ rm -f $(1)/lib/upgrade/nand.sh
+ endef
+endif
+
ifeq ($(CONFIG_EMMC_SUPPORT),)
define Package/base-files/emmc-support
rm -f $(1)/lib/upgrade/emmc.sh
@@ -155,6 +161,7 @@ define Package/base-files/install
$(CP) ./files/* $(1)/
$(Package/base-files/install-key)
$(Package/base-files/nand-support)
+ $(Package/base-files/ipq807x-support)
$(Package/base-files/legacy-sdcard-support)
$(Package/base-files/emmc-support)
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
--
2.34.1

View File

@@ -0,0 +1,35 @@
From 3b9fb627fbc38af82d04474a37f980f1e0095584 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 16 Jul 2023 17:34:10 +0200
Subject: [PATCH 43/43] ipq95xx: add kernel version
Signed-off-by: John Crispin <john@phrozen.org>
---
include/kernel-5.4 | 2 ++
include/target.mk | 1 +
2 files changed, 3 insertions(+)
create mode 100644 include/kernel-5.4
diff --git a/include/kernel-5.4 b/include/kernel-5.4
new file mode 100644
index 0000000000..f77eb5d0b8
--- /dev/null
+++ b/include/kernel-5.4
@@ -0,0 +1,2 @@
+LINUX_VERSION-5.4 = .164
+LINUX_KERNEL_HASH-5.4.164 = a8fdb27e0e7a871086e0c78b899088c21fbc8e16fb236d220926dc4c93e0fb2d
diff --git a/include/target.mk b/include/target.mk
index 36e1377617..d0fd1edd77 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -278,6 +278,7 @@ ifeq ($(DUMP),1)
CPU_TYPE ?= generic
CPU_CFLAGS_generic = -mcpu=generic
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
+ CPU_CFLAGS_cortex-a73 = -mcpu=cortex-a73+crypto
endif
ifeq ($(ARCH),arc)
CPU_TYPE ?= arc700
--
2.34.1

View File

@@ -0,0 +1,144 @@
From 5287669135980433cbcd1064c950aeca19f6f82c Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 28 Jul 2023 16:50:08 +0200
Subject: [PATCH] netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/config/netifd/Makefile | 13 ++--
.../etc/hotplug.d/net/20-smp-packet-steering | 67 +++++++++++++++++++
.../netifd/patches/200-psk-radius.patch | 12 ++++
3 files changed, 86 insertions(+), 6 deletions(-)
create mode 100644 package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering
create mode 100644 package/network/config/netifd/patches/200-psk-radius.patch
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 31fd0838a4..f749d72eb9 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,16 +5,14 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2023-06-04
-PKG_SOURCE_VERSION:=ec9dba72124597b7224bbfe75960386dc320f4bd
-PKG_MIRROR_HASH:=baee39a3882a2b03fc83a3a6a8963c340fa8d884c7a8c9e80e7d2dddc50e24bd
+PKG_SOURCE_DATE:=2023-08-31
+PKG_SOURCE_VERSION:=1a07f1dff32b3af49e39533e33e8964b59535662
+PKG_MIRROR_HASH:=dc621dd04c3c9631002f929cf10a4620f57af8b0baf614c590bda17957fa6201
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=
-PKG_BUILD_FLAGS:=lto
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -32,7 +30,10 @@ endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl-tiny \
- -I$(STAGING_DIR)/usr/include
+ -I$(STAGING_DIR)/usr/include \
+ -flto
+
+TARGET_LDFLAGS += -flto -fuse-linker-plugin
CMAKE_OPTIONS += \
-DLIBNL_LIBS=-lnl-tiny \
diff --git a/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering b/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering
new file mode 100644
index 0000000000..8a86bf75f6
--- /dev/null
+++ b/package/network/config/netifd/files/etc/hotplug.d/net/20-smp-packet-steering
@@ -0,0 +1,67 @@
+#!/bin/sh
+[ "$ACTION" = add ] || exit
+
+NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)"
+[ "$NPROCS" -gt 1 ] || exit
+
+PROC_MASK="$(( (1 << $NPROCS) - 1 ))"
+
+find_irq_cpu() {
+ local dev="$1"
+ local match="$(grep -m 1 "$dev\$" /proc/interrupts)"
+ local cpu=0
+
+ [ -n "$match" ] && {
+ set -- $match
+ shift
+ for cur in $(seq 1 $NPROCS); do
+ [ "$1" -gt 0 ] && {
+ cpu=$(($cur - 1))
+ break
+ }
+ shift
+ done
+ }
+
+ echo "$cpu"
+}
+
+set_hex_val() {
+ local file="$1"
+ local val="$2"
+ val="$(printf %x "$val")"
+ [ -n "$DEBUG" ] && echo "$file = $val"
+ echo "$val" > "$file"
+}
+
+packet_steering="$(uci get "network.@globals[0].packet_steering")"
+[ "$packet_steering" != 1 ] && exit 0
+
+exec 512>/var/lock/smp_tune.lock
+flock 512 || exit 1
+
+for dev in /sys/class/net/*; do
+ [ -d "$dev" ] || continue
+
+ # ignore virtual interfaces
+ [ -n "$(ls "${dev}/" | grep '^lower_')" ] && continue
+ [ -d "${dev}/device" ] || continue
+
+ device="$(readlink "${dev}/device")"
+ device="$(basename "$device")"
+ irq_cpu="$(find_irq_cpu "$device")"
+ irq_cpu_mask="$((1 << $irq_cpu))"
+
+ for q in ${dev}/queues/tx-*; do
+ set_hex_val "$q/xps_cpus" "$PROC_MASK"
+ done
+
+ # ignore dsa slave ports for RPS
+ subsys="$(readlink "${dev}/device/subsystem")"
+ subsys="$(basename "$subsys")"
+ [ "$subsys" = "mdio_bus" ] && continue
+
+ for q in ${dev}/queues/rx-*; do
+ set_hex_val "$q/rps_cpus" "$PROC_MASK"
+ done
+done
diff --git a/package/network/config/netifd/patches/200-psk-radius.patch b/package/network/config/netifd/patches/200-psk-radius.patch
new file mode 100644
index 0000000000..cc1e7021c9
--- /dev/null
+++ b/package/network/config/netifd/patches/200-psk-radius.patch
@@ -0,0 +1,12 @@
+--- a/scripts/netifd-wireless.sh
++++ b/scripts/netifd-wireless.sh
+@@ -260,6 +260,9 @@ wireless_vif_parse_encryption() {
+ wpa3*)
+ auth_type=eap256
+ ;;
++ psk2-radius*)
++ auth_type=psk2-radius
++ ;;
+ psk3-mixed*|sae-mixed*)
+ auth_type=psk-sae
+ ;;
--
2.34.1

View File

@@ -0,0 +1,164 @@
From 2ea2419a492d7473a5cf84818bf4605885e91840 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 28 Jul 2023 16:51:13 +0200
Subject: [PATCH 45/45] ucode: add TIP specific fixes
Signed-off-by: John Crispin <john@phrozen.org>
---
package/utils/ucode/Makefile | 6 +-
.../ucode/patches/000-nl80211_copy.patch | 11 ++
package/utils/ucode/patches/0001-fixes.patch | 100 ++++++++++++++++++
3 files changed, 116 insertions(+), 1 deletion(-)
create mode 100644 package/utils/ucode/patches/000-nl80211_copy.patch
create mode 100644 package/utils/ucode/patches/0001-fixes.patch
diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index e768acbae9..e3a33410c2 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -96,7 +96,7 @@ endef
define Package/ucode-mod-nl80211
$(Package/ucode/default)
TITLE+= (nl80211 module)
- DEPENDS:=ucode +libnl-tiny +libubox
+ DEPENDS:=ucode +libnl-tiny +libubox +kmod-mac80211
endef
define Package/ucode-mod-nl80211/description
@@ -171,6 +171,10 @@ define Package/ucode-mod-uloop/description
loop implementation.
endef
+define Build/Prepare
+ $(Build/Prepare/Default)
+ $(CP) $(STAGING_DIR)/usr/include/mac80211/uapi/linux/nl80211.h $(PKG_BUILD_DIR)/nl80211_copy.h
+endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode
diff --git a/package/utils/ucode/patches/000-nl80211_copy.patch b/package/utils/ucode/patches/000-nl80211_copy.patch
new file mode 100644
index 0000000000..ff20e3e7e2
--- /dev/null
+++ b/package/utils/ucode/patches/000-nl80211_copy.patch
@@ -0,0 +1,11 @@
+--- a/lib/nl80211.c
++++ b/lib/nl80211.c
+@@ -38,7 +38,7 @@ limitations under the License.
+ #include <netlink/genl/family.h>
+ #include <netlink/genl/ctrl.h>
+
+-#include <linux/nl80211.h>
++#include "../nl80211_copy.h"
+ #include <linux/ieee80211.h>
+ #include <libubox/uloop.h>
+
diff --git a/package/utils/ucode/patches/0001-fixes.patch b/package/utils/ucode/patches/0001-fixes.patch
new file mode 100644
index 0000000000..8ef37ecf1c
--- /dev/null
+++ b/package/utils/ucode/patches/0001-fixes.patch
@@ -0,0 +1,100 @@
+From 25df1c3e41f274f70e4fbf5fdc10e4290ba019f5 Mon Sep 17 00:00:00 2001
+From: John Crispin <john@phrozen.org>
+Date: Thu, 20 Jan 2022 10:48:35 +0100
+Subject: [PATCH] fixes
+
+---
+ lib/nl80211.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++----
+ lib/rtnl.c | 1 +
+ 2 files changed, 87 insertions(+), 6 deletions(-)
+
+--- a/lib/nl80211.c
++++ b/lib/nl80211.c
+@@ -56,6 +56,8 @@ limitations under the License.
+
+ #define NL80211_CMDS_BITMAP_SIZE DIV_ROUND_UP(NL80211_CMD_MAX + 1, 32)
+
++#define NL80211_ATTR_NOT_IMPLEMENTED 0x10000
++
+ static struct {
+ int code;
+ char *msg;
+@@ -277,6 +279,14 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_MESHCONF_NOLEARN
++#define NL80211_MESHCONF_NOLEARN NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_MESHCONF_CONNECTED_TO_AS
++#define NL80211_MESHCONF_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_mesh_params_nla = {
+ .headsize = 0,
+ .nattrs = 29,
+@@ -368,6 +378,14 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK
++#define NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR
++#define NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_peer_measurements_peers_req_data_ftm_nla = {
+ .headsize = 0,
+ .nattrs = 13,
+@@ -517,6 +535,26 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_FREQUENCY_ATTR_1MHZ
++#define NL80211_FREQUENCY_ATTR_1MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_2MHZ
++#define NL80211_FREQUENCY_ATTR_2MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_4MHZ
++#define NL80211_FREQUENCY_ATTR_4MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_8MHZ
++#define NL80211_FREQUENCY_ATTR_8MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
++#ifndef NL80211_FREQUENCY_ATTR_16MHZ
++#define NL80211_FREQUENCY_ATTR_16MHZ NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_wiphy_bands_freqs_nla = {
+ .headsize = 0,
+ .nattrs = 25,
+@@ -558,6 +596,10 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS
++#define NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_wiphy_bands_iftype_data_nla = {
+ .headsize = 0,
+ .nattrs = 7,
+@@ -728,6 +770,10 @@ static const uc_nl_nested_spec_t nl80211
+ }
+ };
+
++#ifndef NL80211_STA_INFO_CONNECTED_TO_AS
++#define NL80211_STA_INFO_CONNECTED_TO_AS NL80211_ATTR_NOT_IMPLEMENTED
++#endif
++
+ static const uc_nl_nested_spec_t nl80211_sta_info_nla = {
+ .headsize = 0,
+ .nattrs = 40,
--
2.34.1

View File

@@ -0,0 +1,40 @@
From ff6d59ce79976176caaee181b2a75dc17fb4df41 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 6 Aug 2023 09:46:57 +0200
Subject: [PATCH] ipq807x: fix usb dwc3 dependencies
Signed-off-by: John Crispin <john@phrozen.org>
---
package/kernel/linux/modules/usb.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 2561f36aa3..721cc7893b 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -494,7 +494,7 @@ $(eval $(call KernelPackage,usb-dwc3))
define KernelPackage/usb-dwc3-qcom
TITLE:=DWC3 Qualcomm USB driver
- DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x) +kmod-usb-dwc3
+ DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3
KCONFIG:= CONFIG_USB_DWC3_QCOM
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
--
2.34.1
diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index 27ba55a22d..d6b28c51b7 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -93,7 +93,8 @@ define KernelPackage/vxlan
+IPV6:kmod-udptunnel6
KCONFIG:=CONFIG_VXLAN
FILES:= \
- $(LINUX_DIR)/drivers/net/vxlan/vxlan.ko
+ $(LINUX_DIR)/drivers/net/vxlan/vxlan.ko@ge5.5 \
+ $(LINUX_DIR)/drivers/net/vxlan.ko@le5.4
AUTOLOAD:=$(call AutoLoad,13,vxlan)
endef

View File

@@ -0,0 +1,30 @@
From 8c587aa5eb6ec68769846cdcc68d44e4c629a981 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 1 Sep 2023 11:01:47 +0200
Subject: [PATCH] ucode: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/utils/ucode/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index e3a33410c2..c77da85349 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
-PKG_SOURCE_DATE:=2023-04-03
-PKG_SOURCE_VERSION:=5163867269fc04fa01ec5e9f8df3384c933339f2
-PKG_MIRROR_HASH:=e82922ff59d6f899d9434bf79f2e6e4add0b7b0466355755fc83d4b5a0aeebfb
+PKG_SOURCE_DATE:=2023-06-06
+PKG_SOURCE_VERSION:=c7d84aae09691a99ae3db427c0b2463732ef84f4
+PKG_MIRROR_HASH:=38826ae70d886d1d7ada3fc6591ac807169aa28107f60f7f2e617520083525fb
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC
--
2.34.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
From e8d4adc4f6398b0c139bcfc3da0c878f57b09865 Mon Sep 17 00:00:00 2001 From f144ecc68e6b3abf3bf2d7ad14ac7a70fb3d76aa Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 17 Aug 2023 15:54:39 +0200 Date: Thu, 17 Aug 2023 15:54:39 +0200
Subject: [PATCH 5/6] hostapd: add TIP hostapd.sh version Subject: [PATCH 50/52] hostapd: add TIP hostapd.sh version
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---

View File

@@ -1,7 +1,7 @@
From 65341e2202bd136efe898a7679982d35a3c1f10f Mon Sep 17 00:00:00 2001 From 71c65e4fc9fc7fca9a0288acd23b746937af750d Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Thu, 17 Aug 2023 19:53:52 +0200 Date: Thu, 17 Aug 2023 19:53:52 +0200
Subject: [PATCH 6/6] hostapd: add TIP extensions Subject: [PATCH 51/52] hostapd: add TIP extensions
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
From aa49886b11eac8633fff054dfd6fbbeee6e98954 Mon Sep 17 00:00:00 2001 From d8d0935355a83ea46437d5c145d4c55067d2db00 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org> From: John Crispin <john@phrozen.org>
Date: Fri, 18 Aug 2023 08:37:27 +0200 Date: Fri, 18 Aug 2023 08:37:27 +0200
Subject: [PATCH] mac80211: drop hostapd dependency Subject: [PATCH 54/55] mac80211: drop hostapd dependency
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: John Crispin <john@phrozen.org>
--- ---
@@ -9,10 +9,10 @@ Signed-off-by: John Crispin <john@phrozen.org>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 2f9fd11f10..6d39668bbc 100644 index a7472ee779..1cd537b140 100644
--- a/package/kernel/mac80211/Makefile --- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile
@@ -126,7 +126,7 @@ define KernelPackage/mac80211 @@ -121,7 +121,7 @@ define KernelPackage/mac80211
$(call KernelPackage/mac80211/Default) $(call KernelPackage/mac80211/Default)
TITLE:=Linux 802.11 Wireless Networking Stack TITLE:=Linux 802.11 Wireless Networking Stack
# +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c # +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c

View File

@@ -0,0 +1,70 @@
From ab10243a695beaefcf48aad10d3311c81124b35e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 4 Sep 2023 09:02:22 +0200
Subject: [PATCH 55/55] Revert: mac80211: change default ifname to
<phy>-<type><index>
commit 6603748e0ca697f484adfc16a0d49d35ed36954d
Author: Felix Fietkau <nbd@nbd.name>
Date: Fri Sep 23 14:12:32 2022 +0200
mac80211: change default ifname to <phy>-<type><index>
This makes it clear, which phy a wlan device belongs to and also helps with
telling them apart by including the mode in the ifname.
Preparation for automatically renaming PHYs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
---
.../files/lib/netifd/wireless/mac80211.sh | 21 +++----------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 3b88af4679..f3c982e9f1 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -131,7 +131,7 @@ mac80211_hostapd_setup_base() {
json_select config
- [ "$auto_channel" -gt 0 ] && channel=acs_survey
+ [ "$auto_channel" -gt 0 ] && channel=0
[ "$auto_channel" -gt 0 ] && json_get_vars acs_exclude_dfs
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
@@ -656,28 +656,13 @@ mac80211_check_ap() {
has_ap=1
}
-mac80211_set_ifname() {
- local phy="$1"
- local prefix="$2"
- eval "ifname=\"$phy-$prefix\${idx_$prefix:-0}\"; idx_$prefix=\$((\${idx_$prefix:-0 } + 1))"
-}
-
mac80211_prepare_vif() {
json_select config
json_get_vars ifname mode ssid wds powersave macaddr enable wpa_psk_file vlan_file
- [ -n "$ifname" ] || {
- local prefix;
-
- case "$mode" in
- ap|sta|mesh) prefix=$mode;;
- adhoc) prefix=ibss;;
- monitor) prefix=mon;;
- esac
-
- mac80211_set_ifname "$phy" "$prefix"
- }
+ [ -n "$ifname" ] || ifname="wlan${phy#phy}${if_idx:+-$if_idx}"
+ if_idx=$((${if_idx:-0} + 1))
append active_ifnames "$ifname"
set_default wds 0
--
2.34.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
From 1b0b999cc8165c0d97d72463bbfdb3568eaa3bca Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 4 Sep 2023 12:31:07 +0200
Subject: [PATCH 58/58] kernel: add v5.4 checksums
Signed-off-by: John Crispin <john@phrozen.org>
---
include/kernel-5.4 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/kernel-5.4 b/include/kernel-5.4
index daf1f1740a..ec9733780d 100644
--- a/include/kernel-5.4
+++ b/include/kernel-5.4
@@ -1,2 +1,13 @@
LINUX_VERSION-5.4 = .164
LINUX_KERNEL_HASH-5.4.164 = a8fdb27e0e7a871086e0c78b899088c21fbc8e16fb236d220926dc4c93e0fb2d
+
+ifeq ($(CONFIG_TARGET_ipq40xx),y)
+LINUX_VERSION-5.4 = .158
+LINUX_KERNEL_HASH-5.4.158 = 6e018fecdc8fc24553756e582d83b82d65b10a6b03ef36262a24911f839b8d59
+endif
+
+ifeq ($(CONFIG_TARGET_ipq95xx),y)
+LINUX_VERSION-5.4 = .164
+LINUX_KERNEL_HASH-5.4.164 = 0b2987b4b838d169b49f33f01ffa1bb1940eda8f159632943a6db2a3f61db233
+endif
+
--
2.34.1

View File

@@ -1,47 +0,0 @@
From 643d734b0d05bc9e5fe1b4588bf0876c9fd87bd4 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 30 Jun 2021 11:36:13 +0200
Subject: [PATCH 26/43] ath79: tl-wpa8630p fixes
* a certificates partition and change default port mapping
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi | 7 ++++++-
.../linux/ath79/generic/base-files/etc/board.d/02_network | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
index 9e6d23de4e..c39dbc515b 100644
--- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
@@ -24,7 +24,12 @@
partition@40000 {
compatible = "tplink,firmware";
label = "firmware";
- reg = <0x040000 0x5e0000>;
+ reg = <0x040000 0x5d0000>;
+ };
+
+ partition@610000 {
+ label = "certificates";
+ reg = <0x610000 0x10000>;
};
};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 31c0f11861..3ba3d72abc 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -385,7 +385,7 @@ ath79_setup_interfaces()
tplink,tl-wpa8630p-v2.1-eu)
# port 5 (internal) is the power-line port
ucidef_add_switch "switch0" \
- "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
+ "0@eth0" "2:wan:3" "3:wan:2" "5:wan:4" "4:lan:1"
;;
tplink,tl-wr842n-v2)
ucidef_set_interface_wan "eth1"
--
2.25.1

View File

@@ -1,303 +0,0 @@
From 6ecffc2057aa1261846e51a3966b8710f605910a Mon Sep 17 00:00:00 2001
From: Andrew Cameron <apcameron@softhome.net>
Date: Mon, 12 Apr 2021 13:24:33 -0500
Subject: [PATCH 27/43] ath79: add support for TP-Link CPE710-v1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board
Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs
Flashing instructions:
Flash factory image through stock firmware WEB UI or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254
Signed-off-by: Andrew Cameron <apcameron@softhome.net>
---
.../ath79/dts/qca9563_tplink_cpe710-v1.dts | 141 ++++++++++++++++++
.../generic/base-files/etc/board.d/01_leds | 3 +-
.../generic/base-files/etc/board.d/02_network | 1 +
.../etc/hotplug.d/firmware/11-ath10k-caldata | 6 +
target/linux/ath79/image/generic-tp-link.mk | 11 ++
tools/firmware-utils/src/tplink-safeloader.c | 37 +++++
6 files changed, 198 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
new file mode 100644
index 0000000000..830c3d30b8
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "TP-Link CPE710 v1";
+ compatible = "tplink,cpe710-v1", "qca,qca9563";
+
+ aliases {
+ label-mac-device = &eth0;
+ led-boot = &led_lan;
+ led-failsafe = &led_lan;
+ led-upgrade = &led_lan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_lan: lan {
+ label = "blue:lan";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "Reset button";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x000000 0x040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot-env";
+ reg = <0x040000 0x010000>;
+ };
+
+ partition@50000 {
+ label = "partition-table";
+ reg = <0x050000 0x010000>;
+ read-only;
+ };
+
+ info: partition@60000 {
+ label = "info";
+ reg = <0x060000 0x010000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x070000 0xf50000>;
+ };
+
+ partition@fc0000 {
+ label = "config";
+ reg = <0xfc0000 0x030000>;
+ read-only;
+ };
+
+ art: partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pinmux {
+ mdio_pins: mdio_pins {
+ /* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */
+ pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>;
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio_pins>;
+
+ phy-mask = <0x10>;
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&phy4>;
+ phy-mode = "sgmii";
+
+ mtd-mac-address = <&info 0x8>;
+
+ qca956x-serdes-fixup;
+
+ gmac-config {
+ device = <&gmac>;
+ };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 7c5eeb1112..05bdf60f78 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -164,7 +164,8 @@ enterasys,ws-ap3705i|\
openmesh,mr900-v1|\
openmesh,mr900-v2|\
openmesh,mr1750-v1|\
-openmesh,mr1750-v2)
+openmesh,mr1750-v2|\
+tplink,cpe710-v1)
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
;;
compex,wpj344-16m|\
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 3ba3d72abc..d70432ad2b 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -63,6 +63,7 @@ ath79_setup_interfaces()
tplink,cpe510-v3|\
tplink,cpe610-v1|\
tplink,cpe610-v2|\
+ tplink,cpe710-v1|\
tplink,eap225-outdoor-v1|\
tplink,eap225-v3|\
tplink,eap245-v1|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 80f755b343..4d7940d6ba 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -229,6 +229,12 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
+ tplink,cpe710-v1)
+ caldata_extract "art" 0x5000 0x2f20
+ ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) )
+ ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
+ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
+ ;;
tplink,eap225-outdoor-v1|\
tplink,eap225-v3|\
tplink,eap225-wall-v2|\
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index be6aa06b55..78340f650e 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -362,6 +362,17 @@ define Device/tplink_cpe610-v2
endef
TARGET_DEVICES += tplink_cpe610-v2
+define Device/tplink_cpe710-v1
+ $(Device/tplink-safeloader-uimage)
+ SOC := qca9563
+ IMAGE_SIZE := 15680k
+ DEVICE_MODEL := CPE710
+ DEVICE_VARIANT := v1
+ DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+ TPLINK_BOARD_ID := CPE710V1
+endef
+TARGET_DEVICES += tplink_cpe710-v1
+
define Device/tplink-eap2x5
$(Device/tplink-safeloader)
LOADER_TYPE := elf
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 70e21f99cb..c519a6d367 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -530,6 +530,43 @@ static struct device_info boards[] = {
.first_sysupgrade_partition = "os-image",
.last_sysupgrade_partition = "support-list",
},
+ /** Firmware layout for the CPE710 V1 */
+ {
+ .id = "CPE710V1",
+ .vendor = "CPE710(TP-LINK|UN|AC866-5|00000000):1.0\r\n",
+ .support_list =
+ "SupportList:\r\n"
+ "CPE710(TP-LINK|UN|AC866-5|00000000):1.0\r\n"
+ "CPE710(TP-LINK|EU|AC866-5|45550000):1.0\r\n"
+ "CPE710(TP-LINK|US|AC866-5|55530000):1.0\r\n"
+ "CPE710(TP-LINK|UN|AC866-5):1.0\r\n"
+ "CPE710(TP-LINK|EU|AC866-5):1.0\r\n"
+ "CPE710(TP-LINK|US|AC866-5):1.0\r\n",
+ .part_trail = 0xff,
+ .soft_ver = NULL,
+
+ .partitions = {
+ {"fs-uboot", 0x00000, 0x50000},
+ {"partition-table", 0x50000, 0x02000},
+ {"default-mac", 0x60000, 0x00020},
+ {"serial-number", 0x60100, 0x00020},
+ {"product-info", 0x61100, 0x00100},
+ {"device-info", 0x61400, 0x00400},
+ {"signature", 0x62000, 0x00400},
+ {"device-id", 0x63000, 0x00100},
+ {"firmware", 0x70000, 0xf40000},
+ {"soft-version", 0xfb0000, 0x00100},
+ {"support-list", 0xfb1000, 0x01000},
+ {"user-config", 0xfc0000, 0x10000},
+ {"default-config", 0xfd0000, 0x10000},
+ {"log", 0xfe0000, 0x10000},
+ {"radio", 0xff0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "support-list",
+ },
{
.id = "WBS210",
--
2.25.1

View File

@@ -1,38 +0,0 @@
From 83b7e4074c238cb64f727cde16cdfcc530aaa329 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 8 May 2021 11:30:32 +0200
Subject: [PATCH 34/43] ath79: various fixes
* free up additional 1MB rootfs space
* make the target use bridge-vlan
* use the single eth port as wan
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ath79/generic/base-files/etc/board.d/02_network | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index d70432ad2b..b0b152ba74 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -95,7 +95,7 @@ ath79_setup_interfaces()
ubnt,unifi|\
wd,mynet-wifi-rangeextender|\
winchannel,wb2000)
- ucidef_set_interface_lan "eth0"
+ ucidef_set_interface_wan "eth0"
;;
airtight,c-75)
ucidef_add_switch "switch0" \
@@ -675,6 +675,7 @@ ath79_setup_macs()
board_config_update
board=$(board_name)
+ucidef_set_bridge_device bridge
ath79_setup_interfaces $board
ath79_setup_macs $board
board_config_flush
--
2.25.1

View File

@@ -1,30 +0,0 @@
From ee837f028bd7af515d30a8a90cc2b5ee61eecf19 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 4 Sep 2021 06:04:54 +0200
Subject: [PATCH 35/43] certificates: add ability to persistently store
certificates
Signed-off-by: John Crispin <john@phrozen.org>
---
target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts | 7 ++++++-
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
index 830c3d30b8..71c6381f86 100644
--- a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
@@ -86,7 +86,12 @@
partition@70000 {
compatible = "denx,uimage";
label = "firmware";
- reg = <0x070000 0xf50000>;
+ reg = <0x070000 0xf40000>;
+ };
+
+ partition@fb0000 {
+ label = "certificates";
+ reg = <0xfb0000 0x10000>;
};
partition@fc0000 {

View File

@@ -1,48 +0,0 @@
From c51ac602aff1a9b0093687fe39164a3b895fd4a2 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 22 Oct 2020 10:29:34 +0200
Subject: [PATCH 01/27] build: build kernel image before building
modules/packages
This is needed for linux 5.10, where modules.builtin is generated from
vmlinux.o
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/kernel-defaults.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 3aa1baa761..c02e0d34ca 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -115,7 +115,7 @@ endef
define Kernel/CompileModules/Default
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
- +$(KERNEL_MAKE) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
endef
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
@@ -139,7 +139,7 @@ endef
define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage)
endef
@@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+ +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage,-initramfs)
endef
else
--
2.25.1

View File

@@ -1,46 +0,0 @@
From 6c50e27b166b30c0b3f7b730717ab4b7f446e4d0 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Wed, 17 Feb 2021 13:49:14 +0100
Subject: [PATCH 02/27] build: fix build with CONFIG_STRIP_KERNEL_EXPORTS
Only use symtab.h on the final kernel link
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/kernel-defaults.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index c02e0d34ca..f9316fc3f9 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -3,7 +3,7 @@
# Copyright (C) 2006-2020 OpenWrt.org
ifdef CONFIG_STRIP_KERNEL_EXPORTS
- KERNEL_MAKEOPTS += \
+ KERNEL_MAKEOPTS_IMAGE += \
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
endif
@@ -139,7 +139,7 @@ endef
define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
+ +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage)
endef
@@ -149,7 +149,7 @@ define Kernel/CompileImage/Initramfs
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
- +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all)
+ +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all)
$(call Kernel/CopyImage,-initramfs)
endef
else
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,74 +0,0 @@
From 7ed003d57f1c5273fecddabcdc7bd6845c3854a0 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 20 Feb 2021 08:36:43 +0100
Subject: [PATCH 05/27] sysupgrade-nand: allow limiting rootfs_data by setting
env variable
Check if firmware environment variable 'rootfs_data_max' exists and is
set to a numerical value greater than 0. If so, limit rootfs_data
volume to that size instead of using the maximum available size.
This is useful on devices with lots of flash where users may want to
have eg. a volume for persistent logs and statistics or for external
applications/containers. Persistence on rootfs overlay is limited by
the size of memory available during the sysugprade process as that
data needs to be copied to RAM while the volume is being recreated
during sysupgrade. Hence it is unsuitable for keeping larger amounts
of data accross upgrade which makes additional volume(s) for
application data desirable.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/base-files/files/lib/upgrade/nand.sh | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 5bc9ff83f9..e335d940ed 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -117,6 +117,9 @@ nand_restore_config() {
nand_upgrade_prepare_ubi() {
local rootfs_length="$1"
local rootfs_type="$2"
+ local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)"
+ [ -n "$rootfs_data_max" ] && rootfs_data_max=$(printf %d "$rootfs_data_max")
+
local kernel_length="$3"
local has_env="${4:-0}"
@@ -176,11 +179,11 @@ nand_upgrade_prepare_ubi() {
# update rootfs
if [ -n "$rootfs_length" ]; then
- local root_size_param
+ local rootfs_size_param
if [ "$rootfs_type" = "ubifs" ]; then
- root_size_param="-m"
+ rootfs_size_param="-m"
else
- root_size_param="-s $rootfs_length"
+ rootfs_size_param="-s $rootfs_length"
fi
if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $rootfs_size_param; then
echo "cannot create rootfs volume"
@@ -190,7 +193,16 @@ nand_upgrade_prepare_ubi() {
# create rootfs_data for non-ubifs rootfs
if [ "$rootfs_type" != "ubifs" ]; then
- if ! ubimkvol /dev/$ubidev -N rootfs_data -m; then
+ local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
+ local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
+ local avail_size=$(( $availeb * $ebsize ))
+ local rootfs_data_size_param="-m"
+ if [ -n "$rootfs_data_max" ] &&
+ [ "$rootfs_data_max" != "0" ] &&
+ [ "$rootfs_data_max" -le "$avail_size" ]; then
+ rootfs_data_size_param="-s $rootfs_data_max"
+ fi
+ if ! ubimkvol /dev/$ubidev -N rootfs_data $rootfs_data_size_param; then
echo "cannot initialize rootfs_data volume"
return 1
fi
--
2.25.1

View File

@@ -1,70 +0,0 @@
From 1a9921bab861dd2c89337c3e4833c716a0474653 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 12 Feb 2021 03:09:39 +0000
Subject: [PATCH 07/27] uboot-envtools: add defaults for linksys-e8450-ubi
Add U-Boot environment configuration for the Linksys E8450 (UBI) to
allow access to the bootloader environment from OpenWrt via
'fw_printenv' and 'fw_setenv'.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/boot/uboot-envtools/files/mediatek | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 package/boot/uboot-envtools/files/mediatek
diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek
new file mode 100644
index 0000000000..495a837274
--- /dev/null
+++ b/package/boot/uboot-envtools/files/mediatek
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+case "$board" in
+linksys,e8450-ubi)
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
+ ;;
+bananapi,bpi-r64)
+ . /lib/upgrade/common.sh
+ export_bootdevice
+ export_partdevice rootdev 0
+ case "$rootdev" in
+ mmc*)
+ local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
+ ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
+ ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
+ ;;
+ *)
+ ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+ ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
+ ;;
+ esac
+ ;;
+buffalo,wsr-2533dhp2)
+ ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
+ ;;
+ubnt,unifi-6-lr-ubootmod)
+ ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
+ ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +0,0 @@
From d28712edcc0e57b5c0e5d79125a5517ced252e18 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 7 Apr 2021 10:46:26 +0200
Subject: [PATCH] include: set kernel-version.mk
Signed-off-by: John Crispin <john@phrozen.org>
---
include/kernel-version.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 688660cbbd..c7aba61cd7 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,15 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
+LINUX_VERSION-4.4 = .60
+LINUX_VERSION-4.14 = .193
LINUX_VERSION-5.4 = .158
+LINUX_VERSION-5.10 = .27
+LINUX_KERNEL_HASH-4.4.60 = 2cd8df6f1ac6a5329c5a286ec9b5956215977221a1b731597ed169fff74a9659
+LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03
LINUX_KERNEL_HASH-5.4.158 = 6e018fecdc8fc24553756e582d83b82d65b10a6b03ef36262a24911f839b8d59
+LINUX_KERNEL_HASH-5.10.27 = d99dc9662951299c53a0a8d8c8d0a72a16ff861d20e927c0f9b14f63282d69d9
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
--
2.25.1

View File

@@ -1,266 +0,0 @@
From ad860cb413d1934332de60658d5eb8fb64d19663 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 9 May 2021 12:23:00 +0200
Subject: [PATCH 11/27] backport: mkits.sh
969083634481c3ab5fb80509f385ef10ab45b55f
e991c1b8a2385397fc1e657ed73878938997d951
9f714398e060c6338fbfad44cdbfa8c940dbb84b
Signed-off-by: John Crispin <john@phrozen.org>
---
include/image-commands.mk | 2 +-
include/image.mk | 2 +-
scripts/mkits.sh | 101 +++++++++++++++++++++++++---
target/linux/ipq40xx/image/Makefile | 1 +
target/linux/ipq806x/image/Makefile | 1 +
5 files changed, 95 insertions(+), 12 deletions(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 2c917d613e..c6e8eb0293 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -203,7 +203,7 @@ define Build/fit
$(if $(word 3,$(1)),-r $(IMAGE_ROOTFS) -f $(subst _,$(comma),$(DEVICE_NAME))) \
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
- -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
+ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(word 3,$(1)),-E -B 0x1000 -p 0x1000) -f $@.its $@.new
@mv $@.new $@
diff --git a/include/image.mk b/include/image.mk
index b6e8ab3c84..7c2dcf0e8b 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -139,7 +139,7 @@ endef
define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
- -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
+ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
endef
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 3d68fdacbc..7533baf799 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -24,22 +24,29 @@ usage() {
printf "\n\t-a ==> set load address to 'addr' (hex)"
printf "\n\t-e ==> set entry point to 'entry' (hex)"
printf "\n\t-f ==> set device tree compatible string"
+ printf "\n\t-i ==> include initrd Blob 'initrd'"
printf "\n\t-v ==> set kernel version to 'version'"
printf "\n\t-k ==> include kernel image 'kernel'"
printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
printf "\n\t-n ==> fdt unit-address 'address'"
printf "\n\t-d ==> include Device Tree Blob 'dtb'"
- printf "\n\t-r ==> include RootFS blob"
+ printf "\n\t-r ==> include RootFS blob 'rootfs'"
printf "\n\t-H ==> specify hash algo instead of SHA1"
- printf "\n\t-o ==> create output file 'its_file'\n"
+ printf "\n\t-o ==> create output file 'its_file'"
+ printf "\n\t-O ==> create config with dt overlay 'name:dtb'"
+ printf "\n\t\t(can be specified more than once)\n"
exit 1
}
FDTNUM=1
ROOTFSNUM=1
+INITRDNUM=1
HASH=sha1
+LOADABLES=
+DTOVERLAY=
+DTADDR=
-while getopts ":A:a:c:C:D:d:e:f:k:n:o:v:r:S" OPTION
+while getopts ":A:a:c:C:D:d:e:f:i:k:n:o:O:v:r:S" OPTION
do
case $OPTION in
A ) ARCH=$OPTARG;;
@@ -50,9 +57,11 @@ do
d ) DTB=$OPTARG;;
e ) ENTRY_ADDR=$OPTARG;;
f ) COMPATIBLE=$OPTARG;;
+ i ) INITRD=$OPTARG;;
k ) KERNEL=$OPTARG;;
n ) FDTNUM=$OPTARG;;
o ) OUTPUT=$OPTARG;;
+ O ) DTOVERLAY="$DTOVERLAY ${OPTARG}";;
r ) ROOTFS=$OPTARG;;
S ) HASH=$OPTARG;;
v ) VERSION=$OPTARG;;
@@ -74,14 +83,20 @@ if [ -n "${COMPATIBLE}" ]; then
COMPATIBLE_PROP="compatible = \"${COMPATIBLE}\";"
fi
+[ "$DTOVERLAY" ] && {
+ dtbsize=$(wc -c "$DTB" | cut -d' ' -f1)
+ DTADDR=$(printf "0x%08x" $(($LOAD_ADDR - $dtbsize)) )
+}
+
# Conditionally create fdt information
if [ -n "${DTB}" ]; then
FDT_NODE="
- fdt@$FDTNUM {
+ fdt-$FDTNUM {
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\";
${COMPATIBLE_PROP}
data = /incbin/(\"${DTB}\");
type = \"flat_dt\";
+ ${DTADDR:+load = <${DTADDR}>;}
arch = \"${ARCH}\";
compression = \"none\";
hash@1 {
@@ -92,13 +107,34 @@ if [ -n "${DTB}" ]; then
};
};
"
- FDT_PROP="fdt = \"fdt@$FDTNUM\";"
+ FDT_PROP="fdt = \"fdt-$FDTNUM\";"
fi
+if [ -n "${INITRD}" ]; then
+ INITRD_NODE="
+ initrd-$INITRDNUM {
+ description = \"${ARCH_UPPER} OpenWrt ${DEVICE} initrd\";
+ ${COMPATIBLE_PROP}
+ data = /incbin/(\"${INITRD}\");
+ type = \"ramdisk\";
+ arch = \"${ARCH}\";
+ os = \"linux\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"${HASH}\";
+ };
+ };
+"
+ INITRD_PROP="ramdisk=\"initrd-${INITRDNUM}\";"
+fi
+
+
if [ -n "${ROOTFS}" ]; then
dd if="${ROOTFS}" of="${ROOTFS}.pagesync" bs=4096 conv=sync
ROOTFS_NODE="
- rootfs@$ROOTFSNUM {
+ rootfs-$ROOTFSNUM {
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} rootfs\";
${COMPATIBLE_PROP}
data = /incbin/(\"${ROOTFS}.pagesync\");
@@ -113,9 +149,50 @@ if [ -n "${ROOTFS}" ]; then
};
};
"
- ROOTFS_PROP="loadables = \"rootfs@${ROOTFSNUM}\";"
+ LOADABLES="${LOADABLES:+$LOADABLES, }\"rootfs-${ROOTFSNUM}\""
fi
+# add DT overlay blobs
+FDTOVERLAY_NODE=""
+OVCONFIGS=""
+[ "$DTOVERLAY" ] && for overlay in $DTOVERLAY ; do
+ overlay_blob=${overlay##*:}
+ ovname=${overlay%%:*}
+ ovnode="fdt-$ovname"
+ ovsize=$(wc -c "$overlay_blob" | cut -d' ' -f1)
+ echo "$ovname ($overlay_blob) : $ovsize" >&2
+ DTADDR=$(printf "0x%08x" $(($DTADDR - $ovsize)))
+ FDTOVERLAY_NODE="$FDTOVERLAY_NODE
+
+ $ovnode {
+ description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree overlay $ovname\";
+ ${COMPATIBLE_PROP}
+ data = /incbin/(\"${overlay_blob}\");
+ type = \"flat_dt\";
+ arch = \"${ARCH}\";
+ load = <${DTADDR}>;
+ compression = \"none\";
+ hash@1 {
+ algo = \"crc32\";
+ };
+ hash@2 {
+ algo = \"${HASH}\";
+ };
+ };
+"
+ OVCONFIGS="$OVCONFIGS
+
+ config-$ovname {
+ description = \"OpenWrt ${DEVICE} with $ovname\";
+ kernel = \"kernel-1\";
+ fdt = \"fdt-$FDTNUM\", \"$ovnode\";
+ ${LOADABLES:+loadables = ${LOADABLES};}
+ ${COMPATIBLE_PROP}
+ ${INITRD_PROP}
+ };
+ "
+done
+
# Create a default, fully populated DTS file
DATA="/dts-v1/;
@@ -124,7 +201,7 @@ DATA="/dts-v1/;
#address-cells = <1>;
images {
- kernel@1 {
+ kernel-1 {
description = \"${ARCH_UPPER} OpenWrt Linux-${VERSION}\";
data = /incbin/(\"${KERNEL}\");
type = \"kernel\";
@@ -140,7 +217,9 @@ DATA="/dts-v1/;
algo = \"$HASH\";
};
};
+${INITRD_NODE}
${FDT_NODE}
+${FDTOVERLAY_NODE}
${ROOTFS_NODE}
};
@@ -148,11 +227,13 @@ ${ROOTFS_NODE}
default = \"${CONFIG}\";
${CONFIG} {
description = \"OpenWrt ${DEVICE}\";
- kernel = \"kernel@1\";
+ kernel = \"kernel-1\";
${FDT_PROP}
- ${ROOTFS_PROP}
+ ${LOADABLES:+loadables = ${LOADABLES};}
${COMPATIBLE_PROP}
+ ${INITRD_PROP}
};
+ ${OVCONFIGS}
};
};"
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 2be262936f..a0d6242a28 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -8,6 +8,7 @@ define Device/Default
KERNEL_PREFIX := $$(IMAGE_PREFIX)
KERNEL_LOADADDR := 0x80208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
+ DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index bab1da0090..3bc60fa931 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -30,6 +30,7 @@ define Device/Default
KERNEL_PREFIX := $$(IMAGE_PREFIX)
KERNEL_LOADADDR = 0x42208000
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
+ DEVICE_DTS_CONFIG := config@1
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
IMAGE/sysupgrade.bin/squashfs :=
--
2.25.1

View File

@@ -1,39 +0,0 @@
From 4b7a8429c654dc7a3fc96c0042592793a09f667a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 18 May 2021 10:46:43 +0200
Subject: [PATCH 2/4] libubox: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/libubox/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index d2c07783e1..c112b49d0f 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca
-PKG_SOURCE_DATE:=2021-05-16
-PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
+PKG_MIRROR_HASH:=f9f9c631e8167597ce721c64a0023dae9e0f1b2cc37ae846a49984d535a3c480
+PKG_SOURCE_DATE:=2023-07-05
+PKG_SOURCE_VERSION:=75a3b870cace1171faf57bd55e5a9a2f1564f757
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1
@@ -67,7 +67,7 @@ define Package/libubox-lua
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
-CMAKE_OPTIONS = \
+CMAKE_OPTIONS += \
-DLUAPATH=/usr/lib/lua \
-DABIVERSION="$(PKG_ABI_VERSION)"
--
2.25.1

View File

@@ -1,30 +0,0 @@
From 41db6b8282d09bd9d7ee453f54e592003904ab0e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 30 Jun 2021 14:21:23 +0200
Subject: [PATCH 13/27] umdns: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/services/umdns/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile
index 9a5f46a705..908758e44b 100644
--- a/package/network/services/umdns/Makefile
+++ b/package/network/services/umdns/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-01-26
-PKG_SOURCE_VERSION:=78aa36b0e9808e801c527c6dc47320e593309522
-PKG_MIRROR_HASH:=241833f2bf2f3366f356703159be386862ef747d9b253af6c13555f252cc970d
+PKG_SOURCE_DATE:=2021-06-30
+PKG_SOURCE_VERSION:=4a8747193ab2b8f2d68a9d26334545e19d89cbe2
+PKG_MIRROR_HASH:=bdddec2793303e4cc1a90cb2ed2241c04fdd0a736b6c0cbbb1fab9de5527566a
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1
--
2.25.1

View File

@@ -1,242 +0,0 @@
From 9df1500bde8e609dcbbecbefa0eb5a29d9e6f7f5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 27 Aug 2021 16:52:34 +0200
Subject: [PATCH 14/27] kernel: add bdpu filter support
Signed-off-by: John Crispin <john@phrozen.org>
---
...l-knob-for-filtering-rx-tx-BPDU-pack.patch | 107 ++++++++++++++++++
...l-knob-for-filtering-rx-tx-BPDU-pack.patch | 107 ++++++++++++++++++
2 files changed, 214 insertions(+)
create mode 100644 target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
create mode 100644 target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
diff --git a/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
new file mode 100644
index 0000000000..918ae05d12
--- /dev/null
+++ b/target/linux/generic/pending-5.10/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -0,0 +1,107 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 27 Aug 2021 12:22:32 +0200
+Subject: [PATCH] bridge: add sysctl knob for filtering rx/tx BPDU packets on a
+ port
+
+Some devices (e.g. wireless APs) can't have devices behind them be part of
+a bridge topology with redundant links, due to address limitations.
+Additionally, broadcast traffic on these devices is somewhat expensive, due to
+the low data rate and wakeups of clients in powersave mode.
+This sysctl knob can be used to ensure that BPDU packets are never sent
+or forwarded to/from these devices
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -56,6 +56,7 @@ struct br_ip_list {
+ #define BR_MRP_AWARE BIT(17)
+ #define BR_MRP_LOST_CONT BIT(18)
+ #define BR_MRP_LOST_IN_CONT BIT(19)
++#define BR_BPDU_FILTER BIT(20)
+
+ #define BR_DEFAULT_AGEING_TIME (300 * HZ)
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -191,6 +191,7 @@ out:
+ void br_flood(struct net_bridge *br, struct sk_buff *skb,
+ enum br_pkt_type pkt_type, bool local_rcv, bool local_orig)
+ {
++ const unsigned char *dest = eth_hdr(skb)->h_dest;
+ struct net_bridge_port *prev = NULL;
+ struct net_bridge_port *p;
+
+@@ -206,6 +207,10 @@ void br_flood(struct net_bridge *br, str
+ case BR_PKT_MULTICAST:
+ if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev)
+ continue;
++ if ((p->flags & BR_BPDU_FILTER) &&
++ unlikely(is_link_local_ether_addr(dest) &&
++ dest[5] == 0))
++ continue;
+ break;
+ case BR_PKT_BROADCAST:
+ if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -305,6 +305,8 @@ static rx_handler_result_t br_handle_fra
+ fwd_mask |= p->group_fwd_mask;
+ switch (dest[5]) {
+ case 0x00: /* Bridge Group Address */
++ if (p->flags & BR_BPDU_FILTER)
++ goto drop;
+ /* If STP is turned off,
+ then must forward to keep loop detection */
+ if (p->br->stp_enabled == BR_NO_STP ||
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
+@@ -233,6 +233,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
+ BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD);
+ BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS);
+ BRPORT_ATTR_FLAG(isolated, BR_ISOLATED);
++BRPORT_ATTR_FLAG(bpdu_filter, BR_BPDU_FILTER);
+
+ #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
+ static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
+@@ -285,6 +286,7 @@ static const struct brport_attribute *br
+ &brport_attr_group_fwd_mask,
+ &brport_attr_neigh_suppress,
+ &brport_attr_isolated,
++ &brport_attr_bpdu_filter,
+ &brport_attr_backup_port,
+ NULL
+ };
+--- a/net/bridge/br_stp_bpdu.c
++++ b/net/bridge/br_stp_bpdu.c
+@@ -80,7 +80,8 @@ void br_send_config_bpdu(struct net_brid
+ {
+ unsigned char buf[35];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -127,7 +128,8 @@ void br_send_tcn_bpdu(struct net_bridge_
+ {
+ unsigned char buf[4];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -172,6 +174,9 @@ void br_stp_rcv(const struct stp_proto *
+ if (!(br->dev->flags & IFF_UP))
+ goto out;
+
++ if (p->flags & BR_BPDU_FILTER)
++ goto out;
++
+ if (p->state == BR_STATE_DISABLED)
+ goto out;
+
diff --git a/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
new file mode 100644
index 0000000000..586d264cd5
--- /dev/null
+++ b/target/linux/generic/pending-5.4/710-bridge-add-sysctl-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -0,0 +1,107 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 27 Aug 2021 12:22:32 +0200
+Subject: [PATCH] bridge: add sysctl knob for filtering rx/tx BPDU packets on a
+ port
+
+Some devices (e.g. wireless APs) can't have devices behind them be part of
+a bridge topology with redundant links, due to address limitations.
+Additionally, broadcast traffic on these devices is somewhat expensive, due to
+the low data rate and wakeups of clients in powersave mode.
+This sysctl knob can be used to ensure that BPDU packets are never sent
+or forwarded to/from these devices
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -47,6 +47,7 @@ struct br_ip_list {
+ #define BR_BCAST_FLOOD BIT(14)
+ #define BR_NEIGH_SUPPRESS BIT(15)
+ #define BR_ISOLATED BIT(16)
++#define BR_BPDU_FILTER BIT(17)
+
+ #define BR_DEFAULT_AGEING_TIME (300 * HZ)
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -191,6 +191,7 @@ out:
+ void br_flood(struct net_bridge *br, struct sk_buff *skb,
+ enum br_pkt_type pkt_type, bool local_rcv, bool local_orig)
+ {
++ const unsigned char *dest = eth_hdr(skb)->h_dest;
+ struct net_bridge_port *prev = NULL;
+ struct net_bridge_port *p;
+
+@@ -206,6 +207,10 @@ void br_flood(struct net_bridge *br, str
+ case BR_PKT_MULTICAST:
+ if (!(p->flags & BR_MCAST_FLOOD) && skb->dev != br->dev)
+ continue;
++ if ((p->flags & BR_BPDU_FILTER) &&
++ unlikely(is_link_local_ether_addr(dest) &&
++ dest[5] == 0))
++ continue;
+ break;
+ case BR_PKT_BROADCAST:
+ if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
+--- a/net/bridge/br_input.c
++++ b/net/bridge/br_input.c
+@@ -300,6 +300,8 @@ rx_handler_result_t br_handle_frame(stru
+ fwd_mask |= p->group_fwd_mask;
+ switch (dest[5]) {
+ case 0x00: /* Bridge Group Address */
++ if (p->flags & BR_BPDU_FILTER)
++ goto drop;
+ /* If STP is turned off,
+ then must forward to keep loop detection */
+ if (p->br->stp_enabled == BR_NO_STP ||
+--- a/net/bridge/br_sysfs_if.c
++++ b/net/bridge/br_sysfs_if.c
+@@ -233,6 +233,7 @@ BRPORT_ATTR_FLAG(multicast_flood, BR_MCA
+ BRPORT_ATTR_FLAG(broadcast_flood, BR_BCAST_FLOOD);
+ BRPORT_ATTR_FLAG(neigh_suppress, BR_NEIGH_SUPPRESS);
+ BRPORT_ATTR_FLAG(isolated, BR_ISOLATED);
++BRPORT_ATTR_FLAG(bpdu_filter, BR_BPDU_FILTER);
+
+ #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
+ static ssize_t show_multicast_router(struct net_bridge_port *p, char *buf)
+@@ -285,6 +286,7 @@ static const struct brport_attribute *br
+ &brport_attr_group_fwd_mask,
+ &brport_attr_neigh_suppress,
+ &brport_attr_isolated,
++ &brport_attr_bpdu_filter,
+ &brport_attr_backup_port,
+ NULL
+ };
+--- a/net/bridge/br_stp_bpdu.c
++++ b/net/bridge/br_stp_bpdu.c
+@@ -80,7 +80,8 @@ void br_send_config_bpdu(struct net_brid
+ {
+ unsigned char buf[35];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -125,7 +126,8 @@ void br_send_tcn_bpdu(struct net_bridge_
+ {
+ unsigned char buf[4];
+
+- if (p->br->stp_enabled != BR_KERNEL_STP)
++ if (p->br->stp_enabled != BR_KERNEL_STP ||
++ (p->flags & BR_BPDU_FILTER))
+ return;
+
+ buf[0] = 0;
+@@ -168,6 +170,9 @@ void br_stp_rcv(const struct stp_proto *
+ if (!(br->dev->flags & IFF_UP))
+ goto out;
+
++ if (p->flags & BR_BPDU_FILTER)
++ goto out;
++
+ if (p->state == BR_STATE_DISABLED)
+ goto out;
+
--
2.25.1

View File

@@ -1,33 +0,0 @@
From 8ba5feb6aaba50bda126db027490c7d37e428e3b Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Fri, 20 Aug 2021 16:11:12 +0300
Subject: [PATCH 15/27] uhttpd: add config option for json_script
Add a config option for json_script instead of unconditionally including
all json files in /etc/uhttpd in every uhttpd instance. This makes it
possible to configure a single instance with an unconditional redirect,
which is currently not possible as it would render all other uhttpd
instances unusable.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
package/network/services/uhttpd/files/uhttpd.init | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 869f79bea2..7020912c6c 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -195,7 +195,8 @@ start_instance()
append_bool "$cfg" redirect_https "-q" 0
}
- for file in /etc/uhttpd/*.json; do
+ config_get json_script "$cfg" json_script
+ for file in $json_script; do
[ -s "$file" ] && procd_append_param command -H "$file"
done
--
2.25.1

View File

@@ -1,41 +0,0 @@
From 63281b982b3692828ff453dcb9e68b8e43d628e5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 21 Jun 2021 12:53:28 +0200
Subject: [PATCH 16/27] iwinfo: update to latest git HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/utils/iwinfo/Makefile | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index 815c477988..d235f07da9 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -11,12 +11,20 @@ PKG_RELEASE:=2.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
-PKG_SOURCE_DATE:=2021-04-30
-PKG_SOURCE_VERSION:=c45f0b584b4b86f8250f90ea19afca271c114fa2
-PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec2
+PKG_SOURCE_DATE:=2021-06-09
+PKG_SOURCE_VERSION:=c0414642fead263a4a6a686ad3cb7e965ec8a23a
+PKG_MIRROR_HASH:=c5686bbae86753c53db03a686b034bbb80d31107cc359ebd8522ea1c82db35ea
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0
+PKG_FLAGS := nonshared
+
+PKG_CONFIG_DEPENDS := \
+ CONFIG_PACKAGE_kmod-brcm-wl \
+ CONFIG_PACKAGE_kmod-brcm-wl-mini \
+ CONFIG_PACKAGE_kmod-brcm-wl-mimo \
+ CONFIG_PACKAGE_kmod-cfg80211
+
IWINFO_ABI_VERSION:=20210430
include $(INCLUDE_DIR)/package.mk
--
2.25.1

View File

@@ -1,66 +0,0 @@
From 9f1829135434aa08a15ada5b366707b4eb38ec41 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 27 May 2021 13:24:47 +0200
Subject: [PATCH] netifd: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/config/netifd/Makefile | 8 +++----
.../config/netifd/patches/100-script.patch | 21 +++++++++++++++++++
2 files changed, 24 insertions(+), 5 deletions(-)
create mode 100644 package/network/config/netifd/patches/100-script.patch
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index cd4f8f423d..4e7c99b5e6 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,16 +5,14 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-10-30
-PKG_SOURCE_VERSION:=8f82742ca4f47f459284f3a07323d04da72ea5f6
-PKG_MIRROR_HASH:=5e519bb1aec9bb30782213f32f19f12e874c909e42826618dd4332ded816d2fe
+PKG_SOURCE_DATE:=2023-08-17
+PKG_SOURCE_VERSION:=4711f74479e213ef86f8792b408b117d40148eb2
+PKG_MIRROR_HASH:=91c8aa8e890b0616c1ad1860618951ee73655c4e53cc31999dcbb8d00b8b456d
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
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/config/netifd/patches/100-script.patch b/package/network/config/netifd/patches/100-script.patch
new file mode 100644
index 0000000000..e7ba83f4bb
--- /dev/null
+++ b/package/network/config/netifd/patches/100-script.patch
@@ -0,0 +1,21 @@
+Index: a/scripts/netifd-wireless.sh
+===================================================================
+--- a/scripts/netifd-wireless.sh
++++ b/scripts/netifd-wireless.sh
+@@ -252,11 +252,14 @@ wireless_vif_parse_encryption() {
+ auth_type=owe
+ ;;
+ wpa3-mixed*)
+- auth_type=eap-eap192
++ auth_type=eap-eap256
+ ;;
+- wpa3*)
++ wpa3-192*)
+ auth_type=eap192
+ ;;
++ wpa3*)
++ auth_type=eap256
++ ;;
+ psk3-mixed*|sae-mixed*)
+ auth_type=psk-sae
+ ;;
--
2.34.1

View File

@@ -1,179 +0,0 @@
From 006abf1773051ad355b52d70095f63f44a496b13 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 25 Jul 2021 13:32:37 +0200
Subject: [PATCH 02/70] procd: add uxc support
Signed-off-by: John Crispin <john@phrozen.org>
---
package/system/procd/Makefile | 15 +++---
package/system/procd/files/procd.sh | 79 +++++++++++++++++++++++++++++
package/system/procd/files/uxc.init | 4 ++
3 files changed, 90 insertions(+), 8 deletions(-)
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 30d5adf427..b831f86639 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-02-23
-PKG_SOURCE_VERSION:=37eed131e9967a35f47bacb3437a9d3c8a57b3f4
-PKG_MIRROR_HASH:=2b0131ff9055ccf987cbeb5f36c2c2585dc780999df6be312fbbbcd61ce676d4
+PKG_MIRROR_HASH:=0d51642d82d7bb4150355a6986e54504dce171c6fcb7eeff312d20a5d106bad8
+PKG_SOURCE_DATE:=2021-11-04
+PKG_SOURCE_VERSION:=0ee8e734a7f67220cf4a3412b60ff674b5fb20dd
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
@@ -32,7 +32,7 @@ include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
ifeq ($(DUMP),)
- STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5)
+ STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5)
endif
CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)"
@@ -68,7 +68,7 @@ define Package/procd-ujail
SECTION:=base
CATEGORY:=Base system
DEPENDS:=@KERNEL_NAMESPACES +@KERNEL_UTS_NS +@KERNEL_IPC_NS +@KERNEL_PID_NS \
- +libubox +libubus +libblobmsg-json
+ +libubox +libubus +libuci +libblobmsg-json
TITLE:=OpenWrt process jail helper
endef
@@ -82,15 +82,14 @@ endef
define Package/procd-seccomp
SECTION:=base
CATEGORY:=Base system
- DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \
- @KERNEL_SECCOMP +libubox +libblobmsg-json
+ DEPENDS:=@SECCOMP +libubox +libblobmsg-json
TITLE:=OpenWrt process seccomp helper + utrace
endef
define Package/uxc
SECTION:=base
CATEGORY:=Base system
- DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
+ DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +PACKAGE_uxc:rpcd
TITLE:=OpenWrt container management
MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
endef
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index d86b7219da..3549a5a914 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -329,6 +329,82 @@ _procd_add_config_trigger() {
json_close_array
}
+_procd_add_mount_trigger() {
+ json_add_array
+ _procd_add_array_data "$1"
+ local action="$2"
+ local multi=0
+ shift ; shift
+
+ json_add_array
+ _procd_add_array_data "if"
+
+ if [ "$2" ]; then
+ json_add_array
+ _procd_add_array_data "or"
+ multi=1
+ fi
+
+ while [ "$1" ]; do
+ json_add_array
+ _procd_add_array_data "eq" "target" "$1"
+ shift
+ json_close_array
+ done
+
+ [ $multi = 1 ] && json_close_array
+
+ json_add_array
+ _procd_add_array_data "run_script" /etc/init.d/$name $action
+ json_close_array
+
+ json_close_array
+ _procd_add_timeout
+ json_close_array
+}
+
+_procd_add_action_mount_trigger() {
+ local script=$(readlink "$initscript")
+ local name=$(basename ${script:-$initscript})
+ local action="$1"
+ local mpath
+ shift
+
+ _procd_open_trigger
+ _procd_add_mount_trigger mount.add $action "$@"
+ _procd_close_trigger
+}
+
+procd_get_mountpoints() {
+ (
+ __procd_check_mount() {
+ local cfg="$1"
+ local path="${2%%/}/"
+ local target
+ config_get target "$cfg" target
+ target="${target%%/}/"
+ [ "$path" != "${path##$target}" ] && echo "${target%%/}"
+ }
+
+ config_load fstab
+ for mpath in "$@"; do
+ config_foreach __procd_check_mount mount "$mpath"
+ done
+ ) | sort -u
+}
+
+_procd_add_restart_mount_trigger() {
+ local mountpoints="$(procd_get_mountpoints "$@")"
+ [ "${mountpoints//[[:space:]]}" ] &&
+ _procd_add_action_mount_trigger restart $mountpoints
+}
+
+_procd_add_reload_mount_trigger() {
+ local mountpoints="$(procd_get_mountpoints "$@")"
+ [ "${mountpoints//[[:space:]]}" ] &&
+ _procd_add_action_mount_trigger reload $mountpoints
+}
+
_procd_add_raw_trigger() {
json_add_array
_procd_add_array_data "$1"
@@ -560,8 +636,11 @@ _procd_wrapper \
procd_add_raw_trigger \
procd_add_config_trigger \
procd_add_interface_trigger \
+ procd_add_mount_trigger \
procd_add_reload_trigger \
procd_add_reload_interface_trigger \
+ procd_add_reload_mount_trigger \
+ procd_add_restart_mount_trigger \
procd_open_trigger \
procd_close_trigger \
procd_open_instance \
diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init
index 035c8b0b9e..1e75b796f8 100644
--- a/package/system/procd/files/uxc.init
+++ b/package/system/procd/files/uxc.init
@@ -16,3 +16,7 @@ boot() {
__BOOT_UXC=1
start
}
+
+service_triggers() {
+ procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot
+}
--
2.25.1

View File

@@ -1,174 +0,0 @@
From 23c15e2536d0fa5ed81c5bdfe7623d3370dca997 Mon Sep 17 00:00:00 2001
From: Paul Spooren <mail@aparcar.org>
Date: Fri, 2 Oct 2020 23:30:30 -1000
Subject: [PATCH 21/27] build: create APK files parrallel to IPK
Create APK files based on the folder and control files of IPK packages.
Signed-off-by: Paul Spooren <mail@aparcar.org>
---
include/package-ipkg.mk | 48 +++++++++++++++++++++++++------------
package/Makefile | 2 ++
package/base-files/Makefile | 4 ++++
rules.mk | 2 ++
scripts/apk-make-index.sh | 20 ++++++++++++++++
5 files changed, 61 insertions(+), 15 deletions(-)
create mode 100755 scripts/apk-make-index.sh
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index e972b7de0b..5c31b1774f 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -102,6 +102,7 @@ ifeq ($(DUMP),)
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
PDIR_$(1):=$(call FeedPackageDir,$(1))
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
+ APK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).apk
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
@@ -200,7 +201,7 @@ $(_endef)
$(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
@rm -rf $$(IDIR_$(1)); \
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
- mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
+ mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1)) $(PKG_INFO_DIR)
$(call Package/$(1)/install,$$(IDIR_$(1)))
$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
$(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay)
@@ -226,6 +227,37 @@ $(_endef)
) || true \
)
endif
+
+ ifneq ($$(KEEP_$(1)),)
+ @( \
+ keepfiles=""; \
+ for x in $$(KEEP_$(1)); do \
+ [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
+ done; \
+ [ -z "$$$$keepfiles" ] || { \
+ mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
+ for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
+ }; \
+ )
+ endif
+
+ $(INSTALL_DIR) $$(PDIR_$(1))
+
+ $(FAKEROOT) apk mkpkg \
+ --info "name:$(1)" \
+ --info "version:$(VERSION)" \
+ --info "description:$()" \
+ --info "arch:$(PKGARCH)" \
+ --info "license:$(LICENSE)" \
+ --info "origin:$(SOURCE)" \
+ --info "maintainer:$(MAINTAINER)" \
+ $$(foreach dep,$$(Package/$(1)/DEPENDS),--info "depends:$$(subst $$(comma),,$$(dep))") \
+ --files "$$(IDIR_$(1))" \
+ --output "$$(APK_$(1))" \
+ --sign "$(BUILD_KEY_APK_SEC)"
+
+ mkdir -p $$(IDIR_$(1))/CONTROL
+
(cd $$(IDIR_$(1))/CONTROL; \
( \
echo "$$$$CONTROL"; \
@@ -249,20 +281,6 @@ $(_endef)
$($(1)_COMMANDS) \
)
- ifneq ($$(KEEP_$(1)),)
- @( \
- keepfiles=""; \
- for x in $$(KEEP_$(1)); do \
- [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
- done; \
- [ -z "$$$$keepfiles" ] || { \
- mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
- for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
- }; \
- )
- endif
-
- $(INSTALL_DIR) $$(PDIR_$(1))
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
@[ -f $$(IPKG_$(1)) ]
diff --git a/package/Makefile b/package/Makefile
index ec503dc527..18a19fff13 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -60,6 +60,7 @@ $(curdir)/merge-index: $(curdir)/merge
ifndef SDK
$(curdir)/compile: $(curdir)/system/opkg/host/compile
+ $(patsubst %,$(curdir)/%/compile,$(filter-out %/apk/host,$($(curdir)/builddirs))): $(curdir)/system/apk/host/compile
endif
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
@@ -84,6 +85,7 @@ $(curdir)/index: FORCE
@for d in $(PACKAGE_SUBDIRS); do ( \
mkdir -p $$d; \
cd $$d || continue; \
+ $(SCRIPT_DIR)/apk-make-index.sh . 2>&1; \
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \
case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 8a1ddf96f5..9db4812981 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -107,6 +107,10 @@ ifdef CONFIG_SIGNED_PACKAGES
[ -s $(BUILD_KEY).ucert ] || \
$(STAGING_DIR_HOST)/bin/ucert -I -c $(BUILD_KEY).ucert -p $(BUILD_KEY).pub -s $(BUILD_KEY)
+ [ -s $(BUILD_KEY_APK_SEC) -a -s $(BUILD_KEY_APK_PUB) ] || \
+ openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
+ openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
+
endef
ifndef CONFIG_BUILDBOT
diff --git a/rules.mk b/rules.mk
index f31d9bb113..de81b65d46 100644
--- a/rules.mk
+++ b/rules.mk
@@ -258,6 +258,8 @@ else
endif
BUILD_KEY=$(TOPDIR)/key-build
+BUILD_KEY_APK_SEC=$(TOPDIR)/private-key.pem
+BUILD_KEY_APK_PUB=$(TOPDIR)/public-key.pem
FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot
diff --git a/scripts/apk-make-index.sh b/scripts/apk-make-index.sh
new file mode 100755
index 0000000000..df1f1a2e2b
--- /dev/null
+++ b/scripts/apk-make-index.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -e
+
+pkg_dir=$1
+
+if [ -z "$pkg_dir" ] || [ ! -d "$pkg_dir" ]; then
+ echo "Usage: apk-make-index <package_directory>" >&2
+ exit 1
+fi
+
+(
+ cd "$pkg_dir" || exit 1
+ GLOBIGNORE="kernel*:libc*"
+ set -- *.apk
+ if [ "$1" = '*.apk' ]; then
+ echo "No APK packages found"
+ fi
+ apk index --output APKINDEX.tar.gz "$@"
+ unset GLOBIGNORE
+)
--
2.25.1

View File

@@ -1,69 +0,0 @@
From 8e8b3e443a7f1d0644f43888c8683698f26d4d13 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sun, 25 Jul 2021 01:20:31 +0100
Subject: [PATCH 22/27] fstools: update to git HEAD
bad1835 fstools: add partname volume driver
19d7d93 libfstools: partname: several fixes
3c38f0c libfstools: fix build with glibc
d05ad93 libfstools: remove superflus include
964d1e3 partname: allow skipping existing 'rootfs_data' partition
c44b40b overlay: fix syncronizing typo
b5397a1 fstools: block: fix segfault on mount with no target
bd7cc8d block: use dynamically allocated target string
6d8450e blockd: use allocated strings instead of fixed buffers
d47909e libblkid-tiny: fix buffer overflow
67d2297 block: match device path instead of assuming /dev/%s
2aeba88 block: allow autofs and umount commands also on MTD/UBI
3d40a1b blockd: add missing #define _GNU_SOURCE
4d4dcfb blockd: detect mountpoint of /dev/mapper/*
2f42515 block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging
39558a1 blockd: also send ubus notification on mount hotplug
3386b6b blockd: fix trigger name
cdc9939 blockd: move to its own POSIX process group
59f7c11 blockd: create mountpoint parent folder if needed
9cc96af Revert "block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging"
06334ac Revert "blockd: detect mountpoint of /dev/mapper/*"
9ab3551 block: use /dev/dm-* instead of /dev/mapper/*
5114595 block: allow remove hotplug event to arrive at blockd
a846c6b blockd: fix length of timeout int passed to ioctl
1d681ca block: support umount device basename
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
package/system/fstools/Makefile | 6 +++---
package/system/fstools/files/blockd.init | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 2da508d541..b582a17bae 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=a485792d90c71cd4fb396ce97f42a57ee4d2a3d78e5f3fd0748270ffb14209e6
-PKG_SOURCE_DATE:=2021-01-04
-PKG_SOURCE_VERSION:=c53b18820756f6f32ad0782d3bf489422b7c4ad3
+PKG_MIRROR_HASH:=6a457b812166e04e2244ee1be92a4957666b5d1554315c0e18db1b30376cc617
+PKG_SOURCE_DATE:=2021-07-28
+PKG_SOURCE_VERSION:=cc63933faedd8d4fcdabb872cf4661ac04fe4ba2
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
diff --git a/package/system/fstools/files/blockd.init b/package/system/fstools/files/blockd.init
index a4ce57d40d..bdd8bbf622 100755
--- a/package/system/fstools/files/blockd.init
+++ b/package/system/fstools/files/blockd.init
@@ -16,6 +16,7 @@ reload_service() {
start_service() {
procd_open_instance
procd_set_param command "$PROG"
+ procd_set_param watch block
procd_set_param respawn
procd_close_instance
}
--
2.25.1

View File

@@ -1,40 +0,0 @@
From 873052b99d6597209957ec32898fa56324cf34a4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sat, 19 Jun 2021 14:45:11 -0700
Subject: [PATCH 23/27] tools/libressl: update to 3.3.3
Fix wrong FPIC variable usage. Fixes compilation under sparc64 host.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(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
--
2.25.1

File diff suppressed because it is too large Load Diff

View File

@@ -1,312 +0,0 @@
From bf98d3c1de524ca50cbc09f825a4b0648e353624 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 13 Aug 2021 08:47:11 +0200
Subject: [PATCH 25/27] apk: backport package
Signed-off-by: John Crispin <john@phrozen.org>
---
package/system/apk/Makefile | 93 +++++++++++++++++++
...vel@lists.alpinelinux.org-4a6a0840.rsa.pub | 9 ++
...vel@lists.alpinelinux.org-5243ef4b.rsa.pub | 9 ++
...vel@lists.alpinelinux.org-5261cecb.rsa.pub | 9 ++
package/system/apk/files/alpine-repositories | 3 +
.../apk/patches/000-Makefile-version.patch | 11 +++
.../patches/0001-remove-doc-generation.patch | 21 +++++
package/system/apk/patches/100-link.patch | 16 ++++
package/system/apk/patches/100-phtread.patch | 12 +++
...ude-limits.h-to-fix-build-with-glibc.patch | 20 ++++
package/system/apk/test.sh | 9 ++
11 files changed, 212 insertions(+)
create mode 100644 package/system/apk/Makefile
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
create mode 100644 package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
create mode 100644 package/system/apk/files/alpine-repositories
create mode 100644 package/system/apk/patches/000-Makefile-version.patch
create mode 100644 package/system/apk/patches/0001-remove-doc-generation.patch
create mode 100644 package/system/apk/patches/100-link.patch
create mode 100644 package/system/apk/patches/100-phtread.patch
create mode 100644 package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
create mode 100644 package/system/apk/test.sh
diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
new file mode 100644
index 0000000000..335f50c155
--- /dev/null
+++ b/package/system/apk/Makefile
@@ -0,0 +1,93 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=apk
+PKG_VERSION:=3.0.0_pre0
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.alpinelinux.org/apk-tools.git
+PKG_SOURCE_DATE:=2021-08-17
+PKG_SOURCE_VERSION:=a46043bcc4cc15b456ef1eac5c5f9d93bd905d53
+PKG_MIRROR_HASH:=e16fd04b18043e78a177acd8c6958fa03fd1484b62c879c2dd0bed8ce9c50625
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR)
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_RELEASE:=r$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))-$(AUTORELEASE)
+
+PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+HOST_BUILD_DEPENDS:=lua/host lua-lzlib/host
+PKG_BUILD_DEPENDS:=$(HOST_BUILD_DEPENDS)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/apk
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=apk package manager
+ DEPENDS:=+liblua +libopenssl +zlib @!arc
+ URL:=$(PKG_SOURCE_URL)
+endef
+
+define Package/alpine-keys
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Alpine apk public signing keys
+ DEPENDS:=apk
+endef
+
+define Package/alpine-repositories
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Official Alpine repositories
+ DEPENDS:=apk
+endef
+
+MAKE_FLAGS += \
+ LUA=$(STAGING_DIR_HOSTPKG)/bin/lua \
+ LUA_VERSION=5.1 \
+ LUA_PC=lua
+
+HOST_MAKE_FLAGS += \
+ LUA=$(STAGING_DIR_HOSTPKG)/bin/lua \
+ LUA_VERSION=5.1 \
+ DESTDIR=$(STAGING_DIR_HOSTPKG) \
+ SBINDIR=/bin \
+ PREFIX=
+
+HOST_LDFLAGS+=-Wl,-rpath=$(STAGING_DIR_HOSTPKG)/lib -lpthread
+
+define Package/apk/install
+ $(INSTALL_DIR) $(1)/lib/apk/db
+
+ $(INSTALL_DIR) $(1)/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/apk $(1)/bin/apk
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/lib/*.so.* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/etc/apk/
+ echo $(ARCH) > $(1)/etc/apk/arch
+ touch $(1)/etc/apk/world
+endef
+
+define Package/alpine-keys/install
+ $(INSTALL_DIR) $(1)/etc/apk/keys
+ $(INSTALL_DATA) ./files/alpine-keys/* $(1)/etc/apk/keys
+endef
+
+define Package/alpine-repositories/install
+ $(INSTALL_DIR) $(1)/etc/apk/keys
+ $(INSTALL_DATA) ./files/alpine-repositories $(1)/etc/apk/repositories
+endef
+
+$(eval $(call BuildPackage,apk))
+$(eval $(call BuildPackage,alpine-keys))
+$(eval $(call BuildPackage,alpine-repositories))
+$(eval $(call HostBuild))
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
new file mode 100644
index 0000000000..bb4bdc80fd
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe
+qxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O
+Q0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA
+jixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R
+L5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo
+GuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B
+ywIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
new file mode 100644
index 0000000000..6cbfad7441
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+
+mTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6oy
+DO0W7c44uHKCFGFqBhDasdI4RCYP+fcIX/lyMh6MLbOxqS22TwSLhCVjTyJeeH7K
+aA7vqk+QSsF4TGbYzQDDpg7+6aAcNzg6InNePaywA6hbT0JXbxnDWsB+2/LLSF2G
+mnhJlJrWB1WGjkz23ONIWk85W4S0XB/ewDefd4Ly/zyIciastA7Zqnh7p3Ody6Q0
+sS2MJzo7p3os1smGjUF158s6m/JbVh4DN6YIsxwl2OjDOz9R0OycfJSDaBVIGZzg
+cQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
new file mode 100644
index 0000000000..83f0658e9c
--- /dev/null
+++ b/package/system/apk/files/alpine-keys/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0
+cGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX
+yHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j
+g01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB
+Ca1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY
+sWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw
+wwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/package/system/apk/files/alpine-repositories b/package/system/apk/files/alpine-repositories
new file mode 100644
index 0000000000..5babbb23b4
--- /dev/null
+++ b/package/system/apk/files/alpine-repositories
@@ -0,0 +1,3 @@
+https://dl-cdn.alpinelinux.org/alpine/edge/main
+https://dl-cdn.alpinelinux.org/alpine/edge/community
+
diff --git a/package/system/apk/patches/000-Makefile-version.patch b/package/system/apk/patches/000-Makefile-version.patch
new file mode 100644
index 0000000000..2e7f5b0f15
--- /dev/null
+++ b/package/system/apk/patches/000-Makefile-version.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@
+ -include config.mk
+
+ PACKAGE := apk-tools
+-VERSION := 2.12.0
++VERSION := 3.0.0_pre0
+
+ export VERSION
+
diff --git a/package/system/apk/patches/0001-remove-doc-generation.patch b/package/system/apk/patches/0001-remove-doc-generation.patch
new file mode 100644
index 0000000000..dee05c56f2
--- /dev/null
+++ b/package/system/apk/patches/0001-remove-doc-generation.patch
@@ -0,0 +1,21 @@
+From b05a93c48fdbb50f0c464310dc2ce45777d32ea2 Mon Sep 17 00:00:00 2001
+From: Paul Spooren <mail@aparcar.org>
+Date: Fri, 2 Oct 2020 14:08:52 -1000
+Subject: [PATCH] remove doc generation
+
+Signed-off-by: Paul Spooren <mail@aparcar.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ export DESTDIR SBINDIR LIBDIR CONFDIR MA
+ ##
+ # Top-level subdirs
+
+-subdirs := libfetch/ src/ doc/
++subdirs := libfetch/ src/
+
+ ##
+ # Include all rules and stuff
diff --git a/package/system/apk/patches/100-link.patch b/package/system/apk/patches/100-link.patch
new file mode 100644
index 0000000000..9cae2787d9
--- /dev/null
+++ b/package/system/apk/patches/100-link.patch
@@ -0,0 +1,16 @@
+diff -urN apk-2021-08-17-a46043bc.orig/src/Makefile apk-2021-08-17-a46043bc/src/Makefile
+--- apk-2021-08-17-a46043bc.orig/src/Makefile 2021-08-17 14:21:04.117760513 +0200
++++ apk-2021-08-17-a46043bc/src/Makefile 2021-08-17 14:21:16.653830180 +0200
+@@ -65,7 +65,11 @@
+ app_convdb.o app_convndx.o app_del.o app_dot.o app_extract.o app_fetch.o \
+ app_fix.o app_index.o app_info.o app_list.o app_manifest.o app_mkndx.o \
+ app_mkpkg.o app_policy.o app_update.o app_upgrade.o app_search.o \
+- app_stats.o app_verify.o app_version.o app_vertest.o applet.o
++ app_stats.o app_verify.o app_version.o app_vertest.o applet.o \
++ adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
++ atom.o blob.o commit.o common.o context.o crypto_openssl.o database.o hash.o \
++ extract.o extract_v2.o extract_v3.o io.o io_gunzip.o io_url.o tar.o \
++ package.o pathbuilder.o print.o solver.o trust.o version.o
+
+ ifeq ($(ADB),y)
+ libapk.so.$(libapk_soname)-objs += apk_adb.o
diff --git a/package/system/apk/patches/100-phtread.patch b/package/system/apk/patches/100-phtread.patch
new file mode 100644
index 0000000000..c252e14dc1
--- /dev/null
+++ b/package/system/apk/patches/100-phtread.patch
@@ -0,0 +1,12 @@
+diff -urN apk-2021-07-23-3d203e8f.orig/src/Makefile apk-2021-07-23-3d203e8f/src/Makefile
+--- apk-2021-07-23-3d203e8f.orig/src/Makefile 2021-07-25 12:55:05.576564663 +0200
++++ apk-2021-07-23-3d203e8f/src/Makefile 2021-07-25 12:55:48.660862181 +0200
+@@ -87,7 +87,7 @@
+ apk.static-libs := $(apk-static-libs)
+ LDFLAGS_apk.static := -static
+ LIBS_apk.static := -Wl,--as-needed -ldl -Wl,--no-as-needed
+-LDFLAGS_apk += -L$(obj)
++LDFLAGS_apk += -L$(obj) -pthread
+ LDFLAGS_apk-test += -L$(obj)
+
+ CFLAGS_ALL += $(OPENSSL_CFLAGS) $(ZLIB_CFLAGS)
diff --git a/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch b/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
new file mode 100644
index 0000000000..43ec7d5f1a
--- /dev/null
+++ b/package/system/apk/patches/100-tar-include-limits.h-to-fix-build-with-glibc.patch
@@ -0,0 +1,20 @@
+From c72ea983e287ec1d8b1f2b3aab1bf40aa7a30b03 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Wed, 4 Aug 2021 21:37:40 +0100
+Subject: [PATCH] tar: include <limits.h> to fix build with glibc
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ src/tar.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -9,6 +9,7 @@
+
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
++#include <limits.h> /* for SSIZE_MAX with glibc */
+
+ #include "apk_defines.h"
+ #include "apk_tar.h"
diff --git a/package/system/apk/test.sh b/package/system/apk/test.sh
new file mode 100644
index 0000000000..814777fd70
--- /dev/null
+++ b/package/system/apk/test.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case "$1" in
+ "apk")
+ apk --version | grep "${2/-r*/}"
+ ;;
+ *)
+ return 0;
+esac
--
2.25.1

View File

@@ -1,104 +0,0 @@
From ec862d472fca676cc04ce71b640e880ecefdd477 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 13 Aug 2021 08:48:02 +0200
Subject: [PATCH 26/27] lua-lzlib: backport package
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/lua-lzlib/Makefile | 64 +++++++++++++++++++
.../patches/001-allow_optim_flags.patch | 12 ++++
2 files changed, 76 insertions(+)
create mode 100644 package/libs/lua-lzlib/Makefile
create mode 100644 package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
diff --git a/package/libs/lua-lzlib/Makefile b/package/libs/lua-lzlib/Makefile
new file mode 100644
index 0000000000..5e0a16b135
--- /dev/null
+++ b/package/libs/lua-lzlib/Makefile
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-lzlib
+PKG_VERSION:=0.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MIRROR_HASH:=b6ef5e3f04b7f2137b39931a175ee802489a2486e70537770919bcccca10e723
+PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+HOST_BUILD_DEPENDS:=lua/host
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/lua-lzlib
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Lua zlib binding
+ URL:=http://github.com/LuaDist/lzlib
+ DEPENDS:= +lua +zlib
+endef
+
+define Package/lua-lzlib/description
+ A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package.
+endef
+
+MAKE_FLAGS += \
+ LUA="$(STAGING_DIR)/usr" \
+ OFLAGS="$(TARGET_CFLAGS)" \
+
+HOST_MAKE_FLAGS += \
+ LUA="$(STAGING_DIR_HOSTPKG)" \
+ OFLAGS="$(HOST_CFLAGS)" \
+
+define Package/lua-lzlib/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/
+
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/zlib.so $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+
+ $(INSTALL_DATA) $(HOST_BUILD_DIR)/gzip.lua $(STAGING_DIR_HOSTPKG)/lib/lua/5.1
+endef
+
+$(eval $(call BuildPackage,lua-lzlib))
+$(eval $(call HostBuild))
diff --git a/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch b/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
new file mode 100644
index 0000000000..78f981d237
--- /dev/null
+++ b/package/libs/lua-lzlib/patches/001-allow_optim_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin
+ ZLIB=../zlib-1.2.3
+
+ # no need to change anything below here
+-CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC
++CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC
++OFLAGS= -O0
+ WARN= -g -Werror -Wall -pedantic #-ansi
+ INCS= -I$(LUAINC) -I$(ZLIB)
+ LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51
--
2.25.1

View File

@@ -1,35 +0,0 @@
From 5fc717aa60b36934892d6d77c0637fc53aa7f761 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 10 Jul 2021 20:21:26 +0100
Subject: [PATCH 27/27] lua: make it easier to detect host-built Lua
Install pkg-config file also for host-build, clean up Lua symlinks.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 315f52e0f3bfa3d65ad14ca21a696c6d31c4edcd)
---
package/utils/lua/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index d262d1e1fc..e15142d8d2 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -134,8 +134,12 @@ define Host/Install
INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \
install
- $(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
- $(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/pkgconfig
+ $(CP) $(HOST_BUILD_DIR)/etc/lua.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua5.1.pc
+
+ $(LN) lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
+ $(LN) luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+ $(LN) lua5.1.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua.pc
endef
define Build/InstallDev
--
2.25.1

View File

@@ -1,44 +0,0 @@
From bd346c1fa7f205b10f1aa8f1f4e4e89c3a80c13d Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 26 May 2022 09:01:48 +0200
Subject: [PATCH 1/4] libnl-tiny: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/libnl-tiny/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index bdb496c48e..48df6a4c8c 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libnl-tiny
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
-PKG_SOURCE_DATE:=2020-08-05
-PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
-PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
+PKG_SOURCE_DATE:=2022-05-17
+PKG_SOURCE_VERSION:=b5b2ba09c4f1c8b3c21580aea7223edc2f5e92be
+PKG_MIRROR_HASH:=b957d56aa8c2e7b55184111be69eb8dea734f1feba19e670a91f302459a48a78
CMAKE_INSTALL:=1
PKG_LICENSE:=LGPL-2.1
@@ -27,7 +27,7 @@ define Package/libnl-tiny
SECTION:=libs
CATEGORY:=Libraries
TITLE:=netlink socket library
- ABI_VERSION:=1
+ ABI_VERSION:=$(PKG_SOURCE_DATE)
endef
define Package/libnl-tiny/description
--
2.25.1

View File

@@ -1,35 +0,0 @@
From d4e24006e05474b6dbe582f7c56a505cc0c45e81 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 1 Nov 2021 11:59:41 +0100
Subject: [PATCH] ubus: update to the latest version
b743a331421d ubusd: log ACL init errors
2099bb3ad997 libubus: use list_empty/list_first_entry in ubus_process_pending_msg
ef038488edc3 libubus: process pending messages in data handler if stack depth is 0
a72457b61df0 libubus: increase stack depth for processing obj msgs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
package/system/ubus/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 8a3fd1de7b..d5f86b6850 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
-PKG_SOURCE_DATE:=2021-06-30
-PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044
-PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8
+PKG_SOURCE_DATE:=2021-08-09
+PKG_SOURCE_VERSION:=a72457b61df045d3c499a6211362b751710590d7
+PKG_MIRROR_HASH:=ac617577bcb2ff3dbc3039ad67200afcce910840223a2de15977d3224e6557fd
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
CMAKE_INSTALL:=1
--
2.25.1

View File

@@ -1,34 +0,0 @@
From 49ceb8a8d7009e5c81599c68b8aacc16d17d2e62 Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Tue, 9 Nov 2021 17:20:41 +0100
Subject: [PATCH] rpcd: bump to git HEAD
20bf958 session: use uloop_timeout_remaining64
d11ffe9 session: use blobmsg_get_u64 for RPC_DUMP_EXPIRES
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
package/system/rpcd/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 0896a7dada..af788dcfaa 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -12,10 +12,10 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_SOURCE_DATE:=2021-03-11
-PKG_SOURCE_VERSION:=ccb75178cf6a726896729c6904bd623636aa0b29
+PKG_MIRROR_HASH:=98071b4a1ce983a0e738d7e4a2f6e52b7f6db19f99510ddef430093314134ca4
+PKG_SOURCE_DATE:=2021-11-04
+PKG_SOURCE_VERSION:=d11ffe9383ae0ec34836421926364b24c1d891ca
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_MIRROR_HASH:=87b1839275c209f9767057d6da5272cae973a064767fa28f380a37fb65e2e643
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=
--
2.25.1

View File

@@ -1,66 +0,0 @@
From 9bede53698b963280df8b7c3c85c052e66e9d548 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 17 Feb 2022 08:27:09 +0100
Subject: [PATCH] net: bridge: clear bridge's private skb space on xmit
We need to clear all of the bridge private skb variables as they can be
stale due to the packet being recirculated through the stack and then
transmitted through the bridge device. Similar memset is already done on
bridge's input. We've seen cases where proxyarp_replied was 1 on routed
multicast packets transmitted through the bridge to ports with neigh
suppress which were getting dropped. Same thing can in theory happen with
the port isolation bit as well.
Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
...r-bridge-s-private-skb-space-on-xmit.patch | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
diff --git a/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch b/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
new file mode 100644
index 0000000000..20f71569da
--- /dev/null
+++ b/target/linux/generic/backport-5.4/999-net-bridge-clear-bridge-s-private-skb-space-on-xmit.patch
@@ -0,0 +1,36 @@
+From fd65e5a95d08389444e8591a20538b3edece0e15 Mon Sep 17 00:00:00 2001
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Date: Fri, 31 Jul 2020 19:26:16 +0300
+Subject: [PATCH] net: bridge: clear bridge's private skb space on xmit
+
+We need to clear all of the bridge private skb variables as they can be
+stale due to the packet being recirculated through the stack and then
+transmitted through the bridge device. Similar memset is already done on
+bridge's input. We've seen cases where proxyarp_replied was 1 on routed
+multicast packets transmitted through the bridge to ports with neigh
+suppress which were getting dropped. Same thing can in theory happen with
+the port isolation bit as well.
+
+Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood")
+Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ net/bridge/br_device.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
+index 8c7b78f8bc23..9a2fb4aa1a10 100644
+--- a/net/bridge/br_device.c
++++ b/net/bridge/br_device.c
+@@ -36,6 +36,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
+ const unsigned char *dest;
+ u16 vid = 0;
+
++ memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
++
+ rcu_read_lock();
+ nf_ops = rcu_dereference(nf_br_ops);
+ if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) {
+--
+2.25.1
+
--
2.25.1

View File

@@ -1,30 +0,0 @@
From a3598bcbc83224faf0d2ecb55761d048a1beb6d1 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 10 Dec 2021 10:16:18 +0100
Subject: [PATCH] netifd: on dhcp interfaces, store the dhcp server in
interface data
Among other things, this can be used to auto-configure the DHCP server
address for wireless APs using FILS, if the bridged interface is
configured to DHCP
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
package/network/config/netifd/files/lib/netifd/dhcp.script | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index e46005d84c..6fcf139beb 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -60,6 +60,7 @@ setup_interface () {
[ -n "$message" ] && json_add_string message "$message"
[ -n "$timezone" ] && json_add_int timezone "$timezone"
[ -n "$lease" ] && json_add_int leasetime "$lease"
+ [ -n "$serverid" ] && json_add_string dhcpserver "$serverid"
proto_close_data
proto_send_update "$INTERFACE"
--
2.25.1

View File

@@ -1,66 +0,0 @@
From 574539ee2cdbb3dd54086423c6dfdd19bb1c06a6 Mon Sep 17 00:00:00 2001
From: David Bauer <mail@david-bauer.net>
Date: Thu, 16 Jun 2022 01:55:26 +0200
Subject: [PATCH] hostapd: add owe_transition_ifname
Add the owe_transition_ifname config option to wifi-ifaces.
This allows to configure OWE transition VAPs without adding SSID / BSSID
to the uci conifg but instead autodiscovering these parameters from
other networks on the same PHY.
The following configuration creates a OWE transition mode network
constellation.
config wifi-iface 'open0'
option device 'radio0'
option ifname 'open0'
option network 'lan'
option mode 'ap'
option ssid 'FreeNet'
option encryption 'none'
option owe_transition_ifname 'owe0'
config wifi-iface 'owe0'
option device 'radio0'
option ifname 'owe0'
option network 'lan'
option mode 'ap'
option ssid 'owe_tm.FreeNet'
option encryption 'owe'
option hidden '1'
option owe_transition_ifname 'open0'
Signed-off-by: David Bauer <mail@david-bauer.net>
---
package/network/services/hostapd/files/hostapd.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index e5f816a55b..fa344bd2dd 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -335,6 +335,7 @@ hostapd_common_add_bss_config() {
config_add_int sae_pwe
config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string'
+ config_add_string owe_transition_ifname
config_add_boolean iw_enabled iw_internet iw_asra iw_esr iw_uesa
config_add_int iw_access_network_type iw_venue_group iw_venue_type
@@ -635,10 +636,11 @@ hostapd_set_bss_options() {
case "$auth_type" in
none|owe)
- json_get_vars owe_transition_bssid owe_transition_ssid
+ json_get_vars owe_transition_bssid owe_transition_ssid owe_transition_ifname
[ -n "$owe_transition_ssid" ] && append bss_conf "owe_transition_ssid=\"$owe_transition_ssid\"" "$N"
[ -n "$owe_transition_bssid" ] && append bss_conf "owe_transition_bssid=$owe_transition_bssid" "$N"
+ [ -n "$owe_transition_ifname" ] && append bss_conf "owe_transition_ifname=$owe_transition_ifname" "$N"
wps_possible=1
# Here we make the assumption that if we're in open mode
--
2.25.1

View File

@@ -1,271 +0,0 @@
From a613510bc023dfbf838a2127c94644a56252efcd Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 11 Jul 2022 13:49:14 +0200
Subject: [PATCH] bpftools: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
...pc-fix-EDEADLOCK-redefinition-errors.patch | 56 ------------
package/{network => }/utils/bpftools/Makefile | 86 ++++++++-----------
.../utils/bpftools/patches/001-cflags.patch | 10 +++
.../utils/bpftools/patches/002-includes.patch | 26 ++++++
4 files changed, 70 insertions(+), 108 deletions(-)
delete mode 100644 package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch
rename package/{network => }/utils/bpftools/Makefile (60%)
create mode 100644 package/utils/bpftools/patches/001-cflags.patch
create mode 100644 package/utils/bpftools/patches/002-includes.patch
diff --git a/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch b/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch
deleted file mode 100644
index 66c00a325f..0000000000
--- a/package/network/utils/bpftools/patches/005-tools-arch-powerpc-fix-EDEADLOCK-redefinition-errors.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From afe3f4c765b17ced23811fe652c7f7adf7a0c0cf Mon Sep 17 00:00:00 2001
-From: Tony Ambardar <Tony.Ambardar@gmail.com>
-Date: Mon, 14 Sep 2020 23:05:26 -0700
-Subject: [PATCH] tools/arch/powerpc: fix EDEADLOCK redefinition errors in
- errno.h
-
-A few archs like powerpc have different errno.h values for macros
-EDEADLOCK and EDEADLK. In code including both libc and linux versions of
-errno.h, this can result in multiple definitions of EDEADLOCK in the
-include chain. Definitions to the same value (e.g. seen with mips) do
-not raise warnings, but on powerpc there are redefinitions changing the
-value, which raise warnings and errors (with "-Werror").
-
-Guard against these redefinitions to avoid build errors like the following,
-first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with
-musl 1.1.24:
-
- In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5,
- from ../../include/linux/err.h:8,
- from libbpf.c:29:
- ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror]
- #define EDEADLOCK EDEADLK
-
- In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10,
- from libbpf.c:26:
- toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition
- #define EDEADLOCK 58
-
- cc1: all warnings being treated as errors
- make[5]: *** [target-powerpc_8540_musl/bpftools-5.8.9/tools/build/Makefile.build:97: /home/kodidev/openwrt-project/build_dir/target-powerpc_8540_musl/bpftools-minimal/bpftools-5.8.9//libbpf/staticobjs/libbpf.o] Error 1
-
-Fixes: 95f28190aa01 ("tools include arch: Grab a copy of errno.h for arch's
- supported by perf")
-Fixes: c3617f72036c ("UAPI: (Scripted) Disintegrate arch/powerpc/include/asm")
-
-Reported-by: Rosen Penev <rosenp@gmail.com>
-Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
----
- tools/arch/powerpc/include/uapi/asm/errno.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tools/arch/powerpc/include/uapi/asm/errno.h b/tools/arch/powerpc/include/uapi/asm/errno.h
-index cc79856896a1..4ba87de32be0 100644
---- a/tools/arch/powerpc/include/uapi/asm/errno.h
-+++ b/tools/arch/powerpc/include/uapi/asm/errno.h
-@@ -2,6 +2,7 @@
- #ifndef _ASM_POWERPC_ERRNO_H
- #define _ASM_POWERPC_ERRNO_H
-
-+#undef EDEADLOCK
- #include <asm-generic/errno.h>
-
- #undef EDEADLOCK
---
-2.25.1
-
diff --git a/package/network/utils/bpftools/Makefile b/package/utils/bpftools/Makefile
similarity index 60%
rename from package/network/utils/bpftools/Makefile
rename to package/utils/bpftools/Makefile
index 82eb34e2dc..56422e7902 100644
--- a/package/network/utils/bpftools/Makefile
+++ b/package/utils/bpftools/Makefile
@@ -8,12 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bpftools
-PKG_VERSION:=5.10.10
-PKG_RELEASE:=2
+PKG_RELEASE:=1
-PKG_SOURCE:=linux-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/v5.x
-PKG_HASH:=60ed866fa951522a5255ea37ec3ac2006d3f3427d4783a13ef478464f37cdb19
+PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2022-03-08
+PKG_SOURCE_VERSION:=04c465fd1f561f67796dc68bbfe1aa7cfa956c3c
+PKG_MIRROR_HASH:=e22a954cd186f43228a96586bbdc120b11e6c87360ab88ae96ba37afb9c7cb58
+PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
@@ -21,16 +23,6 @@ PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-LINUX_VERSION:=$(PKG_VERSION)
-LINUX_TLD:=linux-$(LINUX_VERSION)
-
-BPF_FILES:= \
- kernel/bpf scripts tools/Makefile tools/bpf tools/perf/perf-sys.h \
- tools/arch tools/build tools/include tools/lib tools/scripts
-TAR_OPTIONS+= \
- --transform="s;$(LINUX_TLD)/;$(PKG_NAME)-$(PKG_VERSION)/;" \
- $(addprefix $(LINUX_TLD)/,$(BPF_FILES))
-
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
@@ -77,7 +69,7 @@ define Package/libbpf
TITLE:=libbpf - eBPF helper library
VARIANT:=lib
LICENSE:=LGPL-2.1 OR BSD-2-Clause
- ABI_VERSION:=0
+ ABI_VERSION:=$(PKG_ABI_VERSION)
URL:=http://www.kernel.org
DEPENDS:=+libelf
endef
@@ -93,53 +85,43 @@ ifneq ($(BUILD_VARIANT),lib)
TARGET_LDFLAGS += -Wl,--gc-sections
endif
-MAKE_FLAGS += \
+ifeq ($(BUILD_VARIANT),full)
+ full:=1
+else
+ full:=0
+endif
+
+MAKE_VARS = \
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- BPFTOOL_VERSION="$(LINUX_VERSION)" \
- FEATURES_DUMP="$(PKG_BUILD_DIR)/FEATURE-DUMP.openwrt" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+MAKE_FLAGS += \
OUTPUT="$(PKG_BUILD_DIR)/" \
prefix="/usr" \
- $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
+ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
+ LIBSUBDIR=lib \
+ check_feat=0 \
+ feature-clang-bpf-co-re=0 \
+ feature-reallocarray=1 \
+ feature-zlib=1 \
+ feature-libbfd=$(full) \
+ feature-libcap=0 \
+ feature-disassembler-four-args=$(full)
-ifeq ($(BUILD_VARIANT),full)
- HAVE_LIBBFD:=1
- HAVE_LIBCAP:=0
- HAVE_CLANG:=0
- MAKE_PATH:=tools/bpf/bpftool
-else ifeq ($(BUILD_VARIANT),minimal)
- HAVE_LIBBFD:=0
- HAVE_LIBCAP:=0
- HAVE_CLANG:=0
- MAKE_PATH:=tools/bpf/bpftool
-else ifeq ($(BUILD_VARIANT),lib)
- HAVE_LIBBFD:=0
- HAVE_LIBCAP:=0
- HAVE_CLANG:=0
- MAKE_PATH:=tools/lib/bpf
+ifeq ($(BUILD_VARIANT),lib)
+ MAKE_PATH = libbpf/src
+else
+ MAKE_PATH = src
endif
-# Perform a "throw-away" make to create a FEATURE-DUMP.* file to edit later.
-# The "//" in the make target is actually needed, very unPOSIXly.
-define Build/Configure
- +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/tools/bpf/bpftool \
- $(MAKE_FLAGS) FEATURES_DUMP= $(PKG_BUILD_DIR)//libbpf/libbpf.a
- (cd $(PKG_BUILD_DIR); cat FEATURE-DUMP.bpftool libbpf/FEATURE-DUMP.libbpf \
- | sort | uniq > FEATURE-DUMP.openwrt)
- $(SED) 's/feature-libbfd=1/feature-libbfd=$(HAVE_LIBBFD)/' \
- -e 's/feature-libcap=1/feature-libcap=$(HAVE_LIBCAP)/' \
- -e 's/feature-clang-bpf-global-var=1/feature-clang-bpf-global-var=$(HAVE_CLANG)/' \
- $(PKG_BUILD_DIR)/FEATURE-DUMP.openwrt
-endef
-
define Build/InstallDev/libbpf
$(INSTALL_DIR) $(1)/usr/include/bpf
$(CP) $(PKG_INSTALL_DIR)/usr/include/bpf/*.h $(1)/usr/include/bpf/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/libbpf.{a,so*} \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbpf.{a,so*} \
$(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/pkgconfig/libbpf.pc \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libbpf.pc \
$(1)/usr/lib/pkgconfig/
$(SED) 's,/usr/include,$$$${prefix}/include,g' \
$(1)/usr/lib/pkgconfig/libbpf.pc
@@ -159,7 +141,7 @@ endef
define Package/libbpf/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/libbpf.so.* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbpf.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libbpf))
diff --git a/package/utils/bpftools/patches/001-cflags.patch b/package/utils/bpftools/patches/001-cflags.patch
new file mode 100644
index 0000000000..48617e302b
--- /dev/null
+++ b/package/utils/bpftools/patches/001-cflags.patch
@@ -0,0 +1,10 @@
+--- a/libbpf/src/Makefile
++++ b/libbpf/src/Makefile
+@@ -25,6 +25,7 @@ ALL_CFLAGS := $(INCLUDES)
+
+ SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
+
++CFLAGS = $(EXTRA_CFLAGS)
+ CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
+ ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ ALL_LDFLAGS += $(LDFLAGS)
diff --git a/package/utils/bpftools/patches/002-includes.patch b/package/utils/bpftools/patches/002-includes.patch
new file mode 100644
index 0000000000..589d71c31e
--- /dev/null
+++ b/package/utils/bpftools/patches/002-includes.patch
@@ -0,0 +1,26 @@
+--- a/libbpf/include/linux/list.h
++++ b/libbpf/include/linux/list.h
+@@ -3,6 +3,8 @@
+ #ifndef __LINUX_LIST_H
+ #define __LINUX_LIST_H
+
++#include <linux/types.h>
++
+ #define LIST_HEAD_INIT(name) { &(name), &(name) }
+ #define LIST_HEAD(name) \
+ struct list_head name = LIST_HEAD_INIT(name)
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p
+ CFLAGS += $(filter-out -Wswitch-enum -Wnested-externs,$(EXTRA_WARNINGS))
+ CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
+ -I$(if $(OUTPUT),$(OUTPUT),.) \
+- -I$(LIBBPF_INCLUDE) \
+ -I$(srctree)/src/kernel/bpf/ \
+ -I$(srctree)/include \
+- -I$(srctree)/include/uapi
++ -I$(srctree)/include/uapi \
++ -I$(LIBBPF_INCLUDE)
+ ifneq ($(BPFTOOL_VERSION),)
+ CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"'
+ endif
--
2.25.1

View File

@@ -1,779 +0,0 @@
From 5cd97adeb33f5fc92ad1ff319b4ba34535c0a65b Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 23 Aug 2022 08:59:23 +0200
Subject: [PATCH] openssl: backport from 22.06-rc3
Signed-off-by: John Crispin <john@phrozen.org>
---
include/openssl-engine.mk | 50 +++++++++++
package/libs/openssl/Config.in | 11 ---
package/libs/openssl/Makefile | 64 ++++++--------
package/libs/openssl/files/afalg.cnf | 3 +
package/libs/openssl/files/devcrypto.cnf | 31 +++++++
package/libs/openssl/files/openssl.init | 31 +++++++
package/libs/openssl/files/padlock.cnf | 3 +
...m-ppc-xlate.pl-add-linux64v2-flavour.patch | 56 +++++++++++++
.../patches/100-Configure-afalg-support.patch | 5 +-
.../openssl/patches/110-openwrt_targets.patch | 9 +-
.../120-strip-cflags-from-binary.patch | 3 +-
.../patches/130-dont-build-tests-fuzz.patch | 3 +-
.../patches/140-allow-prefer-chacha20.patch | 4 +-
.../150-openssl.cnf-add-engines-conf.patch | 83 ++++---------------
...o-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch | 3 +-
...ypto-add-command-to-dump-driver-info.patch | 3 +-
...o-make-the-dev-crypto-engine-dynamic.patch | 12 +--
...default-to-not-use-digests-in-engine.patch | 1 -
...to-ignore-error-when-closing-session.patch | 1 -
19 files changed, 232 insertions(+), 144 deletions(-)
create mode 100644 include/openssl-engine.mk
create mode 100644 package/libs/openssl/files/afalg.cnf
create mode 100644 package/libs/openssl/files/devcrypto.cnf
create mode 100755 package/libs/openssl/files/openssl.init
create mode 100644 package/libs/openssl/files/padlock.cnf
create mode 100644 package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch
diff --git a/include/openssl-engine.mk b/include/openssl-engine.mk
new file mode 100644
index 0000000000..d8baba482e
--- /dev/null
+++ b/include/openssl-engine.mk
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2022 Enéas Ulir de Queiroz
+
+ENGINES_DIR=engines-1.1
+
+define Package/openssl/engine/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ SUBMENU:=SSL
+ DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf
+endef
+
+# 1 = engine name
+# 2 - package name, defaults to libopenssl-$(1)
+define Package/openssl/add-engine
+ OSSL_ENG_PKG:=$(if $(2),$(2),libopenssl-$(1))
+ Package/$$(OSSL_ENG_PKG)/conffiles:=/etc/ssl/engines.cnf.d/$(1).cnf
+
+ define Package/$$(OSSL_ENG_PKG)/install
+ $$(INSTALL_DIR) $$(1)/usr/lib/$(ENGINES_DIR)
+ $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/$(1).so \
+ $$(1)/usr/lib/$(ENGINES_DIR)
+ $$(INSTALL_DIR) $$(1)/etc/ssl/engines.cnf.d
+ $$(INSTALL_DATA) ./files/$(1).cnf $$(1)/etc/ssl/engines.cnf.d/
+ endef
+
+ define Package/$$(OSSL_ENG_PKG)/postinst :=
+#!/bin/sh
+OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl"
+
+[ -z "$$$${IPKG_INSTROOT}" ] && uci -q get openssl.$(1) >/dev/null && exit 0
+
+cat << EOF >> "$$$${OPENSSL_UCI}"
+
+config engine '$(1)'
+ option enabled '1'
+EOF
+
+[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload
+ endef
+
+ define Package/$$(OSSL_ENG_PKG)/postrm :=
+#!/bin/sh
+[ -n "$$$${IPKG_INSTROOT}" ] && exit 0
+uci delete openssl.$(1)
+uci commit openssl
+/etc/init.d/openssl reload
+ endef
+endef
diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index d1281ec6fa..bc2f0584b6 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -293,15 +293,4 @@ config OPENSSL_WITH_ASYNC
initiate crypto operations asynchronously. In order to work
this will require the presence of an async capable engine.
-config OPENSSL_WITH_GOST
- bool
- prompt "Prepare library for GOST engine"
- depends on OPENSSL_ENGINE
- help
- This option prepares the library to accept engine support
- for Russian GOST crypto algorithms.
- The gost engine is not included in standard openwrt feeds.
- To build such engine yourself, see:
- https://github.com/gost-engine/engine
-
endif
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 0397ab90c4..09bada3915 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,11 +9,10 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_BASE:=1.1.1
-PKG_BUGFIX:=l
+PKG_BUGFIX:=q
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=1
+PKG_RELEASE:=$(AUTORELEASE)
PKG_USE_MIPS16:=0
-ENGINES_DIR=engines-1.1
PKG_BUILD_PARALLEL:=1
@@ -26,7 +25,7 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/
-PKG_HASH:=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
+PKG_HASH:=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
PKG_LICENSE:=OpenSSL
PKG_LICENSE_FILES:=LICENSE
@@ -52,7 +51,6 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_WITH_DTLS \
CONFIG_OPENSSL_WITH_EC2M \
CONFIG_OPENSSL_WITH_ERROR_MESSAGES \
- CONFIG_OPENSSL_WITH_GOST \
CONFIG_OPENSSL_WITH_IDEA \
CONFIG_OPENSSL_WITH_MDC2 \
CONFIG_OPENSSL_WITH_NPN \
@@ -66,6 +64,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_WITH_WHIRLPOOL
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/openssl-engine.mk
ifneq ($(CONFIG_CCACHE),)
HOSTCC=$(HOSTCC_NOCACHE)
@@ -129,6 +128,8 @@ endef
define Package/libopenssl-conf/conffiles
/etc/ssl/openssl.cnf
+$(if CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO,/etc/ssl/engines.cnf.d/devcrypto.cnf)
+$(if CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK,/etc/ssl/engines.cnf.d/padlock.cnf)
endef
define Package/libopenssl-conf/description
@@ -136,51 +137,50 @@ $(call Package/openssl/Default/description)
This package installs the OpenSSL configuration file /etc/ssl/openssl.cnf.
endef
+$(eval $(call Package/openssl/add-engine,afalg))
define Package/libopenssl-afalg
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=AFALG hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO \
- +PACKAGE_libopenssl-afalg:kmod-crypto-user +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += @KERNEL_AIO +PACKAGE_libopenssl-afalg:kmod-crypto-user \
+ @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-afalg/description
This package adds an engine that enables hardware acceleration
through the AF_ALG kernel interface.
-To use it, you need to configure the engine in /etc/ssl/openssl.cnf
See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "afalg"
endef
+$(eval $(call Package/openssl/add-engine,devcrypto))
define Package/libopenssl-devcrypto
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=/dev/crypto hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE +PACKAGE_libopenssl-devcrypto:kmod-cryptodev +libopenssl-conf \
- @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += +PACKAGE_libopenssl-devcrypto:kmod-cryptodev @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-devcrypto/description
This package adds an engine that enables hardware acceleration
through the /dev/crypto kernel interface.
-To use it, you need to configure the engine in /etc/ssl/openssl.cnf
See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "devcrypto"
endef
+$(eval $(call Package/openssl/add-engine,padlock))
define Package/libopenssl-padlock
$(call Package/openssl/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE:=VIA Padlock hardware acceleration engine
- DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \
- +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN
+ DEPENDS += @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \
+ @!OPENSSL_ENGINE_BUILTIN
endef
define Package/libopenssl-padlock/description
This package adds an engine that enables VIA Padlock hardware acceleration.
-To use it, you need to configure it in /etc/ssl/openssl.cnf.
See https://www.openssl.org/docs/man1.1.1/man5/config.html#Engine-Configuration-Module
and https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
The engine_id is "padlock"
@@ -289,10 +289,6 @@ else
OPENSSL_OPTIONS += no-engine
endif
-ifndef CONFIG_OPENSSL_WITH_GOST
- OPENSSL_OPTIONS += no-gost
-endif
-
ifndef CONFIG_OPENSSL_WITH_DTLS
OPENSSL_OPTIONS += no-dtls
endif
@@ -381,8 +377,17 @@ define Package/libopenssl/install
endef
define Package/libopenssl-conf/install
- $(INSTALL_DIR) $(1)/etc/ssl
+ $(INSTALL_DIR) $(1)/etc/ssl/engines.cnf.d $(1)/etc/config $(1)/etc/init.d
$(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(1)/etc/ssl/
+ $(INSTALL_BIN) ./files/openssl.init $(1)/etc/init.d/openssl
+ $(SED) 's!%ENGINES_DIR%!/usr/lib/$(ENGINES_DIR)!' $(1)/etc/init.d/openssl
+ touch $(1)/etc/config/openssl
+ $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),
+ $(CP) ./files/devcrypto.cnf $(1)/etc/ssl/engines.cnf.d/
+ echo -e "config engine 'devcrypto'\n\toption enabled '1'" >> $(1)/etc/config/openssl)
+ $(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),
+ $(CP) ./files/padlock.cnf $(1)/etc/ssl/engines.cnf.d/
+ echo -e "\nconfig engine 'padlock'\n\toption enabled '1'" >> $(1)/etc/config/openssl)
endef
define Package/openssl-util/install
@@ -390,21 +395,6 @@ define Package/openssl-util/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/
endef
-define Package/libopenssl-afalg/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
-define Package/libopenssl-devcrypto/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/devcrypto.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
-define Package/libopenssl-padlock/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/*padlock.so $(1)/usr/lib/$(ENGINES_DIR)
-endef
-
$(eval $(call BuildPackage,libopenssl))
$(eval $(call BuildPackage,libopenssl-conf))
$(eval $(call BuildPackage,libopenssl-afalg))
diff --git a/package/libs/openssl/files/afalg.cnf b/package/libs/openssl/files/afalg.cnf
new file mode 100644
index 0000000000..4f573d757c
--- /dev/null
+++ b/package/libs/openssl/files/afalg.cnf
@@ -0,0 +1,3 @@
+[afalg]
+default_algorithms = ALL
+
diff --git a/package/libs/openssl/files/devcrypto.cnf b/package/libs/openssl/files/devcrypto.cnf
new file mode 100644
index 0000000000..549275600d
--- /dev/null
+++ b/package/libs/openssl/files/devcrypto.cnf
@@ -0,0 +1,31 @@
+[devcrypto]
+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
+default_algorithms = ALL
+
+# Configuration commands:
+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
+# list of supported algorithms, along with their driver, whether they
+# are hw accelerated or not, and the engine's configuration commands.
+
+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
+# if acceleration can't be determined) [default=2]
+#USE_SOFTDRIVERS = 2
+
+# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to
+# enable [default=ALL]
+# It is recommended to disable the ECB ciphers; in most cases, it will
+# only be used for PRNG, in small blocks, where performance is poor,
+# and there may be problems with apps forking with open crypto
+# contexts, leading to failures. The CBC ciphers work well:
+#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC
+
+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
+# enable [default=NONE]
+# It is strongly recommended not to enable digests; their performance
+# is poor, and there are many cases in which they will not work,
+# especially when calling fork with open crypto contexts. Openssh,
+# for example, does this, and you may not be able to login.
+#DIGESTS = NONE
+
+
diff --git a/package/libs/openssl/files/openssl.init b/package/libs/openssl/files/openssl.init
new file mode 100755
index 0000000000..21e253e7a5
--- /dev/null
+++ b/package/libs/openssl/files/openssl.init
@@ -0,0 +1,31 @@
+#!/bin/sh /etc/rc.common
+
+START=13
+ENGINES_CNF_D="/etc/ssl/engines.cnf.d"
+ENGINES_CNF="/var/etc/ssl/engines.cnf"
+ENGINES_DIR="%ENGINES_DIR%"
+
+config_engine() {
+ local enabled force
+ config_get_bool enabled "$1" enabled 1
+ config_get_bool force "$1" force 0
+ [ "$enabled" = 0 ] && return
+ if [ "$force" = 0 ] && \
+ [ ! -f "${ENGINES_CNF_D}/$1.cnf" ] && \
+ [ ! -f "${ENGINES_DIR}/$1.so" ]; then
+ echo Skipping engine "$1": not installed
+ return
+ fi
+ echo Enabling engine "$1"
+ echo "$1=$1" >> "${ENGINES_CNF}"
+}
+
+start() {
+ mkdir -p "$(dirname "${ENGINES_CNF}")" || exit 1
+ echo Generating engines.cnf
+ echo "# This file is automatically generated from /etc/config/openssl." \
+ > "${ENGINES_CNF}" || \
+ { echo Error writing ${ENGINES_CNF} >&2; exit 1; }
+ config_load openssl
+ config_foreach config_engine engine
+}
diff --git a/package/libs/openssl/files/padlock.cnf b/package/libs/openssl/files/padlock.cnf
new file mode 100644
index 0000000000..ef91079e5d
--- /dev/null
+++ b/package/libs/openssl/files/padlock.cnf
@@ -0,0 +1,3 @@
+[padlock]
+default_algorithms = ALL
+
diff --git a/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch
new file mode 100644
index 0000000000..e52a3d52ea
--- /dev/null
+++ b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch
@@ -0,0 +1,56 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Andy Polyakov <appro@openssl.org>
+Date: Sun, 5 May 2019 18:25:50 +0200
+Subject: crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is a big endian ELFv2 configuration. ELFv2 was already being
+used for little endian, and big endian was traditionally ELFv1
+but there are practical configurations that use ELFv2 with big
+endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.)
+
+Reviewed-by: Paul Dale <paul.dale@oracle.com>
+Reviewed-by: Richard Levitte <levitte@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/8883)
+
+diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl
+--- a/crypto/perlasm/ppc-xlate.pl
++++ b/crypto/perlasm/ppc-xlate.pl
+@@ -49,7 +49,7 @@ my $globl = sub {
+ /osx/ && do { $name = "_$name";
+ last;
+ };
+- /linux.*(32|64le)/
++ /linux.*(32|64(le|v2))/
+ && do { $ret .= ".globl $name";
+ if (!$$type) {
+ $ret .= "\n.type $name,\@function";
+@@ -80,7 +80,7 @@ my $globl = sub {
+ };
+ my $text = sub {
+ my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text";
+- $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/);
++ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/);
+ $ret;
+ };
+ my $machine = sub {
+@@ -186,7 +186,7 @@ my $vmr = sub {
+
+ # Some ABIs specify vrsave, special-purpose register #256, as reserved
+ # for system use.
+-my $no_vrsave = ($flavour =~ /aix|linux64le/);
++my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/);
+ my $mtspr = sub {
+ my ($f,$idx,$ra) = @_;
+ if ($idx == 256 && $no_vrsave) {
+@@ -318,7 +318,7 @@ while($line=<>) {
+ if ($label) {
+ my $xlated = ($GLOBALS{$label} or $label);
+ print "$xlated:";
+- if ($flavour =~ /linux.*64le/) {
++ if ($flavour =~ /linux.*64(le|v2)/) {
+ if ($TYPES{$label} =~ /function/) {
+ printf "\n.localentry %s,0\n",$xlated;
+ }
diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch b/package/libs/openssl/patches/100-Configure-afalg-support.patch
index 98944103b5..3125e37a94 100644
--- a/package/libs/openssl/patches/100-Configure-afalg-support.patch
+++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch
@@ -1,4 +1,4 @@
-From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:29:21 -0300
Subject: Do not use host kernel version to disable AFALG
@@ -9,10 +9,9 @@ version to disable building the AFALG engine on openwrt targets.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/Configure b/Configure
-index 5a699836f3..74d057c219 100755
--- a/Configure
+++ b/Configure
-@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
+@@ -1548,7 +1548,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
unless ($disabled{afalgeng}) {
$config{afalgeng}="";
diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch
index d0530b4661..9d5db6cfd1 100644
--- a/package/libs/openssl/patches/110-openwrt_targets.patch
+++ b/package/libs/openssl/patches/110-openwrt_targets.patch
@@ -1,4 +1,4 @@
-From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:30:24 -0300
Subject: Add openwrt targets
@@ -9,10 +9,9 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf
new file mode 100644
-index 0000000000..86a86d31e4
--- /dev/null
+++ b/Configurations/25-openwrt.conf
-@@ -0,0 +1,48 @@
+@@ -0,0 +1,52 @@
+## Openwrt "CONFIG_ARCH" matching targets.
+
+# The targets need to end in '-openwrt' for the AFALG patch to work
@@ -52,6 +51,10 @@ index 0000000000..86a86d31e4
+ "linux-powerpc-openwrt" => {
+ inherit_from => [ "linux-ppc", "openwrt" ],
+ },
++ "linux-powerpc64-openwrt" => {
++ inherit_from => [ "linux-ppc64", "openwrt" ],
++ perlasm_scheme => "linux64v2",
++ },
+ "linux-x86_64-openwrt" => {
+ inherit_from => [ "linux-x86_64", "openwrt" ],
+ },
diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
index 7faec9ab88..20fe21f2ac 100644
--- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
+++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch
@@ -1,4 +1,4 @@
-From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:31:38 -0300
Subject: Avoid exposing build directories
@@ -9,7 +9,6 @@ OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/crypto/build.info b/crypto/build.info
-index 2c619c62e8..893128345a 100644
--- a/crypto/build.info
+++ b/crypto/build.info
@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
diff --git a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
index 7f33cb9dae..4707554d2d 100644
--- a/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
+++ b/package/libs/openssl/patches/130-dont-build-tests-fuzz.patch
@@ -1,4 +1,4 @@
-From ba2fe646f2d9104a18b066e43582154049e9ffcb Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:34:38 -0300
Subject: Do not build tests and fuzz directories
@@ -8,7 +8,6 @@ This shortens build time.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/Configure b/Configure
-index 74d057c219..5813e9f8fe 100755
--- a/Configure
+++ b/Configure
@@ -318,7 +318,7 @@ my $auto_threads=1; # enable threads automatically? true by default
diff --git a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
index b293db28f7..b2418006a9 100644
--- a/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
+++ b/package/libs/openssl/patches/140-allow-prefer-chacha20.patch
@@ -1,4 +1,4 @@
-From 4f7ab2040bb71f03a8f8388911144559aa2a5b60 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Thu, 27 Sep 2018 08:44:39 -0300
Subject: Add OPENSSL_PREFER_CHACHA_OVER_GCM option
@@ -15,7 +15,6 @@ when the client has it on top of its ciphersuite preference.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
-index 6724ccf2d2..96d959427e 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -173,9 +173,15 @@ extern "C" {
@@ -38,7 +37,6 @@ index 6724ccf2d2..96d959427e 100644
# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
"TLS_AES_128_GCM_SHA256"
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
-index 27a1b2ec68..7039811323 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1467,11 +1467,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
diff --git a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
index 81d41963c6..8851116347 100644
--- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
+++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
@@ -1,6 +1,17 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz@gmail.com>
+Date: Sat, 27 Mar 2021 17:43:25 -0300
+Subject: openssl.cnf: add engine configuration
+
+This adds configuration options for engines, loading all cnf files under
+/etc/ssl/engines.cnf.d/.
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
+
+diff --git a/apps/openssl.cnf b/apps/openssl.cnf
--- a/apps/openssl.cnf
+++ b/apps/openssl.cnf
-@@ -22,6 +22,82 @@ oid_section = new_oids
+@@ -22,6 +22,16 @@ oid_section = new_oids
# (Alternatively, use a configuration file that has only
# X.509v3 extensions in its main [= default] section.)
@@ -10,75 +21,9 @@
+engines=engines
+
+[engines]
-+# To enable an engine, install the package, and uncomment it here:
-+#devcrypto=devcrypto
-+#afalg=afalg
-+#padlock=padlock
++.include /var/etc/ssl/engines.cnf
+
-+[afalg]
-+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
-+default_algorithms = ALL
-+
-+# The following commands are only available if using the alternative
-+# (sync) AFALG engine
-+# Configuration commands:
-+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
-+# list of supported algorithms, along with their driver, whether they
-+# are hw accelerated or not, and the engine's configuration commands.
-+
-+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
-+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
-+# if acceleration can't be determined) [default=2]
-+#USE_SOFTDRIVERS = 2
-+
-+# CIPHERS: either ALL, NONE, NO_ECB (all except ECB-mode) or a
-+# comma-separated list of ciphers to enable [default=NO_ECB]
-+# Starting in 1.2.0, if you use a cipher list, each cipher may be
-+# followed by a colon (:) and the minimum request length to use
-+# AF_ALG drivers for that cipher; smaller requests are processed by
-+# softare; a negative value will use the default for that cipher
-+#CIPHERS=AES-128-CBC:1024, AES-256-CBC:768, DES-EDE3-CBC:0
-+
-+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
-+# enable [default=NONE]
-+# It is strongly recommended not to enable digests; their performance
-+# is poor, and there are many cases in which they will not work,
-+# especially when calling fork with open crypto contexts. Openssh,
-+# for example, does this, and you may not be able to login.
-+#DIGESTS = NONE
-+
-+[devcrypto]
-+# Leave this alone and configure algorithms with CIPERS/DIGESTS below
-+default_algorithms = ALL
-+
-+# Configuration commands:
-+# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
-+# list of supported algorithms, along with their driver, whether they
-+# are hw accelerated or not, and the engine's configuration commands.
-+
-+# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
-+# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
-+# if acceleration can't be determined) [default=2]
-+#USE_SOFTDRIVERS = 2
-+
-+# CIPHERS: either ALL, NONE, or a comma-separated list of ciphers to
-+# enable [default=ALL]
-+# It is recommended to disable the ECB ciphers; in most cases, it will
-+# only be used for PRNG, in small blocks, where performance is poor,
-+# and there may be problems with apps forking with open crypto
-+# contexts, leading to failures. The CBC ciphers work well:
-+#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC
-+
-+# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
-+# enable [default=NONE]
-+# It is strongly recommended not to enable digests; their performance
-+# is poor, and there are many cases in which they will not work,
-+# especially when calling fork with open crypto contexts. Openssh,
-+# for example, does this, and you may not be able to login.
-+#DIGESTS = NONE
-+
-+[padlock]
-+default_algorithms = ALL
++.include /etc/ssl/engines.cnf.d
+
[ new_oids ]
diff --git a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch b/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
index 84c68b16a2..71c9fdd438 100644
--- a/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
+++ b/package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
@@ -1,4 +1,4 @@
-From f14345422747a495a52f9237a43b8be189f21912 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Mon, 5 Nov 2018 15:54:17 -0200
Subject: eng_devcrypto: save ioctl if EVP_MD_..FLAG_ONESHOT
@@ -15,7 +15,6 @@ Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7585)
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
-index a727c6f646..a2c9a966f7 100644
--- a/crypto/engine/eng_devcrypto.c
+++ b/crypto/engine/eng_devcrypto.c
@@ -461,6 +461,7 @@ struct digest_ctx {
diff --git a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch b/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
index ad83a51a10..83989a3625 100644
--- a/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
+++ b/package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
@@ -1,4 +1,4 @@
-From 78e7b1cc7119622645bc5a8542c55b6c95dc7868 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Tue, 6 Nov 2018 22:54:07 -0200
Subject: eng_devcrypto: add command to dump driver info
@@ -12,7 +12,6 @@ Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7585)
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
-index 5ec38ca8f3..64dc6b891d 100644
--- a/crypto/engine/eng_devcrypto.c
+++ b/crypto/engine/eng_devcrypto.c
@@ -50,16 +50,20 @@ static int use_softdrivers = DEVCRYPTO_DEFAULT_USE_SOFDTRIVERS;
diff --git a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
index ea3f8fb8a7..da9b704501 100644
--- a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
+++ b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
@@ -9,7 +9,6 @@ engines/e_devcrypto.c.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/crypto/engine/build.info b/crypto/engine/build.info
-index e00802a3fd..47fe948966 100644
--- a/crypto/engine/build.info
+++ b/crypto/engine/build.info
@@ -6,6 +6,3 @@ SOURCE[../../libcrypto]=\
@@ -20,10 +19,9 @@ index e00802a3fd..47fe948966 100644
- SOURCE[../../libcrypto]=eng_devcrypto.c
-ENDIF
diff --git a/crypto/init.c b/crypto/init.c
-index 1b0d523bea..ee3e2eb075 100644
--- a/crypto/init.c
+++ b/crypto/init.c
-@@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
+@@ -328,18 +328,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
engine_load_openssl_int();
return 1;
}
@@ -42,7 +40,7 @@ index 1b0d523bea..ee3e2eb075 100644
# ifndef OPENSSL_NO_RDRAND
static CRYPTO_ONCE engine_rdrand = CRYPTO_ONCE_STATIC_INIT;
-@@ -365,6 +353,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
+@@ -364,6 +352,18 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_dynamic)
return 1;
}
# ifndef OPENSSL_NO_STATIC_ENGINE
@@ -61,7 +59,7 @@ index 1b0d523bea..ee3e2eb075 100644
# if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
static CRYPTO_ONCE engine_padlock = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(ossl_init_engine_padlock)
-@@ -713,11 +713,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
+@@ -704,11 +704,6 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
if ((opts & OPENSSL_INIT_ENGINE_OPENSSL)
&& !RUN_ONCE(&engine_openssl, ossl_init_engine_openssl))
return 0;
@@ -73,7 +71,7 @@ index 1b0d523bea..ee3e2eb075 100644
# ifndef OPENSSL_NO_RDRAND
if ((opts & OPENSSL_INIT_ENGINE_RDRAND)
&& !RUN_ONCE(&engine_rdrand, ossl_init_engine_rdrand))
-@@ -727,6 +722,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
+@@ -718,6 +713,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
&& !RUN_ONCE(&engine_dynamic, ossl_init_engine_dynamic))
return 0;
# ifndef OPENSSL_NO_STATIC_ENGINE
@@ -86,7 +84,6 @@ index 1b0d523bea..ee3e2eb075 100644
if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
&& !RUN_ONCE(&engine_padlock, ossl_init_engine_padlock))
diff --git a/engines/build.info b/engines/build.info
-index 1db771971c..33a25d7004 100644
--- a/engines/build.info
+++ b/engines/build.info
@@ -11,6 +11,9 @@ IF[{- !$disabled{"engine"} -}]
@@ -116,7 +113,6 @@ diff --git a/crypto/engine/eng_devcrypto.c b/engines/e_devcrypto.c
similarity index 95%
rename from crypto/engine/eng_devcrypto.c
rename to engines/e_devcrypto.c
-index 2c1b52d572..eff1ed3a7d 100644
--- a/crypto/engine/eng_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -7,7 +7,7 @@
diff --git a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
index 1f1cd7a582..fd4701307e 100644
--- a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
+++ b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch
@@ -20,7 +20,6 @@ turn them on if it is safe and fast enough.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
-index 3fcd81de7a..d25230d366 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -852,7 +852,7 @@ static void prepare_digest_methods(void)
diff --git a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
index bc514b88c9..bf1c98b104 100644
--- a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
+++ b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch
@@ -9,7 +9,6 @@ session. It may have been closed by another process after a fork.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
diff --git a/engines/e_devcrypto.c b/engines/e_devcrypto.c
-index d25230d366..f4570f1666 100644
--- a/engines/e_devcrypto.c
+++ b/engines/e_devcrypto.c
@@ -195,9 +195,8 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
--
2.25.1

View File

@@ -1,33 +0,0 @@
From 1ac3763815e804eacc0977afb420f015a78f8d72 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 23 Sep 2022 08:48:38 +0200
Subject: [PATCH] backport-5.4: add a BPF off-by-one fix
Signed-off-by: John Crispin <john@phrozen.org>
---
.../backport-5.4/999-bpf-off-by-one-backport.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch
diff --git a/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch b/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch
new file mode 100644
index 0000000000..271eac67da
--- /dev/null
+++ b/target/linux/generic/backport-5.4/999-bpf-off-by-one-backport.patch
@@ -0,0 +1,13 @@
+Index: linux-5.4.158/kernel/bpf/verifier.c
+===================================================================
+--- linux-5.4.158.orig/kernel/bpf/verifier.c
++++ linux-5.4.158/kernel/bpf/verifier.c
+@@ -5372,7 +5372,7 @@ static void find_good_pkt_pointers(struc
+
+ new_range = dst_reg->off;
+ if (range_right_open)
+- new_range--;
++ new_range++;
+
+ /* Examples for register markings:
+ *
--
2.25.1

View File

@@ -1,221 +0,0 @@
From 3937223beab0c3e4284fd916c0c3b6548c287e03 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 26 Oct 2021 20:41:22 +0200
Subject: [PATCH 050/102] bpf-headers: add a package with kernel headers for
ebpf
In order to genererate suitable kernel headers, a 5.10 kernel tree is
prepared with a default config for mips. The arch is forced to mips in
order to avoid issues with inline asm on various architectures in a way
that doesn't involve relying on the host toolchain/headers.
It also has the advantage of supporting both endian types
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
include/bpf.mk | 65 ++++++++++++
package/kernel/bpf-headers/Makefile | 99 +++++++++++++++++++
.../src/include/generated/bounds.h | 14 +++
3 files changed, 178 insertions(+)
create mode 100644 include/bpf.mk
create mode 100644 package/kernel/bpf-headers/Makefile
create mode 100644 package/kernel/bpf-headers/src/include/generated/bounds.h
diff --git a/include/bpf.mk b/include/bpf.mk
new file mode 100644
index 0000000000..3dc65c7685
--- /dev/null
+++ b/include/bpf.mk
@@ -0,0 +1,65 @@
+ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),)
+ BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
+ ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
+ BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
+ else
+ BPF_PATH:=$(BPF_PATH)
+ endif
+ CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11))
+ LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
+else
+ CLANG:=$(STAGING_DIR_HOST)/bin/clang
+ LLVM_VER:=
+endif
+
+LLVM_PATH:=$(dir $(CLANG))
+LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
+LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
+LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
+LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
+
+BPF_KARCH:=mips
+BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el)
+
+BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
+
+BPF_KERNEL_INCLUDE := \
+ -nostdinc -isystem $(TOOLCHAIN_DIR)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
+ -I$(BPF_HEADERS_DIR)/include \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/uapi \
+ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated/uapi \
+ -I$(BPF_HEADERS_DIR)/include/uapi \
+ -I$(BPF_HEADERS_DIR)/include/generated/uapi \
+ -I$(BPF_HEADERS_DIR)/tools/lib \
+ -I$(BPF_HEADERS_DIR)/tools/testing/selftests \
+ -I$(BPF_HEADERS_DIR)/samples/bpf \
+ -include linux/kconfig.h -include asm_goto_workaround.h
+
+BPF_CFLAGS := \
+ $(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \
+ -D__KERNEL__ -D__BPF_TRACING__ \
+ -D__TARGET_ARCH_${BPF_KARCH} \
+ -m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \
+ -fno-stack-protector -Wall \
+ -Wno-unused-value -Wno-pointer-sign \
+ -Wno-compare-distinct-pointer-types \
+ -Wno-gnu-variable-sized-type-not-at-end \
+ -Wno-address-of-packed-member -Wno-tautological-compare \
+ -Wno-unknown-warning-option \
+ -fno-asynchronous-unwind-tables \
+ -Wno-uninitialized -Wno-unused-variable \
+ -Wno-unused-label \
+ -O2 -emit-llvm -Xclang -disable-llvm-passes
+
+define CompileBPF
+ $(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
+ -c $(1) -o $(patsubst %.c,%.bc,$(1))
+ $(LLVM_OPT) -O2 -mtriple=bpf-pc-linux < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
+ $(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
+ $(LLVM_LLC) -march=bpf -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
+ $(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
+endef
+
diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile
new file mode 100644
index 0000000000..5f5b89370d
--- /dev/null
+++ b/package/kernel/bpf-headers/Makefile
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2006-2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+override QUILT:=
+override HOST_QUILT:=
+
+include $(INCLUDE_DIR)/kernel.mk
+
+
+PKG_NAME:=linux
+PKG_PATCHVER:=5.10
+PKG_VERSION:=$(PKG_PATCHVER)$(strip $(LINUX_VERSION-$(PKG_PATCHVER)))
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=$(LINUX_SITE)
+PKG_HASH:=$(LINUX_KERNEL_HASH-$(strip $(PKG_VERSION)))
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/bpf-headers/$(PKG_NAME)-$(PKG_VERSION)
+
+GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
+GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(PKG_PATCHVER)),"$(dir)")
+PATCH_DIR := $(CURDIR)/patches
+FILES_DIR :=
+
+REAL_LINUX_DIR := $(LINUX_DIR)
+LINUX_DIR := $(PKG_BUILD_DIR)
+
+include $(INCLUDE_DIR)/bpf.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bpf-headers
+ SECTION:=kernel
+ CATEGORY:=Kernel
+ TITLE:=eBPF kernel headers
+ BUILDONLY:=1
+ HIDDEN:=1
+endef
+
+export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
+
+KERNEL_MAKE := \
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ ARCH=$(BPF_KARCH) \
+ CROSS_COMPILE=$(BPF_ARCH)-linux- \
+ LLVM=1 CC="$(CLANG)" LD="$(TARGET_CROSS)ld" \
+ HOSTCC="$(HOSTCC)" \
+ HOSTCXX="$(HOSTCXX)" \
+ HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
+ KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
+ CONFIG_SHELL="$(BASH)" \
+ INSTALL_HDR_PATH="$(PKG_BUILD_DIR)/user_headers"
+
+define Build/Patch
+ $(Kernel/Patch/Default)
+endef
+
+BPF_DOC = $(PKG_BUILD_DIR)/scripts/bpf_helpers_doc.py
+
+define Build/Configure
+ grep -vE 'CONFIG_(CPU_.*ENDIAN|HZ)' $(PKG_BUILD_DIR)/arch/mips/configs/generic_defconfig > $(PKG_BUILD_DIR)/.config
+ echo 'CONFIG_CPU_$(if $(CONFIG_BIG_ENDIAN),BIG,LITTLE)_ENDIAN=y' >> $(PKG_BUILD_DIR)/.config
+ grep CONFIG_HZ $(REAL_LINUX_DIR)/.config >> $(PKG_BUILD_DIR)/.config
+ yes '' | $(KERNEL_MAKE) oldconfig
+ grep 'CONFIG_HZ=' $(REAL_LINUX_DIR)/.config | \
+ cut -d= -f2 | \
+ bc -q $(LINUX_DIR)/kernel/time/timeconst.bc \
+ > $(LINUX_DIR)/include/generated/timeconst.h
+ $(BPF_DOC) --header \
+ --file $(LINUX_DIR)/tools/include/uapi/linux/bpf.h \
+ > $(PKG_BUILD_DIR)/tools/lib/bpf/bpf_helper_defs.h
+endef
+
+define Build/Compile
+ $(KERNEL_MAKE) archprepare headers_install
+endef
+
+define Build/InstallDev
+ mkdir -p $(1)/bpf-headers/arch $(1)/bpf-headers/tools
+ $(CP) \
+ $(PKG_BUILD_DIR)/arch/$(BPF_KARCH) \
+ $(1)/bpf-headers/arch/
+ $(CP) \
+ $(PKG_BUILD_DIR)/tools/lib \
+ $(PKG_BUILD_DIR)/tools/testing \
+ $(1)/bpf-headers/tools/
+ $(CP) \
+ $(PKG_BUILD_DIR)/include \
+ $(PKG_BUILD_DIR)/samples \
+ $(PKG_BUILD_DIR)/scripts \
+ $(PKG_BUILD_DIR)/user_headers \
+ $(1)/bpf-headers
+endef
+
+$(eval $(call BuildPackage,bpf-headers))
diff --git a/package/kernel/bpf-headers/src/include/generated/bounds.h b/package/kernel/bpf-headers/src/include/generated/bounds.h
new file mode 100644
index 0000000000..82ff01043c
--- /dev/null
+++ b/package/kernel/bpf-headers/src/include/generated/bounds.h
@@ -0,0 +1,14 @@
+#ifndef __LINUX_BOUNDS_H__
+#define __LINUX_BOUNDS_H__
+/*
+ * DO NOT MODIFY.
+ *
+ * This file was generated by Kbuild
+ */
+
+#define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS */
+#define MAX_NR_ZONES 4 /* __MAX_NR_ZONES */
+#define NR_CPUS_BITS 1 /* ilog2(CONFIG_NR_CPUS) */
+#define SPINLOCK_SIZE 64 /* sizeof(spinlock_t) */
+
+#endif
--
2.25.1

View File

@@ -1,29 +0,0 @@
From 32243b2148fd0dacd0630affaea59345c64df79a Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 10:36:14 +0100
Subject: [PATCH 051/102] bpf-headers: unset PKG_CONFIG_PATH
This fixes an issue where the kernel would pick up an incompatible target
libyaml for building host tools
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
package/kernel/bpf-headers/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile
index 5f5b89370d..df24bfa13f 100644
--- a/package/kernel/bpf-headers/Makefile
+++ b/package/kernel/bpf-headers/Makefile
@@ -41,6 +41,8 @@ define Package/bpf-headers
HIDDEN:=1
endef
+PKG_CONFIG_PATH:=
+
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
KERNEL_MAKE := \
--
2.25.1

View File

@@ -1,99 +0,0 @@
From 1eb36bc2be4b54e4e4e4ceffc01be78d996205f0 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 17 Oct 2021 17:50:53 +0200
Subject: [PATCH 052/102] tools/llvm-bpf: add llvm+clang build suitable for
compiling code to eBPF
Preparation for building packages that ship eBPF code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
toolchain/Config.in | 7 +++++++
tools/Makefile | 2 ++
tools/llvm-bpf/Makefile | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
create mode 100644 tools/llvm-bpf/Makefile
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 6dda9af92d..9062d6f65e 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -37,6 +37,13 @@ menuconfig TARGET_OPTIONS
Most people will answer N.
+config BUILD_LLVM_BPF
+ bool "Build LLVM toolchain for eBPF" if DEVEL
+ help
+ If enabled, a LLVM toolchain for building eBPF binaries will be built.
+ If this is not enabled, eBPF packages can only be built if the host
+ has a suitable toolchain
+
menuconfig EXTERNAL_TOOLCHAIN
bool
diff --git a/tools/Makefile b/tools/Makefile
index a2665dbc9a..83147014c6 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -35,6 +35,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
tools-$(CONFIG_USES_MINOR) += kernel2minor
tools-$(CONFIG_USE_SPARSE) += sparse
+tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf
# builddir dependencies
$(curdir)/autoconf/compile := $(curdir)/m4/compile
@@ -57,6 +58,7 @@ $(curdir)/libelf/compile := $(curdir)/libtool/compile
$(curdir)/libressl/compile := $(curdir)/pkgconf/compile
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
+$(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile
$(curdir)/mkimage/compile += $(curdir)/libressl/compile
diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
new file mode 100644
index 0000000000..a5ba2a4cb7
--- /dev/null
+++ b/tools/llvm-bpf/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=llvm-project
+PKG_VERSION:=13.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
+PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
+PKG_HASH:=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src
+
+HOST_BUILD_PARALLEL:=1
+
+CMAKE_BINARY_SUBDIR := build
+CMAKE_SOURCE_SUBDIR := llvm
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+CMAKE_HOST_OPTIONS += \
+ -DLLVM_ENABLE_BINDINGS=OFF \
+ -DLLVM_INCLUDE_DOCS=OFF \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INCLUDE_TESTS=OFF \
+ -DLLVM_ENABLE_PROJECTS="clang;lld" \
+ -DLLVM_TARGETS_TO_BUILD=BPF \
+ -DCLANG_BUILD_EXAMPLES=OFF
+
+$(eval $(call HostBuild))
--
2.25.1

View File

@@ -1,40 +0,0 @@
From 103a743e7ca4a2e98969d0f60d8aeb6cc7641f67 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 2 Nov 2021 19:38:12 +0100
Subject: [PATCH 053/102] llvm-bpf: move to staging_dir/host/llvm-bpf
This makes it easier to package it up for the download server
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
tools/llvm-bpf/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
index a5ba2a4cb7..ae279d26d2 100644
--- a/tools/llvm-bpf/Makefile
+++ b/tools/llvm-bpf/Makefile
@@ -24,6 +24,8 @@ CMAKE_SOURCE_SUBDIR := llvm
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
+CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/llvm-bpf
+
CMAKE_HOST_OPTIONS += \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
@@ -31,6 +33,10 @@ CMAKE_HOST_OPTIONS += \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD=BPF \
- -DCLANG_BUILD_EXAMPLES=OFF
+ -DCLANG_BUILD_EXAMPLES=OFF \
+ -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \
+ -DCMAKE_SKIP_RPATH=OFF
$(eval $(call HostBuild))
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More