mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-17 12:21:23 +00:00
Improve Xu4 u-boot update logic
This commit is contained in:
parent
24bdb91374
commit
667422519c
1 changed files with 13 additions and 0 deletions
|
@ -39,6 +39,19 @@ GOVERNOR=ondemand
|
|||
|
||||
SERIALCON=ttySAC2
|
||||
|
||||
setup_write_uboot_platform()
|
||||
{
|
||||
# this will update u-boot on the device rootfs is located on
|
||||
# in case it's a mmc device, otherwise DEVICE will not be changed
|
||||
# and will default to /dev/mmcblk0
|
||||
local tmp=$(cat /proc/cmdline)
|
||||
tmp="${tmp##*root=}"
|
||||
tmp="${tmp%% *}"
|
||||
[[ -n $tmp ]] && local part=$(findfs $tmp 2>/dev/null)
|
||||
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
|
||||
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/${dev}"
|
||||
}
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
# handle writing to eMMC on package upgrades
|
||||
|
|
Loading…
Add table
Reference in a new issue