嵌入式爱好者

查看: 1913|回复: 6

[Ubuntu] TF卡启动的问题

[复制链接]

1

主题

4

帖子

12

积分

扫一扫,手机访问本帖
发表于 2023-8-11 13:52:00 | 显示全部楼层 |阅读模式
1043开发版,无法启动,用TF启动,卡死在如下打印处,按空格键无反应。
这个是什么问题?求助

U-Boot SPL 2018.03-00014-g4bc8bc19c4-dirty (Jul 11 2022 - 15:02:59 +0800)
Initialzing DDR using fixed setting
Configuring DDR for 1600 MT/s data rate
Trying to boot from MMC1


U-Boot 2018.03-00014-g4bc8bc19c4-dirty (Jul 11 2022 - 15:02:59 +0800)

SoC:  LS1043AE Rev1.1 (0x87920211)
Clock Configuration:
       CPU0(A53):1600 MHz  CPU1(A53):1600 MHz  CPU2(A53):1600 MHz
       CPU3(A53):1600 MHz
       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     500  MHz
Reset Configuration Word (RCW):
       00000000: 08100010 0a000000 00000000 00000000
       00000010: 14550002 80004012 40044000 c1002000
       00000020: 00000000 00000000 00000000 000389be
       00000030: 20044500 00001002 00000096 00000001
Model: OK1043-C
Board: LS1043ARDB, boot from SD
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
I2C:   ready
DRAM:  1.9 GiB (DDR4, 32-bit, CL=11, ECC off)
Using SERDES1 Protocol: 5205 (0x1455)
SEC0: RNG instantiated
FSL_SDHC: 0
ppa_init: fdt_check_header() failed

MMC read: dev # 0, block # 18952, count 128 ...
Not a microcode
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
secure check passed
Waking secondary cores to start from fbd43000
All (4) cores are up.
MMC:   Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
In:    serial
Out:   serial
Err:   serial
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst
Found 0 device(s).
SCSI:  Net:
MMC read: dev # 0, block # 18432, count 128 ...
Fman1: Uploading microcode version 106.4.18
PCIe0: pcie@3400000 disabled
PCIe1: pcie@3500000 Root Complex: no link
PCIe2: pcie@3600000 Root Complex: no link
FM1@DTSEC1
Warning: FM1@DTSEC1 (eth0) using random MAC address - f6:bf:5f:c3:34:69
Saving Environment to MMC... Writing to MMC(0)...


回复

使用道具 举报

0

主题

29

帖子

100

积分

发表于 2023-8-14 09:28:02 | 显示全部楼层
初步怀疑是您的EMMC读写错误,您参考一下这个步骤对照一下看您的操作有没有什么不同
1、将此路径下:用户资料/手册/1043 用户手册 6.2 章节制作 TF 烧写卡用镜像/firmware_ls1043ardb_uboot_sdboot.img 的镜像拷贝到ubuntu的work目录中
2、使用命令行将镜像文件写入TF卡中(注意不要直接复制到TF卡)具体命令行使用手册有参考
3、TF卡和U盘的镜像文件全部制作完成后,在开发板上同时插入TF卡以及U盘,确保此时U盘中的镜像文件齐全,此时将拨码开关A拨为ON
4、上电启动开发板连续敲击空格停留在boot阶段
5、此时在底板上弹出TF卡
6、开发板输入boot命令进入烧写过程
7、烧写成功后断电,将拨码开关A拨到off,上电启动即可
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

 楼主| 发表于 2023-8-14 14:20:28 | 显示全部楼层
gggfff 发表于 2023-8-14 09:28
初步怀疑是您的EMMC读写错误,您参考一下这个步骤对照一下看您的操作有没有什么不同
1、将此路径下:用户 ...

我是按照此步骤操作的,在第4步上电启动后,连续敲击空格键无反应,无法进入boot阶段
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

 楼主| 发表于 2023-8-14 16:38:55 | 显示全部楼层
更换了TF卡后可以引导了,但是用U盘烧录失败, 报了kernel文件的hash错误

U-Boot 2018.03-00014-g4bc8bc19c4-dirty (Jul 11 2022 - 15:02:59 +0800)

SoC:  LS1043AE Rev1.1 (0x87920211)
Clock Configuration:
       CPU0(A53):1600 MHz  CPU1(A53):1600 MHz  CPU2(A53):1600 MHz
       CPU3(A53):1600 MHz
       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     500  MHz
Reset Configuration Word (RCW):
       00000000: 08100010 0a000000 00000000 00000000
       00000010: 14550002 80004012 40044000 c1002000
       00000020: 00000000 00000000 00000000 000389be
       00000030: 20044500 00001002 00000096 00000001
Model: OK1043-C
Board: LS1043ARDB, boot from SD
SERDES Reference Clocks:
SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ
I2C:   ready
DRAM:  1.9 GiB (DDR4, 32-bit, CL=11, ECC off)
Using SERDES1 Protocol: 5205 (0x1455)
SEC0: RNG instantiated
FSL_SDHC: 0
SEC Firmware: Bad firmware image (bad FIT header)

MMC read: dev # 0, block # 18952, count 128 ...
Not a microcode
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=0
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=1
wait_for_sr_state: Arbitration lost sr=92 cr=0 state=2020
i2c_init_transfer: failed for chip 0x44 retry=2
i2c_init_transfer: give up i2c_regs=0x2180000
secure check passed
Waking secondary cores to start from fbd43000
All (4) cores are up.
MMC:   Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
In:    serial
Out:   serial
Err:   serial
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst
Found 0 device(s).
SCSI:  Net:
MMC read: dev # 0, block # 18432, count 128 ...
Fman1: Data at 00000000fbc49f40 is not a firmware
PCIe0: pcie@3400000 disabled
PCIe1: pcie@3500000 Root Complex: no link
PCIe2: pcie@3600000 Root Complex: no link
No ethernet found.
Hit any key to stop autoboot:  0
=>  boot
starting USB...
USB0:   Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
USB1:   Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: VendorCo Rev: 2.00 Prod: ProductCode
            Type: Removable Hard Disk
            Capacity: 7680.0 MB = 7.5 GB (15728640 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /ls1043ardb_update.scr
365 bytes read in 20 ms (17.6 KiB/s)
## Executing script at 80000000
** Unable to read file AQR.cld **
15887412 bytes read in 620 ms (24.4 MiB/s)
## Loading kernel from FIT Image at a0000000 ...
   Using 'ls1043ardb' configuration
   Trying 'kernel' kernel subimage
     Description:  ARM64 Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0xa00000d0
     Data Size:    9499652 Bytes = 9.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x80080000
     Entry Point:  0x80080000
     Hash algo:    crc32
     Hash value:   0715a576
   Verifying Hash Integrity ... crc32 error!
Bad hash value for 'hash@1' hash node in 'kernel' image node
Bad Data Hash
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
Found U-Boot script /boot/ls1043ardb_boot.scr
905 bytes read in 30 ms (29.3 KiB/s)
## Executing script at 80000000
** Invalid partition 3 **
** Invalid partition 2 **
** Invalid partition 2 **
** Invalid partition 2 **
Bad Linux ARM64 Image magic!
SCRIPT FAILED: continuing...
switch to partitions #0, OK
mmc0(part 0) is current device
** Unrecognized filesystem type **
Scanning mmc 0:2...
Found U-Boot script /boot/ls1043ardb_boot.scr
905 bytes read in 17 ms (51.8 KiB/s)
## Executing script at 80000000
** Unable to read file /boot/uEnv.txt **
21864960 bytes read in 1098 ms (19 MiB/s)
29903 bytes read in 16 ms (1.8 MiB/s)
## Flattened Device Tree blob at 90000000
   Booting using the fdt blob at 0x90000000
   Using Device Tree in place at 0000000090000000, end 000000009001a4ce
WARNING: SEC firmware not running, no kaslr-seed

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.47 (zyh@1ffe9f7b637e) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #1 SMP PREEMPT Fri Jul 15 12:09:54 CST 2022
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: LS1043A RDB Board
[    0.000000] earlycon: uart8250 at MMIO 0x00000000021c0500 (options '')
[    0.000000] bootconsole [uart8250] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id fsl,qman-fqd
[    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id fsl,qman-pfdr
[    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id fsl,bman-fbpr
[    0.000000] cma: Reserved 16 MiB at 0x00000000f7000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000fbdfffff]
[    0.000000] NUMA: NODE_DATA [mem 0xfbdca6c0-0xfbdcbe7f]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000fbdfffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000f7ffffff]
[    0.000000]   node   0: [mem 0x00000000fb000000-0x00000000fb7fffff]
[    0.000000]   node   0: [mem 0x00000000fbc00000-0x00000000fbdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000fbdfffff]
[    0.000000] percpu: Embedded 24 pages/cpu @ffff80007bd63000 s59992 r8192 d30120 u98304
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 486152
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=PARTUUID=2d529f90-03 rw rootwait board_name=ls1043ardb
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 1904120K/1976320K available (13180K kernel code, 1448K rwdata, 5456K rodata, 1216K init, 979K bss, 55816K reserved, 16384K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008d60000   ( 13184 KB)
[    0.000000]     .rodata : 0xffff000008d60000 - 0xffff0000092c0000   (  5504 KB)
[    0.000000]       .init : 0xffff0000092c0000 - 0xffff0000093f0000   (  1216 KB)
[    0.000000]       .data : 0xffff0000093f0000 - 0xffff00000955a200   (  1449 KB)
[    0.000000]        .bss : 0xffff00000955a200 - 0xffff00000964ee90   (   980 KB)
[    0.000000]     fixed   : 0xffff7dfffe7f9000 - 0xffff7dfffec00000   (  4124 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000000000 - 0xffff7e0001ef8000   (    30 MB actual)
[    0.000000]     memory  : 0xffff800000000000 - 0xffff80007be00000   (  1982 MB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU inte**ce base to 0x000000000142f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: Enabling global workaround for Freescale erratum a005858
[    0.000000] arch_timer: CPU0: Trapping CNTVCT access
[    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns
[    0.000002] sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[    0.008551] Console: colour dummy device 80x25
[    0.013051] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000)
[    0.023457] pid_max: default: 32768 minimum: 301
[    0.028163] Security Framework initialized
[    0.032829] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.040271] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.047369] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.054112] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.077321] ASID allocator initialised with 32768 entries
[    0.082791] Hierarchical SRCU implementation.
[    0.095778] EFI services will not be available.
[    0.108342] smp: Bringing up secondary CPUs ...
[    0.140975] Detected VIPT I-cache on CPU1
[    0.140998] arch_timer: CPU1: Trapping CNTVCT access
[    0.141001] CPU1: Booted secondary processor [410fd034]
[    0.168997] Detected VIPT I-cache on CPU2
[    0.169010] arch_timer: CPU2: Trapping CNTVCT access
[    0.169014] CPU2: Booted secondary processor [410fd034]
[    0.197030] Detected VIPT I-cache on CPU3
[    0.197042] arch_timer: CPU3: Trapping CNTVCT access
[    0.197046] CPU3: Booted secondary processor [410fd034]
[    0.197081] smp: Brought up 1 node, 4 CPUs
[    0.243977] SMP: Total of 4 processors activated.
[    0.248703] CPU features: detected feature: 32-bit EL0 Support
[    0.254563] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.264968] CPU: All CPU(s) started at EL2
[    0.269090] alternatives: patching kernel code
[    0.274259] devtmpfs: initialized
[    0.280633] random: get_random_u32 called from bucket_table_alloc+0x108/0x258 with crng_init=0
[    0.289569] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.299380] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.305997] xor: measuring software checksum speed
[    0.350837]    8regs     :  3070.000 MB/sec
[    0.395062]    8regs_prefetch:  2736.000 MB/sec
[    0.439638]    32regs    :  3774.000 MB/sec
[    0.483864]    32regs_prefetch:  3172.000 MB/sec
[    0.488501] xor: using function: 32regs (3774.000 MB/sec)
[    0.493926] pinctrl core: initialized pinctrl subsystem
[    0.499962] DMI not present or invalid.
[    0.504012] NET: Registered protocol family 16
[    0.509517] cpuidle: using governor menu
[    0.513802] Bman ver:0a02,02,01
[    0.518367] qman-fqd addr 0x00000000fb800000 size 0x400000
[    0.523893] qman-pfdr addr 0x00000000f8000000 size 0x2000000
[    0.529586] Qman ver:0a01,03,02,00
[    0.533133] vdso: 2 pages (1 code @ ffff000008d66000, 1 data @ ffff0000093f5000)
[    0.540585] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.548016] DMA: preallocated 256 KiB pool for atomic allocations
[    0.554417] Serial: AMBA PL011 UART driver
[    0.559449] Machine: LS1043A RDB Board
[    0.563218] SoC family: QorIQ LS1043A
[    0.566890] SoC ID: svr:0x87920211, Revision: 1.1

点评

您尝试一下参考手册制作TF卡时,做好之后多执行几次sync然后直接拔出TF卡,还有TF卡里的镜像和U盘里的镜像虽然名字一样但不可以互相替换使用,您从这两个点排查一下。  详情 回复 发表于 2023-8-15 09:00
点评回复 支持 反对

使用道具 举报

0

主题

29

帖子

100

积分

发表于 2023-8-15 09:00:09 | 显示全部楼层
gamble 发表于 2023-8-14 16:38
更换了TF卡后可以引导了,但是用U盘烧录失败, 报了kernel文件的hash错误

U-Boot 2018.03-00014-g4bc8bc ...

您尝试一下参考手册制作TF卡时,做好之后多执行几次sync然后直接拔出TF卡,还有TF卡里的镜像和U盘里的镜像虽然名字一样但不可以互相替换使用,您从这两个点排查一下。

点评

有几个问题想确认一下: 1. 用dd写镜像到TF卡的时候设别名是用/dev/sdb还是/dev/sdb1? 两种方式我都试过: 用sdb的结果是TF卡引导会停在 Warning: FM1@DTSEC1 (eth0) using random MAC address - f6:bf:5f:c3:3  详情 回复 发表于 2023-8-15 15:17
点评回复 支持 反对

使用道具 举报

1

主题

4

帖子

12

积分

 楼主| 发表于 2023-8-15 15:17:33 | 显示全部楼层
本帖最后由 gamble 于 2023-8-15 15:18 编辑
gggfff 发表于 2023-8-15 09:00
您尝试一下参考手册制作TF卡时,做好之后多执行几次sync然后直接拔出TF卡,还有TF卡里的镜像和U盘里的镜 ...

有几个问题想确认一下:
1. 用dd写镜像到TF卡的时候设别名是用/dev/sdb还是/dev/sdb1?
两种方式我都试过:
用sdb的结果是TF卡引导会停在
Warning: FM1@DTSEC1 (eth0) using random MAC address - f6:bf:5f:c3:34:69
Saving Environment to MMC... Writing to MMC(0)...
见1楼
用sdb1的结果是可以进入boot,打印如下:
No ethernet found.
Hit any key to stop autoboot:  0
见4楼
感觉跟是否检测到以太网口有关?
2. U盘的制作是在windows下直接拷贝镜像文件就可以吗?
不知道hash错误是否跟U盘的制作有关。3. 制作的TF卡在windows下读不出信息,是否正常?

点评回复 支持 反对

使用道具 举报

0

主题

29

帖子

100

积分

发表于 2023-8-16 11:22:38 | 显示全部楼层
gamble 发表于 2023-8-15 15:17
有几个问题想确认一下:
1. 用dd写镜像到TF卡的时候设别名是用/dev/sdb还是/dev/sdb1?
两种方式我都试 ...

1、写到sdb就可以
2、对的,您直接在自己的电脑上将镜像复制到U盘就行,需要注意写到TF卡里的镜像和需要考到U盘中的镜像虽然名字一样但是绝对不可以互相替换使用,请您严格按照手册指定的路径文件进行制作
3、您将镜像写入到的是TF卡的设备节点,在windows下查看TF卡里信息读不出来属于正常现象
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-5-5 06:14

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表