openwrt/target/linux
Luiz Angelo Daros de Luca 72466aaeb9 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>
(cherry picked from commit 1005dc0a64)
2022-07-08 22:08:50 -03:00
..
apm821xx kernel: bump 5.10 to 5.10.127 2022-07-01 20:28:35 +02:00
archs38 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
armvirt generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
at91 kernel: bump 5.10 to 5.10.121 2022-06-27 22:34:07 +02:00
ath25 kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
ath79 kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
bcm27xx kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
bcm47xx generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
bcm53xx bcm53xx: enable & setup packet steering 2022-07-08 13:02:39 +02:00
bcm63xx kernel: bump 5.10 to 5.10.121 2022-06-27 22:34:07 +02:00
bcm4908 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
bmips bmips: dgnd3700v2: fix network config 2022-06-07 21:36:58 +02:00
gemini generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
generic kernel: drop patch adding hardcoded kernel compilation flags 2022-07-08 11:28:01 +02:00
imx imx: fix USB support 2022-03-11 00:04:05 +01:00
ipq40xx kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
ipq806x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
kirkwood generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
lantiq kernel: bump 5.10 to 5.10.122 2022-06-27 22:34:07 +02:00
layerscape generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
malta generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
mediatek kernel: Add missing mediatek configuration options 2022-07-06 21:09:39 +02:00
mpc85xx kernel: bump 5.10 to 5.10.122 2022-06-27 22:34:07 +02:00
mvebu mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices 2022-07-04 19:58:13 +01:00
mxs generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
octeon generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
octeontx generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
omap generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
oxnas kernel: bump 5.10 to 5.10.121 2022-06-27 22:34:07 +02:00
pistachio kernel: Refresh patches for all targets 2022-07-03 18:54:04 +02:00
qoriq qoriq: enable Book-E Watchdog Timer 2022-07-01 16:42:32 +03:00
ramips ramips: improve YunCore AX820 LEDs 2022-07-01 20:58:16 +02:00
realtek realtek: add DGS-1210-28 factory image 2022-07-08 22:08:50 -03:00
rockchip generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
sunxi generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
tegra generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
uml generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
x86 x86: 64: Add kmod-igc to default packages 2022-06-29 22:40:04 +02:00
zynq generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-27 22:34:07 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00