recovery-initramfs: register mdev regardless of /proc/sys/kernel/hotplug
Busybox's device manager mdev was originally meant to be set up by writing its path to /proc/sys/kernel/hotplug before launching it, but that entry no longer exists in Linux v5.4's procfs and mdev can be launched directly. Since mdev is the element in the recovery initramfs that is in charge of mounting all partitions where .swu packages can be found (update partition on the eMMC/MTD, uSD and USB), checking for the existence of the hotplug entry in the procfs before launching mdev in v5.4 was preventing the partitions from being mounted, and causing all software updates to fail. While at it, move the two second delay to before mdev is launched, so all partitions can be mounted. Otherwise, some devices such as the USB might not be ready when mdev is launched, causing its partition to not be mounted. https://jira.digi.com/browse/DEL-7143 Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
b793b3faae
commit
48f8720a23
|
|
@ -374,17 +374,14 @@ mount -t sysfs sysfs /sys
|
||||||
mount -t devtmpfs devtmpfs /dev
|
mount -t devtmpfs devtmpfs /dev
|
||||||
mount -t tmpfs tmpfs /tmp
|
mount -t tmpfs tmpfs /tmp
|
||||||
|
|
||||||
# Register mdev as device manager
|
# Give some time for the devices to settle down so mdev can mount all of them
|
||||||
if [ -f /proc/sys/kernel/hotplug ]; then
|
|
||||||
echo > /dev/mdev.seq
|
|
||||||
echo > /dev/mdev.log
|
|
||||||
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
|
|
||||||
mdev -s
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Give some time for the devices to settle down
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
# Register mdev as device manager
|
||||||
|
echo > /dev/mdev.seq
|
||||||
|
echo > /dev/mdev.log
|
||||||
|
mdev -s
|
||||||
|
|
||||||
# Run all shell scripts in postinstall folder
|
# Run all shell scripts in postinstall folder
|
||||||
run-parts /etc/*-postinsts
|
run-parts /etc/*-postinsts
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue