Run this only when a PR is created, so either author or anyone who can
edit the PR message (all maintainers) can trigger such build.
Instead of maintaining it in the main repository, move it to the
external repository to bloat this repository less with further CI
commits.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The gmac definition has an offset of 1 at the moment. This leads to an
off by one error in downstream projects that rely on the package label mac.
Signed-off-by: Steffen Förster <nemesis@chemnitz.freifunk.net>
Link: https://github.com/openwrt/openwrt/pull/21543
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Rename some of the net_device_ops to the new driver prefix.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Rename transmit related functions with the new prefix.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Convert the mac functions to the new prefix.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Rename the header tag encoding/decoding functions according
to the new prefix naming convention.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
All Realtek drivers use ctrl (control) als the central driver
structure. Align that for the ethernet driver. Additionally
use the rteth prefix for the device independent structure
definition. Its current prefix "rtl838x_" is only confusing.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The code to be replaced is a glorious no-op. A default value for
config.radius_das_client does not need to be assigned. This parameter
already has non-empty value: see the enclosing 'if' block.
As a result, the value of config.radius_das_client never gets modified
to contain both dae_client and dae_secret. This breaks hostapd.add_iface()
that expects config.radius_das_client to contain both dae_client and
dae_secret separated by a whitespace.
Fixes: #21519
Signed-off-by: Val Kulkov <val.kulkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21522
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There is currently a mismatch in the detection of the chip type.
rt-loader and the kernel give different revisions. E.g.
rt-loader: Running on RTL9313 (chip id 6567A) with 256MB
kernel: Realtek RTL9313 rev B (6567) SoC with 256 MB
Realtek internal version numbering is
- for RTL838x: 1=A, 2=B, ...
- for others: 0=A, 1=B, ...
rt-loader does not differentiate that. Adapt the calculation to
give a consistent picture.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21498
Signed-off-by: Robert Marko <robimarko@gmail.com>
Initialization of the RTL8214FC was coded like "put the cart
before the horse". Configuration was called from probing
and only when called for the last port.
Testing showed that there is no need to overcomplicate things.
Reorganize the setup as follows:
- Let probe() & config() do what they are meant for
- Split the config part between a package and a port sequence
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21508
Signed-off-by: Robert Marko <robimarko@gmail.com>
The RTL8214FC is initialized with a minimum driver sequence.
The firmware usage has been made obsolete. Drop leftovers.
These include:
- old code
- firmware file
- kernel config (to include the firmware file into the build)
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21508
Signed-off-by: Robert Marko <robimarko@gmail.com>
There are currently two code paths to initialize the RTL8214FC. One is
for RTL838x, the other for RTL839x. With the recently added minimum
setup sequence the phy will come up and pass traffic on any device.
Use this als the reference implementation and drop the usage of the
magic firmware based setup.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21508
Signed-off-by: Robert Marko <robimarko@gmail.com>
For the GS1920 the build system throws errors like
../dts/rtl8392_zyxel_gs1920-24hp-v1.dts:256.19-29:
Warning (reg_format): /switch@1b000000/ports/port@0:reg:
property has invalid length (4 bytes)
(#address-cells == 2, #size-cells == 1)
The dts misses the address and size properties for the
ports section. Fix that.
Fixes: 2a55846 ("realtek: add support for ZyXEL GS1920-24HPv1")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21534
Signed-off-by: Robert Marko <robimarko@gmail.com>
The patch 950-0019-BCM2708-Add-core-Device-Tree-support.patch creates a
symbolic link. It looks like quilt does not support this and never
refreshed it.
I removed the symbolic link, refreshed the patch and then added it
back again.
Link: https://github.com/openwrt/openwrt/pull/21431
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Commit 9151c7015e introduced support for the global DHCP DUID to
generate a RFC4361-style client identifier.
However, the IAID introduced in those changes is based on ifindex, which
is subject to changes and causes issues on environments requiring a stable
IAID.
This commit switches the IAID to a stable one based on MD5.
Fixes: 9151c7015e ("netifd: use the global DHCP DUID for DHCPv4")
Link: https://github.com/openwrt/openwrt/pull/21489
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add new function "network_generate_iface_iaid()" to generate a stable IAID
from an interface name.
Link: https://github.com/openwrt/openwrt/pull/21489
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Implement the .get_link_ksettings to get the rate, duplex, and
auto-negotiation status.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21530
Signed-off-by: Robert Marko <robimarko@gmail.com>
This driver supports the ADT7470 thermal monitoring chip, which is used
in the ECS4100-12PH switch.
Fixes: fa9f925951 ("realtek/rtl839x: Edgecore ECS4100-12PH support")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Link: https://github.com/openwrt/openwrt/pull/21505
Signed-off-by: Robert Marko <robimarko@gmail.com>
Some mpc85xx boards still boot with failsafe configured on a non-LAN
interface. Align the preinit interface with the first DSA port or the
interface that LAN is connected to.
This makes failsafe reachable on devices where the default selection does
not map to the primary LAN port.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21516
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This adds support for the Airpi AP3000M 5G CPE based on MediaTek MT7981B.
Specifications:
SoC: MediaTek MT7981B (dual-core ARM Cortex-A53)
RAM: 1GB DDR4
Storage: 8GB or 16GB eMMC
Ethernet: 1x 2.5GbE LAN, 1x 1GbE WAN
Wireless: 2.4GHz/5GHz 802.11ax
Buttons: Reset, WPS
LEDs: System, 2.4GHz WiFi, 5GHz WiFi
Cooling: PWM-controlled fan
Expansion: M.2 slot for 5G modem
The factory partition (mmcblk0p2) is empty in stock firmware.
Execute via SSH before flashing OpenWrt:
```
dd if=/lib/firmware/MT7981_iPAiLNA_EEPROM.bin of=/dev/mmcblk0p2 bs=4k count=1
MAC addresses
```
Fixed MAC addresses are derived by macaddr_generate_from_mmc_cid.
Installation via U-Boot web page
Set static IP 192.168.88.2/255.255.255.0 on your computer.
Connect to the 1GbE port (WAN) and hold the reset button while booting the device. Wait for about 6 seconds, and release the reset button.
Open U-boot web page on your browser at http://192.168.88.1
Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
Wait for automatic reboot.
Installation via sysupgrade
Flash the sysupgrade file via LuCI upgrade page without saving the settings.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21397
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
If an apk package with an ABI version doesn't have priority set, it
can't be selected by its base name:
$ make manifest PACKAGES='libustream-openssl libsqlite3'
ERROR: unable to select packages:
libsqlite3 (virtual):
note: please select one of the 'provided by'
packages explicitly
provided by: libsqlite3-0
required by: world[libsqlite3]
libustream-openssl (virtual):
note: please select one of the 'provided by'
packages explicitly
provided by: libustream-openssl20201210
required by: world[libustream-openssl]
Look up the ABI version in apk index and if present, add an ABI suffix
to all requested packages.
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21449
Signed-off-by: Robert Marko <robimarko@gmail.com>
Newer Cudy WR3000H units have a Motorcomm YT8821 PHY instead of a
Realtek PHY on the WAN port. Before this commit, the Motorcomm PHY
could not be autodetected by the kernel -- the PHY would show up as
just a generic clause 45 PHY and the proper driver would not be loaded.
The cause of the detection failure likely was that the YT8821 PHY was
held in reset during PHY detection. To fix this, move the reset GPIO
definition to the MDIO bus level. This reset line is deasserted before
the autodetection process, see also [1]. With this change, both Realtek
and Motorcomm PHYs can be supported with a single device tree.
[1]: https://lore.kernel.org/all/20251119134750.394655-1-horatiu.vultur@microchip.com/
Signed-off-by: Jakub Vaněk <linuxtardis@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21399
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Recent Cudy WR3000H v1 units have a Motorcomm YT8821 2.5G PHY for
the WAN interface instead of the RTL8221B PHY used in earlier units,
so add kmod-phy-motorcomm to be able to use it.
Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
[linuxtardis@gmail.com: slightly reworded the commit description]
Signed-off-by: Jakub Vaněk <linuxtardis@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21399
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Motorcomm YT8821 2.5G PHY is being used in some devices as an
alternative to devices like the RTL8221B. Package it as a kmod
so it can be used as a device package rather than requiring changes
to the target kernel config.
Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
Link: https://github.com/openwrt/openwrt/pull/21399
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Microchip ATF depends on Ruby scripts to generate the FWU monitor HTML
and more, so make sure that host Ruby is available.
We also need to call the scripts directly via Ruby executable as shebang
wont work due to lack of Ruby in the Buildbot container.
Fixes: 5205c0c426 ("microchipsw: lan969x: add Microchip EV23X71A")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
LibreSSL 3.9+ has dropped support for X509V3 extension API so cert_create
tool does not compile against it at all.
This was hidden by the fact that it was compiling against OpenSSL on my
host which still has that API, however we do not ship libssl-dev in the
Buildbot containers so compiling against distro OpenSSL is not possible.
So, after a long time trying to find any docs on that API I resorted to
LLM(Gemini 3 Pro) to get it to compile.
Our libcrypto is linked against pthread so we must pass -lpthread as well
for cert_tool.
Fixes: 5205c0c426 ("microchipsw: lan969x: add Microchip EV23X71A")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
The interfaces attribute of the mdio bus held the information
about the connection mode (qsgmii, sgmii, ...). This was only
used during the old RTL930x setup. Drop it because it is not
needed any longer.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21469
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Cleanup the RTL930x polling setup. Make use of the
new phy fixup helper to initialize the polling registers.
As an integral update to the logic before only write
register bits that are really in scope. This might save
some bits set by U-Boot.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21469
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
The mdio driver currently initializes the phy polling registers
with some nasty magic. It identifies the interface mode from the
dts and draws some strange conclusions.
Looking at the SDK one can see that this is basically dependent
of the attached phy type. So the code location is quite right
inside the mdio driver.
Provide a new get_phy_info() function that determines the phy
characteristics that are important for the polling unit . It will
be later needed by the RTL93xx setup code.
Some explanation about the fields of the structure:
- has_res_reg: phy has a special Realtek resolution polling
register. It is unclear if this gives more details or if it
simply allows faster polling.
- has_giga_lite: This is a phy that allows for Realtek proprietary
1G/2.5G lite connectivity. In this case data is only transmitted
over two wire pairs.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21469
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Currently there are several places where the driver uses the
classic "i" as iterator. In these cases where it iterates
phy ports use "addr" instead to make it easier to read. Do
the same for the smi bus. Additionally forthcomming commits
will show nicer diffs.
While we are here fix the initialization sequence of the private
structure. There is no need to set data to zero that has already
been zero-allocated before. Instead initialize smi_bus[] with
a value of "-1" to denote that a phy is not in scope. This is
essential as some functions already have a matching check in
place.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21469
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
If a package has an ABI version defined, set priority to 10. The enables
packages with an ABI version to be installed by their base name instead
of a name and an ABI version, e.g.:
libfoo3, where 3 is the ABI version can be installed by just libfoo.
This affects manual installation only, as the dependency resolution
takes care of ABI versions.
Refactor apk priority logic into a helper define.
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Due to the way apk lifecycle scripts are defined, they might end up with
multiple shebangs. Remove them.
Before:
post-upgrade: |
#!/bin/sh
export PKG_UPGRADE=1
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
export root="${IPKG_INSTROOT}"
export pkgname="adblock-fast"
add_group_and_user
default_postinst
#!/bin/sh
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
/etc/init.d/adblock-fast enable
fi
exit 0
After:
post-upgrade: |
#!/bin/sh
export PKG_UPGRADE=1
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
export root="${IPKG_INSTROOT}"
export pkgname="adblock-fast"
add_group_and_user
default_postinst
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
/etc/init.d/adblock-fast enable
fi
exit 0
Fixes: b52e897 ("include/package-pack: remove leading whitespace from install scripts")
Fixes: 03880e2 ("include/package-pack: add missing apk package lifecycle events")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fix setting implicit self-provides for packages when they don't have any
PROVIDES specified.
Remove redundant self-provide for kmods, since kmods are packages and
will have a self-provide added already.
Fixes: 5ed650a ("build: add support for virtual provides")
Fixes: 9b37b71 ("build: provide virtual self in kmods")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
ABI version is added to a package name during packaging, so there's no
need to specify it manually. And nothing explicitly depends on libelf1.
Fixes: d7bf089 ("elfutils: rename libelf1 to libelf")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Packages shouldn't provide a package that another package, in this case
wget from packages provides. Explicitly provide a virtual @wget-any
instead to match the implicit wget provide and switch the only consumer
to use the new provider.
Set uclient-fetch as the default variant for wget-any.
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Same as for the base package name, when a package has an ABI version,
provide both unversioned provider in addition to one with ABI version
and version.
So for each provide instead of providing only:
$provide$ABI_version=$package_version
now provide:
$provide $provide$ABI_version=$package_version
When a provide ends in a number, the ABI version will be prefixed with
a - sign, e.g.: provide1-0
Fixes: 18029977 ("build: fix apk packaging and ABI-versioning")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Refactor dependencies and extra dependencies logic into a helper define
and document it.
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Don't mark all provides as virtual when ALTERNATIVES is set.
Automatically marking all provides as virtual prevents variants from
conflicting between each other. Alternatives have nothing to do with
packaging and packages are expected to manage their own provides.
Updated internal provides explanation.
Remove unnecessary back slashes from FormatProvides.
Fixes: 18029977 ("build: fix apk packaging and ABI-versioning")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
Remove default provider priority since packages are expected to
explicitly declare virtual provides and set default variants. With
default priority some package variants without PROVIDES and not marked
as default end up with priority 0 and are not picked for installation.
Before the change dnsmasq-dhcpv6 is selected for dnsmasq, because the
former has higher priority:
name <dnsmasq> selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer existing package
choose as new provider
consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
prefer highest declared provider priority
choose as new provider
consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
prefer lowest available repository
selecting: dnsmasq-dhcpv6-2.91-r2, available: 1
assign dnsmasq-dhcpv6 to dnsmasq-dhcpv6-2.91-r2
assign dnsmasq to dnsmasq-dhcpv6-2.91-r2
disqualify_package: dnsmasq-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
apply_constraint: libc
apply_constraint: provider: libc-1.2.5-r5: 1
After the change dnsmasq is selected for dnsmasq based on
lexicographical order:
name <dnsmasq> selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer existing package
choose as new provider
consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer lowest available repository
consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer lowest available repository
selecting: dnsmasq-2.91-r2, available: 1
assign dnsmasq to dnsmasq-2.91-r2
disqualify_package: dnsmasq-dhcpv6-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
apply_constraint: libc
apply_constraint: provider: libc-1.2.5-r5: 1
Fixes: dea8397 ("include/package-pack: add default 'provider_priority' for APK packages")
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko <robimarko@gmail.com>
The mdio driver was carved out from the ethernet driver long
ago. Remove some leftover defines.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21502
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Mark T4240RDB u-boot variants as device-built and avoid installing them into rootfs.
Without this buildbot crashes during package install with:
ERROR: unable to select packages:
u-boot-fsl_T4240RDB-nor (no such package):
required by: world[u-boot-fsl_T4240RDB-nor]
u-boot-fsl_T4240RDB-sdboot (no such package):
required by: world[u-boot-fsl_T4240RDB-sdboot]
Fixes: c5d3d5fe28 ("package: u-boot: initial support for qoriq arch")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21514
Signed-off-by: Robert Marko <robimarko@gmail.com>
The mac_addr variable was not zero-initialized, causing weird side effects
when the memory contents were a valid MAC address.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Link: https://github.com/openwrt/openwrt/pull/21504
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
The realtek target uses some functions marked __init for initialization.
However, that means they can only be called once when compiled in and
afterwards the memory occupied by them is freed and potentially reused.
Some "impossible" (code at a given location can't crash in the way it
does) crashes can be caused by this because upon re-execution of those
functions, garbage gets executed. Such re-execution can happen for
deferred probes or repeated probes.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Link: https://github.com/openwrt/openwrt/pull/21504
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>