[PATCH] octeontx: add default packages for on-board devices
The Gateworks Newport boards supported by the octeontx target have the following on-board devices: - Gateworks System Controller - GPIO buttons - GPIO leds - GPS PPS - Accelerometer - MCP251X CAN controller Add kernel drivers for these devices in DEFAULT_PACKAGES Signed-off-by: Tim Harvey --- target/linux/octeontx/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile index 5260291d0504..25096c90ba96 100644 --- a/target/linux/octeontx/Makefile +++ b/target/linux/octeontx/Makefile @@ -20,4 +20,8 @@ include $(INCLUDE_DIR)/target.mk KERNELNAME:=Image +DEFAULT_PACKAGES += kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio \ + kmod-gpio-button-hotplug kmod-input-evdev kmod-rtc-ds1672 \ + kmod-can kmod-can-mcp251x + $(eval $(call BuildTarget)) -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] kernel: can: fix MCP251x CAN controller module autoload
Fix autoload module name for can-mcp251x kmod. Signed-off-by: Tim Harvey --- package/kernel/linux/modules/can.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk index 9cdebb9091a6..4ff85d1c0137 100644 --- a/package/kernel/linux/modules/can.mk +++ b/package/kernel/linux/modules/can.mk @@ -152,7 +152,7 @@ define KernelPackage/can-mcp251x CONFIG_SPI=y \ CONFIG_CAN_MCP251X FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko - AUTOLOAD:=$(call AutoProbe,can-mcp251x) + AUTOLOAD:=$(call AutoProbe,mcp251x) $(call AddDepends/can) endef -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] kernel: replace out-of-tree hwmon-gsc driver with in-tree
The Gateworks GSC drivers were merged in Linux v5.8: - remove the old out-of-tree module - add configuration for the in-tree modules Signed-off-by: Tim Harvey --- package/kernel/hwmon-gsc/Makefile | 28 --- package/kernel/hwmon-gsc/src/Makefile | 1 - package/kernel/hwmon-gsc/src/gsc.c| 308 -- package/kernel/linux/modules/hwmon.mk | 18 ++ 4 files changed, 18 insertions(+), 337 deletions(-) delete mode 100644 package/kernel/hwmon-gsc/Makefile delete mode 100644 package/kernel/hwmon-gsc/src/Makefile delete mode 100644 package/kernel/hwmon-gsc/src/gsc.c diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile deleted file mode 100644 index cd7d4efb1079.. --- a/package/kernel/hwmon-gsc/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=hwmon-gsc -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/hwmon-gsc - SUBMENU:=Hardware Monitoring Support - DEPENDS:=@TARGET_imx +kmod-hwmon-core +kmod-i2c-core - TITLE:=Driver for the Gateworks System Controller - AUTOLOAD:=$(call AutoLoad,60,gsc) - FILES:=$(PKG_BUILD_DIR)/gsc.ko -endef - -define KernelPackage/hwmon-gsc/description - Kernel module for the Gateworks System Controller chips. -endef - -define Build/Compile - $(KERNEL_MAKE) \ - M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(BUILDFLAGS)" \ - modules -endef - -$(eval $(call KernelPackage,hwmon-gsc)) diff --git a/package/kernel/hwmon-gsc/src/Makefile b/package/kernel/hwmon-gsc/src/Makefile deleted file mode 100644 index 0e54aed2e376.. --- a/package/kernel/hwmon-gsc/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := gsc.o diff --git a/package/kernel/hwmon-gsc/src/gsc.c b/package/kernel/hwmon-gsc/src/gsc.c deleted file mode 100644 index 737cc599b4e7.. --- a/package/kernel/hwmon-gsc/src/gsc.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * A hwmon driver for the Gateworks System Controller - * Copyright (C) 2009 Gateworks Corporation - * - * Author: Chris Lang - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, - * as published by the Free Software Foundation - version 2. - */ - -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.2" - -enum chips { gsp }; - -/* AD7418 registers */ -#define GSP_REG_TEMP_IN0x00 -#define GSP_REG_VIN0x02 -#define GSP_REG_3P30x05 -#define GSP_REG_BAT0x08 -#define GSP_REG_5P00x0b -#define GSP_REG_CORE 0x0e -#define GSP_REG_CPU1 0x11 -#define GSP_REG_CPU2 0x14 -#define GSP_REG_DRAM 0x17 -#define GSP_REG_EXT_BAT0x1a -#define GSP_REG_IO10x1d -#define GSP_REG_IO20x20 -#define GSP_REG_PCIE 0x23 -#define GSP_REG_CURRENT0x26 -#define GSP_FAN_0 0x2C -#define GSP_FAN_1 0x2E -#define GSP_FAN_2 0x30 -#define GSP_FAN_3 0x32 -#define GSP_FAN_4 0x34 -#define GSP_FAN_5 0x36 - -struct gsp_sensor_info { - const char* name; - int reg; -}; - -static const struct gsp_sensor_info gsp_sensors[] = { - {"temp", GSP_REG_TEMP_IN}, - {"vin", GSP_REG_VIN}, - {"3p3", GSP_REG_3P3}, - {"bat", GSP_REG_BAT}, - {"5p0", GSP_REG_5P0}, - {"core", GSP_REG_CORE}, - {"cpu1", GSP_REG_CPU1}, - {"cpu2", GSP_REG_CPU2}, - {"dram", GSP_REG_DRAM}, - {"ext_bat", GSP_REG_EXT_BAT}, - {"io1", GSP_REG_IO1}, - {"io2", GSP_REG_IO2}, - {"pci2", GSP_REG_PCIE}, - {"current", GSP_REG_CURRENT}, - {"fan_point0", GSP_FAN_0}, - {"fan_point1", GSP_FAN_1}, - {"fan_point2", GSP_FAN_2}, - {"fan_point3", GSP_FAN_3}, - {"fan_point4", GSP_FAN_4}, - {"fan_point5", GSP_FAN_5}, -}; - -struct gsp_data { - struct device *hwmon_dev; - struct attribute_group attrs; - enum chips type; -}; - -static int gsp_probe(struct i2c_client *client, - const struct i2c_device_id *id); -static int gsp_remove(struct i2c_client *client); - -static const struct i2c_device_id gsp_id[] = { - { "gsp", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, gsp_id); - -static struct i2c_driver gsp_driver = { - .driver = { - .name = "gsp", - }, - .probe = gsp_probe, - .remove = gsp_remove, - .id_table = gsp_id, -}; - -/* All registers are word-sized, except for the configuration registers. - * AD7418 uses a high-byte first convention. Do NOT use those functions to - * access the configuration registers CONF and CONF2, as they are byte-sized. - */ -static inline int gsp_read(struct i2c_client *client, u8 reg) -{ -
[PATCH RFT 0/2] ipq807x: ZyXEL NBG7815: add fan support
Add on/off fan support for the ZyXEL NBG7815. Single CPU cores, cluster CPU temperatures and the Aquantia PHY temperature sensor are monitored. The tmp103 sensor is missing from this patch, and can be added later, when kernel is bumped to 6.x, as it seems to require non-trivial hwmon backporting. Add kmod-phy-aquantia as default package while at it. Note: this patch has been marked RFT, since temperature values tuning is needed from someone actively using this device in high load conditions. Furthermore, this change depends on an hwmon patch of which the correctness has not been determined. Thanks to robimarko for helping me out. CC: Andre Valentin CC: Karol Przybylski Enrico Mioso (2): ipq807x: ZyXEL NBG7815: add fan support hack-5.15: add Aquantia PHY hwmon temperature clamp patch ...-clamp-temperature-value-in-aqr_hwmo.patch | 30 + .../arm64/boot/dts/qcom/ipq8074-nbg7815.dts | 119 ++ target/linux/ipq807x/image/generic.mk | 2 +- 3 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 target/linux/generic/hack-5.15/726-net-phy-aquantia-clamp-temperature-value-in-aqr_hwmo.patch -- 2.39.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 2/2] hack-5.15: add Aquantia PHY hwmon temperature clamp patch
This is needed to avoid failures in the thermal subsystem while using this driver via hwmon subsystem. CC: Andre Valentin CC: Karol Przybylski Signed-off-by: Enrico Mioso --- ...-clamp-temperature-value-in-aqr_hwmo.patch | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 target/linux/generic/hack-5.15/726-net-phy-aquantia-clamp-temperature-value-in-aqr_hwmo.patch diff --git a/target/linux/generic/hack-5.15/726-net-phy-aquantia-clamp-temperature-value-in-aqr_hwmo.patch b/target/linux/generic/hack-5.15/726-net-phy-aquantia-clamp-temperature-value-in-aqr_hwmo.patch new file mode 100644 index 00..36f0b37130 --- /dev/null +++ b/target/linux/generic/hack-5.15/726-net-phy-aquantia-clamp-temperature-value-in-aqr_hwmo.patch @@ -0,0 +1,30 @@ +From 7bfceb1036d2ccda7b8e1e177e834c1cea9f0858 Mon Sep 17 00:00:00 2001 +From: Enrico Mioso +Date: Sat, 18 Feb 2023 00:27:55 +0100 +Subject: [PATCH] net: phy: aquantia: clamp temperature value in aqr_hwmon_set + +This patch is still under evaluation and is not guaranteed to be correct, +therefore it is submitted here in hack form. :) + +Signed-off-by: Enrico Mioso +--- + drivers/net/phy/aquantia_hwmon.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/phy/aquantia_hwmon.c b/drivers/net/phy/aquantia_hwmon.c +index 19c4c280a6cd..6444055e720c 100644 +--- a/drivers/net/phy/aquantia_hwmon.c b/drivers/net/phy/aquantia_hwmon.c +@@ -70,8 +70,7 @@ static int aqr_hwmon_set(struct phy_device *phydev, int reg, long value) + { + int temp; + +- if (value >= 128000 || value < -128000) +- return -ERANGE; ++ clamp_val(value, -128000, 128000); + + temp = value * 256 / 1000; + +-- +2.39.2 + -- 2.39.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 1/2] ipq807x: ZyXEL NBG7815: add fan support
Add on/off fan support for the ZyXEL NBG7815. Single CPU cores, cluster CPU temperatures and the Aquantia PHY temperature sensor are monitored. The tmp103 sensor is missing from this patch, and can be added later, when kernel is bumped to 6.x, as it seems to require non-trivial hwmon backporting. Add kmod-phy-aquantia as default package while at it. Note: this patch has been marked RFT, since temperature values tuning is needed from someone actively using this device in high load conditions. Thanks to robimarko for helping me out. CC: Andre Valentin CC: Karol Przybylski Signed-off-by: Enrico Mioso --- .../arm64/boot/dts/qcom/ipq8074-nbg7815.dts | 119 ++ target/linux/ipq807x/image/generic.mk | 2 +- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts index 537dd52032..0ec602cf31 100644 --- a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts +++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts @@ -39,6 +39,22 @@ gpios = < 54 GPIO_ACTIVE_LOW>; }; }; + + fan: gpio_fan { + compatible = "gpio-fan"; + gpios = < 21 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = <00 + 4500 1>; + #cooling-cells = <2>; + }; + + thermal-zones { + aqr_thermal: aqr-thermal { + polling-delay-passive = <1000>; + polling-delay = <1000>; + thermal-sensors = <>; + }; + }; }; { @@ -291,6 +307,7 @@ compatible = "ethernet-phy-ieee802.3-c45"; reg = <8>; reset-gpios = < 63 GPIO_ACTIVE_LOW>; + #thermal-sensor-cells = <0>; }; }; @@ -443,3 +460,105 @@ qcom,ath11k-calibration-variant = "Zyxel-NBG7815"; }; + +_thermal { + trips { + cpu0_active: cpu0-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +_thermal { + trips { + cpu1_active: cpu1-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +_thermal { + trips { + cpu2_active: cpu2-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +_thermal { + trips { + cpu3_active: cpu3-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +_thermal { + trips { + cluster_active: cluster-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +_thermal { + trips { + aqr_thermal_active: aqr-thermal-active { + temperature = <7>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <_thermal_active>; + cooling-device = < THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 38770a5f24..bbdb8c5d8b 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -141,6 +141,6 @@
[PATCH 1/2] imx: image: ventana: use squashfs rootfs for non NAND devices
In order to support squashfs+ext4 define rootfstype=squashfs and use P2 as P1 is boot filesystem. Signed-off-by: Tim Harvey --- target/linux/imx/image/bootscript-ventana | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/imx/image/bootscript-ventana b/target/linux/imx/image/bootscript-ventana index 734f74a30c5f..44a425d3484f 100644 --- a/target/linux/imx/image/bootscript-ventana +++ b/target/linux/imx/image/bootscript-ventana @@ -44,7 +44,7 @@ if itest.s "x${dtype}" == "xnand" ; then setenv root "ubi0:ubi ubi.mtd=2 rootfstype=squashfs,ubifs" else setenv fsload "${fs}load ${dtype} ${disk}:1" - part uuid ${dtype} ${disk}:1 uuid + part uuid ${dtype} ${disk}:2 uuid if test -z "${uuid}"; then # fallback to bootdev if test -n "$bootdev" ; then @@ -60,7 +60,7 @@ else else setenv root "root=PARTUUID=${uuid}" fi - setenv root "$root rootfstype=${fs} rootwait rw" + setenv root "$root rootfstype=squashfs rootwait" fi setenv bootargs "${bootargs}" "${root}" "${video}" "${extra}" -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 2/2] imx: image: ventana: add blkdev compressed disk image
Add a ventana-img.gz compressed disk image to support squashfs+ext4 on a block storage device such as USB/MMC/SATA. The Ventana bootloader expects the bootscript to be boot/6x_bootscript-ventana therefore we must create a bootfs that matches this. Signed-off-by: Tim Harvey --- target/linux/imx/image/cortexa9.mk | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/target/linux/imx/image/cortexa9.mk b/target/linux/imx/image/cortexa9.mk index 78079aa746b9..2edbbaac4765 100644 --- a/target/linux/imx/image/cortexa9.mk +++ b/target/linux/imx/image/cortexa9.mk @@ -52,6 +52,29 @@ define Build/apalis-emmc $(Build/imx-combined-image-clean) endef +define Build/ventana-img + rm -rf $@.boot + mkdir -p $@.boot/boot + $(CP) $(IMAGE_KERNEL) $@.boot/boot/uImage + $(foreach dts,$(DEVICE_DTS), \ + $(CP) \ + $(DTS_DIR)/$(dts).dtb \ + $@.boot/boot/; + ) + mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n '$(DEVICE_ID) OpenWrt bootscript' \ + -d bootscript-$(DEVICE_NAME) \ + $@.boot/boot/6x_bootscript-ventana + cp $@ $@.fs + + $(SCRIPT_DIR)/gen_image_generic.sh $@ \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) \ + $@.boot \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ + $@.fs \ + 1024 + $(Build/imx-combined-image-clean) +endef define Device/Default PROFILES := Default @@ -99,10 +122,11 @@ define Device/gateworks_ventana kmod-sound-soc-imx-sgtl5000 kmod-can kmod-can-flexcan kmod-can-raw \ kmod-hwmon-gsc kmod-leds-gpio kmod-pps-gpio kobs-ng KERNEL += | boot-overlay - IMAGES := nand.ubi bootfs.tar.gz dtb + IMAGES := img.gz nand.ubi bootfs.tar.gz dtb IMAGE/nand.ubi := append-ubi IMAGE/bootfs.tar.gz := bootfs.tar.gz IMAGE/dtb := install-dtb + IMAGE/img.gz := append-rootfs | pad-extra 128k | ventana-img | gzip UBINIZE_PARTS = boot=$$(KDIR_KERNEL_IMAGE).boot.ubifs=15 PAGESIZE := 2048 BLOCKSIZE := 128k -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[openwrt] Patch notification: 1 patch updated
Hello, The following patch (submitted by you) has been updated in Patchwork: * openwrt: build: add option to use preinit IP as LAN IP - http://patchwork.ozlabs.org/project/openwrt/patch/mailman.46047.1670443421.4154159.openwrt-de...@lists.openwrt.org/ - for: OpenWrt development was: New now: Accepted This email is a notification only - you do not need to respond. Happy patchworking. -- This is an automated mail sent by the Patchwork system at patchwork.ozlabs.org. To stop receiving these notifications, edit your mail settings at: http://patchwork.ozlabs.org/mail/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v2] sdk: expose PATENTED an NLS build options
From: Tomasz Maciej Nowak Some packages offer functionalities guarded by these options and it'll be impossible to reach them without changing Config-build.in. So allow to toggle these in more friendly way, by exposing them in configuration menu. Signed-off-by: Tomasz Maciej Nowak --- v1 -> v2 * drop uClibc from NLS help description, not supported anymore target/sdk/files/Config.in | 17 + 1 file changed, 17 insertions(+) diff --git a/target/sdk/files/Config.in b/target/sdk/files/Config.in index 7926e124265a..a14c17fe955b 100644 --- a/target/sdk/files/Config.in +++ b/target/sdk/files/Config.in @@ -18,6 +18,23 @@ menu "Global build settings" bool "Cryptographically sign package lists" default y + comment "General build options" + + config BUILD_PATENTED + default n + bool "Compile with support for patented functionality" + help + When this option is disabled, software which provides patented functionality + will not be built. In case software provides optional support for patented + functionality, this optional support will get disabled for this package. + + config BUILD_NLS + default n + bool "Compile with full language support" + help + When this option is enabled, packages are built with the full versions of + iconv and GNU gettext instead of the default OpenWrt stubs. + comment "Package build options" config DEBUG -- 2.39.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH odhcpd v2 2/2] router: always check ra_default
On Thu, Feb 16, 2023 at 9:30 PM wrote: > > We currently only check ra_default when an interface has valid > addresses. This results in ra_default being ignored in case we have an > interface with only link-local addresses. This effectively breaks the > use of value 2 for the ra_default parameter. > > Fix this by always checking ra_lifetime, regardless of the interface > having public addresses or not. > > Fixes: #11930 > Fixes: 83e14f455817 ("router: advertise removed addresses as invalid in 3 > consecutive RAs") > Signed-off-by: Stijn Tintel Acked-by:Hans Dedecker > --- > src/router.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/src/router.c b/src/router.c > index 1c11849..7e66e3c 100644 > --- a/src/router.c > +++ b/src/router.c > @@ -488,6 +488,14 @@ static int send_router_advert(struct interface *iface, > const struct in6_addr *fr > valid_addr_cnt = (iface->timer_rs.cb /* if not shutdown */ ? > iface->addr6_len : 0); > invalid_addr_cnt = iface->invalid_addr6_len; > > + // check ra_default > + if (iface->default_router) { > + default_route = true; > + > + if (iface->default_router > 1) > + valid_prefix = true; > + } > + > if (valid_addr_cnt + invalid_addr_cnt) { > addrs = alloca(sizeof(*addrs) * (valid_addr_cnt + > invalid_addr_cnt)); > > @@ -495,12 +503,7 @@ static int send_router_advert(struct interface *iface, > const struct in6_addr *fr > memcpy(addrs, iface->addr6, sizeof(*addrs) * > valid_addr_cnt); > > /* Check default route */ > - if (iface->default_router) { > - default_route = true; > - > - if (iface->default_router > 1) > - valid_prefix = true; > - } else if (parse_routes(addrs, valid_addr_cnt)) > + if (!default_route && parse_routes(addrs, > valid_addr_cnt)) > default_route = true; > } > > -- > 2.39.1 > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH odhcpd v2 1/2] router: improve RA logging
On Thu, Feb 16, 2023 at 9:30 PM wrote: > > We only set the RA lifetime to what is configured in UCI when there is a > default route and valid prefix. In any other case, we set it to 0. This > leads to confusion where people believe ra_lifetime is completely > ignored. In case there is a default route, but no valid prefix, a debug > message explains this, but if there is no default route, we silently > override ra_lifetime. > > Add a debug message for the latter case, and explicitly mention > overriding ra_lifetime in both cases. > > Signed-off-by: Stijn Tintel Acked-by: Hans Dedecker > --- > src/router.c | 20 +++- > 1 file changed, 11 insertions(+), 9 deletions(-) > > diff --git a/src/router.c b/src/router.c > index 949cbe7..1c11849 100644 > --- a/src/router.c > +++ b/src/router.c > @@ -618,17 +618,19 @@ static int send_router_advert(struct interface *iface, > const struct in6_addr *fr > msecs = calc_adv_interval(iface, minvalid, ); > lifetime = calc_ra_lifetime(iface, maxival); > > - if (default_route) { > - if (!valid_prefix) { > - syslog(LOG_WARNING, "A default route is present but > there is no public prefix " > - "on %s thus we don't announce a > default route!", iface->name); > - adv.h.nd_ra_router_lifetime = 0; > - } else > - adv.h.nd_ra_router_lifetime = htons(lifetime < > UINT16_MAX ? lifetime : UINT16_MAX); > - > - } else > + if (default_route && valid_prefix) { > + adv.h.nd_ra_router_lifetime = htons(lifetime < UINT16_MAX ? > lifetime : UINT16_MAX); > + } else { > adv.h.nd_ra_router_lifetime = 0; > > + if (default_route) { > + syslog(LOG_WARNING, "A default route is present but > there is no public prefix " > + "on %s thus we don't announce a > default route by overriding ra_lifetime!", iface->name); > + } else { > + syslog(LOG_WARNING, "No default route present, > overriding ra_lifetime!"); > + } > + } > + > syslog(LOG_DEBUG, "Using a RA lifetime of %d seconds on %s", > ntohs(adv.h.nd_ra_router_lifetime), iface->name); > > /* DNS options */ > -- > 2.39.1 > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] tools: meson: bump to 1.0.0
On 17/02/2023 10:18, Koen Vandeputte wrote: Drop upstreamed patch. Tested by compiling the complete gstreamer package which heavily depends on this one. Signed-off-by: Koen Vandeputte Not possible unfortunately, see https://github.com/openwrt/openwrt/pull/10543 We tried a few times to get meson to not drop support for older python versions, but here we are... Cheers, Andre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] tools: meson: bump to 1.0.0
Drop upstreamed patch. Tested by compiling the complete gstreamer package which heavily depends on this one. Signed-off-by: Koen Vandeputte --- This patch is a requirement to build gstreamer 1.22.0 for which a PR is ready to submit in package feed tools/meson/Makefile | 4 ++-- tools/meson/patches/010-wsl2.patch | 21 - 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 tools/meson/patches/010-wsl2.patch diff --git a/tools/meson/Makefile b/tools/meson/Makefile index d53ed897a3..75fae42b37 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=0.61.5 +PKG_VERSION:=1.0.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) -PKG_HASH:=5e9a0d65c1a51936362b9686d1c5e9e184a6fd245d57e7269750ce50c20f5d9a +PKG_HASH:=aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 diff --git a/tools/meson/patches/010-wsl2.patch b/tools/meson/patches/010-wsl2.patch deleted file mode 100644 index 4ab799d699..00 --- a/tools/meson/patches/010-wsl2.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 7d1ef4343ed5b2b7ab51469177a42c32c47f0528 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Tue, 6 Sep 2022 01:36:17 -0700 -Subject: [PATCH] minstall: handle extra error for selinuxenabled - -Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing. - mesonbuild/minstall.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - a/mesonbuild/minstall.py -+++ b/mesonbuild/minstall.py -@@ -229,7 +229,7 @@ def restore_selinux_contexts() -> None: - ''' - try: - subprocess.check_call(['selinuxenabled']) --except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError): -+except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError): - # If we don't have selinux or selinuxenabled returned 1, failure - # is ignored quietly. - return -- 2.34.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel