openwrt/target/linux/realtek
Luiz Angelo Daros de Luca 1005dc0a64 realtek: add DGS-1210-28 factory image
DGS-1210 switches support dual image, with each image composed of a
kernel and a rootfs partition. For image1, kernel and rootfs are in
sequence. The current OpenWrt image (written using a serial console),
uses those partitions together as the firmware partition, ignoring the
partition division. The current OEM u-boot fails to validate image1 but
it will only trigger firmware recovery if both image1 and image2 fail,
and it does not switch the boot image in case one of them fails the
check.

The OEM factory image is composed of concatenated blocks of data, each
one prefixed with a 0x40-byte cameo header. A normal OEM firmware will
have two of these blocks (kernel, rootfs). The OEM firmware only checks
the header before writing unconditionally the data (except the header)
to the correspoding partition.

The OpenWrt factory image mimics the OEM image by cutting the
kernel+rootfs firmware at the exact size of the OEM kernel partition
and packing it as "the kernel partition" and the rest of the kernel and
the rootfs as "the rootfs partition". It will only work if written to
image1 because image2 has a sysinfo partition between kernel2 and
rootfs2, cutting the kernel code in the middle.

Steps to install:

1) switch to image2 (containing an OEM image), using web or these CLI
   commands:
   - config firmware image_id 2 boot_up
   - reboot
2) flash the factory_image1.bin to image1. OEM web (v6.30.016)
   is crashing for any upload (ssh keys, firmware), even applying OEM
   firmwares. These CLI commands can upload a new firmware to the other
   image location (not used to boot):
   - download firmware_fromTFTP <tftpserver> factory_image1.bin
   - config firmware image_id 1 boot_up
   - reboot

To debrick the device, you'll need serial access. If you want to
recover to an OpenWrt, you can replay the serial installation
instructions. For returning to the original firmware, press ESC during
the boot to trigger the emergency firmware recovery procedure. After
that, use D-Link Network Assistant v2.0.2.4 to flash a new firmware.

The device documentation does describe that holding RESET for 12s
trigger the firmware recovery. However, the latest shipped U-Boot
"2011.12.(2.1.5.67086)-Candidate1" from "Aug 24 2021 - 17:33:09" cannot
trigger that from a cold boot. In fact, any U-Boot procedure that relies
on the RESET button, like reset settings, will only work if started from
a running original firmware. That, in practice, cancels the benefit of
having two images and a firmware recovery procedure (if you are not
consider dual-booting OpenWrt).

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-06-28 22:20:09 +02:00
..
base-files realtek: add ZyXEL GS1900-24HP v1 support 2022-04-16 17:26:56 +02:00
dts-5.10 realtek: EnGenius EWS2910P: add support for SFP ports 2022-06-25 15:45:30 +02:00
files/firmware/rtl838x_phy realtek: update the tree to the latest refactored version 2020-11-26 13:29:27 +01:00
files-5.10 realtek: cleanup LAG logging 2022-06-26 11:02:15 +02:00
image realtek: add DGS-1210-28 factory image 2022-06-28 22:20:09 +02:00
patches-5.10 kernel: bump 5.10 to 5.10.120 2022-06-06 19:20:02 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
rtl839x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
rtl930x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
rtl931x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
Makefile realtek: Fix tc default package 2022-03-29 13:43:01 +02:00