-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odroid N2 Plus: Boot loop when attached USB storage NOT ready #7168
Comments
Thanks for reporting. You you boot via SPI bootloader or MMC? |
In my case, I just tested it with an old little USB 2.0 stick. When using the MMC bootloader, all works fine. When using the SPI bootloader (I flashed the latest one from G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;0.▒!,K▒▒х▒▒}▒▒▒с0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180
TE: 84167
BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13
Board ID = 5
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 000190a2
eMMC boot @ 0
sw8 s
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 5
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
00000000
emmc switch 1 ok
00000000
emmc switch 2 ok
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
00000000
emmc switch 0 ok
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from eMMC, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!
R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==118 ps 10
R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0
dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
pre test bdlr_100_average==440 bdlr_100_min==440 bdlr_100_max==440 bdlr_100_cur==440
aft test bdlr_100_average==440 bdlr_100_min==440 bdlr_100_max==440 bdlr_100_cur==440
non-sec scramble use zero key
ddr scramble enabled
100bdlr_step_size ps== 430
result report
boot times 2Enable ddr reg access
00000000
emmc switch 3 ok
Authentication key not yet programmed
get rpmb counter error 0x00000007
00000000
emmc switch 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x0006c200, des: 0x0175c000, size: 0x0009aa00, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0c 40 00 01 17 16 00 00 03 32 33 32 58 33 50
[3.579735 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):ab8811b
NOTICE: BL31: Built : 15:03:31, Feb 12 2019
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast
<debug_uart>
serial_meson serial@3000: pincu
U-Boot 2022.10-armbian (May 19 2024 - 19:20:08 +0000) odroid-n2/n2-plus
Model: Hardkernel ODROID-N2
SoC: Amlogic Meson G12B (S922X) Revision 29:c (40:2)
DRAM: 3.8 GiB
Core: 388 devices, 27 uclasses, devicetree: separate
MMC: sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
Board variant: n2-plus
Net: dwmac_meson8b ethernet@ff3f0000: Can't get reset: -2
eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... WARN halted endpoint, queueing URB anyway.
Unexpected XHCI event TRB, skipping... (f0f719a0 00000000 13000000 04008400)
BUG at drivers/usb/host/xhci-ring.c:530/abort_td()!
BUG!
resetting ...
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;0.
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180
TE: 144400
BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13
Board ID = 5
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00027c44
eMMC boot @ 0
sw8 s
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 5
Load FIP HDR from eMMC, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from eMMC, src: 0x00060200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
00000000
emmc switch 1 ok
00000000
emmc switch 2 ok
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from eMMC, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
00000000
emmc switch 0 ok
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from eMMC, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!
R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==118 ps 10
R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0
dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
pre test bdlr_100_average==435 bdlr_100_min==435 bdlr_100_max==435 bdlr_100_cur==435
aft test bdlr_100_average==435 bdlr_100_min==435 bdlr_100_max==435 bdlr_100_cur==435
non-sec scramble use zero key
ddr scramble enabled
100bdlr_step_size ps== 435
result report
boot times 3Enable ddr reg access
00000000
emmc switch 3 ok
Authentication key not yet programmed
get rpmb counter error 0x00000007
00000000
emmc switch 0 ok
Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from eMMC, src: 0x0006c200, des: 0x0175c000, size: 0x0009aa00, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0c 40 00 01 17 16 00 00 03 32 33 32 58 33 50
[3.640432 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE: BL31: v1.3(release):ab8811b
NOTICE: BL31: Built : 15:03:31, Feb 12 2019
NOTICE: BL31: G12A normal boot!
NOTICE: BL31: BL33 decompress pass
ERROR: Error initializing runtime service opteed_fast
<debug_uart>
serial_meson serial@3000: pincu
U-Boot 2022.10-armbian (May 19 2024 - 19:20:08 +0000) odroid-n2/n2-plus
Model: Hardkernel ODROID-N2
SoC: Amlogic Meson G12B (S922X) Revision 29:c (40:2)
DRAM: 3.8 GiB
Core: 388 devices, 27 uclasses, devicetree: separate
MMC: sd@ffe05000: 0, mmc@ffe07000: 1
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
Board variant: n2-plus
Net: dwmac_meson8b ethernet@ff3f0000: Can't get reset: -2
eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... usb_new_device: Cannot read configuration, skipping device 058f:6387
4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
2967 bytes read in 1 ms (2.8 MiB/s)
## Executing script at 08000000
288 bytes read in 1 ms (281.3 KiB/s)
Unknown command 'ini' - try 'help'
27496960 bytes read in 1250 ms (21 MiB/s)
13650867 bytes read in 621 ms (21 MiB/s)
80112 bytes read in 7 ms (10.9 MiB/s)
576 bytes read in 4 ms (140.6 KiB/s)
Applying kernel provided DT overlay meson-g12b-odroid-n2-spi.dtbo
232 bytes read in 3 ms (75.2 KiB/s)
Applying kernel provided DT fixup script meson-fixup.scr
## Executing script at 32000000
## Loading init Ramdisk from Legacy Image at 13000000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 13650803 Bytes = 13 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 04080000
Booting using the fdt blob at 0x4080000
Loading Ramdisk to 3f2fb000, end 3ffffb73 ... OK
Loading Device Tree to 000000003f27f000, end 000000003f2fafff ... OK
Starting kernel ... Here the first reset, which differs form your's and indicates an error in the driver: starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... WARN halted endpoint, queueing URB anyway.
Unexpected XHCI event TRB, skipping... (f0f719a0 00000000 13000000 04008400)
BUG at drivers/usb/host/xhci-ring.c:530/abort_td()!
BUG!
resetting ... On next attempt, it works: starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... usb_new_device: Cannot read configuration, skipping device 058f:6387
4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr On another reboot, it looped 4 times before it succeeded 🤔. Weird, either there is a bug in the driver, or not. Though probably one at the stage where the USB device is not fully ready yet, being some kind of race condition. I have another USB 3.0 device, where it works well on every attempt, so it seems to depend on the particular USB stick, how fast it initialises or such. Did you try other USB ports? EDIT: Here is a matching report on the Armbian forum: https://forum.armbian.com/topic/36141-usb-errors/ |
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
I just pushed a U-Boot update to our APT server: apt update
apt upgrade And then |
I think that broke something else.
a reboot didn't make it better:
I'll flash a fresh SD card to see if this still happen. |
Yep, an upgrade on a fresh SD card worked for me. |
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
since it sometimes results in a boot loop, when aiming to boot from eMMC or SD card: MichaIng/DietPi#7168, https://forum.armbian.com/topic/36141-usb-errors/ The attempt to boot from USB might be too fast, when trying it first, where some USB drives are not ready yet, resulting in an error. Signed-off-by: MichaIng <micha@dietpi.com>
Creating a bug report/issue
Required Information
cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=6
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
echo $G_DISTRO_NAME $G_RASPBIAN
bookworm
uname -a
Linux n254 6.6.37-current-meson64 #1 SMP PREEMPT Fri Jul 5 07:34:07 UTC 2024 aarch64 GNU/Linux
echo $G_HW_MODEL_NAME
or (EG: RPi3)Odroid N2 (aarch64)
12V 2A
Sandisk High Endurance 128GB
Additional Information (if applicable)
N/A
N/A
Yes
echo $G_HW_UUID
792a1110-3713-4144-ae3d-41ff25f28819
Steps to reproduce
Expected behaviour
u-boot proceed to boot from mmc after detecting USB storage not ready.
Actual behaviour
Boot loop when detecting USB storage NOT ready
Extra details
I manually got around the issue by:
1 .Hit any key to interrup the boot process
2. Change the boot_target environment variable: setenv boot_targets 'mmc0 mmc1 mmc2 romusb usb0 pxe dhcp'
3. => boot : succesful.
But this require interruption on every boot.
Is there anyway to change and persist the boot_target environment variable?
See output from the boot process:
The text was updated successfully, but these errors were encountered: