Until now the rt-loader only works on U-Boot driven devices where the
environment (e.g. coprocessor) is usually setup properly. Devices like
the ZyXEL GS1920 series use BootBase as start environment and skip
some of the basic initialization steps. rt-loader will fail in these
cases. Take care about the CP0 registers.
Additionally enhance the documentation of the printf implementation.
It was optimized during the different revisions of the initial PR.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19253
Signed-off-by: Robert Marko <robimarko@gmail.com>
There are too many supported Realtek devices so avoid activating the
rt loader recipe in the default builds. Just start with the LGS310C.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18397
Signed-off-by: Robert Marko <robimarko@gmail.com>
To make use of the new rt-loader provide the needed recipes.
This has been tested with the following devices:
- rtl838x Linksys LGS310: initramfs & flash
- rtl930x Zyxel XGS1210: initramfs
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18397
Signed-off-by: Robert Marko <robimarko@gmail.com>
The bootloader of many Realtek switches only supports gzipped kernel images.
With limited flash space that might get critical in future versions. For better
compression allow support for compressed images. For this a new loader was
developed. Several ideas have been taken over from the existing lzma loader
but this has been enhanced to make integration simpler. What is new:
- Loader is position independent. No need to define load addresses
- Loader identifies device memory on its own
- Loader uses "official" upstream kernel lzma uncompress
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/decompress_unlzma.c
- Loader uses "official" UNMODIFIED nanoprintg that is used by several
bare metal projects. https://github.com/charlesnicholson/nanoprintf
Compiled the loader ist just under 12KiB and during boot it will show:
rt-loader
Found RTL8380M (chip id 6275C) with 256MB
Relocate 2924240 bytes from 0x80100000 to 0x8fce0000
Extract kernel with 2900144 bytes from 0x8fce521c to 0x80100000...
Extracted kernel size is 9814907 bytes
Booting kernel from 0x80100000 ...
[ 0.000000] Linux version 6.12.33 ...
[ 0.000000] RTL838X model is 83806800
...
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18397
Signed-off-by: Robert Marko <robimarko@gmail.com>
The same function is used twice, so let's make it common.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Functions ubootenv_add_mtd, ubootenv_add_sys_mtd and ubootenv_add_mmc
can be shared so make them common.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
When doing package support and management it is often the case that
knowing the corresponding openwrt repo's release version is useful.
For example, when adding package changes to the ASU server, the
openwrt revision is used as the cutoff for applying those changes.
Knowing a package change's hash in its remote feed repo allows us
to look up its change date, which we can now use with getver.sh
to approximate the revision in openwrt at which it was made.
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17817
Signed-off-by: Robert Marko <robimarko@gmail.com>
Move changes to mt7988a.dtsi from patch adding the support for the
MT7988A Reference Board to a dedicated patch to ease maintainance.
Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Restore the conversion to an all-UBI NAND layout and use of fitblk on
SPI-NAND connected via the mt65xx SPI controller.
Apply the same also for SPI-NAND connected via the SNFI controller, and
use fitblk also for boot from SPI-NOR, eMMC and SD.
Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The MediaTek MT7988A RFB currently hangs on boot as CCI fails to probe.
This is due to the wrong SoC compatible string "mediatek,mt7988" instead of
"mediatek,mt7988a". Fix that.
Fixes: f9206d1111 ("kernel/mediatek: 6.12: replace downstream files by patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Currently, uboot-envtools is being built for a (shared) instruction
set (phase2 in buildbots) instead of target-specific (phase1 in builbots).
So the package does not contain the uci-defaults file specific for each
target_subtarget. (Only the fortunate target with coincidentally the same
instruction set and target as the SDK chosen by the buildbot will have the
uci-defaults file.)
This commit sets the nonshared flag correctly in the Makefile so that
uboot-envtools is built for the target-specific (phase 1).
This is done by using the PKGFLAGS variable which is intended for
per-binary flags (instead of PKG_FLAGS which has a global scope), as
stated in some old commits 349e7b635e[1], 2d7eaf2e15[2], 064e7c8f00[3] and
2cb75cd8b9[4].
While at here, use PKG_URL, instead of URL, which is intended for global
scope. As stated in commit e32edf712b[5].
[1] 349e7b635e
[2] 2d7eaf2e15
[3] 064e7c8f00
[4] 2cb75cd8b9
[5] e32edf712bFixes: #19040
Fixes: 46e376c ("uboot-tools: migrate uboot-envtools to uboot-tools")
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19180
Signed-off-by: Robert Marko <robimarko@gmail.com>
During setup the mdio driver decides the polling mode of the 4 smi
busses depending on the DTS phy settings. This works as follows:
- set polling to c45 if at least one phy is ethernet-phy-ieee802.3-c45
- set polling to c22 if all phys are ethernet-phy-ieee802.3-c22
On RTL930x it is not possible to switch to c22 if uboot has set c45
before. Fix this by overwriting the bitfield properly. While we are
here:
- Sort variables according to kernel style (inverse christmas tree)
- Initialize fields properly with = { 0 }
- Use GENMASK() for better readability
- Make use of RTMDIO_MAX_SMI_BUS
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19161
Signed-off-by: Robert Marko <robimarko@gmail.com>
This will allow more flexibility in using PHY drivers as kmods.
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add support for Maxlinear GPHY module. Also add support for
kmod-polynomial, which is a dependency for this module.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
After update to v6.12 some PCS driver fixes were dropped and additional
are needed due to updated driver.
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
The original PCS driver did not use the .pcs_validate() in
phylink_pcs_ops. The patches for 1000/2500base-x and 10g modes were
taken from this old driver, and thus did not bother with
.pcs_validate(). Thus, even though these modes are supported, phylink
would not enable them.
To fix these, list these modes in .pcs_validate(). Also list them in
ipq_pcs_clk_rate_get(). While the latter does not appear to change
behavior, it does change the clock rates listed under
/sys/kernel/debug/clk
Co-developed-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
0102-arm64-dts-qcom-ipq9574-Fix-USB-vdd-info.patch was merged in 6.12.34
Other patches automatically refreshed.
Fixes: cb1b656027 ("kernel: bump 6.12 to 6.12.34")
Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/19232
Signed-off-by: Robert Marko <robimarko@gmail.com>
The IgniteNet SunSpot AC Wave2 uses the standard smem-assigned partition
for its bootloader environment.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The qcomsmem MTD partition parser converts all partition names to
lower case while the vendor solution uses upper case names, which
often made their way into OpenWrt as labels in 'fixed-partitions'
(probably due to contributors and reviewers being unaware of the
qcomsmem parsers).
Use case-insensitive matching of the 'APPSBLENV' name to make
ubootenv_mtdinfo() work in both cases.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The IgniteNet SunSpot AC Wave2 comes with 2x QCA9994 ath10k chips
connected to the IPQ8068 SoC via PCIe.
Add board-2.bin for both radios on this board.
3ac4a64 qca9984: add BDFs for IgniteNet SS-W2-AC2600
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The current code uses functions and features only found in newer
versions of Python, so rework to allow use on systems only supporting
older Python. Tested on Python 3.8 (released Oct 2019), but should
work on 3.7 also.
Suggested-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
While this worked during testing, the repository of a organization requires
extra permissions. Add write access to pull requests, like we do over at
packages.git.
Signed-off-by: Paul Spooren <mail@aparcar.org>
This has been requested many times, so let's add this to speed up reviews. When
a member of the "reviewers" group comments the magic word written below, that
specific firmware is created and attached by a bot.
build <target>/<subtarget>/<profile>
Members of the "reviewers" group have no extra privileges, they can not commit
to the repository nor perform any action outside the `build-on-comment` action.
Motivation is to speedup reviews and have a better source for sharing compiled
firmware.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Override via RSNE is a relatively new feature, which can be used to enable
WPA3 features in a way that is invisible to older clients.
Use it by default to mask the GCMP-256 cipher from older clients, since
there are compatibility issues with existing devices.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
When using TFTP install method on a fresh unit, wifi_fw and ubi_rootfs UBI volumes must be removed or will hang when mounting.
Signed-off-by: Erik Servili <serverror@serverror.com>
Link: https://github.com/openwrt/openwrt/pull/19215
Signed-off-by: Robert Marko <robimarko@gmail.com>
When using an external toolchain, the SetToolchainInfo function
is missing a qstrip call on GCC_VERSION, which results in quotes
making it to the toolchain info.mk file.
This leads to a failure to build the libgcc ipk package because
the quotes make it to its version and filename. For some reason,
it only fails on the first make invocation, but succeeds on
subsequent ones on my setup.
Fix this issue by adding the qstrip, making it consistent with
the internal toolchain approach.
Signed-off-by: Ondrej Cierny <o.cierny@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19192
Signed-off-by: Robert Marko <robimarko@gmail.com>
As a workaround to an issue causing hang during PCI enumeration on
imx8mp with a specific PCIe switch, disable PCI AER.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
Enable DT overlay support:
- add dt-overlay to board features
- add DEVICE_DTS_OVERLAYS
- update the boot script to resize before applying each overlay
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
Backport some additional upstream patches:
- 6.13-arm64-dts-imx8mm-venice-gw73xx-remove-compatible-in-overlay-files.patch
(this resolves some issues when using dt overlays on gw73xx-0x)
- 6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
- pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function
(these resolve enumeration issues on imx8mm/imx8mp with a pcie switch)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/19189
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fixes status information and scanning on extra BSS interfaces when operating
on multi-radio devices.
Reported-by: Chad Monroe <chad.monroe@adtran.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
glibc 2.39 has removed libcrypt completely.
solution: build libxcrypt with glibc compatibility.
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19160
Signed-off-by: Robert Marko <robimarko@gmail.com>
On commit 3010ab8 ("base-files: add update_alternatives function") was
implemented the function to handle ALTERNATIVES when using APK (OPKG
handle it internally) but in commit bcc6415 ("base-files: add
compatibility for APK and OPKG") was only called when adding a package,
so call it also when removing packages.
While we are here, check for a more specific *.alternatives files instead
of *.list, and remove redundant "filelist" variable definition.
Fixes: bcc6415 ("base-files: add compatibility for APK and OPKG")
Fixes: https://github.com/openwrt/openwrt/issues/19090
Fixes: https://github.com/openwrt/openwrt/issues/16991
Reported-and-tested-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19093
Signed-off-by: Robert Marko <robimarko@gmail.com>
9389775ceb47 rpc-sys: update packagelist call to handle apk abiversion tag
ed0d01e4360b file: linkstat to get link stat info
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19211
Signed-off-by: Robert Marko <robimarko@gmail.com>
Specification:
SoC: MediaTek MT7628NN
RAM: 128 MB, EtronTech EM68C16CWQG-25H (DDR2)
Flash: 32MB, Winbond 25Q256JVFQ (Dual Boot, SPI)
Switch: MediaTek MT7628AN, 4 ports 100 Mbps
WiFi: MediaTek MT7603 2T2R/2.4GHz 802.11n
GPIO: 3 buttons (Wi-Fi, Reset, FN), 3 LEDs (Power, Internet, Wi-Fi), 1 port USB 2.0
Disassembly:
At the bottom, under the LEDs, there are 2 screws hidden by rubber feet. After removing the screws, pry the gray plastic part around (it is secured with latches) and remove it.
Serial Interface:
The serial interface can be connected to the 5 pin dots located on the right between the operating mode switch and the antenna.
Pins (from antenna to operating mode switch):
VCC
TX
RX
NC
GND
Settings: 115200, 8N1
Flashing via OEM recovery software:
1. Download the OEM recovery software from the manufacturer's website
2. Download the firmware image (for OpenWRT it is *-squashfs-factory.bin), rename it to KN-1212_recovery.bin
3. Replace the file in the fw folder OEM recovery software with the file from step 2.
4. Run the OEM recovery software and follow the instructions.
Flashing via TFTP:
1. Connect your PC and router to port 1-3, configure PC interface using IP 192.168.1.2, mask 255.255.255.252
2. Serve the firmware image (for OpenWRT it is *-squashfs-factory.bin) renamed to KN-1212_recovery.bin via TFTP
3. Power up the router while pressing Reset button on the back
4. Release Restart button when Power LED starts blinking
To revert back to OEM firmware:
The return to the OEM firmware is carried out by using the methods described above with the help of the appropriate firmware image.
When using OEM bootloader, the firmware image size cannot exceed the size of one OEM «Firmware_x» partition or Kernel + rootFS size.
Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/19157
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>