Comment 7 for bug 2011744

Revision history for this message
Denis Ovsienko (dovsienko) wrote :

Thank you for the comments. The problem is not specific to the SD card or the power supply, it is specific to the botched bootloader update on this board, as demonstrated earlier and just recently. The board has been running fine since May with regular package updates, none of which caused a problem because the bootloader packages were set on hold, as described earlier. I decided to see whether the bug is fixed, removed the hold and allowed APT to upgrade the bootloader packages, which broke the bootloader, as described. The correlation is straightforward: bootloader update => reboot => bootloader fault.

Specifically, this looks the most likely cause of failure in the above dpkg log, which included at least two invocations of dd (the bug tracker is not displaying the complete comment for reasons I do not immediately understand). For this particular hardware dd writes one of the bootloaders (in this case U-boot) into a fixed offset on the SD card, as documented in detail here: https://fedoraproject.org/wiki/Architectures/RISC-V/Allwinner

I suspect the bug has to do wither with the U-boot package or the one that breaks the FAT filesystem, from which U-boot chain-loads GRUB. In case the bug tracker has quietly discarded a part of my previous comment, below is the serial console log again:

=> reset
resetting ...
[30]HELLO! BOOT0 is starting!
[32]BOOT0 commit : 20220228+g0ad88b
[36]set pll start
[37]periph0 has been enabled
[40]set pll end
[42]board init ok
[44]DRAM only have internal ZQ!!
[47]get_pmu_exist() = -1
[49]ddr_efuse_type: 0x0
[52][AUTO DEBUG] two rank and full DQ!
[55]ddr_efuse_type: 0x0
[58][AUTO DEBUG] rank 0 row = 15
[61][AUTO DEBUG] rank 0 bank = 8
[64][AUTO DEBUG] rank 0 page size = 2 KB
[68][AUTO DEBUG] rank 1 row = 15
[71][AUTO DEBUG] rank 1 bank = 8
[74][AUTO DEBUG] rank 1 page size = 2 KB
[78]rank1 config same as rank0
[81]DRAM BOOT DRIVE INFO: V0.24
[84]DRAM CLK = 792 MHz
[86]DRAM Type = 3 (2:DDR2,3:DDR3)
[89]DRAMC ZQ value: 0x7b7bfb
[92]DRAM ODT value: 0x42.
[94]ddr_efuse_type: 0x0
[97]DRAM SIZE =1024 M
[100]DRAM simple test OK.
[103]dram size =1024
[105]card no is 0
[106]sdcard 0 line count 4
[109][mmc]: mmc driver ver 2021-04-2 16:45
[118][mmc]: Wrong media type 0x0
[121][mmc]: ***Try SD card 0***
[130][mmc]: HSSDR52/SDR25 4 bit
[133][mmc]: 50000000 Hz
[135][mmc]: 118900 MB
[137][mmc]: ***SD/MMC 0 init OK!!!***
[185]Loading boot-pkg Succeed(index=1).
[189]Entry_name = opensbi
[192]Entry_name = dtb
[194]Entry_name = u-boot
[198]Adding DRAM info to DTB.
[203]Jump to second Boot.

OpenSBI v1.3
   ____ _____ ____ _____
  / __ \ / ____| _ \_ _|
 | | | |_ __ ___ _ __ | (___ | |_) || |
 | | | | '_ \ / _ \ '_ \ \___ \| _ < | |
 | |__| | |_) | __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|___/_____|
        | |
        |_|

Platform Name : Allwinner D1 Nezha
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 24000000Hz
Platform Console Device : uart8250
Platform HSM Device : sun20i-d1-ppu
Platform PMU Device :
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Platform Suspend Device : ---
Platform CPPC Device : ---
Firmware Base : 0x40000000
Firmware Size : 194 KB
Firmware RW Offset : 0x20000
Firmware RW Size : 66 KB
Firmware Heap Offset : 0x28000
Firmware Heap Size : 34 KB (total), 2 KB (reserved), 9 KB (used), 22 KB (free)
Firmware Scratch Size : 4096 B (total), 760 B (used), 3336 B (free)
Runtime SBI Version : 1.0

Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000014008000-0x000000001400bfff M: (I,R,W) S/U: ()
Domain0 Region01 : 0x0000000014000000-0x0000000014007fff M: (I,R,W) S/U: ()
Domain0 Region02 : 0x0000000040000000-0x000000004001ffff M: (R,X) S/U: ()
Domain0 Region03 : 0x0000000040020000-0x000000004003ffff M: (R,W) S/U: ()
Domain0 Region04 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address : 0x000000004a000000
Domain0 Next Arg1 : 0x0000000044000000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain0 SysSuspend : yes

Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcvx
Boot HART ISA Extensions : time
Boot HART PMP Count : 8
Boot HART PMP Granularity : 2048
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 29
Boot HART MIDELEG : 0x0000000000020222
Boot HART MEDELEG : 0x000000000000b109

U-Boot 2022.04 (Jul 20 2023 - 09:56:44 +0000)

CPU: rv64imafdc
Model: Allwinner D1 Nezha
DRAM: 1 GiB
sunxi_set_gate: (CLK#24) unhandled
Core: 56 devices, 20 uclasses, devicetree: board
MMC: mmc@4020000: 0, mmc@4021000: 1
Loading Environment from nowhere... OK
In: serial@2500000
Out: serial@2500000
Err: serial@2500000
Net:
Warning: ethernet@4500000 (eth0) using random MAC address - e2:72:5c:fe:74:88
eth0: ethernet@4500000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@4020000.blk...
Scanning disk mmc@4021000.blk...
Disk mmc@4021000.blk not ready
Found 7 disks
** Unable to read file ubootefi.var **
Failed to load EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
Scanning mmc 0:f...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootriscv64.efi
Invalid FAT entry
** Unable to read file efi/boot/bootriscv64.efi **
Failed to load 'efi/boot/bootriscv64.efi'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No UEFI binary known at 0x40080000
EFI LOAD FAILED: continuing...
starting USB...
Bus usb@4101000: USB EHCI 1.00
Bus usb@4101400: USB OHCI 1.0
Bus usb@4200000: USB EHCI 1.00
Bus usb@4200400: USB OHCI 1.0
scanning bus usb@4101000 for devices... 1 USB Device(s) found
scanning bus usb@4101400 for devices... 1 USB Device(s) found
scanning bus usb@4200000 for devices... 1 USB Device(s) found
scanning bus usb@4200400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-e2-72-5c-fe-74-88
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-riscv-sunxi-sunxi
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-riscv-sunxi
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-riscv
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default
*** ERROR: `serverip' not set
Config file not found
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12