openwrt/target/linux
Valerio 'ftp21' Mancini b5df398a36 mediatek: add Zyxel EX5601-T0 with uboot custom partition
The flash procedure is similar to the Xiaomi AX6000 router.

Load openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb from original Zyxel U-Boot:

tftpboot openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
bootm 0x46000000
Load mtd-rw
insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1

Format ubi and create ubootenv partitions

ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
Copy openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb to /tmp and create recovery partition.
If your recovery image is larger than 10MiB, size the recovery partition accordingly to make it fit.

ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
ubiupdatevol /dev/ubi0_2  openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-initramfs-recovery.itb
Copy preloader and uboot to /tmp and write them in the mtd

mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-bl31-uboot.fip fip
Now write the firmware:
sysupgrade -n  /tmp/openwrt-mediatek-filogic-zyxel_ex5601-t0-ubootmod-squashfs-sysupgrade.itb

To create a correct BL2, I had to add a profile for 'spim:4k+256' as I could not find a way to value the variable 'NAND_TYPE'.

Features and fixes from hitech95 tree has been squashed, I'm attaching his commit message:

The Power LED was not working correctly and not reacting
 to the boot process and statuses.

The board has space (footprint) for an unpopulated Zigbee chip,
 while we dont know the device model having this chip populated
 we have to assure that the common dts doesnt enable
 interfaces that share pins with such device.

In this instance the PCIe and the uart1 and uart2 are disabled.
Some of the control PCIE pins seems to be used for the Zigbee chip,
 UART1 seems to be used as a flash port while UART2 should be the
 main comunication interface of Zigbee chip.

The Zigbee chip should be a EFR32MG21. But the pins used for UART
 seems to be not on standard PINS used by other adapters.
 So it cannot run firmwares shared on the web.
 But it should be possible to build a custom firmware with
 the corrtect pinmux.

This commit also contains the following squashed commit from hitech95
 - mediatek: fix sysupgrade for Zyxel EX7601-T0 ubootmod

Changes and fixes added in common board:
 - added aliases for boot status leds.
 - added aliases for the mac-label-device.
 - added pin claims for core features (MDIO and UART 0)
 - added default LEDs configuration (01_leds)
 - added default network configuration (02_network)
 - added missing kmod-usb3 module for USB3
 - fixed LED names
 - fixed reset pin for SLIC chip
 - removed unused pinmux configurations and devices
 - fix LAN (switch) port numbering
 - using nvmem cells for wifi eeprom, dropping deprecated "mediatek,mtd-eeprom"
 - proper factory partition and mac address handling
 - cleaned up spi_nand sections and partition

Changes and fixxes added in stock layout:
 - added NMBM, if u-boot has it, the kernel must be informed.

Co-authored-by: Nicolò Veronese <nicveronese@gmail.com>
Co-developed-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
2023-11-25 14:51:21 +01:00
..
airoha kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
apm821xx apm821xx: WNDR4700: fix broken sysupgrade, factory images 2023-10-20 18:13:57 +02:00
archs38 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
armsr x86,armsr: interpolate GRUB_SERIAL into /etc/inittab 2023-11-19 17:33:37 +01:00
at91 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
ath25 kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
ath79 ath79: add support for D-Link COVR-P2500 A1 2023-11-23 00:26:28 +01:00
bcm27xx kernel: bump 6.1 to 6.1.63 2023-11-23 22:51:52 +01:00
bcm47xx kernel: bump 5.15 to 5.15.133 2023-10-04 21:03:12 +02:00
bcm53xx kernel: bump 6.1 to 6.1.63 2023-11-23 22:51:52 +01:00
bcm63xx kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
bcm4908 kernel: bump 5.15 to 5.15.137 2023-10-27 19:43:06 +01:00
bmips bmips: remove mac-address-increment 2023-11-22 00:02:01 +01:00
gemini gemini: usb-fotg210: remove uneeded dependency on @USB_SUPPORT 2023-11-08 22:01:44 +01:00
generic generic: 6.1: backport upstream Aquantia PHY firmware loader patches 2023-11-24 16:46:50 +01:00
imx kernel: backport NVMEM patches queued for the v6.5 2023-06-16 09:45:38 +02:00
ipq40xx ipq40xx: refresh patches 2023-11-25 00:12:01 +01:00
ipq806x ipq806x: add missing interrupt-controller 2023-11-22 00:10:31 +01:00
ixp4xx kernel: bump 6.1 to 6.1.63 2023-11-23 22:51:52 +01:00
kirkwood kirkwood: add support for Iomega Storcenter ix4-200d 2023-05-20 15:35:37 +02:00
lantiq lantiq: remove mac-address-increment 2023-11-22 00:05:34 +01:00
layerscape treewide: fix shell errors during dump stage 2023-11-13 14:01:25 +01:00
malta kernel: remove CRYPTO_BLAKE2S from all >=5.15 2023-07-08 16:54:01 +02:00
mediatek mediatek: add Zyxel EX5601-T0 with uboot custom partition 2023-11-25 14:51:21 +01:00
mpc85xx Revert "mpc85xx: replace user space MAC with nvmem" 2023-11-21 23:57:44 +01:00
mvebu mvebu: remove mac-address-increment 2023-11-22 19:58:22 +01:00
mxs mxs: add testing kernel 6.1 2023-07-01 12:54:30 +02:00
octeon octeon: remove mac-address-increment 2023-11-21 23:07:18 +01:00
octeontx kernel: bump 5.15 to 5.15.138 2023-11-10 17:33:59 +01:00
omap treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
oxnas treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
pistachio kernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver 2023-10-31 17:33:28 +01:00
qoriq treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
qualcommax kernel: bump 6.1 to 6.1.63 2023-11-23 22:51:52 +01:00
ramips ramips: add support for Sercomm CPJ routers 2023-11-25 01:11:18 +01:00
realtek realtek: convert to nvmem-layout 2023-11-24 16:37:02 +01:00
rockchip treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
sifiveu kernel: remove CONFIG_DEVTMPFS_SAFE from target config 2023-11-19 16:46:24 +01:00
sunxi sunxi: enable cpufreq driver for H6 SoC 2023-10-28 18:31:43 +02:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml kernel: bump 6.1 to 6.1.53 2023-09-23 13:10:28 +02:00
x86 kernel: bump 5.15 to 5.15.139 2023-11-23 22:55:55 +01:00
zynq generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00