-bash: ./imxdownload: cannot execute binary file: Executable file format error(可执行文件格式错误)

这可能是因为可执行文件不符合当前主机架构,因此需要在当前主机上再次编译生成可执行文件。

在这里插入图片描述

1. 复制

  • 把源代码文件复制到当前主机
    -bash: ./imxdownload: cannot execute binary file: Executable file format error(可执行文件格式错误)_第1张图片

2. 编译

sudo gcc imxdownload.c -o imxdownload

-bash: ./imxdownload: cannot execute binary file: Executable file format error(可执行文件格式错误)_第2张图片

3. 尝试

  • 将以上生成的可执行文件复制到 .bin 所在的文件夹。
  • 赋予权限
  • 下载到 SD 卡。
$: sudo chmod 777 imxdownloa 
$: ./imxdownload u-boot.bin /dev/sdb
		I.MX6ULL bin download software
		Edit by:zuozhongkai
		Date:2019/6/10
		Version:V1.1
		log:V1.0 initial version,just support 512MB DDR3
		    V1.1 and support 256MB DDR3
		file u-boot.bin size = 419540Bytes
		Board DDR SIZE: 512MB
		Delete Old load.imx
		Create New load.imx
		Download load.imx to /dev/sdb  ......
		记录了825+1 的读入
		记录了825+1 的写出
		422612 bytes (423 kB, 413 KiB) copied, 1.17408 s, 360 kB/s

你可能感兴趣的:(Linux,bash,linux,开发语言,经验分享,arm)