When using alpine as host, things start to fail. Lets pull in the
upstream alpine patches to make things work. This should not affect
other hosts.
Note, that Alpine has the '_GNU_SOURCE' define in the APKBUILD file, but
here we add this flag to the needed fix flags patch, which does similar
things too.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Add support for OrayBox X1. It is a 802.11n router, based on MediaTek MT7628N.
Specifications:
SoC: MediaTek MT7628N (580MHz)
RAM: 64 MiB
Flash: 16 MiB NOR (Winbond W25Q128JVSIQ)
Wireless: 802.11b/g/n 2x2 2.4GHz (Built In)
Ethernet: 1x 100Mbps only
USB: 1x USB Type-A 2.0 Host Port
Button: 1x "Reset" button
LED: 1x Blue LED + 1x Red LED + 1x White LED
Power: 5V Micro-USB input
Manufacturer Page:
https://pgy.oray.com/router/x1.html/parameter
Flash Layout:
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "kpanic"
0x000000040000-0x000000050000 : "factory"
0x000000050000-0x000000fe0000 : "firmware"
0x000000fe0000-0x000000ff0000 : "bdinfo"
0x000000ff0000-0x000001000000 : "reserve"
Install via SSH:
Original firmware is based on OpenWRT, but SSH is not start by default,
You should enable it first
1. Login into web admin (10.168.1.1), default password is 'admin'
2. Open the following link, and the result should be {"code":0};
SSH is now started, username is root, password is same as web admin password
http://10.168.1.1/cgi-bin/oraybox?_api=ssh_set&enabled=1
4. You can flash firmware via mtd: mtd write /tmp/firmware_image.bin firmware
Signed-off-by: Bin We <me@udp.pw>
Some modems (namely, Telit LE910C4) require the IPv6 connection state to
be cleared explicitly, to avoid reporting "no effect" if IPv6
connection is already connected through autoconnect mechanism, or during
LTE default bearer attach, which would lead to established session, but
without a way to inform protocol handler of the status.
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Some modems require CID to be set explicitly during IPv6 connection
status check, others require IPv6 address family to be checked explicitly
after establishing connection, in order to provide correct status.
Set both fields in the request to satisfy them.
Fixes: c8a88118af ("uqmi: set CID during 'query-data-status' operation")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
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.
Tested on bt_homehub-v5a with 5.10 and 5.15.
Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
[Add commit description into patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This resolves an error when building toolchain/musl on macOS due to
improper hole-detection caused by a bug in macOS/APFS [1].
As long as we don't reconfigure, 001-m4.patch is not needed.
If we keep it, it will force reconfigure the project,
since m4 files are changed. This works, but may not be optimal,
because the build should use files from coreutils/m4, but
OpenWRT uses legacy files from staging_dir/host/share/aclocal [2].
backport a couple of upstream patches
date: diagnose -f read errors
copy: fix --reflink=auto to fallback in more cases
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61386
[2] https://github.com/openwrt/openwrt/pull/12233#issuecomment-1481097456
Co-developed-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
It appears that the refactor of the upgrade process for NAND devices
resulted in the nand_do_upgrade_success step not being called for
devices using the linksys.sh script. As a result, configuration
was not preserved over sysupgrade steps.
This restores the preservation of configs for ipq806x devices using the
linksys.sh script. Other devices and targets have not been examined.
This commit uses the same functionality and terminology used in commit
8634c10 ("ipq40xx: Fix Linksys upgrade, restore config step")
Fixes: e25e6d8 ("base-files: fix and clean up nand sysupgrade code")
Tested-on: EA8500
Signed-off-by: Jacob Aharon <ah.jacob@gmail.com>
Given ipv6 has SLAAC it is quite plausible to wish to use dynamic
dhcp4 but static dhcp6. This patch keeps dynamicdhcp as the default
option for both, but is overridden by dynamicdhcpv6 or dynamicdhcpv4
Signed-off-by: Ian Dall <ian@beware.dropbear.id.au>
PCI paths of the WLAN devices have changed between kernel 5.10 and 5.15;
migrate config so existing wifi-iface definitions don't break.
This is implemented as a hotplug handler rather than a uci-defaults script
as the migration script must run before the 10-wifi-detect hotplug handler.
based on b452af23a8
migration was forgotten when device trees were adjusted in
688697889cc77913be5bfixes#9374
affected devices:
Netgear R6220
Netgear WAC104
Netgear WNDR3700 v5
Zbtlink ZBT-WE1326
Wiflyer WF3526-P
Arcadyan WE420223-99
Beeline Smartbox Flash (Arcadyan WG443223)
MTS WG430223 (Arcadyan WG430223)
Tested-by: Maximilian Baumgartner <aufhaxer@googlemail.com>
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
The dhcphostsfile must be mounted into the (ujail) sandbox.
The file can not be accessed without this mount.
Signed-off-by: Ruben Jenster <rjenster@gmail.com>
Hanyang Digitech Co., Ltd.
MSIP-CMM-HYD-HYC-G920
CJ-Hello HYC-G920
SoC : MediaTek MT7621AT
RAM : 256M (SK hynix H5TQ2G63FFR)
FLASH : 16MB (Winbond W25Q128BV)
WiFi : MediaTek MT7602EN bgn 2SS
WiFi : MediaTek MT7612EN nac 2SS
BTN : Reset
LED : - Power RED
- WAN Green
- LAN {1-4}
- WiFi 2.4 GHz Blue
- WiFi 5 GHz Blue
- USB Green
**For MT7621 stage1 DDR Test**
UART : J4 GND - 3V3 - TX - RX - GND / 57600-8N1
```
MT7621 stage1 code 10:33:55 (ASIC)
CPU=500000000 HZ BUS=166666666 HZ
```
**For u boot environment**
UART : J4 GND - 3V3 - TX - RX - GND / 115200-8N1
**UART Menu**
```
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
```
**Steps**
Press 4: Entr boot command line interface.
On the pormpt enter.
`setenv firmware_size 0xf60000`
Then enter.
`saveenv`
Then enter.
`reset`
**Device will reboot**
Set your IP 192.168.100.100/24
Connect your lan cable to wan port.
**On the UART Menu**
Press 2: Load system code then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) **enter** `Y`
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.100.55) ==:`192.168.100.55`
Input server IP (192.168.100.100) ==:`192.168.100.100`
Input Linux Kernel filename () ==:`openwrt-22.03.0-ramips-mt7621-hanyang_hyc-g920-squashfs-sysupgrade.bin`
After uploading firmware image, device will boot Openwrt.
Signed-off-by: Muhammad AL-Qadhy <m.ismael@gmail.com>
Kmod-tg3 supports Ethernet adapters over PCIe bus. On targets without
PCI support, this package is empty. Symbol CONFIG_TIGON3 depends on
CONFIG_PCI.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Kmod-hfcpci and kmod-hfcmulti supports ISDN adapters over PCI. On targets
without PCI support, this package is empty. Symbol CONFIG_MISDN_HFCMULTI
and CONFIG_MISDN_HFCPCI depends on CONFIG_PCI.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Changes:
1c6f0f3 libtraceevent: version 1.7.2
73f6a8a libtraceevent: Fix some missing commas in big endian blocks
da2ea6b libtraceevent: Rename "ok" to "token_has_paren" in process_sizeof()
e6f7cfa libtraceevent: No need for testing ok in else if (!ok) in process_sizeof()
a4b1ba5 libtraceevent: Fix double free in parsing sizeof()
Signed-off-by: Nick Hainke <vincent@systemli.org>
Run `time make tools/squashfs4/{clean,compile} -j$(nproc)`
Before:
real 0m8.803s
user 0m12.415s
sys 0m1.317s
After:
real 0m13.781s
user 0m13.290s
sys 0m1.528s
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
From https://github.com/openwrt/openwrt/pull/12280#issuecomment-1489279860
On Ethernet and WLAN, NAPI is threaded for all queues. This means that the
processing work is not stuck on the CPU that fired the IRQ. Under heavy
load, IRQs get disabled anyway, so it should not matter at all which CPUs
the IRQs fire on.
Basic testing indicates this to be true. There's no speedup or slowdown.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Nests kernel and ubi into firmware partition in-order to be compatible
with OEM firmware. This allows restoring oem firmware from a backup of
firmware2. Add jffs2 partition which is present in the oem firmware.
Add support for mediatek NMBM (wear leveling on newer mediatek devices).
Exclude UBI partition from NMBM management.
Continues PR #10685.
Tested-by: Felix Baumann <felix.bau@gmx.de>
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3.
Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf
Signed-off-by: Joe Mullally <jwmullally@gmail.com>
Recent ath11k sync introduced a regression causing 80+80 and 160MHz to
stop being advertised and thus not selectable due to the respective feature
flags being cleared.
So, until we get answers upstream to what was the reasoning behind this and
it gets fixed, lets just remove the flag clearing to reanable 160MHz.
Fixes: 789a0bac35 ("mac80211: ath11k: sync with ath-next")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Use latest release build instead of a git snapshot. As this tarball
extracts in a trusted-firmware-a-2.8 subdirectory, we no longer need to
override the PKG_NAME defined in trusted-firmware-a.mk. The actual
package name is still the same, so we don't need to update any
dependencies.
Tested on A64-OLinuXino-1Ge16GW.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This is the newest release where 210-sunxi-deactivate-binman.patch still
applies.
Tested on A64-Olinuxino-eMMC.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Add LED function properties for the LED controller to avoid failing
driver probe with kernel 5.15.
While at it, also define the OpenWrt LED indicator patterns for this
device.
Ref commit 583ac0e11d ("mpc85xx: update lp5521 led-controller node for 5.10")
Google uses white for running and red for an issue
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Tested-by: Andrijan Möcker <amo@ct.de>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Add the external reset button for use with OpenWrt.
Co-authored-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
This enables the HW Random Number Generator on the BCM6362 and BCM63268 SoCs,
which is the same one used on BCM6368 SoC.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Register the ethernet driver from iudma, which avoids the attempt to probe the
emac driver before iudma and its consequent deferral.
The ethernet driver can't work without iudma anyway.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Pahole version is being autodetected during runtime since kernel 5.15.96
via in-kernel scripts/pahole-version.sh so add CONFIG_PAHOLE_VERSION to
kernel filter in order to prevent it from being added to target configs.
Signed-off-by: Robert Marko <robimarko@gmail.com>
The Mikrotik R11e-LTE6 modem is similar to ZTE MF286R modem, added
earlier: it has a Marvel chip, able to work in ACM+RNDIS mode, knows ZTE
specific commands, runs OpenWrt Barrier Breaker fork.
While the modem is able to offer IPv6 address, the RNDIS setup is unable
to complete if there is an IPv6 adress.
While it works in ACM+RNDIS mode, the user experience isn't as good as
with "proto 3g": the modem happily serves a local IP (192.168.1.xxx)
without internet access. Of course, if the modem has enough time
(for example at the second dialup), it will serve a public IP.
Modifing the DHCP Lease (to a short interval before connect and back to
default while finalizing) is a workaround to get a public IP at the
first try.
A safe workaround for this is to excercise an offline script of the
pingcheck program: simply restart (ifdown - ifup) the connection.
Another pitfall is that the modem writes a few messages at startup,
which confuses the manufacturer detection algorithm and got disabled.
daemon.notice netifd: Interface 'mikrotik' is setting up now
daemon.notice netifd: mikrotik (2366): Failed to parse message data
daemon.notice netifd: mikrotik (2366): WARNING: Variable 'ok' does not exist or is not an array/object
daemon.notice netifd: mikrotik (2366): Unsupported modem
daemon.notice netifd: mikrotik (2426): Stopping network mikrotik
daemon.notice netifd: mikrotik (2426): Failed to parse message data
daemon.notice netifd: mikrotik (2426): WARNING: Variable '*simdetec:1,sim' does not exist or is not an array/object
daemon.notice netifd: mikrotik (2426): Unsupported modem
daemon.notice netifd: Interface 'mikrotik' is now down
A workaround for this is to use the "delay" option in the interface
configuration.
I want to thank Forum members dchard (in topic Adding support for
MikroTik hAP ac3 LTE6 kit (D53GR_5HacD2HnD)) [1]
and mrhaav (in topic OpenWrt X86_64 + Mikrotik R11e-LTE6) [2]
for sharing their experiments and works.
Another information page was found at eko.one.pl [3].
[1]: https://forum.openwrt.org/t/137555
[2]: https://forum.openwrt.org/t/151743
[3]: https://eko.one.pl/?p=modem-r11elte
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
The MikroTik R11e-LTE6 modem goes into flight mode (CFUN=4) at startup
and the radio is off (*RADIOPOWER: 0):
AT+RESET
OK
OK
*SIMDETEC:2,NOS
*SIMDETEC:1,SIM
*ICCID: 8936500119010596302
*EUICC: 1
+MSTK: 11, D025....74F3
*ADMINDATA: 0, 2, 0
+CPIN: READY
*EUICC: 1
*ECCLIST: 5, 0, 112, 0, 000, 0, 08, 0, 118, 0, 911
+CREG: 0
$CREG: 0
+CESQ: 99,99,255,255,255,255
*CESQ: 99,99,255,255,255,255,0
+CGREG: 0
+CEREG: 0
+CESQ: 99,99,255,255,255,255
*CESQ: 99,99,255,255,255,255,0
*RADIOPOWER: 0
+MMSG: 0, 0
+MMSG: 0, 0
+MMSG: 1, 0
+MPBK: 1
While the chat script is able to establish the PPP connection,
it's closed instantly by the modem: LCP terminated by peer.
local2.info chat[7000]: send (ATD*99***1#^M)
local2.info chat[7000]: expect (CONNECT)
local2.info chat[7000]: ^M
local2.info chat[7000]: ATD*99***1#^M^M
local2.info chat[7000]: CONNECT
local2.info chat[7000]: -- got it
local2.info chat[7000]: send ( ^M)
daemon.info pppd[6997]: Serial connection established.
kern.info kernel: [ 453.659146] 3g-mikrotik: renamed from ppp0
daemon.info pppd[6997]: Renamed interface ppp0 to 3g-mikrotik
daemon.info pppd[6997]: Using interface 3g-mikrotik
daemon.notice pppd[6997]: Connect: 3g-mikrotik <--> /dev/ttyACM0
daemon.info pppd[6997]: LCP terminated by peer
daemon.notice pppd[6997]: Connection terminated.
daemon.notice pppd[6997]: Modem hangup
daemon.info pppd[6997]: Exit.
daemon.notice netifd: Interface 'mikrotik' is now down
Sending "AT+CFUN=1" to modem deactivates the flight mode and
solves the issue:
daemon.notice netifd: Interface 'mikrotik' is setting up now
daemon.notice netifd: mikrotik (7051): sending -> AT+CFUN=1
daemon.notice pppd[7137]: pppd 2.4.9 started by root, uid 0
local2.info chat[7140]: abort on (BUSY)
local2.info chat[7140]: abort on (NO CARRIER)
local2.info chat[7140]: abort on (ERROR)
local2.info chat[7140]: report (CONNECT)
local2.info chat[7140]: timeout set to 10 seconds
local2.info chat[7140]: send (AT&F^M)
local2.info chat[7140]: expect (OK)
local2.info chat[7140]: ^M
local2.info chat[7140]: +CESQ: 99,99,255,255,255,255^M
local2.info chat[7140]: ^M
local2.info chat[7140]: *CESQ: 99,99,255,255,255,255,0^M
local2.info chat[7140]: AT&F^MAT&F^M^M
local2.info chat[7140]: OK
local2.info chat[7140]: -- got it
...
local2.info chat[7140]: send (ATD*99***1#^M)
local2.info chat[7140]: expect (CONNECT)
local2.info chat[7140]: ^M
local2.info chat[7140]: ATD*99***1#^M^M
local2.info chat[7140]: CONNECT
local2.info chat[7140]: -- got it
local2.info chat[7140]: send ( ^M)
daemon.info pppd[7137]: Serial connection established.
kern.info kernel: [ 463.094254] 3g-mikrotik: renamed from ppp0
daemon.info pppd[7137]: Renamed interface ppp0 to 3g-mikrotik
daemon.info pppd[7137]: Using interface 3g-mikrotik
daemon.notice pppd[7137]: Connect: 3g-mikrotik <--> /dev/ttyACM0
daemon.warn pppd[7137]: Could not determine remote IP address: defaulting to 10.64.64.64
daemon.notice pppd[7137]: local IP address 100.112.63.62
daemon.notice pppd[7137]: remote IP address 10.64.64.64
daemon.notice pppd[7137]: primary DNS address 185.29.83.64
daemon.notice pppd[7137]: secondary DNS address 185.62.131.64
daemon.notice netifd: Network device '3g-mikrotik' link is up
daemon.notice netifd: Interface 'mikrotik' is now up
To send this AT command to the modem the "runcommand.gcom" script
dependency is moved from comgt-ncm to comgt.
As the comgt-ncm package depends on comgt already, this change
is a NOOP from that point of view.
But from the modem's point it is a low hanging fruit as the modem
is usable with installing comgt and kmod-usb-ncm packages.
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
The wireless driver package was incorrectly removed from the TUF-AX4200
device-packages, resulting in images without wireless functionality.
Fixes: d98c4fb8bf ("mediatek: broaden filogic target description")
Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
[rework commit description]
Signed-off-by: David Bauer <mail@david-bauer.net>
We should ensure that the PHY is properly configured.
This is specially needed in devices using the internal PHY for ethernet0.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
The MDIO bus is supported but there are errors when trying to probe and
configure the external BCM5325E switch through B53 DSA.
Therefore, let's add basic ethernet (but working) support for now.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
The current implementation of bcm6368-enetsw is a mess of dev, ndev and kdev
variables, which have refer to different things depending on the function.
This commit harmonizes it and resolves the issue.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Sercomm H500-s has a Quantenna SoC for external wifi which can be activated or
deactivated through GPIO #20.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This patch solves the problem of receiving "error" responses when
initially calling gcom. This avoids unnecessary NO_DEVICE failures.
A retry loop retries the call after an "error" response within the
specified delay. A successful response will continue with the connection
immediately without waiting for max specified delay, bringing the
interface up sooner.
Signed-off-by: Mike Wilson <mikewse@hotmail.com>