[PATCH] UBI: support EOF block marking end of ubinized image

Zhihao Cheng chengzhihao1 at huawei.com
Fri Mar 18 20:15:02 PDT 2022


Hi, Rafał
> While I personally think that UBI should provide *any* solution for such
> poor bootloaders it has been stated upstream won't accept this hack.
> There is no idea for any other / cleaner solution neither.
> 
> For details see e-mail thread:
> Handling ubinized image flashed on not erased flash space
> http://lists.infradead.org/pipermail/linux-mtd/2022-March/091993.html
> http://lists.infradead.org/pipermail/linux-mtd/2022-March/092081.html
> 
> This patch is meant for downstream usage in projects like OpenWrt /
> Buildroot / Yocto / foo.
Does 'downstream' mean this patch won't be applied to mainline? 
Eventhough, I don't think this modification is sutiable for common 
scenarios. The UBI image provided by poor bootloader does not follow the 
standard UBI format defined in [1], and linux kernel should have 
recognized bad image and rejected attaching rather than tries fixing bad 
image.

Maybe there are other better solutions? Such as,
1. For 'EOF' ended image scenarios, DIY an userspace tool to convert bad 
UBI image to valid UBI image.
2. Erasing/Formatting the whole mtd partition. (BTW, why does booloader 
only format part of mtd partition? What will the left space in mtd 
partition be used for?)

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_ubi_headers
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/




More information about the linux-mtd mailing list