x86: add preinit hook for bootloader upgrade
authorTomasz Maciej Nowak <tomek_n@o2.pl>
Tue, 14 Jan 2020 17:45:45 +0000 (18:45 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sun, 1 Mar 2020 20:36:00 +0000 (21:36 +0100)
commitb9c1cf16579c53b51524f753313732817ea1439d
treea1904d4508615bb614b7cde4c90d0e1e2d058931
parentb322243d2f768a04a04831c45dabc627a41c4570
x86: add preinit hook for bootloader upgrade

This commit fills the void for current OpenWrt installations which will
be still on old bootloader version even after "x86: add bootloader
upgrade on sysupgrade", since it performs bootloader upgrade only on
sysupgrade. To keep all OpenWrt deploynents on the same GRUB version,
add preinit hook, which will perform upgrade of the bootloader on first
boot after sysupgrade.

It's temporary solution and should be deleted, when the first release
including this hook will no longer be supported by OpenWrt team.
We can assume that all installations should be on current bootolader
version and from there sysupgrade routine will be sufficient.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader [new file with mode: 0644]
target/linux/x86/base-files/lib/upgrade/platform.sh