Merge branch 'openwrt:master' into master
This commit is contained in:
commit
4b1e4ae2b6
26 changed files with 676 additions and 118 deletions
|
@ -192,6 +192,7 @@ proto_qmi_setup() {
|
|||
|
||||
# Cleanup current state if any
|
||||
uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1
|
||||
uqmi -s -d "$device" --set-ip-family ipv6 --stop-network 0xffffffff --autoconnect > /dev/null 2>&1
|
||||
|
||||
# Go online
|
||||
uqmi -s -d "$device" --set-device-operating-mode online > /dev/null 2>&1
|
||||
|
@ -326,7 +327,7 @@ proto_qmi_setup() {
|
|||
fi
|
||||
|
||||
# Check data connection state
|
||||
connstat=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" --get-data-status)
|
||||
connstat=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 --get-data-status)
|
||||
[ "$connstat" == '"connected"' ] || {
|
||||
echo "No data link!"
|
||||
uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds > /dev/null 2>&1
|
||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -373,6 +373,11 @@ static const struct sfp_quirk sfp_quirks
|
||||
@@ -377,6 +377,11 @@ static const struct sfp_quirk sfp_quirks
|
||||
.modes = sfp_quirk_2500basex,
|
||||
.fixup = sfp_fixup_ignore_tx_fault,
|
||||
}, {
|
||||
|
@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
// Lantech 8330-262D-E can operate at 2500base-X, but
|
||||
// incorrectly report 2500MBd NRZ in their EEPROM
|
||||
.vendor = "Lantech",
|
||||
@@ -2306,7 +2311,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
@@ -2310,7 +2315,8 @@ static void sfp_sm_main(struct sfp *sfp,
|
||||
* or t_start_up, so assume there is a fault.
|
||||
*/
|
||||
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
|
||||
|
@ -48,7 +48,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|||
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
|
||||
init_done:
|
||||
sfp->sm_phy_retries = R_PHY_RETRY;
|
||||
@@ -2529,10 +2535,12 @@ static void sfp_check_state(struct sfp *
|
||||
@@ -2533,10 +2539,12 @@ static void sfp_check_state(struct sfp *
|
||||
mutex_lock(&sfp->st_mutex);
|
||||
state = sfp_get_state(sfp);
|
||||
changed = state ^ sfp->state;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -366,6 +366,10 @@ static const struct sfp_quirk sfp_quirks
|
||||
.part = "HL-GSFP",
|
||||
.fixup = sfp_fixup_halny_gsfp,
|
||||
}, {
|
||||
+ .vendor = "HG GENUINE",
|
||||
+ .part = "MXPD-483II",
|
||||
+ .modes = sfp_quirk_2500basex,
|
||||
+ }, {
|
||||
// Huawei MA5671A can operate at 2500base-X, but report 1.2GBd
|
||||
// NRZ in their EEPROM
|
||||
.vendor = "HUAWEI",
|
|
@ -0,0 +1,61 @@
|
|||
From 312753d0aadba0f58841ae513b80fdbabc887523 Mon Sep 17 00:00:00 2001
|
||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Date: Wed, 8 Feb 2023 16:32:18 +0800
|
||||
Subject: [PATCH] net: phy: realtek: support switching between SGMII and
|
||||
2500BASE-X for RTL822x series
|
||||
|
||||
After commit ace6aba ("net: phy: realtek: rtl8221: allow to configure
|
||||
SERDES mode"), the rtl8221 phy can work in SGMII and 2500base-x modes
|
||||
respectively. So add interface automatic switching for rtl8221 phy to
|
||||
match various wire speeds.
|
||||
|
||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 26 ++++++++++++++++++++++++--
|
||||
1 file changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -676,6 +676,25 @@ static int rtl822x_config_aneg(struct ph
|
||||
return __genphy_config_aneg(phydev, ret);
|
||||
}
|
||||
|
||||
+static void rtl822x_update_interface(struct phy_device *phydev)
|
||||
+{
|
||||
+ /* Automatically switch SERDES interface between
|
||||
+ * SGMII and 2500-BaseX according to speed.
|
||||
+ */
|
||||
+ switch (phydev->speed) {
|
||||
+ case SPEED_2500:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
+ break;
|
||||
+ case SPEED_1000:
|
||||
+ case SPEED_100:
|
||||
+ case SPEED_10:
|
||||
+ phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int rtl822x_read_status(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
@@ -694,11 +713,14 @@ static int rtl822x_read_status(struct ph
|
||||
phydev->lp_advertising, lpadv & RTL_LPADV_2500FULL);
|
||||
}
|
||||
|
||||
- ret = genphy_read_status(phydev);
|
||||
+ ret = rtlgen_read_status(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
- return rtlgen_get_speed(phydev);
|
||||
+ if (phydev->link)
|
||||
+ rtl822x_update_interface(phydev);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static bool rtlgen_supports_2_5gbps(struct phy_device *phydev)
|
|
@ -0,0 +1,65 @@
|
|||
From 85cd45580f5e3b26068cccb7d6173f200e754dc0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sun, 2 Apr 2023 23:56:16 +0100
|
||||
Subject: [PATCH 1/2] net: phy: realtek: use genphy_soft_reset for 2.5G PHYs
|
||||
|
||||
Some vendor bootloaders do weird things with those PHYs which result in
|
||||
link modes being reported wrongly. Start from a clean sheet by resetting
|
||||
the PHY.
|
||||
|
||||
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -1013,6 +1013,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.write_page = rtl821x_write_page,
|
||||
.read_mmd = rtl822x_read_mmd,
|
||||
.write_mmd = rtl822x_write_mmd,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc840),
|
||||
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
|
||||
@@ -1025,6 +1026,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.write_page = rtl821x_write_page,
|
||||
.read_mmd = rtl822x_read_mmd,
|
||||
.write_mmd = rtl822x_write_mmd,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc838),
|
||||
.name = "RTL8226-CG 2.5Gbps PHY",
|
||||
@@ -1035,6 +1037,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc848),
|
||||
.name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
|
||||
@@ -1045,6 +1048,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc849),
|
||||
.name = "RTL8221B-VB-CG 2.5Gbps PHY",
|
||||
@@ -1056,6 +1060,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc84a),
|
||||
.name = "RTL8221B-VM-CG 2.5Gbps PHY",
|
||||
@@ -1067,6 +1072,7 @@ static struct phy_driver realtek_drvs[]
|
||||
.resume = rtlgen_resume,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
+ .soft_reset = genphy_soft_reset,
|
||||
}, {
|
||||
PHY_ID_MATCH_EXACT(0x001cc961),
|
||||
.name = "RTL8366RB Gigabit Ethernet",
|
|
@ -0,0 +1,43 @@
|
|||
From 2b1b8c4c215af7988136401c902338d091d408a1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Mon, 3 Apr 2023 01:21:57 +0300
|
||||
Subject: [PATCH 2/2] net: phy: realtek: disable SGMII in-band AN for 2.5G PHYs
|
||||
|
||||
MAC drivers don't use SGMII in-band autonegotiation unless told to do so
|
||||
in device tree using 'managed = "in-band-status"'. When using MDIO to
|
||||
access a PHY, in-band-status is unneeded as we have link-status via
|
||||
MDIO. Switch off SGMII in-band autonegotiation using magic values.
|
||||
|
||||
Reported-by: Chen Minqiang <ptpt52@gmail.com>
|
||||
Reported-by: Chukun Pan <amadeus@jmu.edu.cn>
|
||||
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
|
||||
Tested-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/phy/realtek.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -875,6 +875,7 @@ static irqreturn_t rtl9000a_handle_inter
|
||||
static int rtl8221b_config_init(struct phy_device *phydev)
|
||||
{
|
||||
u16 option_mode;
|
||||
+ int val;
|
||||
|
||||
switch (phydev->interface) {
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
@@ -906,6 +907,13 @@ static int rtl8221b_config_init(struct p
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* Disable SGMII AN */
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7588, 0x2);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7589, 0x71d0);
|
||||
+ phy_write_mmd(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7587, 0x3);
|
||||
+ phy_read_mmd_poll_timeout(phydev, RTL8221B_MMD_SERDES_CTRL, 0x7587, val,
|
||||
+ !(val & BIT(0)), 500, 100000, false);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -94,7 +94,12 @@ platform_do_upgrade_linksys() {
|
|||
|
||||
|
||||
# complete std upgrade
|
||||
nand_upgrade_tar "$1"
|
||||
if nand_upgrade_tar "$1" ; then
|
||||
nand_do_upgrade_success
|
||||
else
|
||||
nand_do_upgrade_failure
|
||||
fi
|
||||
|
||||
}
|
||||
[ "$magic_long" = "27051956" ] && {
|
||||
get_image "$1" | mtd write - $part_label
|
||||
|
|
|
@ -49,22 +49,31 @@ define Build/fullimage
|
|||
rm $@.tmp
|
||||
endef
|
||||
|
||||
define Build/loader-okli-compile
|
||||
define Build/loader-common
|
||||
rm -rf $@.src
|
||||
$(MAKE) -C lzma-loader \
|
||||
PKG_BUILD_DIR="$@.src" \
|
||||
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
|
||||
PLATFORM="lantiq" \
|
||||
BOARD="$(BOARDNAME)" PLATFORM="lantiq" \
|
||||
LZMA_TEXT_START=0x82000000 \
|
||||
LOADADDR=0x80002000 \
|
||||
FLASH_START=0x10000000 \
|
||||
FLASH_OFFS=$(LOADER_FLASH_OFFS) \
|
||||
FLASH_MAX=0x0 \
|
||||
$(1) compile loader.bin
|
||||
mv "$@.bin" "$@"
|
||||
rm -rf $@.src
|
||||
endef
|
||||
|
||||
define Build/loader-kernel
|
||||
$(call Build/loader-common,LOADER_DATA="$@")
|
||||
endef
|
||||
|
||||
define Build/loader-okli-compile
|
||||
$(call Build/loader-common, \
|
||||
FLASH_START=0x10000000 \
|
||||
FLASH_OFFS=$(LOADER_FLASH_OFFS) \
|
||||
FLASH_MAX=0x0 \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/prepend-loader-okli
|
||||
cat "$(KDIR)/loader-$(word 1,$(1)).bin" "$@" >> "$@.new"
|
||||
mv "$@.new" "$@"
|
||||
|
|
|
@ -90,6 +90,8 @@ define Device/netgear_dgn3500
|
|||
DEVICE_MODEL := DGN3500
|
||||
SOC := ar9
|
||||
IMAGE_SIZE := 16000k
|
||||
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
|
||||
KERNEL_INITRAMFS := $$(KERNEL)
|
||||
IMAGES := \
|
||||
sysupgrade-na.bin sysupgrade.bin \
|
||||
factory-na.img factory.img
|
||||
|
@ -121,6 +123,8 @@ define Device/netgear_dgn3500b
|
|||
DEVICE_MODEL := DGN3500B
|
||||
SOC := ar9
|
||||
IMAGE_SIZE := 16000k
|
||||
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
|
||||
KERNEL_INITRAMFS := $$(KERNEL)
|
||||
IMAGES += factory.img
|
||||
IMAGE/sysupgrade.bin := \
|
||||
append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
From 416f25a948d11ef15733f2e31658d31b5cc7bef6 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Nixon <tom@tomn.co.uk>
|
||||
Date: Sun, 26 Mar 2023 11:08:49 +0100
|
||||
Subject: [PATCH] mtd: rawnand: xway: don't yield while holding spinlock
|
||||
|
||||
The nand driver normally while waiting for the device to become ready;
|
||||
this is normally fine, but xway_nand holds the ebu_lock spinlock, and
|
||||
this can cause lockups if other threads which use ebu_lock are
|
||||
interleaved. Fix this by waiting instead of polling.
|
||||
|
||||
This mainly showed up as crashes in ath9k_pci_owl_loader (see
|
||||
https://github.com/openwrt/openwrt/issues/9829 ), but turning on
|
||||
spinlock debugging shows this happening in other places too.
|
||||
|
||||
This doesn't seem to measurably impact boot time.
|
||||
|
||||
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
|
||||
---
|
||||
drivers/mtd/nand/raw/xway_nand.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/xway_nand.c
|
||||
+++ b/drivers/mtd/nand/raw/xway_nand.c
|
||||
@@ -175,7 +175,13 @@ static void xway_cmd_ctrl(struct nand_ch
|
||||
|
||||
static int xway_dev_ready(struct nand_chip *chip)
|
||||
{
|
||||
- return ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_RD;
|
||||
+ /*
|
||||
+ * wait until ready, as otherwise the driver will yield in nand_wait or
|
||||
+ * nand_wait_ready, which is a bad idea when we're holding ebu_lock
|
||||
+ */
|
||||
+ while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_RD) == 0)
|
||||
+ cpu_relax();
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
static unsigned char xway_read_byte(struct nand_chip *chip)
|
|
@ -0,0 +1,38 @@
|
|||
From 416f25a948d11ef15733f2e31658d31b5cc7bef6 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Nixon <tom@tomn.co.uk>
|
||||
Date: Sun, 26 Mar 2023 11:08:49 +0100
|
||||
Subject: [PATCH] mtd: rawnand: xway: don't yield while holding spinlock
|
||||
|
||||
The nand driver normally while waiting for the device to become ready;
|
||||
this is normally fine, but xway_nand holds the ebu_lock spinlock, and
|
||||
this can cause lockups if other threads which use ebu_lock are
|
||||
interleaved. Fix this by waiting instead of polling.
|
||||
|
||||
This mainly showed up as crashes in ath9k_pci_owl_loader (see
|
||||
https://github.com/openwrt/openwrt/issues/9829 ), but turning on
|
||||
spinlock debugging shows this happening in other places too.
|
||||
|
||||
This doesn't seem to measurably impact boot time.
|
||||
|
||||
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
|
||||
---
|
||||
drivers/mtd/nand/raw/xway_nand.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/xway_nand.c
|
||||
+++ b/drivers/mtd/nand/raw/xway_nand.c
|
||||
@@ -175,7 +175,13 @@ static void xway_cmd_ctrl(struct nand_ch
|
||||
|
||||
static int xway_dev_ready(struct nand_chip *chip)
|
||||
{
|
||||
- return ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_RD;
|
||||
+ /*
|
||||
+ * wait until ready, as otherwise the driver will yield in nand_wait or
|
||||
+ * nand_wait_ready, which is a bad idea when we're holding ebu_lock
|
||||
+ */
|
||||
+ while ((ltq_ebu_r32(EBU_NAND_WAIT) & NAND_WAIT_RD) == 0)
|
||||
+ cpu_relax();
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
static unsigned char xway_read_byte(struct nand_chip *chip)
|
|
@ -7,6 +7,11 @@ preinit_set_mac_address() {
|
|||
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
|
||||
ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr)
|
||||
;;
|
||||
watchguard,firebox-t10)
|
||||
ip link set dev eth0 address "$(mtd_get_mac_text "device_id" 0x1830)"
|
||||
ip link set dev eth1 address "$(mtd_get_mac_text "device_id" 0x1844)"
|
||||
ip link set dev eth2 address "$(mtd_get_mac_text "device_id" 0x1858)"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
129
target/linux/ramips/dts/mt7628an_oraybox_x1.dts
Normal file
129
target/linux/ramips/dts/mt7628an_oraybox_x1.dts
Normal file
|
@ -0,0 +1,129 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "mt7628an.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "oraybox,x1", "mediatek,mt7628an-soc";
|
||||
model = "OrayBox X1";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_white;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_white;
|
||||
led-upgrade = &led_status_red;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_blue: status-blue {
|
||||
label = "blue:status";
|
||||
gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_red: status-red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_white: status-white {
|
||||
label = "white:status";
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "kpanic";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xf00000>;
|
||||
};
|
||||
|
||||
bdinfo: partition@fe0000 {
|
||||
label = "bdinfo";
|
||||
reg = <0xfe0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
label = "reserve";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_bdinfo_9>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&bdinfo {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_bdinfo_9: macaddr@9 {
|
||||
reg = <0x9 0x6>;
|
||||
};
|
||||
};
|
|
@ -474,6 +474,14 @@ define Device/onion_omega2p
|
|||
endef
|
||||
TARGET_DEVICES += onion_omega2p
|
||||
|
||||
define Device/oraybox_x1
|
||||
IMAGE_SIZE := 15360k
|
||||
DEVICE_VENDOR := OrayBox
|
||||
DEVICE_MODEL := X1
|
||||
DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += oraybox_x1
|
||||
|
||||
define Device/rakwireless_rak633
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_VENDOR := Rakwireless
|
||||
|
|
|
@ -59,6 +59,9 @@ keenetic,kn-1613)
|
|||
mediatek,linkit-smart-7688)
|
||||
ucidef_set_led_wlan "wifi" "wifi" "orange:wifi" "phy0tpt"
|
||||
;;
|
||||
oraybox,x1)
|
||||
ucidef_set_led_netdev "wifi" "wifi" "blue:status" "wlan0"
|
||||
;;
|
||||
rakwireless,rak633)
|
||||
ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
|
||||
;;
|
||||
|
|
|
@ -141,6 +141,10 @@ ramips_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
||||
;;
|
||||
oraybox,x1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"3:lan" "6@eth0"
|
||||
;;
|
||||
rakwireless,rak633)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
|||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -2147,6 +2147,13 @@ static void sfp_sm_module(struct sfp *sf
|
||||
@@ -2151,6 +2151,13 @@ static void sfp_sm_module(struct sfp *sf
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
|||
|
||||
--- a/drivers/net/phy/sfp.c
|
||||
+++ b/drivers/net/phy/sfp.c
|
||||
@@ -539,32 +539,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
@@ -543,32 +543,72 @@ static int sfp_i2c_write(struct sfp *sfp
|
||||
return ret == ARRAY_SIZE(msgs) ? len : 0;
|
||||
}
|
||||
|
||||
|
|
27
tools/7z/patches/7-zip-flags.patch
Normal file
27
tools/7z/patches/7-zip-flags.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- a/CPP/7zip/7zip_gcc.mak
|
||||
+++ b/CPP/7zip/7zip_gcc.mak
|
||||
@@ -18,13 +18,13 @@ PROGPATH_STATIC = $(O)/$(PROG)s
|
||||
|
||||
|
||||
ifneq ($(CC), xlc)
|
||||
-CFLAGS_WARN_WALL = -Wall -Werror -Wextra
|
||||
+CFLAGS_WARN_WALL = -Wall -Wextra
|
||||
endif
|
||||
|
||||
# for object file
|
||||
CFLAGS_BASE_LIST = -c
|
||||
# CFLAGS_BASE_LIST = -S
|
||||
-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
|
||||
+CFLAGS_BASE = $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) -D_GNU_SOURCE \
|
||||
-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-fPIC
|
||||
|
||||
@@ -192,7 +192,7 @@ all: $(O) $(PROGPATH) $(STATIC_TARGET)
|
||||
$(O):
|
||||
$(MY_MKDIR) $(O)
|
||||
|
||||
-LFLAGS_ALL = -s $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)
|
||||
+LFLAGS_ALL = $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)
|
||||
$(PROGPATH): $(OBJS)
|
||||
$(CXX) -o $(PROGPATH) $(LFLAGS_ALL)
|
||||
|
59
tools/7z/patches/7-zip-musl.patch
Normal file
59
tools/7z/patches/7-zip-musl.patch
Normal file
|
@ -0,0 +1,59 @@
|
|||
--- a/C/CpuArch.c
|
||||
+++ b/C/CpuArch.c
|
||||
@@ -421,8 +421,6 @@ BoolInt CPU_IsSupported_AES (void) { ret
|
||||
|
||||
#ifdef USE_HWCAP
|
||||
|
||||
-#include <asm/hwcap.h>
|
||||
-
|
||||
#define MY_HWCAP_CHECK_FUNC_2(name1, name2) \
|
||||
BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; }
|
||||
|
||||
--- a/C/Threads.c
|
||||
+++ b/C/Threads.c
|
||||
@@ -257,7 +257,7 @@ WRes Thread_Create_With_CpuSet(CThread *
|
||||
*/
|
||||
|
||||
// ret2 =
|
||||
- pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);
|
||||
+ //pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);
|
||||
// if (ret2) ret = ret2;
|
||||
#endif
|
||||
}
|
||||
@@ -267,14 +267,12 @@ WRes Thread_Create_With_CpuSet(CThread *
|
||||
if (!ret)
|
||||
{
|
||||
p->_created = 1;
|
||||
- /*
|
||||
if (cpuSet)
|
||||
{
|
||||
// ret2 =
|
||||
pthread_setaffinity_np(p->_tid, sizeof(*cpuSet), cpuSet);
|
||||
// if (ret2) ret = ret2;
|
||||
}
|
||||
- */
|
||||
}
|
||||
}
|
||||
// ret2 =
|
||||
--- a/C/Threads.h
|
||||
+++ b/C/Threads.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
+#include <sched.h>
|
||||
|
||||
#endif
|
||||
|
||||
--- a/CPP/Windows/SystemInfo.cpp
|
||||
+++ b/CPP/Windows/SystemInfo.cpp
|
||||
@@ -36,9 +36,6 @@
|
||||
#endif
|
||||
*/
|
||||
|
||||
-#ifdef MY_CPU_ARM_OR_ARM64
|
||||
-#include <asm/hwcap.h>
|
||||
-#endif
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
|
@ -5,14 +5,13 @@
|
|||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
PKG_NAME:=ccache
|
||||
PKG_VERSION:=4.7.4
|
||||
PKG_VERSION:=4.8
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36
|
||||
PKG_HASH:=b963ee3bf88d7266b8a0565e4ba685d5666357f0a7e364ed98adb0dc1191fcbb
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
@ -22,10 +21,7 @@ CMAKE_HOST_OPTIONS += \
|
|||
-DCMAKE_CXX_COMPILER_LAUNCHER="" \
|
||||
-DCMAKE_SKIP_RPATH=FALSE \
|
||||
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \
|
||||
-DENABLE_DOCUMENTATION=OFF
|
||||
-DREDIS_STORAGE_BACKEND=OFF
|
||||
|
||||
ifneq (docs-$(CONFIG_BUILD_DOCUMENTATION),docs-y)
|
||||
CMAKE_HOST_OPTIONS += -DENABLE_DOCUMENTATION=OFF
|
||||
endif
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/ccache.cpp
|
||||
+++ b/src/ccache.cpp
|
||||
@@ -1779,6 +1779,7 @@ get_manifest_key(Context& ctx, Hash& has
|
||||
@@ -1813,6 +1813,7 @@ get_manifest_key(Context& ctx, Hash& has
|
||||
"CPLUS_INCLUDE_PATH",
|
||||
"OBJC_INCLUDE_PATH",
|
||||
"OBJCPLUS_INCLUDE_PATH", // clang
|
||||
|
|
|
@ -8,14 +8,13 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=coreutils
|
||||
PKG_CPE_ID:=cpe:/a:gnu:coreutils
|
||||
PKG_VERSION:=9.1
|
||||
PKG_VERSION:=9.2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/coreutils
|
||||
PKG_HASH:=61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423
|
||||
PKG_HASH:=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
|
||||
|
||||
HOST_BUILD_PARALLEL := 1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
BUILD_PROGRAMS = date readlink touch ln chown ginstall
|
||||
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Thu, 23 Mar 2023 13:19:04 +0000
|
||||
Subject: [PATCH] copy: fix --reflink=auto to fallback in more cases
|
||||
|
||||
On restricted systems like android or some containers,
|
||||
FICLONE could return EPERM, EACCES, or ENOTTY,
|
||||
which would have induced the command to fail to copy
|
||||
rather than falling back to a more standard copy.
|
||||
|
||||
* src/copy.c (is_terminal_failure): A new function refactored
|
||||
from handle_clone_fail().
|
||||
(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
|
||||
as they also pertain to determination of whether cloning is supported
|
||||
if we ever use this function in that context.
|
||||
(handle_clone_fail): Use is_terminal_failure() in all cases,
|
||||
so that we assume a terminal failure in less errno cases.
|
||||
* NEWS: Mention the bug fix.
|
||||
Addresses https://bugs.gnu.org/62404
|
||||
---
|
||||
--- a/src/copy.c
|
||||
+++ b/src/copy.c
|
||||
@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, b
|
||||
}
|
||||
|
||||
|
||||
-/* Whether the errno from FICLONE, or copy_file_range
|
||||
- indicates operation is not supported for this file or file system. */
|
||||
+/* Whether the errno indicates the operation is a transient failure.
|
||||
+ I.e., a failure that would indicate the operation _is_ supported,
|
||||
+ but has failed in a terminal way. */
|
||||
+
|
||||
+static bool
|
||||
+is_terminal_error (int err)
|
||||
+{
|
||||
+ return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Whether the errno from FICLONE, or copy_file_range indicates
|
||||
+ the operation is not supported/allowed for this file or process. */
|
||||
|
||||
static bool
|
||||
is_CLONENOTSUP (int err)
|
||||
{
|
||||
- return err == ENOSYS || is_ENOTSUP (err)
|
||||
+ return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
|
||||
|| err == EINVAL || err == EBADF
|
||||
- || err == EXDEV || err == ETXTBSY;
|
||||
+ || err == EXDEV || err == ETXTBSY
|
||||
+ || err == EPERM || err == EACCES;
|
||||
}
|
||||
|
||||
|
||||
@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, ch
|
||||
{
|
||||
copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
|
||||
|
||||
- if (is_CLONENOTSUP (errno))
|
||||
- break;
|
||||
-
|
||||
- /* copy_file_range might not be enabled in seccomp filters,
|
||||
- so retry with a standard copy. EPERM can also occur
|
||||
- for immutable files, but that would only be in the edge case
|
||||
- where the file is made immutable after creating/truncating,
|
||||
+ /* Consider operation unsupported only if no data copied.
|
||||
+ For example, EPERM could occur if copy_file_range not enabled
|
||||
+ in seccomp filters, so retry with a standard copy. EPERM can
|
||||
+ also occur for immutable files, but that would only be in the
|
||||
+ edge case where the file is made immutable after creating,
|
||||
in which case the (more accurate) error is still shown. */
|
||||
- if (errno == EPERM && *total_n_read == 0)
|
||||
+ if (*total_n_read == 0 && is_CLONENOTSUP (errno))
|
||||
break;
|
||||
|
||||
/* ENOENT was seen sometimes across CIFS shares, resulting in
|
||||
no data being copied, but subsequent standard copies succeed. */
|
||||
- if (errno == ENOENT && *total_n_read == 0)
|
||||
+ if (*total_n_read == 0 && errno == ENOENT)
|
||||
break;
|
||||
|
||||
if (errno == EINTR)
|
||||
@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char c
|
||||
char const* src_name, char const* dst_name,
|
||||
int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
|
||||
{
|
||||
- /* If the clone operation is creating the destination,
|
||||
- then don't try and cater for all non transient file system errors,
|
||||
- and instead only cater for specific transient errors. */
|
||||
- bool transient_failure;
|
||||
- if (dest_desc < 0) /* currently for fclonefileat(). */
|
||||
- transient_failure = errno == EIO || errno == ENOMEM
|
||||
- || errno == ENOSPC || errno == EDQUOT;
|
||||
- else /* currently for FICLONE. */
|
||||
- transient_failure = ! is_CLONENOTSUP (errno);
|
||||
+ /* When the clone operation fails, report failure only with errno values
|
||||
+ known to mean trouble when the clone is supported and called properly.
|
||||
+ Do not report failure merely because !is_CLONENOTSUP (errno),
|
||||
+ as systems may yield oddball errno values here with FICLONE.
|
||||
+ Also is_CLONENOTSUP() is not appropriate for the range of errnos
|
||||
+ possible from fclonefileat(), so it's more consistent to avoid. */
|
||||
+ bool report_failure = is_terminal_error (errno);
|
||||
|
||||
- if (reflink_mode == REFLINK_ALWAYS || transient_failure)
|
||||
+ if (reflink_mode == REFLINK_ALWAYS || report_failure)
|
||||
error (0, errno, _("failed to clone %s from %s"),
|
||||
quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
|
||||
|
||||
@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char c
|
||||
but cloned no data. */
|
||||
if (new_dst /* currently not for fclonefileat(). */
|
||||
&& reflink_mode == REFLINK_ALWAYS
|
||||
- && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
|
||||
+ && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
|
||||
&& unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
|
||||
error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
|
||||
|
||||
- if (! transient_failure)
|
||||
+ if (! report_failure)
|
||||
copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
|
||||
|
||||
- if (reflink_mode == REFLINK_ALWAYS || transient_failure)
|
||||
+ if (reflink_mode == REFLINK_ALWAYS || report_failure)
|
||||
return false;
|
||||
|
||||
return true;
|
|
@ -1,95 +0,0 @@
|
|||
--- a/m4/gnulib-comp.m4
|
||||
+++ b/m4/gnulib-comp.m4
|
||||
@@ -2671,7 +2671,7 @@ changequote([, ])dnl
|
||||
fi
|
||||
gl_SYS_SOCKET_MODULE_INDICATOR([socket])
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
gl_FUNC_STRERROR_R
|
||||
AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
|
||||
AC_LIBOBJ([strerror_r])
|
||||
--- a/m4/stdint.m4
|
||||
+++ b/m4/stdint.m4
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
AC_REQUIRE([gl_LIMITS_H])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
|
||||
dnl For backward compatibility. Some packages may still be testing these
|
||||
dnl macros.
|
||||
--- a/m4/vasnprintf.m4
|
||||
+++ b/m4/vasnprintf.m4
|
||||
@@ -33,7 +33,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
|
||||
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
|
||||
[
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
])
|
||||
|
||||
# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
|
||||
@@ -41,7 +41,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
|
||||
[
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])
|
||||
AC_CHECK_TYPE([ptrdiff_t], ,
|
||||
[AC_DEFINE([ptrdiff_t], [long],
|
||||
@@ -55,7 +55,7 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
|
||||
[
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
|
||||
dnl Use the _snprintf function only if it is declared (because on NetBSD it
|
||||
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
|
||||
--- a/m4/wchar_h.m4
|
||||
+++ b/m4/wchar_h.m4
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H],
|
||||
|
||||
AC_REQUIRE([gl_FEATURES_H])
|
||||
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
if test $gt_cv_c_wint_t = yes; then
|
||||
HAVE_WINT_T=1
|
||||
else
|
||||
--- a/m4/wctype_h.m4
|
||||
+++ b/m4/wctype_h.m4
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H],
|
||||
fi
|
||||
AC_SUBST([HAVE_ISWCNTRL])
|
||||
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
if test $gt_cv_c_wint_t = yes; then
|
||||
HAVE_WINT_T=1
|
||||
else
|
||||
--- a/m4/wcwidth.m4
|
||||
+++ b/m4/wcwidth.m4
|
||||
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
|
||||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
AC_REQUIRE([gt_TYPE_WCHAR_T])
|
||||
- AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
+ AC_REQUIRE([gt_TYPE_WINT_T_GNUTLS])
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([wchar.h])
|
||||
AC_CHECK_FUNCS_ONCE([wcwidth])
|
||||
--- a/m4/wint_t.m4
|
||||
+++ b/m4/wint_t.m4
|
||||
@@ -9,7 +9,7 @@ dnl Test whether <wchar.h> has the 'wint
|
||||
dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
|
||||
dnl Prerequisite: AC_PROG_CC
|
||||
|
||||
-AC_DEFUN([gt_TYPE_WINT_T],
|
||||
+AC_DEFUN([gt_TYPE_WINT_T_GNUTLS],
|
||||
[
|
||||
AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
|
||||
[AC_COMPILE_IFELSE(
|
|
@ -0,0 +1,20 @@
|
|||
From 9c5e542fd190a14431092e3b6cb45d18fe95f26f Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Tue, 28 Mar 2023 01:52:43 -0700
|
||||
Subject: [PATCH] date: diagnose -f read errors
|
||||
|
||||
* src/date.c (batch_convert): Diagnose read errors, fixing Bug#62497.
|
||||
---
|
||||
--- a/src/date.c
|
||||
+++ b/src/date.c
|
||||
@@ -368,7 +368,9 @@ batch_convert (char const *input_filenam
|
||||
ssize_t line_length = getline (&line, &buflen, in_stream);
|
||||
if (line_length < 0)
|
||||
{
|
||||
- /* FIXME: detect/handle error here. */
|
||||
+ if (ferror (in_stream))
|
||||
+ die (EXIT_FAILURE, errno, _("%s: read error"),
|
||||
+ quotef (input_filename));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in a new issue