run/boot_dir/foc: avoid error on link creation

In combination with run/image/uboot, run/boot_dir/foc expected a file link it
created itself to be a directory by trying to create another file link inside
it.

Ref #1987
This commit is contained in:
Martin Stein 2017-01-23 13:41:44 +01:00 committed by Norman Feske
parent c76c199f8d
commit 7f7f8063dd

View File

@ -165,7 +165,9 @@ proc run_boot_dir_arm { binaries } {
set tftp_base_dir [load_tftp_base_dir]
set tftp_offset_dir [load_tftp_offset_dir]
exec ln -sf [pwd]/[run_dir]/image.elf $tftp_base_dir$tftp_offset_dir
exec rm -rf $tftp_base_dir$tftp_offset_dir
exec mkdir $tftp_base_dir$tftp_offset_dir
exec ln -sf [pwd]/[run_dir]/image.elf $tftp_base_dir$tftp_offset_dir/image.elf
if {[have_include "image/uboot"]} {
exec ln -sf [pwd]/[run_dir]/uImage $tftp_base_dir$tftp_offset_dir/uImage
}