[PATCH 1/2] trusted-firmware-a.mk: use correct CPE ID

2022-12-20 Thread stijn--- via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
There are 2 different CPE IDs on the NVD website:
cpe:/a:arm:trusted_firmware-a
cpe:/o:arm:arm_trusted_firmware

The ID as currently used in trusted-firmware-a.mk does not exist. The
CPE ID using the arm_trusted_firmware product name only lists a few
records for versions 2.2 and 2.3 on the NVD site. The CPE ID using the
trusted_firmware-a product name lists many more records, and actually
has a CVE linked to it. Therefore, use the CPE ID using the
trusted_firmware-a product name.

Fixes: 104d60fe94ce ("trusted-firmware-a.mk: add PKG_CPE_ID")
Signed-off-by: Stijn Tintel 
---
 include/trusted-firmware-a.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk
index 0b37c0f943..082ada269c 100644
--- a/include/trusted-firmware-a.mk
+++ b/include/trusted-firmware-a.mk
@@ -1,5 +1,5 @@
 PKG_NAME ?= trusted-firmware-a
-PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware
+PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
 
 ifndef PKG_SOURCE_PROTO
 PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
-- 
2.38.2


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/2] arm-trusted-firmware-sunxi: drop CPE ID

2022-12-20 Thread stijn--- via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
The CPE ID is already set in trusted-firmware-a.mk.

Signed-off-by: Stijn Tintel 
---
 package/boot/arm-trusted-firmware-sunxi/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/boot/arm-trusted-firmware-sunxi/Makefile 
b/package/boot/arm-trusted-firmware-sunxi/Makefile
index 430d78f7a3..178b3958b8 100644
--- a/package/boot/arm-trusted-firmware-sunxi/Makefile
+++ b/package/boot/arm-trusted-firmware-sunxi/Makefile
@@ -8,7 +8,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=arm-trusted-firmware-sunxi
-PKG_CPE_ID:=cpe:/o:arm:arm_trusted_firmware
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-- 
2.38.2


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] build: add option to use preinit IP as LAN IP

2022-12-07 Thread stijn--- via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
We currently have build options to customize the IP address used in the
preinit phase of the boot process, but not to set the default LAN IP.

Introduce a boolean build option that, when enabled, results in the IP
address configured for the preinit phase, to be also used as the default
LAN IP address.

Signed-off-by: Stijn Tintel 
---
 package/base-files/Makefile| 13 +
 package/base-files/image-config.in |  7 +++
 2 files changed, 20 insertions(+)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 914f0598ff..8732f82fb9 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -89,6 +89,19 @@ define ImageConfigOptions
echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' 
>>$(1)/lib/preinit/00_preinit.conf
echo 
'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"'
 >>$(1)/lib/preinit/00_preinit.conf
echo 
'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' 
>>$(1)/lib/preinit/00_preinit.conf
+ifeq ($(CONFIG_TARGET_DEFAULT_LAN_IP_FROM_PREINIT),y)
+   mkdir -p $(1)/etc/board.d
+   echo '. /lib/functions/uci-defaults.sh' >$(1)/etc/board.d/99-lan-ip
+   echo 'logger -t 99-lan-ip "setting custom default LAN IP"' 
>>$(1)/etc/board.d/99-lan-ip
+   echo 'board_config_update' >>$(1)/etc/board.d/99-lan-ip
+   echo 'json_select network' >>$(1)/etc/board.d/99-lan-ip
+   echo 'json_select lan' >>$(1)/etc/board.d/99-lan-ip
+   echo 'json_add_string ipaddr $(if 
$(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' 
>>$(1)/etc/board.d/99-lan-ip
+   echo 'json_add_string netmask $(if 
$(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")'
 >>$(1)/etc/board.d/99-lan-ip
+   echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
+   echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
+   echo 'board_config_flush' >>$(1)/etc/board.d/99-lan-ip
+endif
 endef
 
 define Build/Prepare
diff --git a/package/base-files/image-config.in 
b/package/base-files/image-config.in
index ac406bc456..2de2130b84 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -5,6 +5,13 @@
 # See /LICENSE for more information.
 #
 
+config TARGET_DEFAULT_LAN_IP_FROM_PREINIT
+   bool "Use preinit IP configuration as default LAN IP" if IMAGEOPT
+   default n
+   help
+   Enabling this will set the default LAN IP address and netmask
+   to the preinit values set in the image config.
+
 menuconfig PREINITOPT
bool "Preinit configuration options" if IMAGEOPT
default n
-- 
2.37.4


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel