Files
openwrt-R7800-nss/target/linux
Klaus Kudielka ad62247800 base-files: improve lib/upgrade/common.sh
Recently, upgrade device autodetection has been added to the mvebu target.
This exposes some shortcomings of the generic export_bootdevice function,
e.g. on the Turris Omnia: export_bootdevice silently reports the root
partition to be the boot device. This makes the sysupgrade process fail at
several places.

Fix this by clearly distinguishing between /proc/cmdline arguments which
specify the boot disk, and those which specify the root partition. Only in
the latter case, strip off the partition, and do it consistently.
root=PARTUUID=<pseudo PARTUUID for MBR> (any partition) and root=/dev/*
(any partition) are accepted.

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.

Targets, which boot with root=/dev/... *and* use export_bootdevice /
export_partdevice, have added workarounds to this behaviour, by specifying
*negative* increments to the export_partdevice function.

Consequently, those targets have to be adapted to use positive increments,
otherwise they are broken by the change to export_bootdevice.

Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2019-05-11 16:37:11 +02:00
..
2019-01-28 18:17:32 +01:00
2019-01-27 00:16:13 +01:00
2018-11-05 16:00:00 +01:00
2019-03-22 18:14:28 +01:00
2019-05-06 12:43:01 +02:00
2019-03-27 10:48:59 +01:00
2019-02-25 17:33:16 +01:00
2019-05-06 12:43:01 +02:00
2019-01-13 16:31:40 +01:00
2019-02-14 16:45:01 +01:00
2019-04-22 21:15:17 +02:00
2019-03-11 19:35:43 +01:00
2018-10-09 14:29:55 +02:00
2019-03-27 10:48:59 +01:00
2019-01-07 17:09:06 +01:00
2019-05-11 01:05:11 +02:00
2018-12-10 11:48:44 +01:00