use mkimage from updated firmware

This commit is contained in:
Jan Schneider 2018-03-24 01:44:28 +01:00
parent 30b7317fee
commit 41a1c26497
1 changed files with 11 additions and 1 deletions

View File

@ -460,7 +460,11 @@ proc ::rmupdate::update_boot_scr {boot_scr root} {
puts $fd $data
close $fd
exec /usr/bin/mkimage -C none -A arm -T script -d $boot_script $boot_scr
set mkimage "/tmp/mkimage"
if {![file exists $mkimage]} {
set mkimage "/usr/bin/mkimage"
}
exec $mkimage -C none -A arm -T script -d $boot_script $boot_scr
file delete $boot_script
}
@ -703,6 +707,12 @@ proc ::rmupdate::update_filesystems {image {dryrun 0}} {
write_log 4 [exec ls -la ${mnt_s}]
}
if {$img_partition == 2} {
if {![file exists "/usr/bin/mkimage"] && [file exists "${mnt_s}/usr/bin/mkimage"]} {
file copy -force ${mnt_s}/usr/bin/mkimage /tmp/mkimage
}
}
if {$img_partition == 1} {
write_install_log "Updating boot configuration."
if {!$dryrun} {