Skip to content
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

fail to boot from pre-built image #24

Open
yuzibo opened this issue Dec 12, 2022 · 12 comments
Open

fail to boot from pre-built image #24

yuzibo opened this issue Dec 12, 2022 · 12 comments

Comments

@yuzibo
Copy link

yuzibo commented Dec 12, 2022

Hi,
I am sorry if I am missing something here.
I downloaded the pre-built image and use sudo dd if=lichee_rv_dock_gcc_10.2.1_kernel_d1-wip-v5.18-rc1.img of=/dev/sdb bs=4M to flash the image into sd card. But when I try to boot the image from lichee dock, I got:

=> ▒[127]HELLO! BOOT0 is starting!
[130]BOOT0 commit : 882671f
[132]set pll start
[134]periph0 has been enabled
[137]set pll end
[139]board init ok
[141]DRAM only have internal ZQ!!
[144]get_pmu_exist() = -1
[146]ddr_efuse_type: 0x0
[149][AUTO DEBUG] single rank and full DQ!
[153]ddr_efuse_type: 0x0
[156][AUTO DEBUG] rank 0 row = 15
[159][AUTO DEBUG] rank 0 bank = 8
[162][AUTO DEBUG] rank 0 page size = 2 KB
[166]DRAM BOOT DRIVE INFO: V0.24
[169]DRAM CLK = 792 MHz
[171]DRAM Type = 3 (2:DDR2,3:DDR3)
[175]DRAMC ZQ value: 0x7b7bfb
[177]DRAM ODT value: 0x42.
[180]ddr_efuse_type: 0x0
[183]DRAM SIZE =512 M
[186]DRAM simple test OK.
[189]dram size =512
[191]card no is 0
[192]sdcard 0 line count 4
[195][mmc]: mmc driver ver 2021-04-2 16:45
[204][mmc]: Wrong media type 0x0
[207][mmc]: ***Try SD card 0***
[216][mmc]: HSSDR52/SDR25 4 bit
[218][mmc]: 50000000 Hz
[221][mmc]: 119152 MB
[223][mmc]: ***SD/MMC 0 init OK!!!***
[258]Loading boot-pkg Succeed(index=1).
[261]Entry_name        = opensbi
[264]Entry_name        = dtb
[267]Entry_name        = u-boot
[270]Adding DRAM info to DTB.
[276]Jump to second Boot.

OpenSBI v1.1
[...]
Platform Name             : Sipeed Lichee RV Dock
Platform Features         : medeleg
Platform HART Count       : 1
Platform IPI Device       : ---
Platform Timer Device     : --- @ 0Hz
Platform Console Device   : uart8250
Platform HSM Device       : sun20i-d1-ppu
Platform Reboot Device    : sunxi-wdt-reset
Platform Shutdown Device  : ---
Firmware Base             : 0x40000000
Firmware Size             : 240 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000040000000-0x000000004003ffff ()
Domain0 Region01          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x000000004a000000
Domain0 Next Arg1         : 0x0000000044000000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : 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      : 0
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2022.07-rc3-gafc07cec-dirty (Jul 21 2022 - 05:36:22 +0000)

DRAM:  512 MiB
sunxi_set_gate: (CLK#24) unhandled
Core:  51 devices, 21 uclasses, devicetree: board
WDT:   Started watchdog@6011000 with servicing (16s timeout)
MMC:   mmc@4020000: 0, mmc@4021000: 1
Loading Environment from nowhere... OK
In:    serial@2500000
Out:   serial@2500000
Err:   serial@2500000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
716176 bytes read in 128 ms (5.3 MiB/s)
## Executing script at 41900000
No FIT subimage unit name
SCRIPT FAILED: continuing...
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
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... 2 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
No ethernet found.
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
Retrieving file: pxelinux.cfg/000000
No ethernet found.
Retrieving file: pxelinux.cfg/00000
No ethernet found.
Retrieving file: pxelinux.cfg/0000
No ethernet found.
Retrieving file: pxelinux.cfg/000
No ethernet found.
Retrieving file: pxelinux.cfg/00
No ethernet found.
Retrieving file: pxelinux.cfg/0
No ethernet found.
Retrieving file: pxelinux.cfg/default-riscv-sunxi-sunxi
No ethernet found.
Retrieving file: pxelinux.cfg/default-riscv-sunxi
No ethernet found.
Retrieving file: pxelinux.cfg/default-riscv
No ethernet found.
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.

I think the sunxi's dtb file existed in the image, right?
Any help is very appreciated!

@sney
Copy link

sney commented Dec 14, 2022

If you press a key to skip auto-boot and then enter the commands manually it will boot, so it seems boot.scr in the image is malformed somehow. You should be able to make a new one with mkimage and copy it into /boot though I haven't tried this yet. https://github.com/tmolteno/d1_build/blob/main/config/bootscr_lichee_rv_dock.txt

@yuzibo
Copy link
Author

yuzibo commented Dec 14, 2022

@sney hi, many thanks, it works.:)

@tmolteno
Copy link
Owner

Thanks for these reports. I'm trying to work backwards and fix this. @yuzibo, can you let me know the steps you took to fix?

@yuzibo
Copy link
Author

yuzibo commented Jan 2, 2023

Hi @tmolteno ,
When I stuck in the u-boot stage(as I described above), I just copy these instructions from bootscr_lichee_rv_dock.txt, then the u-boot will load image correctly.
But I reviewed the here again, there should not be no problem here.

@romanrm
Copy link

romanrm commented Feb 3, 2023

@yuzibo does the 0.4.0 release work for you?

@sunmin89
Copy link

sunmin89 commented Feb 6, 2023

@yuzibo does the 0.4.0 release work for you?

hi @romanrm

0.4.0 release works for my lichee rv dock.
I flashed it to a 64GB sdcard(exfat format) using Raspberry Pi Imager burning tool.
All the basic functions of os works well so far. But the serial communication (putty from windows) seems not well enough, lichee rv has no repond to any keyboard input occasionally .
Wireless and hdmi output need to be tested further. Here is the boot log.lichee rv dock reboot log

@romanrm
Copy link

romanrm commented Feb 6, 2023

Thanks for your report. I was asking because for me with 0.4.0 there is no image on HDMI, and serial console does not accept keyboard input at all.

@yuzibo
Copy link
Author

yuzibo commented Feb 7, 2023

maybe try to flash image with another method. I flashed it failed so ask @sunmin89 to help check the image.
Many thanks.:)

@sunmin89
Copy link

sunmin89 commented Feb 7, 2023

Thanks for your report. I was asking because for me with 0.4.0 there is no image on HDMI, and serial console does not accept keyboard input at all.

  1. Yes,there is no HDMI output.
  2. I connected the board with a Realtek usb to RJ45 10M/100M adapter(idVendor=0bda, idProduct=8152, bcdDevice=20.00),but the kernel failed to recognize it, that said no ethernet card info showed after executing sudo dmesg | tail -n 30 or ls /sys/class/net/.
  3. Wlan works well after configuring it with below command:
    sudo nmcli device wifi connect 'ssid' password 'password'
  4. I can't update or install any new package using apt update or apt install XXX.

@HX2003
Copy link

HX2003 commented Feb 24, 2023

Hi, I am unable to start using v0.4.2 but able to using v0.4.0, there is no message after Starting kernel ... and then after about 15 seconds it reboots. I am using RV Dock.

@HX2003
Copy link

HX2003 commented Feb 26, 2023

Here are my findings for anyone interested. Using d428c16, with UBOOT_TAG: d1-wip KERNEL_TAG: d1/all. WiFi works. HDMI works (added CONFIG_SUN8I_DE2_CCU to defconfig, did not try without it). CPU frequency is defaulted to 408MHz which explains why its so slow. Coremark score @ 408MHz, 919. Coremark score @ 1008MHz, 2306.

@tmolteno
Copy link
Owner

tmolteno commented Mar 1, 2023

Fantastic. Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants