您尚未登录。

楼主 # 2021-06-07 23:05:06

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

uboot无法引导进入系统

uboot编译完毕后,烧录完毕,设备树和根文件系统都装好了,但是uboot无法引导进入系统:
DRAM: 32 MiB
Trying to boot from MMC1


U-Boot 2018.01 (Jun 06 2021 - 07:18:09 -0700) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /suniv-f1c100s-licheepi-nano.dtb
7583 bytes read in 25 ms (295.9 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
starting USB...
No controllers found
No ethernet found.
No ethernet found.
=>

想问问各位,上面的uboot引导是不是有问题呀?

离线

楼主 #1 2021-06-07 23:05:32

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

=> print
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${pre}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};i
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddrf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp};
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo 'i
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootfstype=fat
bootm_size=0x1700000
console=ttyS0,115200
cpu=arm926ejs
devnum=0
devplist=1
devtype=mmc
dfu_alt_info_ram=kernel ram 0x80500000 0x1000000;fdt ram 0x80C00000 0x100000;r0
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x80C00000
fdtcontroladdr=81e55da8
fdtfile=suniv-f1c100s-licheepi-nano.dtb
fel_booted=1
fileaddr=80c00000
filesize=1d9f
kernel_addr_r=0x80500000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${pref}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_i
partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader;
preboot=usb start
pxefile_addr_r=0x80D00000
ramdisk_addr_r=0x80D50000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; fo;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env e
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n e
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prei
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} $e
scriptaddr=0x80C50000
soc=sunxi
stderr=serial@1c25000
stdin=serial@1c25000
stdout=serial@1c25000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dei
uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3

Environment size: 4545/131068 bytes

离线

楼主 #2 2021-06-07 23:05:46

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

=> bdinfo
arch_number = 0x00000000
boot_params = 0x80000100
DRAM bank   = 0x00000000
-> start    = 0x80000000
-> size     = 0x02000000
baudrate    = 115200 bps
TLB addr    = 0x81FF0000
relocaddr   = 0x81F78000
reloc off   = 0x00878000
irq_sp      = 0x81E55D90
sp start    = 0x81E55D80
Early malloc usage: 118 / 400
fdt_blob = 81e55da8

离线

楼主 #3 2021-06-07 23:06:17

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

print信息和dbinfo信息打印如上

离线

楼主 #4 2021-06-07 23:09:57

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

是uboot哪里编译的有问题吗? 烧写命令是:sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8

离线

楼主 #5 2021-06-08 05:46:42

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

说一下,我是使用tf卡启动的。

离线

楼主 #6 2021-06-08 06:36:15

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: uboot无法引导进入系统

结贴, 是因为suniv.h中需要配置

/* bootcmd 保存着 uboot 默认命令, uboot 倒计时结束以后就会执行 bootcmd 中的命令 */
/* bootargs 保存着 uboot 传递给 Linux 内核的参数*/
sudo nano /include/configs/suniv.h
 
/* 添加以下代码(mmc 0为TF卡,1是第一分区,文件系统为fat32,把zImage和dtb文件拷入DRAM)*/
#define CONFIG_BOOTCOMMAND  "fatload mmc 0:1 0x80800000 zImage; "  \
                            "fatload mmc 0:1 0x83000000 suniv-f1c100s-licheepi-nano.dtb; " \
                            "bootz 0x80800000 - 0x83000000;"
 
/* 继续添加(linux将使用uart0进行交互,死机5s重启,根文件系统在mmc0(tf卡)第二分区(EXT4),等待 mmc 设备初始化完成以后再挂载,开启读写权限) */
#define CONFIG_BOOTARGS   "console=ttyS0,115200 panic=5 root=/dev/mmcblk0p2 rootwait rw "
 
 
/* 回到u-boot目录进行编译 */
make ARCH=arm menuconfig
/* 取消勾选 [] Enable a default value for bootcmd */
/* 勾选 [v] Enable boot arguments;*/
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16

离线

#7 2021-06-08 09:16:18

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: uboot无法引导进入系统

感谢楼主分享





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn