中级会员
- 积分
- 254
- 金钱
- 254
- 注册时间
- 2020-10-19
- 在线时间
- 54 小时
|
情况描述:我采用的是2020.2系列的支持包和linux5.4.0版本的内核。我尝试了很多方法,但最终都会出现下述错误:
这是我的boot.scr文件:
- # Generate boot.scr:
- # mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
- #
- ################
- for boot_target in ${boot_targets};
- do
- if test "${boot_target}" = "jtag" ; then
- bootm 0x00200000 0x04000000 0x00100000
- exit;
- fi
- if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then
- if test -e ${devtype} ${devnum}:${distro_bootpart} /image.ub; then
- fatload ${devtype} ${devnum}:${distro_bootpart} 0x10000000 image.ub;
- bootm 0x10000000;
- exit;
- fi
- if test -e ${devtype} ${devnum}:${distro_bootpart} /zImage; then
- fatload ${devtype} ${devnum}:${distro_bootpart} 0x00200000 zImage;;
- fi
- if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
- fatload ${devtype} ${devnum}:${distro_bootpart} 0x00100000 system.dtb;
- fi
- if test -e ${devtype} ${devnum}:${distro_bootpart} /rootfs.cpio.gz.u-boot; then
- fatload ${devtype} ${devnum}:${distro_bootpart} 0x04000000 rootfs.cpio.gz.u-boot;
- bootm 0x00200000 0x04000000 0x00100000
- exit;
- fi
- if test -e ${devtype} ${devnum}:${distro_bootpart} /system.bit; then
- fatload ${devtype} ${devnum}:${distro_bootpart} 0x00800000 system.bit;
- fpga loadb 0 ${fileaddr} ${filesize}
- fi
- bootz 0x00200000 - 0x00100000
- exit;
- fi
- if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then
- sf probe 0 0 0;
- if test "image.ub" = "image.ub"; then
- sf read 0x10000000 0x1000000 0xF00000;
- bootm 0x10000000;
- exit;
- fi
- if test "image.ub" = "uImage"; then
- sf read 0x00200000 0x1000000 0x500000;
- sf read 0x04000000 0x1580000 0xA00000
- bootm 0x00200000 0x04000000 0x00100000
- exit;
- fi
- exit;
- fi
- if test "${boot_target}" = "nand" || test "${boot_target}" = "nand0"; then
- nand info
- if test "image.ub" = "image.ub"; then
- nand read 0x10000000 0x1000000 0x6400000;
- bootm 0x10000000;
- exit;
- fi
- if test "image.ub" = "uImage"; then
- nand read 0x00200000 0x1000000 0x3200000;
- nand read 0x04000000 0x4600000 0x3200000;
- bootm 0x00200000 0x04000000 0x00100000
- exit;
- fi
- fi
- done
复制代码 根据之前大佬的建议,我尝试将zImage改成了Image,并且修改了boot.scr。但仍旧不行,后来在启动时,进入uboot命令窗口,我输入了如下四条指令:
- 1. u-boot> fatload mmc 0 0x00200000 zImage
- 2. u-boot> fatload mmc 0 0x00100000 system.dtb
- 3. u-boot> fatload mmc 0 0x04000000 rootfs.cpio.gz.u-boot
- 4. u-boot> bootz 0x00200000 0x04000000 0x00100000
复制代码 起初执行到第三步时,没有读取成功,于是我将rootfs.cpio.gz.u-boot也放入了FAT分区。
然后重新执行了,顺利进入了系统。我是根据领航v3教程操作的,教程中并未将该文件放入FAT分区。
请问该用什么办法直接上电自动进入,而不是输入uboot命令后才能进入?能力有限,并未深入了解这些东西,仅是复现。
|
|