From 3bbc1d5fba1d700917138334a48c16bafdf48de9 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 20 Oct 2023 11:59:34 +0800 Subject: [PATCH 01/20] uboot-mediatek: fix determine the size of an uImage.FIT using 'imsz' or 'imszb'. It must read the entire image for previous code of 'imsz' or 'imszb'. Signed-off-by: Jianhui Zhao Suggested-by: Chuanhong Guo --- .../patches/200-cmd-add-imsz-and-imszb.patch | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch b/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch index 574259fb395..ae7623086e4 100644 --- a/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch +++ b/package/boot/uboot-mediatek/patches/200-cmd-add-imsz-and-imszb.patch @@ -70,7 +70,7 @@ { --- a/boot/image-fit.c +++ b/boot/image-fit.c -@@ -2051,6 +2051,49 @@ static const char *fit_get_image_type_pr +@@ -2051,6 +2051,47 @@ static const char *fit_get_image_type_pr return "unknown"; } @@ -93,11 +93,8 @@ + max_size = hdrsize; + + images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH); -+ if (images_noffset < 0) { -+ printf("Can't find images parent node '%s' (%s)\n", -+ FIT_IMAGES_PATH, fdt_strerror(images_noffset)); -+ return 0; -+ } ++ if (images_noffset < 0) ++ goto out; + + for (ndepth = 0, + noffset = fdt_next_node(fit, images_noffset, &ndepth); @@ -106,7 +103,7 @@ + if (ndepth == 1) { + ret = fit_image_get_data_and_size(fit, noffset, &data, &data_size); + if (ret) -+ return 0; ++ goto out; + + img_total = data_size + (data - fit); + @@ -114,6 +111,7 @@ + } + } + ++out: + return max_size; +} + From 33b3fea70245068030ef64b6d7c5b344d08ba9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 19 Oct 2022 15:43:37 +0200 Subject: [PATCH 02/20] package-dumpinfo: add CPE information to package index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Common Platform Enumeration (CPE) is a structured naming scheme for information technology systems, software, and packages. In order for the information to be processed further, it should also be available in package index files. Signed-off-by: Petr Štetiar --- include/package-dumpinfo.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 597452e4b93..afc325c1ed6 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -36,6 +36,7 @@ $(if $(USERID),Require-User: $(USERID) )Source: $(PKG_SOURCE) $(if $(LICENSE),License: $(LICENSE) )$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES) +)$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID) )Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg)) $(if $(KCONFIG),Kernel-Config: $(KCONFIG) )$(if $(BUILDONLY),Build-Only: $(BUILDONLY) From 8562c65ff8aae3899cdb190319709500b7651492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 19 Oct 2022 15:46:45 +0200 Subject: [PATCH 03/20] package-metadata: add CPE information to JSON package manifests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Common Platform Enumeration (CPE) is a structured naming scheme for information technology systems, software, and packages. In order for the information to be processed further, it should also be available in JSON package manifests. Signed-off-by: Petr Štetiar --- scripts/metadata.pm | 1 + scripts/package-metadata.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index ee5a2945ca7..e716f75d102 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -256,6 +256,7 @@ sub parse_package_metadata($) { /^Source: \s*(.+)\s*$/ and $pkg->{source} = $1; /^License: \s*(.+)\s*$/ and $pkg->{license} = $1; /^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1; + /^CPE-ID: \s*(.+)\s*$/ and $pkg->{cpe_id} = $1; /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; /^Provides: \s*(.+)\s*$/ and do { my @vpkg = split /\s+/, $1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 8d8a9fd3065..e34b738c0f1 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -611,6 +611,7 @@ ${json}{ "version":"$pkg->{version}", "category":"$pkg->{category}", "license":"$pkg->{license}", +"cpe_id":"$pkg->{cpe_id}", "maintainer": [$pkg_maintainer], "depends":[$pkg_deps]}, END_JSON From 649655f427932fe79b96a41f883c8054b1806191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Thu, 26 Oct 2023 16:11:47 +0000 Subject: [PATCH 04/20] package-dumpinfo,metadata: add ABI version information to package index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no standard for ABI versioning, so its not possible to find out from `libext2fs2`, `libiwinfo20230701` or `libss2` package names if thats just package name or package name with ABI version included. To help with the decision, lets make ABI version aviable in package index. Signed-off-by: Petr Štetiar --- include/package-dumpinfo.mk | 1 + scripts/metadata.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index afc325c1ed6..6baf10225de 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -37,6 +37,7 @@ $(if $(USERID),Require-User: $(USERID) $(if $(LICENSE),License: $(LICENSE) )$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES) )$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID) +)$(if $(ABI_VERSION),ABI-Version: $(ABI_VERSION) )Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg)) $(if $(KCONFIG),Kernel-Config: $(KCONFIG) )$(if $(BUILDONLY),Build-Only: $(BUILDONLY) diff --git a/scripts/metadata.pm b/scripts/metadata.pm index e716f75d102..a00d19f185a 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -257,6 +257,7 @@ sub parse_package_metadata($) { /^License: \s*(.+)\s*$/ and $pkg->{license} = $1; /^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1; /^CPE-ID: \s*(.+)\s*$/ and $pkg->{cpe_id} = $1; + /^ABI-Version: \s*(.+)\s*$/ and $pkg->{abi_version} = $1; /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1; /^Provides: \s*(.+)\s*$/ and do { my @vpkg = split /\s+/, $1; From d604a07225c5c82b942cd3374cc113ad676a2519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 24 Oct 2023 08:27:13 +0000 Subject: [PATCH 05/20] build: add CycloneDX SBOM JSON support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CycloneDX is an open source standard developed by the OWASP foundation. It supports a wide range of development ecosystems, a comprehensive set of use cases, and focuses on automation, ease of adoption, and progressive enhancement of SBOMs (Software Bill Of Materials) throughout build pipelines. So lets add support for CycloneDX SBOM for packages and images manifests. Signed-off-by: Petr Štetiar --- config/Config-build.in | 8 ++ include/image.mk | 5 + package/Makefile | 8 ++ scripts/metadata.pm | 40 +++++++- scripts/package-metadata.pl | 187 ++++++++++++++++++++++++++++++++++-- 5 files changed, 240 insertions(+), 8 deletions(-) diff --git a/config/Config-build.in b/config/Config-build.in index 5f9a1be8586..ebfce8add44 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -26,6 +26,14 @@ menu "Global build settings" directory containing machine readable list of built profiles and resulting images. + config JSON_CYCLONEDX_SBOM + bool "Create CycloneDX SBOM JSON" + default BUILDBOT + help + Create a JSON files *.bom.cdx.json in the build + directory containing Software Bill Of Materials in CycloneDX + format. + config ALL_NONSHARED bool "Select all target specific packages by default" select ALL_KMODS diff --git a/include/image.mk b/include/image.mk index 8f0cbead108..764410fe188 100644 --- a/include/image.mk +++ b/include/image.mk @@ -277,6 +277,11 @@ endef define Image/Manifest $(call opkg,$(TARGET_DIR_ORIG)) list-installed > \ $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest + $(if $(CONFIG_JSON_CYCLONEDX_SBOM), \ + $(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \ + $(TMP_DIR)/.packageinfo \ + $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \ + $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json) endef define Image/gzip-ext4-padded-squashfs diff --git a/package/Makefile b/package/Makefile index 4b8df7f484d..8e72d4ec726 100644 --- a/package/Makefile +++ b/package/Makefile @@ -106,6 +106,14 @@ ifdef CONFIG_SIGNED_PACKAGES $(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \ ); done endif +ifdef CONFIG_JSON_CYCLONEDX_SBOM + @echo Creating CycloneDX package SBOMs... + @for d in $(PACKAGE_SUBDIRS); do ( \ + [ -d $$d ] && \ + cd $$d || continue; \ + $(SCRIPT_DIR)/package-metadata.pl pkgcyclonedxsbom Packages.manifest > Packages.bom.cdx.json || true; \ + ); done +endif $(curdir)/flags-install:= -j1 diff --git a/scripts/metadata.pm b/scripts/metadata.pm index a00d19f185a..587ce7207d2 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -2,7 +2,7 @@ package metadata; use base 'Exporter'; use strict; use warnings; -our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); +our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides clear_packages parse_package_metadata parse_package_manifest_metadata parse_target_metadata get_multiline @ignore %usernames %groupnames); our %package; our %vpackage; @@ -317,4 +317,42 @@ sub parse_package_metadata($) { return 1; } +sub parse_package_manifest_metadata($) { + my $file = shift; + my $pkg; + my %pkgs; + + open FILE, "<$file" or do { + warn "Cannot open '$file': $!\n"; + return undef; + }; + + while () { + chomp; + /^Package:\s*(.+?)\s*$/ and do { + $pkg = {}; + $pkg->{name} = $1; + $pkg->{depends} = []; + $pkgs{$1} = $pkg; + }; + /^Version:\s*(.+)\s*$/ and $pkg->{version} = $1; + /^Depends:\s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ]; + /^Source:\s*(.+)\s*$/ and $pkg->{source} = $1; + /^SourceName:\s*(.+)\s*$/ and $pkg->{sourcename} = $1; + /^License:\s*(.+)\s*$/ and $pkg->{license} = $1; + /^LicenseFiles:\s*(.+)\s*$/ and $pkg->{licensefiles} = $1; + /^Section:\s*(.+)\s*$/ and $pkg->{section} = $1; + /^SourceDateEpoch: \s*(.+)\s*$/ and $pkg->{sourcedateepoch} = $1; + /^CPE-ID:\s*(.+)\s*$/ and $pkg->{cpe_id} = $1; + /^Architecture:\s*(.+)\s*$/ and $pkg->{architecture} = $1; + /^Installed-Size:\s*(.+)\s*$/ and $pkg->{installedsize} = $1; + /^Filename:\s*(.+)\s*$/ and $pkg->{filename} = $1; + /^Size:\s*(\d+)\s*$/ and $pkg->{size} = $1; + /^SHA256sum:\s*(.*)\s*$/ and $pkg->{sha256sum} = $1; + } + + close FILE; + return %pkgs; +} + 1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index e34b738c0f1..9e0e6dd9e58 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -4,6 +4,8 @@ use lib "$FindBin::Bin"; use strict; use metadata; use Getopt::Long; +use Time::Piece; +use JSON::PP; my %board; @@ -622,6 +624,173 @@ END_JSON print "[$json]"; } +sub image_manifest_packages($) +{ + my %packages; + my $imgmanifest = shift; + + open FILE, "<$imgmanifest" or return; + while () { + /^(.+?) - (.+)$/ and $packages{$1} = $2; + } + close FILE; + + return %packages; +} + +sub dump_cyclonedxsbom_json { + my (@components) = @_; + + my $uuid = sprintf( + "%04x%04x-%04x-%04x-%04x-%04x%04x%04x", + rand(0xffff), rand(0xffff), rand(0xffff), + rand(0x0fff) | 0x4000, + rand(0x3fff) | 0x8000, + rand(0xffff), rand(0xffff), rand(0xffff) + ); + + my $cyclonedx = { + bomFormat => "CycloneDX", + specVersion => "1.4", + serialNumber => "urn:uuid:$uuid", + version => 1, + metadata => { + timestamp => gmtime->datetime, + }, + "components" => [@components], + }; + + return encode_json($cyclonedx); +} + +sub gen_image_cyclonedxsbom() { + my $pkginfo = shift @ARGV; + my $imgmanifest = shift @ARGV; + my @components; + my %image_packages; + + %image_packages = image_manifest_packages($imgmanifest); + %image_packages or exit 1; + parse_package_metadata($pkginfo) or exit 1; + + $package{"kernel"} = { + license => "GPL-2.0", + cpe_id => "cpe:/o:linux:linux_kernel", + name => "kernel", + }; + + my %abimap; + my @abipkgs = grep { defined $package{$_}->{abi_version} } keys %package; + foreach my $name (@abipkgs) { + my $pkg = $package{$name}; + my $abipkg = $name . $pkg->{abi_version}; + $abimap{$abipkg} = $name; + } + + foreach my $name (sort {uc($a) cmp uc($b)} keys %image_packages) { + my $pkg = $package{$name}; + if (!$pkg) { + $pkg = $package{$abimap{$name}}; + next if !$pkg; + } + + my @licenses; + my @license = split(/\s+/, $pkg->{license}); + foreach my $lic (@license) { + push @licenses, ( + { "license" => { "name" => $lic } } + ); + } + my $type; + if ($pkg->{category}) { + my $category = $pkg->{category}; + my %cat_type = ( + "Firmware" => "firmware", + "Libraries" => "library" + ); + + if ($cat_type{$category}) { + $type = $cat_type{$category}; + } else { + $type = "application"; + } + } + + my $version = $pkg->{version}; + if ($image_packages{$name}) { + $version = $image_packages{$name}; + } + $version =~ s/-\d+$// if $version; + if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) { + $version = $1; + } + + push @components, { + name => $pkg->{name}, + version => $version, + @licenses > 0 ? (licenses => [ @licenses ]) : (), + $pkg->{cpe_id} ? (cpe => $pkg->{cpe_id}.":".$version) : (), + $type ? (type => $type) : (), + $version ? (version => $version) : (), + }; + } + + print dump_cyclonedxsbom_json(@components); +} + +sub gen_package_cyclonedxsbom() { + my $pkgmanifest = shift @ARGV; + my @components; + my %mpkgs; + + %mpkgs = parse_package_manifest_metadata($pkgmanifest); + %mpkgs or exit 1; + + foreach my $name (sort {uc($a) cmp uc($b)} keys %mpkgs) { + my $pkg = $mpkgs{$name}; + + my @licenses; + my @license = split(/\s+/, $pkg->{license}); + foreach my $lic (@license) { + push @licenses, ( + { "license" => { "name" => $lic } } + ); + } + + my $type; + if ($pkg->{section}) { + my $section = $pkg->{section}; + my %section_type = ( + "firmware" => "firmware", + "libs" => "library" + ); + + if ($section_type{$section}) { + $type = $section_type{$section}; + } else { + $type = "application"; + } + } + + my $version = $pkg->{version}; + $version =~ s/-\d+$// if $version; + if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) { + $version = $1; + } + + push @components, { + name => $name, + version => $version, + @licenses > 0 ? (licenses => [ @licenses ]) : (), + $pkg->{cpe_id} ? (cpe => $pkg->{cpe_id}.":".$version) : (), + $type ? (type => $type) : (), + $version ? (version => $version) : (), + }; + } + + print dump_cyclonedxsbom_json(@components); +} + sub parse_command() { GetOptions("ignore=s", \@ignore); my $cmd = shift @ARGV; @@ -632,6 +801,8 @@ sub parse_command() { /^source$/ and return gen_package_source(); /^pkgaux$/ and return gen_package_auxiliary(); /^pkgmanifestjson$/ and return gen_package_manifest_json(); + /^imgcyclonedxsbom$/ and return gen_image_cyclonedxsbom(); + /^pkgcyclonedxsbom$/ and return gen_package_cyclonedxsbom(); /^license$/ and return gen_package_license(0); /^licensefull$/ and return gen_package_license(1); /^usergroup$/ and return gen_usergroup_list(); @@ -639,15 +810,17 @@ sub parse_command() { } die < [manifest] Image package manifest in CycloneDX SBOM JSON format + $0 pkgcyclonedxsbom Package manifest in CycloneDX SBOM JSON format + $0 license [file] Package license information $0 licensefull [file] Package license information (full list) - $0 usergroup [file] Package usergroup allocation list + $0 usergroup [file] Package usergroup allocation list $0 version_filter [patchver] [list...] Filter list of version tagged strings Options: From 6dca88aa4acd60229147628cb920d05a1136666d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Fri, 27 Oct 2023 07:37:52 +0000 Subject: [PATCH 06/20] hostapd: fix broken WPS on broadcom-wl and ath11k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl/ath11k based adapters. The reason for it is hostapd tries to install additional IEs for scanning while the driver does not support this. The kernel indicates the maximum number of bytes for additional scan IEs using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and only add additional scan IEs in case the driver can accommodate these additional IEs. Bug: http://lists.infradead.org/pipermail/hostap/2022-January/040178.html Bug-Debian: https://bugs.debian.org/1004524 Bug-ArchLinux: https://bugs.archlinux.org/task/73495 Upstream-Status: Changes Requested [https://patchwork.ozlabs.org/project/hostap/patch/20220130192200.10883-1-mail@david-bauer.net] Reported-by: Étienne Morice Tested-by: Étienne Morice Signed-off-by: David Bauer Signed-off-by: Petr Štetiar --- ...-extra-ies-only-if-allowed-by-driver.patch | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch diff --git a/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch new file mode 100644 index 00000000000..c7b595da57d --- /dev/null +++ b/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch @@ -0,0 +1,62 @@ +From: David Bauer +To: hostap@lists.infradead.org +Cc: =?utf-8?q?=C3=89tienne_Morice?= +Subject: [PATCH] nl80211: add extra-ies only if allowed by driver +Date: Sun, 30 Jan 2022 20:22:00 +0100 +Message-Id: <20220130192200.10883-1-mail@david-bauer.net> +List-Id: + +Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl +based adapters. The reason for it is hostapd tries to install additional +IEs for scanning while the driver does not support this. + +The kernel indicates the maximum number of bytes for additional scan IEs +using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and +only add additional scan IEs in case the driver can accommodate these +additional IEs. + +Reported-by: Étienne Morice +Tested-by: Étienne Morice +Signed-off-by: David Bauer +--- + src/drivers/driver.h | 3 +++ + src/drivers/driver_nl80211_capa.c | 4 ++++ + src/drivers/driver_nl80211_scan.c | 2 +- + 3 files changed, 8 insertions(+), 1 deletion(-) + +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -2283,6 +2283,9 @@ struct wpa_driver_capa { + /** Maximum number of iterations in a single scan plan */ + u32 max_sched_scan_plan_iterations; + ++ /** Maximum number of extra IE bytes for scans */ ++ u16 max_scan_ie_len; ++ + /** Whether sched_scan (offloaded scanning) is supported */ + int sched_scan_supported; + +--- a/src/drivers/driver_nl80211_capa.c ++++ b/src/drivers/driver_nl80211_capa.c +@@ -949,6 +949,10 @@ static int wiphy_info_handler(struct nl_ + nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]); + } + ++ if (tb[NL80211_ATTR_MAX_SCAN_IE_LEN]) ++ capa->max_scan_ie_len = ++ nla_get_u16(tb[NL80211_ATTR_MAX_SCAN_IE_LEN]); ++ + if (tb[NL80211_ATTR_MAX_MATCH_SETS]) + capa->max_match_sets = + nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]); +--- a/src/drivers/driver_nl80211_scan.c ++++ b/src/drivers/driver_nl80211_scan.c +@@ -222,7 +222,7 @@ nl80211_scan_common(struct i802_bss *bss + wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested"); + } + +- if (params->extra_ies) { ++ if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) { + wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs", + params->extra_ies, params->extra_ies_len); + if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len, From 280d9dd75874ef4c4e2407366eda987cda8efd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Thu, 19 Oct 2023 04:09:25 +0000 Subject: [PATCH 07/20] ci: add workflow for automated GitHub release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement a GitHub Actions workflow for automated project releases. The workflow triggers on Git tags, ensuring that a GitHub release is created whenever a new tag is pushed. That new release is going to be created in draft and pre-release mode and needs to be manually promoted to the proper release, once its decided, that its good enough and prepared. This is a start of a streamlined and consistent release process for GitHub, reducing manual intervention. Acked-by: Christian Marangi Signed-off-by: Petr Štetiar --- .github/workflows/github-release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/github-release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 00000000000..55d01f85cbb --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,24 @@ +name: Create GitHub release + +permissions: + contents: write + +on: + push: + tags: + - "v*" + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + prerelease: true From 5364163e774a6887c3c9e5c87203d32e2db26928 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 1 Nov 2023 17:44:43 +0100 Subject: [PATCH 08/20] tools/elfutils: add -fPIC to fix linker errors (#13841) Resolves issues with building PIE binaries that link against libdw or libelf Signed-off-by: Felix Fietkau --- tools/elfutils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index 2605bc61cb7..92eabc14ddf 100644 --- a/tools/elfutils/Makefile +++ b/tools/elfutils/Makefile @@ -23,7 +23,7 @@ ifeq ($(HOST_OS),Darwin) HOST_CFLAGS += -I/opt/homebrew/include endif -HOST_CFLAGS += -Wno-error +HOST_CFLAGS += -Wno-error -fPIC HOST_CONFIGURE_ARGS += \ --without-libintl-prefix \ From 17a5f1c81f8b72c0f684ea05bd1acac6fa49d188 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 1 Nov 2023 18:37:45 +0100 Subject: [PATCH 09/20] tools/elfutils: disable bzlib support It is not needed Signed-off-by: Felix Fietkau --- tools/elfutils/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index 92eabc14ddf..a7018272485 100644 --- a/tools/elfutils/Makefile +++ b/tools/elfutils/Makefile @@ -34,6 +34,7 @@ HOST_CONFIGURE_ARGS += \ --disable-shared \ --enable-static \ --without-lzma \ + --without-bzlib \ --without-zstd ifeq ($(HOST_OS),Darwin) From f95a8f876926969b3643f43cf08674cf153e22e8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 1 Nov 2023 19:20:16 +0100 Subject: [PATCH 10/20] tools/elfutils: fix missing _ in auxv info alias Fixes dwarves compile issue Signed-off-by: Felix Fietkau --- tools/elfutils/patches/100-portability.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch index a0c7d74bb32..0d650549eec 100644 --- a/tools/elfutils/patches/100-portability.patch +++ b/tools/elfutils/patches/100-portability.patch @@ -291,7 +291,7 @@ case DW_TAG_rvalue_reference_type +#define auxv_info_alias(arch) \ -+ int EBLHOOK_1(arch, auxv_info) (GElf_Xword a_type, const char **name, const char **format) \ ++ int EBLHOOK_1(arch ## _, auxv_info) (GElf_Xword a_type, const char **name, const char **format) \ + { \ + return EBLHOOK(auxv_info)(a_type, name, format); \ + } From d62726b1e44f785d543e4625b19ca1f628adda6c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 1 Nov 2023 22:10:46 +0100 Subject: [PATCH 11/20] urngd: update to version 2023-11-01 Fix compilation with glibc 44365eb Deactivate _FORTIFY_SOURCE in jitterentropy-base.c Signed-off-by: Hauke Mehrtens --- package/system/urngd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index 818f06b210d..477c5f24059 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git -PKG_SOURCE_DATE:=2023-07-25 -PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4 -PKG_MIRROR_HASH:=427d4228fd65cf4320b8c212e710b86bcbfcdd4239f4e67132b3b471f7437202 +PKG_SOURCE_DATE:=2023-11-01 +PKG_SOURCE_VERSION:=44365eb1e1165f2a44cb31f404b04cf85031718e +PKG_MIRROR_HASH:=743bdfacf1f1e779047a55fe8f388aaf31f6e55e8a4d0a00fcabffb68af2202e PKG_LICENSE:=GPL-2.0 BSD-3-Clause PKG_LICENSE_FILES:= From 943bd3c9f6244c928cd168302d638a6a218fd4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 2 Nov 2023 09:08:54 +0100 Subject: [PATCH 12/20] bcm53xx: add the latest fix version of brcm_nvram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was just sent for upstream. Signed-off-by: Rafał Miłecki --- ...nvram-store-a-copy-of-NVRAM-content.patch} | 23 +++++++++++-------- ...nvram-store-a-copy-of-NVRAM-content.patch} | 23 +++++++++++-------- 2 files changed, 28 insertions(+), 18 deletions(-) rename target/linux/bcm53xx/patches-5.15/{800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch => 181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch} (91%) rename target/linux/bcm53xx/patches-6.1/{800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch => 181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch} (91%) diff --git a/target/linux/bcm53xx/patches-5.15/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch b/target/linux/bcm53xx/patches-5.15/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch similarity index 91% rename from target/linux/bcm53xx/patches-5.15/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch rename to target/linux/bcm53xx/patches-5.15/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch index 2aae713b640..cceb3635ac5 100644 --- a/target/linux/bcm53xx/patches-5.15/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch +++ b/target/linux/bcm53xx/patches-5.15/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch @@ -25,23 +25,27 @@ Cc: Arınç ÜNAL Cc: Florian Fainelli Cc: Scott Branden Signed-off-by: Rafał Miłecki +Acked-by: Arınç ÜNAL --- - drivers/nvmem/brcm_nvram.c | 130 +++++++++++++++++++++++++------------ - 1 file changed, 90 insertions(+), 40 deletions(-) + drivers/nvmem/brcm_nvram.c | 134 ++++++++++++++++++++++++++----------- + 1 file changed, 94 insertions(+), 40 deletions(-) --- a/drivers/nvmem/brcm_nvram.c +++ b/drivers/nvmem/brcm_nvram.c -@@ -17,9 +17,20 @@ +@@ -17,9 +17,23 @@ #define NVRAM_MAGIC "FLSH" +/** + * struct brcm_nvram - driver state internal struct + * ++ * @dev: NVMEM device pointer + * @nvmem_size: Size of the whole space available for NVRAM + * @data: NVRAM data copy stored to avoid poking underlaying flash controller + * @data_len: NVRAM data size + * @padding_byte: Padding value used to fill remaining space ++ * @cells: Array of discovered NVMEM cells ++ * @ncells: Number of elements in cells + */ struct brcm_nvram { struct device *dev; @@ -53,7 +57,7 @@ Signed-off-by: Rafał Miłecki struct nvmem_cell_info *cells; int ncells; }; -@@ -36,10 +47,47 @@ static int brcm_nvram_read(void *context +@@ -36,10 +50,47 @@ static int brcm_nvram_read(void *context size_t bytes) { struct brcm_nvram *priv = context; @@ -104,7 +108,7 @@ Signed-off-by: Rafał Miłecki return 0; } -@@ -67,8 +115,13 @@ static int brcm_nvram_add_cells(struct b +@@ -67,8 +118,13 @@ static int brcm_nvram_add_cells(struct b size_t len) { struct device *dev = priv->dev; @@ -119,7 +123,7 @@ Signed-off-by: Rafał Miłecki priv->ncells = 0; for (var = data + sizeof(struct brcm_nvram_header); -@@ -78,67 +131,67 @@ static int brcm_nvram_add_cells(struct b +@@ -78,67 +134,68 @@ static int brcm_nvram_add_cells(struct b } priv->cells = devm_kcalloc(dev, priv->ncells, sizeof(*priv->cells), GFP_KERNEL); @@ -204,7 +208,8 @@ Signed-off-by: Rafał Miłecki - return err; + len = le32_to_cpu(header->len); + if (len > priv->nvmem_size) { -+ dev_err(dev, "NVRAM length (%zd) exceeds mapped size (%zd)\n", len, priv->nvmem_size); ++ dev_err(dev, "NVRAM length (%zd) exceeds mapped size (%zd)\n", len, ++ priv->nvmem_size); + return -EINVAL; } @@ -215,7 +220,7 @@ Signed-off-by: Rafał Miłecki return 0; } -@@ -150,7 +203,6 @@ static int brcm_nvram_probe(struct platf +@@ -150,7 +207,6 @@ static int brcm_nvram_probe(struct platf .reg_read = brcm_nvram_read, }; struct device *dev = &pdev->dev; @@ -223,7 +228,7 @@ Signed-off-by: Rafał Miłecki struct brcm_nvram *priv; int err; -@@ -159,21 +211,19 @@ static int brcm_nvram_probe(struct platf +@@ -159,21 +215,19 @@ static int brcm_nvram_probe(struct platf return -ENOMEM; priv->dev = dev; diff --git a/target/linux/bcm53xx/patches-6.1/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch b/target/linux/bcm53xx/patches-6.1/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch similarity index 91% rename from target/linux/bcm53xx/patches-6.1/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch rename to target/linux/bcm53xx/patches-6.1/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch index 2aae713b640..cceb3635ac5 100644 --- a/target/linux/bcm53xx/patches-6.1/800-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch +++ b/target/linux/bcm53xx/patches-6.1/181-nvmem-brcm_nvram-store-a-copy-of-NVRAM-content.patch @@ -25,23 +25,27 @@ Cc: Arınç ÜNAL Cc: Florian Fainelli Cc: Scott Branden Signed-off-by: Rafał Miłecki +Acked-by: Arınç ÜNAL --- - drivers/nvmem/brcm_nvram.c | 130 +++++++++++++++++++++++++------------ - 1 file changed, 90 insertions(+), 40 deletions(-) + drivers/nvmem/brcm_nvram.c | 134 ++++++++++++++++++++++++++----------- + 1 file changed, 94 insertions(+), 40 deletions(-) --- a/drivers/nvmem/brcm_nvram.c +++ b/drivers/nvmem/brcm_nvram.c -@@ -17,9 +17,20 @@ +@@ -17,9 +17,23 @@ #define NVRAM_MAGIC "FLSH" +/** + * struct brcm_nvram - driver state internal struct + * ++ * @dev: NVMEM device pointer + * @nvmem_size: Size of the whole space available for NVRAM + * @data: NVRAM data copy stored to avoid poking underlaying flash controller + * @data_len: NVRAM data size + * @padding_byte: Padding value used to fill remaining space ++ * @cells: Array of discovered NVMEM cells ++ * @ncells: Number of elements in cells + */ struct brcm_nvram { struct device *dev; @@ -53,7 +57,7 @@ Signed-off-by: Rafał Miłecki struct nvmem_cell_info *cells; int ncells; }; -@@ -36,10 +47,47 @@ static int brcm_nvram_read(void *context +@@ -36,10 +50,47 @@ static int brcm_nvram_read(void *context size_t bytes) { struct brcm_nvram *priv = context; @@ -104,7 +108,7 @@ Signed-off-by: Rafał Miłecki return 0; } -@@ -67,8 +115,13 @@ static int brcm_nvram_add_cells(struct b +@@ -67,8 +118,13 @@ static int brcm_nvram_add_cells(struct b size_t len) { struct device *dev = priv->dev; @@ -119,7 +123,7 @@ Signed-off-by: Rafał Miłecki priv->ncells = 0; for (var = data + sizeof(struct brcm_nvram_header); -@@ -78,67 +131,67 @@ static int brcm_nvram_add_cells(struct b +@@ -78,67 +134,68 @@ static int brcm_nvram_add_cells(struct b } priv->cells = devm_kcalloc(dev, priv->ncells, sizeof(*priv->cells), GFP_KERNEL); @@ -204,7 +208,8 @@ Signed-off-by: Rafał Miłecki - return err; + len = le32_to_cpu(header->len); + if (len > priv->nvmem_size) { -+ dev_err(dev, "NVRAM length (%zd) exceeds mapped size (%zd)\n", len, priv->nvmem_size); ++ dev_err(dev, "NVRAM length (%zd) exceeds mapped size (%zd)\n", len, ++ priv->nvmem_size); + return -EINVAL; } @@ -215,7 +220,7 @@ Signed-off-by: Rafał Miłecki return 0; } -@@ -150,7 +203,6 @@ static int brcm_nvram_probe(struct platf +@@ -150,7 +207,6 @@ static int brcm_nvram_probe(struct platf .reg_read = brcm_nvram_read, }; struct device *dev = &pdev->dev; @@ -223,7 +228,7 @@ Signed-off-by: Rafał Miłecki struct brcm_nvram *priv; int err; -@@ -159,21 +211,19 @@ static int brcm_nvram_probe(struct platf +@@ -159,21 +215,19 @@ static int brcm_nvram_probe(struct platf return -ENOMEM; priv->dev = dev; From 6f5f9a0218ab7da6a11b91ee6a5ccba0531de963 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 2 Nov 2023 10:36:05 +0100 Subject: [PATCH 13/20] ucode: update to latest Git HEAD cfb24ea build: avoid redefining _FORTIFY_SOURCE 448c763 lib: enforce consistent `index()` behavior with empty needle argument cdc0203 nl80211: fix maybe uninitialized variable a69b5c8 vm: fix unused result warning ea046bd build: enable source fortification by default Signed-off-by: Jo-Philipp Wich --- 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 46112d31e88..b62633492aa 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-10-19 -PKG_SOURCE_VERSION:=07c03173d4e6a30953f92fa88ed29b0b956c9106 -PKG_MIRROR_HASH:=fd770335f442ebfc0f4e28d94bb60d886c43aa239ab88e965be7c490b3283a82 +PKG_SOURCE_DATE:=2023-11-02 +PKG_SOURCE_VERSION:=cfb24ea4f12131dcefe4f1ede2f51d3d16b88dec +PKG_MIRROR_HASH:=f515a23ab438f92be5788c42b9f614a82e670de2df1c01cd63143cdc77fa24fe PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From 376f1c80a967cf349e9d7d6168dd9bce3c35ebd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 2 Nov 2023 03:16:52 +0100 Subject: [PATCH 14/20] build: use long hashes when generating feed.buildinfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Short hashes are not guaranteed to be unambiguous forever and could collide if the repo grows over time. Git also estimates how many characters are roughly required to prevent such a collision and slowly increases the amount of characters beginning from 6, OpenWrt is already at 8. Lets use the full hash the have a predictable length and keep hashes unambiguous forever. Signed-off-by: Sandro Jäckel --- scripts/feeds | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/feeds b/scripts/feeds index aee73e793f5..7d5b83e0813 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -162,7 +162,7 @@ my %update_method = ( 'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)", 'post_update' => "git submodule update --init --recursive", 'controldir' => ".git", - 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, + 'revision' => "git rev-parse HEAD | tr -d '\n'"}, 'src-git-full' => { 'init' => "git clone '%s' '%s'", 'init_branch' => "git clone --branch '%s' '%s' '%s'", @@ -171,12 +171,12 @@ my %update_method = ( 'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)", 'post_update' => "git submodule update --init --recursive", 'controldir' => ".git", - 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, + 'revision' => "git rev-parse HEAD | tr -d '\n'"}, 'src-gitsvn' => { 'init' => "git svn clone -r HEAD '%s' '%s'", 'update' => "git svn rebase", 'controldir' => ".git", - 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, + 'revision' => "git rev-parse HEAD | tr -d '\n'"}, 'src-bzr' => { 'init' => "bzr checkout --lightweight '%s' '%s'", 'update' => "bzr update", From 4a8961f1dfba33b1e9a38dd0ecb3a8b03c46edbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 30 Oct 2023 19:31:03 +0000 Subject: [PATCH 15/20] tools: macOS: types.h: fix missing unsigned types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason unsigned types were not added in commit 0a06fcf608dd ("build: fix kernel 5.4 on macos"), which led to bunch of hacks, like commit 3cc57ba4627c ("uboot-sunxi: add missing type __u64") or commit 997ff740dc44 ("uboot-mediatek: fix build on Mac OS X"). So lets add the missing unsigned types to workaround it in a bit more maintainable way. Fixes: #13833 Signed-off-by: Petr Štetiar --- tools/include/asm/types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/include/asm/types.h b/tools/include/asm/types.h index 2c912326195..5a12bbe91b6 100644 --- a/tools/include/asm/types.h +++ b/tools/include/asm/types.h @@ -10,15 +10,20 @@ #define _ASM_GENERIC_INT_LL64_H typedef __signed__ char __s8; +typedef unsigned char __u8; typedef __signed__ short __s16; +typedef unsigned short __u16; typedef __signed__ int __s32; +typedef unsigned int __u32; #ifdef __GNUC__ __extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; #else typedef __signed__ long long __s64; +typedef unsigned long long __u64; #endif #endif /* _ASM_GENERIC_INT_LL64_H */ From f691830307b484ec611f173157739e56c78f336c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 30 Oct 2023 19:37:59 +0000 Subject: [PATCH 16/20] Revert "uboot-mediatek: fix build on Mac OS X" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 997ff740dc44045390680eaa30b6566d40bca322. 78cbd5apick as it should be fixed in commit 78cbd5a57e11 ("tools: macOS: types.h: fix missing unsigned types"). References: #13833 Signed-off-by: Petr Štetiar --- .../patches/260-add-missing-type-u64.patch | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch diff --git a/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch b/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch deleted file mode 100644 index a6204c7b69e..00000000000 --- a/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/linux/types.h -+++ b/include/linux/types.h -@@ -1,6 +1,7 @@ - #ifndef _LINUX_TYPES_H - #define _LINUX_TYPES_H - -+typedef unsigned long long __u64; - #include - #include - #include From bc47613cf0215743cde641f962386d59b57a332a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 30 Oct 2023 19:38:04 +0000 Subject: [PATCH 17/20] Revert "uboot-sunxi: add missing type __u64" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3cc57ba4627c9c7555f8ad86e4f78d86d8f9ddf0 as it should be fixed in commit 78cbd5a57e11 ("tools: macOS: types.h: fix missing unsigned types"). References: #13833 Signed-off-by: Petr Štetiar --- .../uboot-sunxi/patches/260-add-missing-type-u64.patch | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch diff --git a/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch b/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch deleted file mode 100644 index a6204c7b69e..00000000000 --- a/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/linux/types.h -+++ b/include/linux/types.h -@@ -1,6 +1,7 @@ - #ifndef _LINUX_TYPES_H - #define _LINUX_TYPES_H - -+typedef unsigned long long __u64; - #include - #include - #include From 5cdf152b28da70d12cd4eba08e1c75dd7afcced2 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 29 Oct 2023 17:00:29 +0100 Subject: [PATCH 18/20] qualcommax: ipq807x: move subtarget specific kernel options Currently, qualcommax target contains the full kernel config for the ipq807x subtarget, but since I am working on ipq60xx as well it makes sense to split out the ipq807x specific kernel options to subtarget config. ipq60xx will use the same approach and use subtarget config. Should result in the same end kernel config, verified by comparing the generated kernel .config. Signed-off-by: Robert Marko --- target/linux/qualcommax/config-6.1 | 34 +++---------------- .../linux/qualcommax/ipq807x/config-default | 30 ++++++++++++++++ 2 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 target/linux/qualcommax/ipq807x/config-default diff --git a/target/linux/qualcommax/config-6.1 b/target/linux/qualcommax/config-6.1 index 8bac3fa1872..7a983b961b3 100644 --- a/target/linux/qualcommax/config-6.1 +++ b/target/linux/qualcommax/config-6.1 @@ -52,7 +52,6 @@ CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y # CONFIG_ARM_MHU_V2 is not set CONFIG_ARM_PSCI_CPUIDLE=y -CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y CONFIG_ARM_PSCI_FW=y # CONFIG_ARM_QCOM_CPUFREQ_HW is not set CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y @@ -135,7 +134,6 @@ CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DTC=y -CONFIG_DT_IDLE_GENPD=y CONFIG_DT_IDLE_STATES=y CONFIG_EDAC_SUPPORT=y CONFIG_EXCLUSIVE_SYSTEM_RAM=y @@ -200,7 +198,7 @@ CONFIG_IPQ_APSS_PLL=y # CONFIG_IPQ_GCC_4019 is not set # CONFIG_IPQ_GCC_6018 is not set # CONFIG_IPQ_GCC_806X is not set -CONFIG_IPQ_GCC_8074=y +# CONFIG_IPQ_GCC_8074 is not set # CONFIG_IPQ_LCC_806X is not set CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y @@ -223,9 +221,7 @@ CONFIG_MDIO_IPQ4019=y # CONFIG_MDM_GCC_9615 is not set # CONFIG_MDM_LCC_9615 is not set CONFIG_MEMFD_CREATE=y -# CONFIG_MFD_HI6421_SPMI is not set # CONFIG_MFD_QCOM_RPM is not set -CONFIG_MFD_SPMI_PMIC=y CONFIG_MFD_SYSCON=y CONFIG_MIGRATION=y CONFIG_MMC=y @@ -279,7 +275,6 @@ CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y CONFIG_NVMEM=y CONFIG_NVMEM_QCOM_QFPROM=y # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set -# CONFIG_NVMEM_SPMI_SDAM is not set CONFIG_NVMEM_SYSFS=y CONFIG_NVMEM_U_BOOT_ENV=y CONFIG_OF=y @@ -327,7 +322,7 @@ CONFIG_PHY_QCOM_QUSB2=y # CONFIG_PHY_QCOM_USB_SS is not set CONFIG_PINCTRL=y # CONFIG_PINCTRL_IPQ6018 is not set -CONFIG_PINCTRL_IPQ8074=y +# CONFIG_PINCTRL_IPQ8074 is not set CONFIG_PINCTRL_MSM=y # CONFIG_PINCTRL_MSM8916 is not set # CONFIG_PINCTRL_MSM8976 is not set @@ -335,7 +330,6 @@ CONFIG_PINCTRL_MSM=y # CONFIG_PINCTRL_MSM8996 is not set # CONFIG_PINCTRL_MSM8998 is not set # CONFIG_PINCTRL_QCM2290 is not set -CONFIG_PINCTRL_QCOM_SPMI_PMIC=y # CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set # CONFIG_PINCTRL_QCS404 is not set # CONFIG_PINCTRL_SC7180 is not set @@ -348,15 +342,11 @@ CONFIG_PINCTRL_QCOM_SPMI_PMIC=y # CONFIG_PINCTRL_SM8250 is not set # CONFIG_PINCTRL_SM8450 is not set CONFIG_PM=y -# CONFIG_PM8916_WATCHDOG is not set CONFIG_PM_CLK=y -CONFIG_PM_GENERIC_DOMAINS=y -CONFIG_PM_GENERIC_DOMAINS_OF=y CONFIG_PM_OPP=y CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y CONFIG_POWER_RESET=y # CONFIG_POWER_RESET_MSM is not set -# CONFIG_POWER_RESET_QCOM_PON is not set CONFIG_POWER_SUPPLY=y CONFIG_PREEMPT_NONE_BUILD=y CONFIG_PRINTK_TIME=y @@ -366,18 +356,16 @@ CONFIG_PTP_1588_CLOCK_OPTIONAL=y # CONFIG_QCOM_A53PLL is not set # CONFIG_QCOM_AOSS_QMP is not set CONFIG_QCOM_APCS_IPC=y -CONFIG_QCOM_APM=y +# CONFIG_QCOM_APM is not set # CONFIG_QCOM_APR is not set CONFIG_QCOM_BAM_DMA=y # CONFIG_QCOM_CLK_APCC_MSM8996 is not set # CONFIG_QCOM_CLK_APCS_MSM8916 is not set # CONFIG_QCOM_CLK_APCS_SDX55 is not set -# CONFIG_QCOM_COINCELL is not set # CONFIG_QCOM_COMMAND_DB is not set # CONFIG_QCOM_CPR is not set # CONFIG_QCOM_EBI2 is not set # CONFIG_QCOM_FASTRPC is not set -CONFIG_QCOM_GDSC=y # CONFIG_QCOM_GENI_SE is not set # CONFIG_QCOM_GSBI is not set # CONFIG_QCOM_HFPLL is not set @@ -406,12 +394,9 @@ CONFIG_QCOM_SMP2P=y # CONFIG_QCOM_SMSM is not set CONFIG_QCOM_SOCINFO=y # CONFIG_QCOM_SPM is not set -CONFIG_QCOM_SPMI_ADC5=y -# CONFIG_QCOM_SPMI_RRADC is not set # CONFIG_QCOM_STATS is not set # CONFIG_QCOM_SYSMON is not set CONFIG_QCOM_TSENS=y -CONFIG_QCOM_VADC_COMMON=y # CONFIG_QCOM_WCNSS_CTRL is not set # CONFIG_QCOM_WCNSS_PIL is not set CONFIG_QCOM_WDT=y @@ -425,15 +410,9 @@ CONFIG_RAS=y CONFIG_RATIONAL=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_SPMI=y CONFIG_REGULATOR=y -CONFIG_REGULATOR_CPR3=y -# CONFIG_REGULATOR_CPR3_NPU is not set -CONFIG_REGULATOR_CPR4_APSS=y +# CONFIG_REGULATOR_CPR3 is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y -# CONFIG_REGULATOR_QCOM_LABIBB is not set -CONFIG_REGULATOR_QCOM_SPMI=y -# CONFIG_REGULATOR_QCOM_USB_VBUS is not set # CONFIG_REGULATOR_VQMMC_IPQ4019 is not set CONFIG_RELOCATABLE=y CONFIG_REMOTEPROC=y @@ -454,7 +433,6 @@ CONFIG_RPMSG_QCOM_SMD=y # CONFIG_RPMSG_TTY is not set CONFIG_RPS=y CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PM8XXX=y CONFIG_RTC_I2C_AND_SPI=y CONFIG_RWSEM_SPIN_ON_OWNER=y # CONFIG_SCHED_CORE is not set @@ -512,10 +490,6 @@ CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y CONFIG_SPI_QUP=y -CONFIG_SPMI=y -# CONFIG_SPMI_HISI3670 is not set -CONFIG_SPMI_MSM_PMIC_ARB=y -# CONFIG_SPMI_PMIC_CLKDIV is not set CONFIG_SRCU=y CONFIG_SWIOTLB=y CONFIG_SWPHY=y diff --git a/target/linux/qualcommax/ipq807x/config-default b/target/linux/qualcommax/ipq807x/config-default new file mode 100644 index 00000000000..18483d05b44 --- /dev/null +++ b/target/linux/qualcommax/ipq807x/config-default @@ -0,0 +1,30 @@ +CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y +CONFIG_DT_IDLE_GENPD=y +CONFIG_IPQ_GCC_8074=y +# CONFIG_MFD_HI6421_SPMI is not set +CONFIG_MFD_SPMI_PMIC=y +# CONFIG_NVMEM_SPMI_SDAM is not set +CONFIG_PINCTRL_IPQ8074=y +CONFIG_PINCTRL_QCOM_SPMI_PMIC=y +# CONFIG_PM8916_WATCHDOG is not set +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_OF=y +# CONFIG_POWER_RESET_QCOM_PON is not set +CONFIG_QCOM_APM=y +# CONFIG_QCOM_COINCELL is not set +CONFIG_QCOM_GDSC=y +CONFIG_QCOM_SPMI_ADC5=y +# CONFIG_QCOM_SPMI_RRADC is not set +CONFIG_QCOM_VADC_COMMON=y +CONFIG_REGMAP_SPMI=y +CONFIG_REGULATOR_CPR3=y +# CONFIG_REGULATOR_CPR3_NPU is not set +CONFIG_REGULATOR_CPR4_APSS=y +# CONFIG_REGULATOR_QCOM_LABIBB is not set +CONFIG_REGULATOR_QCOM_SPMI=y +# CONFIG_REGULATOR_QCOM_USB_VBUS is not set +CONFIG_RTC_DRV_PM8XXX=y +CONFIG_SPMI=y +# CONFIG_SPMI_HISI3670 is not set +CONFIG_SPMI_MSM_PMIC_ARB=y +# CONFIG_SPMI_PMIC_CLKDIV is not set From 86ca7199dfb132042ce3110acef23d74f4ef14a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 1 Nov 2023 16:49:20 +0100 Subject: [PATCH 19/20] build: fix pkg-config detection when inside of a nix-shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The output of command_all when inside a nix-shell looks like the below where /usr does not match: ➜ scripts/command_all.sh pkg-config /nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config Signed-off-by: Sandro Jäckel --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c325034bb9d..9bdb03a443f 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir world: -DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1) +DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1) export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH)) export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH) From ac199c57c59ebc4f3cf642ab8541fa665d731c29 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 22 Oct 2023 14:26:48 -0600 Subject: [PATCH 20/20] dnsmasq: don't source functions.sh twice It's already pulled in from /etc/rc.common. Fixes: #13758 Fixes: 6b23836071b1 ("package: avoid the use of eval to parse ipcalc.sh output") Signed-off-by: Philip Prindeville --- package/network/services/dnsmasq/files/dnsmasq.init | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 4cef2f4c295..d356a21f81f 100755 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -1,8 +1,6 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2007-2012 OpenWrt.org -. /lib/functions.sh - START=19 USE_PROCD=1