9d96b6fb72
The current support for MikroTik NAND-based devices relies on a gross hack that packs the kernel into a static YAFFS stub, as the stock bootloader only supports booting a YAFFS-encapsulated kernel. The problem with this approach is that since the kernel partition is blindly overwritten without any kind of wear or badblock management (due to lack of proper support for YAFFS in OpenWRT), the NAND flash is not worn uniformly and eventually badblocks appear, leading to unbootable devices. This issue has been reported here [1] and discussed in more detail here [2]. [1] https://forum.openwrt.org/t/rb433-bad-sector-cannot-start-openwrt/71519 [2] https://github.com/openwrt/openwrt/pull/3026#issuecomment-673597461 Until a proper fix is found (or the stock bootloader supports other filesystems), we disable building these images to prevent unknowing users from risking their devices. Thanks to Thibaut Varène for summarizing the details above. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
22 lines
602 B
Makefile
22 lines
602 B
Makefile
define Device/mikrotik
|
|
DEVICE_VENDOR := MikroTik
|
|
KERNEL_NAME := vmlinuz
|
|
KERNEL := kernel-bin | append-dtb-elf
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb-elf
|
|
endef
|
|
|
|
define Device/mikrotik_nor
|
|
$(Device/mikrotik)
|
|
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \
|
|
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
|
|
append-metadata | check-size
|
|
endef
|
|
|
|
define Device/mikrotik_nand
|
|
$(Device/mikrotik)
|
|
IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \
|
|
sysupgrade-tar kernel=$$$$@ | append-metadata
|
|
DEVICE_PACKAGES := nand-utils
|
|
DEFAULT := n
|
|
endef
|