[PATCH] base-files: fix sysupgrade with ubi and kernel sharing partition

Bjørn Mork bjorn at mork.no
Mon May 2 01:10:18 PDT 2022


Lanchon <lanchon at gmail.com> writes:

> hi,
>
> sorry for the delay. I didn't expect that kind of sharing.

I can understand that. I have not been able to find any other examples,
so I have to take full responsibility for this unexpected configuration.
I guess I thought it would make sense to have a "Kernel" partition large
enough to allow reverting to OEM firmware.

But I recently found out that the bootloader can be configured to boot
from "Kernel2", which means that we can document a "revert to OEM"
procedure using that partition instead.  Will fail if/when we add dual
image support to OpenWrt though.

Another alternative is of course to add another partition for the
OpenWrt kernel (pointed to by $CI_KERNPART), keeping the "Kernel" as an
unused container only.  Maybe the safest solution?


> your fix is not enough: when later the partition is written, it is via
> 'mtd -n write' which expects an erased partition.
>
> i will do a PR ASAP to fix this by invalidating the start of the
> kernel partition instead of erasing it, this is enough to invalidate
> the kernel CRC.

OK, thanks for taking care of this.


Bjørn



More information about the openwrt-devel mailing list