1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
Commit Graph

58981 Commits

Author SHA1 Message Date
Tianling Shen
2670bb4a83 uboot-rockchip: add NanoPi R5S support
Add support for the FriendlyARM NanoPi R5S support.

Tested-by: Packet Please <pktpls@systemli.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4d9059aed9 rockchip: armv8: broaden boardname
Now we have rk356x support :-)

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
4be1e39c4e rockchip: enable drivers for rk356x
Enable all necessary drivers for the rk356x SoCs, including PHY,
SCMI, SPI etc. Also backport 2 upstream patches for sdhci fixes.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
22a9c4b67d rockchip: remove kernel 5.15 patches and config
As we switched to kernel 6.1, these files can go.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
48c9a4b47c rockchip: switch to kernel 6.1
Required by the following rk3568 support.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
dd8972fde3 rockchip: move image generation command to default
It's applicable for all devices so move it to default to reduce
redudant code. Addtionally introduce a new variable `BOOT_SCRIPT`
to allow custom boot script (if necessary).

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
b061e2d890 rkbin: add new TF-A package for rk35xx
Currently there's no usable mainline (open source) TF-A implementation
for rk35xx SoCs, so pack the prebuilt firmware from the vendor.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
548ab9d7ad uboot-rockchip: Update to 2023.07.02
* Removed swig hacks and prebuilt of-platdata
* Removed upstreamed patches
  - 101-rock64pro-disable-CONFIG_USE_PREBOOT.patch
  - 102-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R2C.patch
* Reordered patches

* Introduced new dependencies check
* Overrided default PATH to avoid race condition
    (host python3 vs hostpkg python3)
* Switched to use UBOOT_CUSTOMIZE_CONFIG for config update

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
8fc4fe7b48 uboot-sunxi: use intree dtc explicitly
This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
fb3af86119 uboot-sifiveu: use intree dtc explicitly
This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
20f81f49ea uboot-mediatek: use intree dtc explicitly
This replaces pylibfdt hack.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tianling Shen
a3ec855073 u-boot: introduce dependencies check for swig and pyelftools
They are required by modern u-boot builds,
e.g. uboot-rockchip and uboot-sunxi.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-26 19:44:56 +01:00
Tony Ambardar
a7818e0550 ipq40xx: enable UBI size checks for some Linksys NAND devices
Add correct NAND_SIZE in device definitions for EA6350v3, EA8300, MR8300,
WHW01 and WHW03v2, to enable improved image size checks wrt UBI reserved
blocks on NAND devices.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:21 +01:00
Tony Ambardar
fc16df9fdd image: improve UBI image sizing on NAND devices
Many NAND devices use a build recipe with "append-ubi | check-size" to
ensure factory images don't exceed the target flash partition size.
However, UBI reserves space for bad block handling and other operational
overhead, and thus 'check-size' can overestimate the space available by
several MB. In practice, this means a failed check is definitely a failure,
while a passing check is only probably a pass.

Improve the situation by teaching 'Build/append-ubi' to check image sizes
while accounting for UBI reserved blocks. Add new device variable NAND_SIZE
and use with existing IMAGE_SIZE to derate the available space. Each UBI
device reserves 20 PEBs per 1024 PEBs of the entire NAND device for bad
blocks, plus an additional 4 PEBs overhead.

Many devices can transparently enable this check by setting NAND_SIZE based
on their flash storage, and may then remove any unneeded 'check-size'.

Link: http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead

Suggested-by: Shiji Yang <yangshiji66@qq.com>
Suggested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Tony Ambardar
cd5e0134b6 image: fix Linksys image alignment and simplify footer creation
Current factory image sizes for Linksys devices are 256-byte aligned. This
is not an issue writing factory images from the OpenWrt or Linksys GUIs,
but can lead to failures using a TFTP client from the Linksys bootloader:

     NAND write: device 1 offset 0x2800000, size 0xc00100
     Attempt to write to non page aligned data
     NAND write to offset 2800000 failed -22
      0 bytes written: ERROR

Simplify Linksys footer creation by migrating to a makefile build recipe,
and pre-pad the footer (with 0xFF) to ensure the final image is $(PAGESIZE)
aligned.  Finally, remove the old linksys-image.sh script no longer needed.

Linksys footer details are given below for future reference. The 256-byte
footer is appended to factory images and tested by both the Linksys
Upgrader (observed in EA6350v3) and OpenWrt sysupgrade.

  Footer format:
    .LINKSYS.     Checked by Linksys upgrader before continuing.  (9 bytes)
    <VERSION>     Upgrade version number, unchecked so arbitrary. (8 bytes)
    <TYPE>        Model of device, space padded (0x20).          (15 bytes)
    <CRC>         CRC checksum of factory image to flash.         (8 bytes)
    <padding>     Padding ('0' + 0x20 * 7)                        (8 bytes)
    <signature>   Signature of signer, unchecked so arbitrary.   (16 bytes)
    <padding>     Padding with nulls (0x00)                     (192 bytes)

Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1358510123
Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1587517739

Reported-by: Stijn Segers <foss@volatilesystems.org>
Reported-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Tony Ambardar
b16e14a220 image: use helper function for size units
Add the make function 'exp_units' for helping evaluate k/m/g size units in
expressions, and use this to consistently replace many ad hoc substitutions
like '$(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE)))' in makefiles.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Tony Ambardar
c66511bc48 ipq40xx: fix typo in Linksys WHW01 image definition
Use lower-case "k" in IMAGE_SIZE for Linksys WHW01, permitting proper unit
conversions in build recipes (e.g. 75776k -> 75776*1024).

Fixes: 2a9f3b7717 ("ipq40xx: fix up Linksys WHW01 board name, device definition")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-11-26 18:37:20 +01:00
Rani Hod
e29f4a3f70 ath79: add support for D-link DAP-1720 A1
D-Link DAP-1720 rev A1 is a mains-powered AC1750 Wi-Fi range extender,
manufactured by Alpha Networks [8WAPAC28.1A1G].
(in square brackets: PCB silkscreen markings)

Specifications:
* CPU (Qualcomm Atheros QCA9563-AL3A [U5]):
  775 MHz single core MIPS 74Kc;
* RAM (Winbond W9751G6KB-25J [U3]):
  64 MiB DDR2;
* ROM (Winbond W25Q128FV [U16]):
  16 MiB SPI NOR flash;
* Ethernet (AR8033-AL1A PHY [U1], no switch):
  1 GbE RJ45 port (no PHY LEDs);
* Wi-Fi
  * 2.4 GHz (Qualcomm Atheros QCA9563-AL3A [U5]):
    3x3 802.11n;
  * 5 GHz (Qualcomm Atheros QCA9880-BR4A [U9]):
    3x3 802.11ac Wave 1;
  * 3 foldable dual-band antennas (U.fl) [P1],[P2],[P3];
* GPIO LEDs:
  * RSSI low (red/green) [D2];
  * RSSI medium (green) [D3];
  * RSSI high (green) [D4];
  * status (red/green) [D5];
* GPIO buttons:
  * WPS [SW1], co-located with status LED;
  * reset [SW4], accessible via hole in the side;
* Serial/UART:
  Tx-Gnd-3v3-Rx [JP1], Tx is the square pin, 1.25mm pitch;
  125000-8-n-1 in U-boot, 115200-8-n-1 in kernel;
* Misc:
  * 12V VCC [JP2], fed from internal 12V/1A AC to DC converter;
  * on/off slide switch [SW2] (disconnects VCC mechanically);
  * unpopulated footprints for a Wi-Fi LED [D1];
  * unpopulated footprints for a 4-pin 3-position slide switch (SW3);

MAC addresses:
* Label = LAN;
* 2.4 GHz WiFi = LAN;
* 5 GHz WiFi = LAN+2;

Installation:
* `factory.bin` can be used to install OpenWrt from OEM firmware via the
  standard upgrade webpage at http://192.168.0.50/UpdateFirmware.html
* `recovery.bin` can be used to install OpenWrt (or revert to OEM
  firmware) from D-Link Web Recovery. To enter web recovery, keep reset
  button pressed and then power on the device. Reset button can be
  released when the red status LED is bright; it will then blink slowly.
  Set static IP to 192.168.0.10, navigate to http://192.168.0.50 and
  upload 'recovery.bin'. Note that in web recovery mode the device
  ignores ping and DHCP requests.

Note: 802.11s is not supported by the default `ath10k` driver and
firmware, but is supported by the non-CT driver and firmware variants.
The `-smallbuffers` driver variant is recommended due to RAM size.

Co-developed-by: Anthony Sepa <protectivedad@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
2023-11-26 18:27:35 +01:00
Rosen Penev
b7f26c6392 ath79: ar: convert to mac-base
Replacement for deprecated mac-address-increment

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 21:34:18 -08:00
Rosen Penev
9783340af9 ath79: ar: convert to nvmem-layout
Will allow removing deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 21:34:18 -08:00
Rosen Penev
de1d9da150 ath79: tp9343: convert to nvmem-layout
Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 19:43:35 -08:00
Rosen Penev
ede82f35eb ath79: qcn: convert to nvmem-layout
Allows getting rid of deprecated mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 19:43:32 -08:00
Rosen Penev
b2f1c6ed52 ath79: qca: remove mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
e816591e22 ath79: qca: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
eea4dfaa7b ath79: mikrotik: fix dts warnings
property has invalid length

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:14:04 -08:00
Rosen Penev
3395184825
ramips: mt7621: nix mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:32 +01:00
Rosen Penev
f4c33d098f
ramips: mt7621: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:32 +01:00
Rosen Penev
3c1c3f4685
ramips: mt7621: add interrupt-controller
Fixes dtc warning:

'#interrupt-cells' found, but node is not an interrupt provider

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 01:30:04 +01:00
Rosen Penev
458cb2cd6b
ramips: mt7620a: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:58 +01:00
Rosen Penev
40feb97e56
ramips: mt7620a: convert to nvmem-layout
Allows using mac-base to replace mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:58 +01:00
Rosen Penev
32c1ac8960
ramips: mt7620n: convert to nvmem-layout
nvmem-cells is deprecated. nvmem-layout allows using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-26 00:15:55 +01:00
Rosen Penev
e8084a3c3b
ramips: mt7628: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:58:44 +01:00
Rosen Penev
0a1d15642f
ramips: mt7628: use nvmem-layout
Will allow using mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:58:40 +01:00
Rosen Penev
3eb899fd36
mediatek: use mac-base
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:45:26 +01:00
Rosen Penev
405bc5be13
mediatek: convert to nvmem-layout
Will allow removing mac-address-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:45:26 +01:00
Rosen Penev
b976fa5d2b
ramips: rtxxxx: remove mac-address-increment
Deprecated and replaced upstream with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:39:52 +01:00
Rosen Penev
5f479a4f34
ramips: rtxxxx: convert to nvmem-layout
Allows replacing mac-adress-increment.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:39:47 +01:00
Chukun Pan
07482d15af
mediatek: filogic: reorder alphabetically
Reorder scripts and image recipes to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:35 +01:00
Chukun Pan
4825defe44
uboot-envtools: filogic: reorder alphabetically
Reorder scripts to keep alphabetical order.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:35 +01:00
Chukun Pan
b74ae69596
mediatek: filogic: remove kmod-usb2 for GL-MT6000
The usb driver requires kmod-usb3, not kmod-usb2.
Remove the useless kmod-usb2 from default package.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:34 +01:00
Chukun Pan
1be6347b7d
mediatek: Cetron CT3003: fixes typo for spi properties
Same as commit 3674689, correct 'buswidth' to 'bus-width'.
Also move the nmbm properties outside the partition definition.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-11-25 23:16:34 +01:00
Rosen Penev
7e316bc53a
ipq40xx: remove mac-address-increment
nvmem-layout allows removal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:54 +01:00
Rosen Penev
fe8dd23882
ipq40xx: convert to nvmem-layout
Allows replacing mac-address-increment with mac-base.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:54 +01:00
Rosen Penev
14467fd515
ipq40xx: fix dtc warnimg
I2C bus unit address format error, expected "62"

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 23:14:51 +01:00
Rosen Penev
eadf2ead4e
qualcommax: convert to nvmem-layout
nvmem-cells is deprecated

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 22:51:32 +01:00
Rosen Penev
10b7e2d0df
apm821xx: convert to nvmem-layout
nvmem-cells is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 22:50:32 +01:00
Hauke Mehrtens
d99aed31a0 mediatek: filogic: Fix GPIOs for Zbtlink ZBT-Z8102AX
The PGIO configuration should be added for the ZBT-Z8102AX and not the ZBT-Z8103AX

Fixes: c8c2f522625c ("mediatek: add support for Zbtlink ZBT-Z8102AX")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-25 22:25:42 +01:00
Xiaobo Liu
5fbb1f09ca ramips: mt76x8 add support for RTC class/drivers
This commit adds support for RTC class/drivers to the mt76x8 target.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2023-11-25 18:16:46 +01:00
Rosen Penev
8a8d68cf03 f2fs-tools: avoid dead symlinks in root
When building on the host, this avoids creating dead symlinks. Matches
what is done elsewhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 17:55:03 +01:00
Darlan Pedro de Campos
2a0c9cc8cd ramips: add support for TP-Link EX220 v1
This device is very similar, if not identical, to the TP-Link AX23 v1
but is targeted at service providers and features a completely different
flash layout.

Hardware
--------

CPU:    MediaTek MT7621 DAT
RAM:    128MB DDR3 (integrated)
FLASH:  16MB SPI-NOR
WiFi:   MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax
SERIAL: 115200 8N1
        LEDs - (3V3 - GND - RX - TX) - ETH ports

Installation
------------

Flashing is only possible via a serial connection using the sysupgrade
image; the factory image must be signed. You can flash the sysupgrade
image directly through the U-Boot console, or preferably, by booting the
initramfs image and flashing with the sysupgrade command. Follow these
steps for sysupgrade flashing:

1. Establish a UART serial connection.
2. Set up a TFTP server at 192.168.0.2 and copy the initramfs image
   there.
3. Power on the device and press any key to interrupt normal boot.
4. Load the initramfs image using tftpboot.
5. Boot with bootm.
6. If you haven't done so already, back up all stock mtd partitions.
7. Copy the sysupgrade image to the router.
8. Flash OpenWrt through either LuCI or the sysupgrade command. Remember
   not to attempt saving settings.

Revert to stock firmware
------------------------

Flash stock firmware via OEM web-recovery mode. If you don't have access
to the stock firmware image, you will need to restore the firmware
partition backed up earlier.

Web-Recovery
------------

The router supports an HTTP recovery mode:

1. Turn off the router.
2. Press the reset button and power on the device.
3. When all LEDs start flashing, release reset and quickly press it
   again.

The interface is reachable at 192.168.0.1 and supports installation of
the OEM factory image. Note that flashing OpenWrt this way is not
possible, as mentioned above.

Signed-off-by: Darlan Pedro de Campos <darlanpedro@gmail.com>
2023-11-25 16:14:32 +01:00