From patchwork Wed Dec 6 02:54:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1874227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=nTJ23Ubo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SpCJF5nRbz1ySY for ; Mon, 11 Dec 2023 04:57:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:Cc:To:Subject:Date:From:References:In-Reply-To:Message-Id:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GBPusJAZ2lh8FYw/H0YaoFBMMAYz0jBvLcsqmU8VZ9k=; b=nTJ23UboxhMZMFYPQ8m1j8c3v5 SqGFmi++QcLVJN73g+40XajFqCDFkXjc75kme0hN8mfdxA26qwnXtCTANetyTJZmVCPhylD/OFfeS UQ5MEqE5oqvoSBcPMyorzDM6TgvYIcBQNPzXMW/0zdsIEvs9ywTl181enAZWt+M4RmuOn6wAw8HQV xDWzJQSdTur0hqWM0M0rRA+tFgDPfWpHg7Kf0NCtRS36R8pXHEskT2hYHlDKz/IrzutHX2Bsp232s QXyCRXwVo03FvZ3gMPsRyO4vbbXUifGmCEst/FNvHYJzVwi3Uk4St/SQyVkDRl19GIHSeHCWRm/LD dQtHfNrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rCO1a-003KUL-0b; Sun, 10 Dec 2023 17:55:30 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rCO1T-003KSl-32 for openwrt-devel@lists.openwrt.org; Sun, 10 Dec 2023 17:55:26 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 3BAHs39r020280 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 10 Dec 2023 12:55:21 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 3BAHs3Ei020279; Sun, 10 Dec 2023 09:54:03 -0800 (PST) (envelope-from ehem) Message-Id: <30dd08245134ac8e09643f9dea25b8a7ec2eceb7.1702174576.git.ehem+openwrt@m5p.com> In-Reply-To: References: From: Elliott Mitchell Date: Tue, 5 Dec 2023 18:54:42 -0800 Subject: [PATCH RESEND 11/11] kernel/x86: isolate board-specific files to associated architecture To: openwrt-devel@lists.openwrt.org Cc: daniel@makrotopia.org X-Spam-Status: No, score=3.8 required=10.0 tests=DATE_IN_PAST_96_XX, KHOP_HELO_FCRDNS,PP_MIME_FAKE_ASCII_TEXT,URIBL_BLACK autolearn=no autolearn_force=no version=4.0.0 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231210_095524_783459_07F66283 X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 4.8 (++++) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Split the board.d files to isolate their data to associated architectures. Seems wasteful to include all board-specific data with every single build. Signed-off-by: Elliott Mitchell --- .../{ => 64}/base-files/etc/board.d/01_leds | 5 ----- .../base-files/etc/board.d/02_network | 7 ------- .../x86/geode/base-files/etc/board.d/ [...] Content analysis details: (4.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: system.sh] 1.0 PP_MIME_FAKE_ASCII_TEXT BODY: MIME text/plain claims to be ASCII but isn't X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Split the board.d files to isolate their data to associated architectures. Seems wasteful to include all board-specific data with every single build. Signed-off-by: Elliott Mitchell --- .../{ => 64}/base-files/etc/board.d/01_leds | 5 ----- .../base-files/etc/board.d/02_network | 7 ------- .../x86/geode/base-files/etc/board.d/01_leds | 18 ++++++++++++++++ .../geode/base-files/etc/board.d/02_network | 21 +++++++++++++++++++ 4 files changed, 39 insertions(+), 12 deletions(-) rename target/linux/x86/{ => 64}/base-files/etc/board.d/01_leds (85%) rename target/linux/x86/{ => 64}/base-files/etc/board.d/02_network (93%) create mode 100644 target/linux/x86/geode/base-files/etc/board.d/01_leds create mode 100644 target/linux/x86/geode/base-files/etc/board.d/02_network diff --git a/target/linux/x86/base-files/etc/board.d/01_leds b/target/linux/x86/64/base-files/etc/board.d/01_leds similarity index 85% rename from target/linux/x86/base-files/etc/board.d/01_leds rename to target/linux/x86/64/base-files/etc/board.d/01_leds index 47ea0929e6..2d65997d99 100644 --- a/target/linux/x86/base-files/etc/board.d/01_leds +++ b/target/linux/x86/64/base-files/etc/board.d/01_leds @@ -23,11 +23,6 @@ sophos-sg-105wr2|sophos-sg-125wr2|sophos-sg-135wr2|sophos-xg-105wr2|sophos-xg-12 sophos-sg-105wr3|sophos-sg-125wr3|sophos-sg-135wr3|sophos-xg-105wr3|sophos-xg-125wr3|sophos-xg-135wr3) ucidef_set_led_netdev "wlan" "WiFi" "ath10k-phy0" "phy0tpt" ;; -traverse-technologies-geos) - ucidef_set_led_netdev "lan" "LAN" "geos:1" "br-lan" "tx rx" - ucidef_set_led_netdev "wlan" "WiFi" "geos:2" "phy0tpt" - ucidef_set_led_default "diag" "DIAG" "geos:3" "1" - ;; silicom-80500-0214-*) ucidef_set_led_netdev "wan" "WAN" "multicolor:fp_center" "wan0" ucidef_set_led_netdev "lan" "LAN" "multicolor:fp_right" "br-lan" diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/64/base-files/etc/board.d/02_network similarity index 93% rename from target/linux/x86/base-files/etc/board.d/02_network rename to target/linux/x86/64/base-files/etc/board.d/02_network index b18ab60120..c47f79b607 100644 --- a/target/linux/x86/base-files/etc/board.d/02_network +++ b/target/linux/x86/64/base-files/etc/board.d/02_network @@ -71,13 +71,6 @@ sophos-sg-135r3|sophos-xg-135r3| \ sophos-sg-135wr3|sophos-xg-135wr3) ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth5 eth7 eth8" "eth6" ;; -traverse-technologies-geos) - ucidef_set_interface_lan "eth0 eth1" - ucidef_add_atm_bridge "0" "35" "llc" "bridged" - ucidef_set_interface_wan "nas0" "dhcp" - macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null - [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr" - ;; silicom-80500-0214-*) ucidef_set_network_device_path "wan0" "pci0000:00/0000:00:16.0/0000:03:00.0" ucidef_set_network_device_path "wan1" "pci0000:00/0000:00:16.0/0000:03:00.1" diff --git a/target/linux/x86/geode/base-files/etc/board.d/01_leds b/target/linux/x86/geode/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..75fd60c1f9 --- /dev/null +++ b/target/linux/x86/geode/base-files/etc/board.d/01_leds @@ -0,0 +1,18 @@ +# +# Copyright © 2017 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +traverse-technologies-geos) + ucidef_set_led_netdev "lan" "LAN" "geos:1" "br-lan" "tx rx" + ucidef_set_led_netdev "wlan" "WiFi" "geos:2" "phy0tpt" + ucidef_set_led_default "diag" "DIAG" "geos:3" "1" + ;; +esac +board_config_flush + +exit 0 diff --git a/target/linux/x86/geode/base-files/etc/board.d/02_network b/target/linux/x86/geode/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..53cc0f8261 --- /dev/null +++ b/target/linux/x86/geode/base-files/etc/board.d/02_network @@ -0,0 +1,21 @@ +# +# Copyright © 2017 OpenWrt.org +# + +. /lib/functions/system.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +traverse-technologies-geos) + ucidef_set_interface_lan "eth0 eth1" + ucidef_add_atm_bridge "0" "35" "llc" "bridged" + ucidef_set_interface_wan "nas0" "dhcp" + macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null + [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr" + ;; +esac +board_config_flush + +exit 0