7Ji / u-boot

"Das U-Boot" Source Tree, with my ports to several devices
12 stars 0 forks source link

r3300l的主线u-boot在插上usb硬盘后启动报错 #3

Closed a520ass closed 1 year ago

a520ass commented 1 year ago

r3300l刷了r3300l-u-boot.bin.sd.bin后,在插入usb硬盘(无启动项的纯数据盘)时,无法正常启动,会一直resetting,好像跟内存有关,不知道怎么解决,报错如下 QQ截图20230319162620

a520ass commented 1 year ago

不插usb硬盘,启动是正常的,能正常启动内核 QQ截图20230319164013

7Ji commented 1 year ago

我插U盘是正常的。是不是供电不足?你用的是5V电源还是12V电源?这一系列原装12V的盒子,可以用5V启动,但是如果外设供电压力大的话,会把整机的供电带崩

a520ass commented 1 year ago

我插U盘是正常的。是不是供电不足?你用的是5V电源还是12V电源?这一系列原装12V的盒子,可以用5V启动,但是如果外设供电压力大的话,会把整机的供电带崩

现在插u盘是没问题。用的12V 1.5A电源,应该不是电源问题,之前插着usb硬盘,用原厂bootloader加bl33的u-boot能正常启动。

7Ji commented 1 year ago

直接从boot_targets里把usb0去掉,不初始化usb总线试试?

fw_setenv boot_targets 'mmc0 mmc1 pxe dhcp'
a520ass commented 1 year ago

直接从boot_targets里把usb0去掉,不初始化usb总线试试?

fw_setenv boot_targets 'mmc0 mmc1 pxe dhcp'

我去试试,给它换个顺序

a520ass commented 1 year ago

试了一下换个顺序,就不会报错了。boot_targets=mmc0 mmc1 usb0 pxe dhcp

a520ass commented 1 year ago

大佬,我试了一下旧版本2022.04,没有这个问题。在2023.01版本里,你可以测试一下,插上u盘,u盘没系统的话,它按顺序切换到emmc的时候(emmc有系统),启动就一定会报错。好像是改了这个 https://github.com/u-boot/u-boot/blob/v2023.01/boot/image-fdt.c ,这个能修复吗?

7Ji commented 1 year ago

特意又把我r3300l拆了看了下,没有这个问题:

U-Boot 2023.01-g0a36ee5457-dirty (Mar 17 2023 - 11:51:25 +0800) r3300l                  
Model: Amlogic Meson GXL (S905L) BesTV R3300L
SoC:   Amlogic Meson GXL (S905L) Revision 21:c (c4:2)
DRAM:  1 GiB
Core:  172 devices, 26 uclasses, devicetree: separate
MMC:   mmc@70000: 2, mmc@72000: 0, mmc@74000: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
[BL31]: tee size: 0
Net:   eth0: ethernet@c9410000
Hit any key to stop autoboot:  0
starting USB...
Bus usb@c9000000: dwc3_meson_gxl_get_phys: usb2 ports: 2
Register 2000140 NbrPorts 2                                                             Starting the controller
USB XHCI 1.00
scanning bus usb@c9000000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor:  USB Rev: 1.00 Prod:  SanDisk 3.2Gen1
            Type: Removable Hard Disk
            Capacity: 117360.0 MB = 114.6 GB (240353280 x 512)
... is now current device
** No partition table - usb 0 **
Couldn't find partition usb 0:1
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
Boot options select
1:      ArchLinux ARM (flippy kernel, normal initramfs)
2:      ArchLinux ARM (flippy kernel, fallback initramfs)
Enter choice: 1:        ArchLinux ARM (flippy kernel, normal initramfs)
Retrieving file: /boot/initramfs-linux-aarch64-flippy.img
Retrieving file: /boot/vmlinuz-linux-aarch64-flippy
append: root=/dev/mmcblk2p1 rw zswap.enabled=0
Retrieving file: /boot/dtbs/linux-aarch64-flippy/amlogic/meson-gxl-s905x-p212.dtb
Moving Image from 0x8080000 to 0x8200000, end=9b00000
## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
Working FDT set to 8008000
   Loading Ramdisk to 3a732000, end 3af067bf ... OK
   Loading Device Tree to 000000003a725000, end 000000003a731b6f ... OK
Working FDT set to 3a725000

Starting kernel ...
7Ji commented 1 year ago

搞了个高耗电的黑盘也是一样的:

U-Boot 2023.01-g0a36ee5457-dirty (Mar 17 2023 - 11:51:25 +0800) r3300l                  
Model: Amlogic Meson GXL (S905L) BesTV R3300L
SoC:   Amlogic Meson GXL (S905L) Revision 21:c (c4:2)
DRAM:  1 GiB
Core:  172 devices, 26 uclasses, devicetree: separate
MMC:   mmc@70000: 2, mmc@72000: 0, mmc@74000: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
[BL31]: tee size: 0
Net:   eth0: ethernet@c9410000
Hit any key to stop autoboot:  0
starting USB...
Bus usb@c9000000: dwc3_meson_gxl_get_phys: usb2 ports: 2
Register 2000140 NbrPorts 2
Starting the controller                                                                 USB XHCI 1.00
scanning bus usb@c9000000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: JMicron  Rev: 0215 Prod: Generic
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
... is now current device
** No partition table - usb 0 **
Couldn't find partition usb 0:1
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
Boot options select
1:      ArchLinux ARM (flippy kernel, normal initramfs)
2:      ArchLinux ARM (flippy kernel, fallback initramfs)
Enter choice: 1:        ArchLinux ARM (flippy kernel, normal initramfs)
Retrieving file: /boot/initramfs-linux-aarch64-flippy.img
Retrieving file: /boot/vmlinuz-linux-aarch64-flippy
append: root=/dev/mmcblk2p1 rw zswap.enabled=0
Retrieving file: /boot/dtbs/linux-aarch64-flippy/amlogic/meson-gxl-s905x-p212.dtb
Moving Image from 0x8080000 to 0x8200000, end=9b10000
## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
Working FDT set to 8008000
   Loading Ramdisk to 3a731000, end 3af062c1 ... OK
   Loading Device Tree to 000000003a724000, end 000000003a730b6f ... OK
Working FDT set to 3a724000

Starting kernel ...
a520ass commented 1 year ago

这么奇怪,我现在合并了v2023.04版本后,没有这个问题了