Bugzilla – Bug 1212624
Tumbleweed + Risc-V: grub2 reports out of memory on kernel load
Last modified: 2023-08-09 15:02:13 UTC
Booting openSUSE-Tumbleweed-RISC-V-JeOS-starfivevisionfive2.riscv64-2023.03.20-Build11.107.raw (from devel:RISCV:Factory:Contrib:StarFive:VisionFive2) on a StarFive VisionFive V2) leads to "Loading Linux 6.4.0-rc7-41-default ... error: ../../grub-core/loader/efi/linux.c:436:out of memory. Loading initial ramdisk ... error: ../../grub-core/loader/efi/linux.c:346:you need to load the kernel first. Press any key to continue..." in grub ---- CPU: rv64imacu_zba_zbb Model: StarFive VisionFive V2 DRAM: 8 GiB MMC: sdio0@16010000: 0, sdio1@16020000: 1 --------EEPROM INFO-------- Vendor : StarFive Technology Co., Ltd. Product full SN: <redacted> data version: 0x2 PCB revision: 0xb2 BOM revision: A Ethernet MAC0 address: <redacted> Ethernet MAC1 address: <redacted> --------EEPROM INFO-------- Firmware v3.0.4 (updated the 'easy way' according to https://jamesachambers.com/starfive-visionfive-2-firmware-update-guide/) ---- grub> lsmmap base_addr = 0x40000000, length = 0x80000, reserved RAM base_addr = 0x40080000, length = 0x7e71000, available RAM base_addr = 0x47ef1000, length = 0x1e000, ACPI reclaimable RAM base_addr = 0x47f0f000, length = 0x81375000, available RAM base_addr = 0xc9284000, length = 0xd000, available RAM base_addr = 0xc9291000, length = 0x2000000, available RAM base_addr = 0xcb291000, length = 0x1000, available RAM base_addr = 0xcb292000, length = 0x4000, available RAM base_addr = 0xcb296000, length = 0x2000, available RAM base_addr = 0xcb298000, length = 0x2dc000, available RAM base_addr = 0xcb574000, length = 0x8000, available RAM base_addr = 0xcb57c000, length = 0x1000, reserved RAM base_addr = 0xcb57d000, length = 0x3000, available RAM base_addr = 0xcb580000, length = 0x3000, reserved RAM base_addr = 0xcb583000, length = 0x1000, available RAM base_addr = 0xcb584000, length = 0x4000, reserved RAM base_addr = 0xcb588000, length = 0xa000, available RAM base_addr = 0xcb592000, length = 0x1811000, available RAM base_addr = 0xccda3000, length = 0x1000, RAM holding firmware code base_addr = 0xccda4000, length = 0x3325c000, available RAM base_addr = 0x100000000, length = 0x140000000, available RAM
(In reply to Klaus Kämpf from comment #0) > Booting > openSUSE-Tumbleweed-RISC-V-JeOS-starfivevisionfive2.riscv64-2023.03.20- > Build11.107.raw (from devel:RISCV:Factory:Contrib:StarFive:VisionFive2) on a > StarFive VisionFive V2) leads to > > "Loading Linux 6.4.0-rc7-41-default ... > error: ../../grub-core/loader/efi/linux.c:436:out of memory. > Loading initial ramdisk ... > error: ../../grub-core/loader/efi/linux.c:346:you need to load the kernel > first. The booting grub seemed not built from our source. For tumbleweed, the grub version is 2.06 and Risc-V linux loader path in the source tree is grub-core/loader/riscv/linux.c. It is very likely, judging from the error message, the grub in question was built from a more recent upstream source where Risc-V linux loader has been unified with arm64. It can also be the boot variable to an alternate loader was used rather than sles/opensuse. Added Chester Lin to CC as he seemed to be working on the Risc-V image routinely and may be able to shed some light to the problem.
* Add Andreas and Torsten since they are the maintainers of the visionfive2 Contrib project. Hi Klaus, Not sure if anything changes but the latest image [openSUSE-Tumbleweed-RISC-V-JeOS-starfivevisionfive2.riscv64-2023.08.04-Build16.5.raw.xz] can boot on my board [rev1.3b]. Could you try the latest image first? Just try to make sure that we are using the same image.
Please use the U-Boot from the SDcard, not the builtin from SPI.
(In reply to Andreas Schwab from comment #3) > Please use the U-Boot from the SDcard, not the builtin from SPI. How would I do that ?
The 8GB models seem to have known issues: https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v3.4.5 "Please do not upgrade u-boot/spl for 8GB DDR VisionFive2 since CMA will not allocated successfully under Debian image 202306;"
See 4.6. Boot Mode Settings in the QSG.
(In reply to Andreas Schwab from comment #6) > See 4.6. Boot Mode Settings in the QSG. Thank you ! Setting this to "SDIO3.0" makes the image boot. Closing as feature ;-)