From 3860d9cac82f09090b838772a146585b14c26d25 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:06:27 +0000 Subject: [PATCH 01/13] openwrt: bump master 2024-11-14 -> 2024-08-14 --- openwrt/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 60d3ab6e..db59caff 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -1,5 +1,5 @@ # -# Builds Openwrt images for ar71xx & ipq806x targets used at Scale +# Builds Openwrt images for targets used at Scale # Assumes all dependency tools are already installed # @@ -24,7 +24,7 @@ KEYPATH ?= ../facts/keys/ GOMPLATE := $(shell command -v gomplate 2> /dev/null) CURL := $(shell command -v curl 2> /dev/null) -OPENWRT_VER ?= 9062e5faaedc03823ee419fe34de1de73f48babc +OPENWRT_VER ?= c8ea1aa970bf5a0275e3b0b7da777e804821ddcd # If bumping opkg it needs to be a commit that exists in the fork # https://github.com/sarcasticadmin/opkgs OPENWRT_PKG_VERSION ?= b18cf76d0f31fa12877f7b8e83596d27d89f0020 From 31a3a6e1721b6c35d7761fb0618af3d7987ed7f2 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:20:41 +0000 Subject: [PATCH 02/13] openwrt: opkg bump to 2024-12-26 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index db59caff..777e876a 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -27,7 +27,7 @@ CURL := $(shell command -v curl 2> /dev/null) OPENWRT_VER ?= c8ea1aa970bf5a0275e3b0b7da777e804821ddcd # If bumping opkg it needs to be a commit that exists in the fork # https://github.com/sarcasticadmin/opkgs -OPENWRT_PKG_VERSION ?= b18cf76d0f31fa12877f7b8e83596d27d89f0020 +OPENWRT_PKG_VERSION ?= 38e0f8c7d5c2f69f1603abb99e0fd3886c05f687 SHORT_VER = $(shell echo $(OPENWRT_VER) | cut -c 1-7) IMAGEBUILDER = source-$(TARGET)-$(SHORT_VER) From 83581b6e4227460aa1df4f721b11d7dd89463ff9 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:27:44 +0000 Subject: [PATCH 03/13] openwrt: update Dockerfile for building to ubuntu 24.04 --- openwrt/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openwrt/Dockerfile b/openwrt/Dockerfile index 8b998c27..aac27a11 100644 --- a/openwrt/Dockerfile +++ b/openwrt/Dockerfile @@ -1,5 +1,5 @@ FROM hairyhenderson/gomplate:v3.2.0-slim AS gomplate -FROM ubuntu:20.04 as build +FROM ubuntu:24.04 AS build ENV TZ=ETC/UTC @@ -8,15 +8,13 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ apt-get install -y sudo time git-core subversion build-essential gcc-multilib \ - libncurses5-dev zlib1g-dev gawk flex gettext wget unzip \ - curl rsync python3 python3-distutils \ + libncurses5-dev \ + zlib1g-dev gawk flex gettext wget unzip \ + curl rsync python3 file swig zstd \ python3-setuptools python3-dev pkg-config &&\ apt-get clean COPY --from=gomplate /gomplate /bin/gomplate -RUN useradd -m openwrt &&\ - echo 'openwrt ALL=NOPASSWD: ALL' > /etc/sudoers.d/openwrt - -USER openwrt -WORKDIR /home/openwrt +USER ubuntu +WORKDIR /home/ubuntu From 7236acf861d58be26f114e85839259a77ec9b506 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:23:33 +0000 Subject: [PATCH 04/13] openwrt: moving default make TARGET=ath79 --- openwrt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt/Makefile b/openwrt/Makefile index 777e876a..cd50608a 100644 --- a/openwrt/Makefile +++ b/openwrt/Makefile @@ -11,7 +11,7 @@ include include/*.mk SHELL = /usr/bin/env bash # WNDR by default -TARGET ?= ar71xx +TARGET ?= ath79 BUILD_DIR ?= build # Set to configure -j (defaults to nproc) From c021370a2e8ec1598432098bd1d3cc2e128ff3c7 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:26:42 +0000 Subject: [PATCH 05/13] github: matrix build move ar71xx -> ath79 --- .github/workflows/openwrt-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openwrt-build.yml b/.github/workflows/openwrt-build.yml index 698a5c98..0438355b 100644 --- a/.github/workflows/openwrt-build.yml +++ b/.github/workflows/openwrt-build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - target: ["ar71xx", "mt7622"] + target: ["ath79", "mt7622"] container: # Ubuntu 20.04 image: sarcasticadmin/openwrt-build@sha256:3fab43fea9e698bade514af0b84192ec447708c8f24d7c5a5e383464e9c44922 From d5a6e4d3d0aaf23417b03139237345e0a52543db Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:25:28 +0000 Subject: [PATCH 06/13] openwrt/tests: moving golden files to new ath79 arch --- openwrt/include/tests.mk | 4 ++-- tests/unit/openwrt/golden/{ar71xx => ath79}/etc/apinger.tmpl | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/lldpd | 2 +- .../openwrt/golden/{ar71xx => ath79}/etc/config/network.0 | 0 .../openwrt/golden/{ar71xx => ath79}/etc/config/network.1 | 0 .../{ar71xx => ath79}/etc/config/prometheus-node-exporter-lua | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/system | 0 .../openwrt/golden/{ar71xx => ath79}/etc/config/wireless.0 | 0 .../openwrt/golden/{ar71xx => ath79}/etc/config/wireless.1 | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/crontabs/root | 0 .../unit/openwrt/golden/{ar71xx => ath79}/etc/logrotate.conf | 0 .../openwrt/golden/{ar71xx => ath79}/etc/logrotate.d/rsyslog | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/passwd | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/rc.local | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/rsyslog.conf | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/shadow | 0 .../unit/openwrt/golden/{ar71xx => ath79}/etc/ssh/sshd_config | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/etc/udhcpc.user | 0 tests/unit/openwrt/golden/{ar71xx => ath79}/root/.bashrc | 0 .../golden/{ar71xx => ath79}/root/.ssh/authorized_keys | 0 .../openwrt/golden/{ar71xx => ath79}/root/bin/apinger-pop.sh | 0 .../golden/{ar71xx => ath79}/root/bin/config-version.sh | 0 .../openwrt/golden/{ar71xx => ath79}/root/bin/wifi-details.sh | 0 tests/unit/openwrt/test.sh | 2 +- 24 files changed, 4 insertions(+), 4 deletions(-) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/apinger.tmpl (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/lldpd (91%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/network.0 (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/network.1 (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/prometheus-node-exporter-lua (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/system (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/wireless.0 (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/config/wireless.1 (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/crontabs/root (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/logrotate.conf (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/logrotate.d/rsyslog (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/passwd (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/rc.local (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/rsyslog.conf (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/shadow (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/ssh/sshd_config (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/etc/udhcpc.user (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/root/.bashrc (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/root/.ssh/authorized_keys (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/root/bin/apinger-pop.sh (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/root/bin/config-version.sh (100%) rename tests/unit/openwrt/golden/{ar71xx => ath79}/root/bin/wifi-details.sh (100%) diff --git a/openwrt/include/tests.mk b/openwrt/include/tests.mk index af0320b9..c3bb6847 100644 --- a/openwrt/include/tests.mk +++ b/openwrt/include/tests.mk @@ -10,11 +10,11 @@ REPO_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) golden-test: @cd $(REPO_ROOT)/tests/unit/openwrt && \ - sh test.sh -t ar71xx + sh test.sh -t ath79 golden-update: @cd $(REPO_ROOT)/tests/unit/openwrt && \ - sh test.sh -u -t ar71xx + sh test.sh -u -t ath79 autoflash-test: curl --request POST \ diff --git a/tests/unit/openwrt/golden/ar71xx/etc/apinger.tmpl b/tests/unit/openwrt/golden/ath79/etc/apinger.tmpl similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/apinger.tmpl rename to tests/unit/openwrt/golden/ath79/etc/apinger.tmpl diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/lldpd b/tests/unit/openwrt/golden/ath79/etc/config/lldpd similarity index 91% rename from tests/unit/openwrt/golden/ar71xx/etc/config/lldpd rename to tests/unit/openwrt/golden/ath79/etc/config/lldpd index 41098c16..46859d67 100644 --- a/tests/unit/openwrt/golden/ar71xx/etc/config/lldpd +++ b/tests/unit/openwrt/golden/ath79/etc/config/lldpd @@ -13,4 +13,4 @@ config lldpd config # Set class of device option lldp_class 4 # if empty, the distribution description is sent - option lldp_description "ar71xx SCaLE OpenWrt" + option lldp_description "ath79 SCaLE OpenWrt" diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/network.0 b/tests/unit/openwrt/golden/ath79/etc/config/network.0 similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/network.0 rename to tests/unit/openwrt/golden/ath79/etc/config/network.0 diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/network.1 b/tests/unit/openwrt/golden/ath79/etc/config/network.1 similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/network.1 rename to tests/unit/openwrt/golden/ath79/etc/config/network.1 diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/prometheus-node-exporter-lua b/tests/unit/openwrt/golden/ath79/etc/config/prometheus-node-exporter-lua similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/prometheus-node-exporter-lua rename to tests/unit/openwrt/golden/ath79/etc/config/prometheus-node-exporter-lua diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/system b/tests/unit/openwrt/golden/ath79/etc/config/system similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/system rename to tests/unit/openwrt/golden/ath79/etc/config/system diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/wireless.0 b/tests/unit/openwrt/golden/ath79/etc/config/wireless.0 similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/wireless.0 rename to tests/unit/openwrt/golden/ath79/etc/config/wireless.0 diff --git a/tests/unit/openwrt/golden/ar71xx/etc/config/wireless.1 b/tests/unit/openwrt/golden/ath79/etc/config/wireless.1 similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/config/wireless.1 rename to tests/unit/openwrt/golden/ath79/etc/config/wireless.1 diff --git a/tests/unit/openwrt/golden/ar71xx/etc/crontabs/root b/tests/unit/openwrt/golden/ath79/etc/crontabs/root similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/crontabs/root rename to tests/unit/openwrt/golden/ath79/etc/crontabs/root diff --git a/tests/unit/openwrt/golden/ar71xx/etc/logrotate.conf b/tests/unit/openwrt/golden/ath79/etc/logrotate.conf similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/logrotate.conf rename to tests/unit/openwrt/golden/ath79/etc/logrotate.conf diff --git a/tests/unit/openwrt/golden/ar71xx/etc/logrotate.d/rsyslog b/tests/unit/openwrt/golden/ath79/etc/logrotate.d/rsyslog similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/logrotate.d/rsyslog rename to tests/unit/openwrt/golden/ath79/etc/logrotate.d/rsyslog diff --git a/tests/unit/openwrt/golden/ar71xx/etc/passwd b/tests/unit/openwrt/golden/ath79/etc/passwd similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/passwd rename to tests/unit/openwrt/golden/ath79/etc/passwd diff --git a/tests/unit/openwrt/golden/ar71xx/etc/rc.local b/tests/unit/openwrt/golden/ath79/etc/rc.local similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/rc.local rename to tests/unit/openwrt/golden/ath79/etc/rc.local diff --git a/tests/unit/openwrt/golden/ar71xx/etc/rsyslog.conf b/tests/unit/openwrt/golden/ath79/etc/rsyslog.conf similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/rsyslog.conf rename to tests/unit/openwrt/golden/ath79/etc/rsyslog.conf diff --git a/tests/unit/openwrt/golden/ar71xx/etc/shadow b/tests/unit/openwrt/golden/ath79/etc/shadow similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/shadow rename to tests/unit/openwrt/golden/ath79/etc/shadow diff --git a/tests/unit/openwrt/golden/ar71xx/etc/ssh/sshd_config b/tests/unit/openwrt/golden/ath79/etc/ssh/sshd_config similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/ssh/sshd_config rename to tests/unit/openwrt/golden/ath79/etc/ssh/sshd_config diff --git a/tests/unit/openwrt/golden/ar71xx/etc/udhcpc.user b/tests/unit/openwrt/golden/ath79/etc/udhcpc.user similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/etc/udhcpc.user rename to tests/unit/openwrt/golden/ath79/etc/udhcpc.user diff --git a/tests/unit/openwrt/golden/ar71xx/root/.bashrc b/tests/unit/openwrt/golden/ath79/root/.bashrc similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/root/.bashrc rename to tests/unit/openwrt/golden/ath79/root/.bashrc diff --git a/tests/unit/openwrt/golden/ar71xx/root/.ssh/authorized_keys b/tests/unit/openwrt/golden/ath79/root/.ssh/authorized_keys similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/root/.ssh/authorized_keys rename to tests/unit/openwrt/golden/ath79/root/.ssh/authorized_keys diff --git a/tests/unit/openwrt/golden/ar71xx/root/bin/apinger-pop.sh b/tests/unit/openwrt/golden/ath79/root/bin/apinger-pop.sh similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/root/bin/apinger-pop.sh rename to tests/unit/openwrt/golden/ath79/root/bin/apinger-pop.sh diff --git a/tests/unit/openwrt/golden/ar71xx/root/bin/config-version.sh b/tests/unit/openwrt/golden/ath79/root/bin/config-version.sh similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/root/bin/config-version.sh rename to tests/unit/openwrt/golden/ath79/root/bin/config-version.sh diff --git a/tests/unit/openwrt/golden/ar71xx/root/bin/wifi-details.sh b/tests/unit/openwrt/golden/ath79/root/bin/wifi-details.sh similarity index 100% rename from tests/unit/openwrt/golden/ar71xx/root/bin/wifi-details.sh rename to tests/unit/openwrt/golden/ath79/root/bin/wifi-details.sh diff --git a/tests/unit/openwrt/test.sh b/tests/unit/openwrt/test.sh index 80a6fdf8..9dbed0f4 100755 --- a/tests/unit/openwrt/test.sh +++ b/tests/unit/openwrt/test.sh @@ -42,7 +42,7 @@ do done shift $((OPTIND -1)) -TARGET=${TARGET:-'ar71xx'} +TARGET=${TARGET:-'ath79'} UPDATE=${UPDATE:-0} TMPLOC="${OUTPUT:-.}/tmp/${TARGET}" From 4f2b80d64a427b08b4a6de45a7b2caefd6b68d68 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:30:24 +0000 Subject: [PATCH 07/13] github: update openwrt-build.yml container --- .github/workflows/openwrt-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/openwrt-build.yml b/.github/workflows/openwrt-build.yml index 0438355b..97d921d4 100644 --- a/.github/workflows/openwrt-build.yml +++ b/.github/workflows/openwrt-build.yml @@ -12,10 +12,10 @@ jobs: matrix: target: ["ath79", "mt7622"] container: - # Ubuntu 20.04 - image: sarcasticadmin/openwrt-build@sha256:3fab43fea9e698bade514af0b84192ec447708c8f24d7c5a5e383464e9c44922 - # Since user is openwrt and gets 1001 from inside container - options: --user 1001 + # Ubuntu 24.04 + image: sarcasticadmin/openwrt-build@sha256:25ac9d0dd4eeaad1aaaa7c82c09e9ecc103c69224fc55eb9717c4cfb018a5281 + # Since user is ubuntu and gets 1000 from inside container + options: --user 1000 steps: - uses: actions/checkout@v1 with: From bb4136168bd9d991937c8f7f885fe87b0da2780d Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:33:47 +0000 Subject: [PATCH 08/13] nix.checks.openwrt-golden: update from ar71xx to ath79 for golden --- nix/checks/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/checks/default.nix b/nix/checks/default.nix index a49f35a4..f9d43077 100644 --- a/nix/checks/default.nix +++ b/nix/checks/default.nix @@ -131,11 +131,11 @@ genAttrs buildPhase = '' cd tests/unit/openwrt - mkdir -p $out/tmp/ar71xx + mkdir -p $out/tmp/ath79 ''; installPhase = '' - ./test.sh -t ar71xx -o $out + ./test.sh -t ath79 -o $out ''; }); From a508181606393d14a53d223f5ac1540672839cea Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:36:04 +0000 Subject: [PATCH 09/13] openwrt: update configs after version bump --- openwrt/configs/ar71xx-generic.config | 3 +-- openwrt/configs/ath79-generic.config | 9 +++++++++ openwrt/configs/common.config | 13 ++++++++----- openwrt/configs/mt7622-generic.config | 2 +- 4 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 openwrt/configs/ath79-generic.config diff --git a/openwrt/configs/ar71xx-generic.config b/openwrt/configs/ar71xx-generic.config index 77c2648e..f71ecd67 100644 --- a/openwrt/configs/ar71xx-generic.config +++ b/openwrt/configs/ar71xx-generic.config @@ -1,5 +1,4 @@ -# CONFIG_PACKAGE_ucode-mod-uci is not set -CONFIG_PACKAGE_libatomic=y +CONFIG_PACKAGE_libpthread=y CONFIG_PACKAGE_librt=y CONFIG_PACKAGE_libuuid=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_netgear_wndr3700-v2=y diff --git a/openwrt/configs/ath79-generic.config b/openwrt/configs/ath79-generic.config new file mode 100644 index 00000000..f71ecd67 --- /dev/null +++ b/openwrt/configs/ath79-generic.config @@ -0,0 +1,9 @@ +CONFIG_PACKAGE_libpthread=y +CONFIG_PACKAGE_librt=y +CONFIG_PACKAGE_libuuid=y +CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_netgear_wndr3700-v2=y +CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_netgear_wndr3800=y +CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_netgear_wndr3800ch=y +CONFIG_TARGET_MULTI_PROFILE=y +CONFIG_TARGET_ath79=y +CONFIG_TARGET_ath79_generic=y diff --git a/openwrt/configs/common.config b/openwrt/configs/common.config index 773d9197..d311948e 100644 --- a/openwrt/configs/common.config +++ b/openwrt/configs/common.config @@ -14,6 +14,7 @@ CONFIG_LLDPD_WITH_FDP=y CONFIG_LLDPD_WITH_LLDPMED=y CONFIG_LLDPD_WITH_PRIVSEP=y CONFIG_LLDPD_WITH_SONMP=y +CONFIG_LOGROTATE_ACL=y # CONFIG_LUA_ECO_MBEDTLS is not set CONFIG_LUA_ECO_OPENSSL=y CONFIG_OPENSSH_LIBFIDO2=y @@ -33,7 +34,7 @@ CONFIG_OPENSSL_WITH_SRP=y CONFIG_OPENSSL_WITH_SSE2=y CONFIG_OPENSSL_WITH_TLS13=y CONFIG_OPENSSL_WITH_WHIRLPOOL=y -CONFIG_PACKAGE_apinger=y +CONFIG_PACKAGE_apinger-upstream=y CONFIG_PACKAGE_bash=y # CONFIG_PACKAGE_dnsmasq is not set # CONFIG_PACKAGE_dropbear is not set @@ -42,6 +43,9 @@ CONFIG_PACKAGE_iperf3=y # CONFIG_PACKAGE_jansson is not set CONFIG_PACKAGE_jq=y # CONFIG_PACKAGE_kmod-nft-fib is not set +CONFIG_PACKAGE_libacl=y +CONFIG_PACKAGE_libatomic=y +CONFIG_PACKAGE_libattr=y CONFIG_PACKAGE_libcap=y CONFIG_PACKAGE_libcbor=y CONFIG_PACKAGE_libestr=y @@ -62,11 +66,10 @@ CONFIG_PACKAGE_libpcap=y CONFIG_PACKAGE_libpopt=y CONFIG_PACKAGE_libreadline=y CONFIG_PACKAGE_libubus-lua=y -# CONFIG_PACKAGE_libucode is not set CONFIG_PACKAGE_libudev-zero=y CONFIG_PACKAGE_lldpd=y -CONFIG_PACKAGE_logger=y # CONFIG_PACKAGE_logd is not set +CONFIG_PACKAGE_logger=y CONFIG_PACKAGE_logrotate=y CONFIG_PACKAGE_lua=y CONFIG_PACKAGE_luasocket=y @@ -83,7 +86,7 @@ CONFIG_PACKAGE_prometheus-node-exporter-lua-wifi_stations=y CONFIG_PACKAGE_rsyslog=y CONFIG_PACKAGE_tcpdump=y CONFIG_PACKAGE_terminfo=y -# CONFIG_PACKAGE_ucode is not set +# CONFIG_PACKAGE_ucode-mod-ubus is not set +# CONFIG_PACKAGE_ucode-mod-uci is not set CONFIG_PACKAGE_uhttpd=y CONFIG_PACKAGE_uhttpd-mod-lua=y -CONFIG_PACKAGE_zlib=y diff --git a/openwrt/configs/mt7622-generic.config b/openwrt/configs/mt7622-generic.config index 16fdbcd1..50b7c624 100644 --- a/openwrt/configs/mt7622-generic.config +++ b/openwrt/configs/mt7622-generic.config @@ -1,4 +1,4 @@ -# CONFIG_PACKAGE_ucode-mod-uci is not set +CONFIG_PACKAGE_libpthread=y CONFIG_PACKAGE_librt=y CONFIG_PACKAGE_libuuid=y CONFIG_TARGET_mediatek=y From f199546edd53683de6681a0cc17dc93aa339a4ee Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:39:07 +0000 Subject: [PATCH 10/13] openwrt: files* updates for ath79 --- openwrt/{files-ar71xx => files-ath79}/etc/config/network.0 | 7 ------- openwrt/{files-ar71xx => files-ath79}/etc/config/network.1 | 0 .../{files-ar71xx => files-ath79}/etc/config/wireless.0 | 0 .../{files-ar71xx => files-ath79}/etc/config/wireless.1 | 0 openwrt/files/etc/config/system | 2 +- 5 files changed, 1 insertion(+), 8 deletions(-) rename openwrt/{files-ar71xx => files-ath79}/etc/config/network.0 (85%) rename openwrt/{files-ar71xx => files-ath79}/etc/config/network.1 (100%) rename openwrt/{files-ar71xx => files-ath79}/etc/config/wireless.0 (100%) rename openwrt/{files-ar71xx => files-ath79}/etc/config/wireless.1 (100%) diff --git a/openwrt/files-ar71xx/etc/config/network.0 b/openwrt/files-ath79/etc/config/network.0 similarity index 85% rename from openwrt/files-ar71xx/etc/config/network.0 rename to openwrt/files-ath79/etc/config/network.0 index 448fc7a9..14f22eb3 100644 --- a/openwrt/files-ar71xx/etc/config/network.0 +++ b/openwrt/files-ath79/etc/config/network.0 @@ -4,13 +4,8 @@ config interface 'loopback' option ipaddr '127.0.0.1' option netmask '255.0.0.0' -{{ if (eq (env.Getenv "TARGET") "ar71xx") }} config globals 'globals' option ula_prefix 'fdfa:7251:0374::/48' -{{ else }} -config globals 'globals' - option ula_prefix 'fd38:15c5:20b8::/48' -{{ end }} {{ range (datasource "openwrt").wired.switches }} config switch @@ -35,7 +30,6 @@ config interface '{{.name}}' {{ end -}} {{ end }} -{{ if (eq (env.Getenv "TARGET") "ar71xx") }} config switch_port option device 'rtl8366s' option port '1' @@ -50,4 +44,3 @@ config switch_port option device 'rtl8366s' option port '5' option led '2' -{{ end }} diff --git a/openwrt/files-ar71xx/etc/config/network.1 b/openwrt/files-ath79/etc/config/network.1 similarity index 100% rename from openwrt/files-ar71xx/etc/config/network.1 rename to openwrt/files-ath79/etc/config/network.1 diff --git a/openwrt/files-ar71xx/etc/config/wireless.0 b/openwrt/files-ath79/etc/config/wireless.0 similarity index 100% rename from openwrt/files-ar71xx/etc/config/wireless.0 rename to openwrt/files-ath79/etc/config/wireless.0 diff --git a/openwrt/files-ar71xx/etc/config/wireless.1 b/openwrt/files-ath79/etc/config/wireless.1 similarity index 100% rename from openwrt/files-ar71xx/etc/config/wireless.1 rename to openwrt/files-ath79/etc/config/wireless.1 diff --git a/openwrt/files/etc/config/system b/openwrt/files/etc/config/system index 67073934..87302f9b 100644 --- a/openwrt/files/etc/config/system +++ b/openwrt/files/etc/config/system @@ -10,7 +10,7 @@ config timeserver 'ntp' option enable_server '0' list server '{{ (datasource "openwrt").ntp.server }}' -{{ if (eq (env.Getenv "TARGET") "ar71xx") }} +{{ if (eq (env.Getenv "TARGET") "ath79") }} config led 'led_wan' option name 'WAN LED (green)' option sysfs 'netgear:green:wan' From 75ca01f04a11ca071f6f4945a11560f9705d19d6 Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:43:00 +0000 Subject: [PATCH 11/13] openwrt: rename input yaml files to ath79 --- .../{ar71xx-openwrt-example.yaml => ath79-openwrt-example.yaml} | 0 .../secrets/{ar71xx-openwrt-show.yaml => ath79-openwrt-show.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename facts/secrets/{ar71xx-openwrt-example.yaml => ath79-openwrt-example.yaml} (100%) rename facts/secrets/{ar71xx-openwrt-show.yaml => ath79-openwrt-show.yaml} (100%) diff --git a/facts/secrets/ar71xx-openwrt-example.yaml b/facts/secrets/ath79-openwrt-example.yaml similarity index 100% rename from facts/secrets/ar71xx-openwrt-example.yaml rename to facts/secrets/ath79-openwrt-example.yaml diff --git a/facts/secrets/ar71xx-openwrt-show.yaml b/facts/secrets/ath79-openwrt-show.yaml similarity index 100% rename from facts/secrets/ar71xx-openwrt-show.yaml rename to facts/secrets/ath79-openwrt-show.yaml From 6ea442055af9e69404eb2171cf52adac28b0ee0f Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 22:14:20 +0000 Subject: [PATCH 12/13] openwrt/tests: update golden output for ath79 --- tests/unit/openwrt/golden/ath79/etc/config/network.0 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/unit/openwrt/golden/ath79/etc/config/network.0 b/tests/unit/openwrt/golden/ath79/etc/config/network.0 index 6509361b..e234aa76 100644 --- a/tests/unit/openwrt/golden/ath79/etc/config/network.0 +++ b/tests/unit/openwrt/golden/ath79/etc/config/network.0 @@ -4,12 +4,10 @@ config interface 'loopback' option ipaddr '127.0.0.1' option netmask '255.0.0.0' - config globals 'globals' option ula_prefix 'fdfa:7251:0374::/48' - config switch option blinkrate '2' option enable_vlan '1' @@ -124,7 +122,6 @@ config interface 'backdoor' option proto 'static' - config switch_port option device 'rtl8366s' option port '1' @@ -139,4 +136,3 @@ config switch_port option device 'rtl8366s' option port '5' option led '2' - From 0f24be7d0abf96f61fa1f72de80d7dba839bceec Mon Sep 17 00:00:00 2001 From: Robert James Hernandez Date: Sun, 26 Jan 2025 21:44:07 +0000 Subject: [PATCH 13/13] openwrt: update build docs to leverage git rev-parse --- openwrt/docs/BUILD.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openwrt/docs/BUILD.md b/openwrt/docs/BUILD.md index 0cba5727..1ad68008 100644 --- a/openwrt/docs/BUILD.md +++ b/openwrt/docs/BUILD.md @@ -31,7 +31,7 @@ for all members of the tech team. To start building: ``` -# Make sure to mount the git root inside this container +# Make sure to mount the git rev-parse --show-toplevel) inside this container docker run -v $(git rev-parse --show-toplevel):/home/openwrt/scale-network --rm -it sarcasticadmin/openwrt-build@sha256:3fab43fea9e698bade514af0b84192ec447708c8f24d7c5a5e383464e9c44922 /bin/bash cd /home/openwrt/scale-network ``` @@ -255,7 +255,7 @@ rm -f *.config If you already have a true common config (meaning no specific arch or arch packages inside) you can copy it in: ``` -cp $(git root)/openwrt/configs/common.config ./.config +cp $(git rev-parse --show-toplevel)/openwrt/configs/common.config ./.config ``` Or create a new one: @@ -270,29 +270,29 @@ Install only packages which are utilities and non arch specific things. We dont the `common.config` ``` -./scripts/diffconfig.sh | tee .diffconfig | grep -v CONFIG_TARGET > $(git root)/openwrt/configs/common.config +./scripts/diffconfig.sh | tee .diffconfig | grep -v CONFIG_TARGET > $(git rev-parse --show-toplevel)/openwrt/configs/common.config ``` ``` -comm -23 <(sort ./.diffconfig) <(sort $(git root)/openwrt/configs/common.config) > $(git root)/openwrt/configs/x86-generic.config +comm -23 <(sort ./.diffconfig) <(sort $(git rev-parse --show-toplevel)/openwrt/configs/common.config) > $(git rev-parse --show-toplevel)/openwrt/configs/x86-generic.config ``` Now we have the `common.config` and `x86-generic.config`. To add in a specific board: ``` cd -cat $(git root)/openwrt/configs/common.config > ./.config -cat $(git root)/openwrt/configs/x86_generic.config >> ./.config +cat $(git rev-parse --show-toplevel)/openwrt/configs/common.config > ./.config +cat $(git rev-parse --show-toplevel)/openwrt/configs/x86_generic.config >> ./.config ``` Run `make menuconfig` and change the arch from x86 to target arch: ``` -./scripts/diffconfig.sh | tee .diffconfig | grep -v CONFIG_TARGET > $(git root)/openwrt/configs/common.config +./scripts/diffconfig.sh | tee .diffconfig | grep -v CONFIG_TARGET > $(git rev-parse --show-toplevel)/openwrt/configs/common.config ``` ``` -comm -23 <(sort ./.diffconfig) <(sort $(git root)/openwrt/configs/common.config) > $(git root)/openwrt/configs/mt7622-generic.config +comm -23 <(sort ./.diffconfig) <(sort $(git rev-parse --show-toplevel)/openwrt/configs/common.config) > $(git rev-parse --show-toplevel)/openwrt/configs/mt7622-generic.config ``` > Assuming mt7622 is our target arch