[OpenWrt-Devel] [PATCH v2 1/2] base-files: improve lib/upgrade/common.sh

Petr Štetiar ynezz at true.cz
Fri May 3 15:38:46 EDT 2019

Klaus Kudielka <klaus.kudielka at gmail.com> [2019-05-03 20:16:39]:

> Let me remind you that the common one *alone* breaks sysupgrade for those
> four targets, as Tomasz already pointed out earlier.

Well, how could I know what was wrong with v1 if you didn't included the
changes between v1 -> v2 in your v2 patch :-)

Anyway, thanks for the explanation, it wasn't that much clear to me from the
commit message, so if you don't mind, I'll include the details there as well
in order to help it better understand to other folks.

Merged into my staging tree https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=195178f88ee7b3815f9bea66a2454ccfdf2135a5

> In more detail:
> The root of the problem is that the *existing* export_bootdevice in
> /lib/upgrade/common.sh behaves differently, if the kernel is booted with
> root=/dev/..., or if it is booted with root=PARTUUID=...
> In the former case, it reports back major/minor of the root partition,
> in the latter case it reports back major/minor of the complete boot disk.
> The targets mentioned above have added workarounds to this behaviour, by
> specifying *negative* increments to the export_partdevice function.
> And then came the mvebu target to use export_bootdevice /
> export_partdevice as well. Now, different subtargets boot differently,
> and the workaround would be even more complex.
> I think now is the time to make export_bootdevice behave consistently,
> and to report major/minor of the boot disk, period.
> Consequently, those targets, which boot with root=/dev/... *and* use
> export_bootdevice / export_partdevice, have to be adapted to use
> positive increments, otherwise they are broken by the change
> to export_bootdevice.
> The targets affected were easy to spot with find & grep.

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list