From 41a1c264979997f09d43774835967e2f35f05c5c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sat, 24 Mar 2018 01:44:28 +0100 Subject: [PATCH] use mkimage from updated firmware --- addon/lib/rmupdate.tcl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/addon/lib/rmupdate.tcl b/addon/lib/rmupdate.tcl index 2a5bcbe..96516b3 100644 --- a/addon/lib/rmupdate.tcl +++ b/addon/lib/rmupdate.tcl @@ -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} {