FreeBSD 13.1 arm64 not booting on rock64 via sd card.

Hi I downloaded this freebsd image.

I decompressed it and copied the .img file to the sd card. After that I inserted it into the rock64 I get this error message after it POSTS.
Code:
ERROR: cannot open /boot/lua/loader.lua: invalid argument.

I'm not sure what this means thus why I came here.

I think this issue is with freebsd specifically because I was able to get netbsd 9.3 to work on this same rock64 SBC.

Thank you for any help with this issue.
 
I have trouble with 13.1-RELEASE for Rock64 too.

Mine is different. Will boot from microSD card fine but when image flashed to eMMC it stalls out.
Once dtb is applied at bootup it does something to the eMMC power state and it locks up.

Can I recommend you check FreeBSD 13.0-RELEASE for ROCK64. It worked fine.
 
I have trouble with 13.1-RELEASE for Rock64 too.

Mine is different. Will boot from microSD card fine but when image flashed to eMMC it stalls out.
Once dtb is applied at bootup it does something to the eMMC power state and it locks up.

Can I recommend you check FreeBSD 13.0-RELEASE for ROCK64. It worked fine.
I will try 13.0 too. right now I'm in the process of flashing 14.0 current to see if that helps the issue.
 
Your Lua error proceeds the dtb being loaded in the boot process.
So that is probably a separate issue.

You can check at loader prompt if drive is showing ok.
lsdev

ERROR: cannot open /boot/lua/loader.lua: invalid argument.
Usually this means it cannot find the drive/file.

These problems could be similar to mine.
 
I think the drive is showing up properly.

Code:
OK lsdev
disk devices:
    disk0:    30883841 X 512 blocks (removable)
      disk0p1: EFI
      disk0p2: FreeBSD UFS

That is on 14.0 current from Feb 23rd 2023
 
I'm placing this here for reference this is my show output from the freebsd boot loader I believe.
Code:
OK show
COLUMNS=80
LINES=25
autoboot_delay=NO
console=efi,comconsole
currdev=
efi-version=2.05
efi_com_port=0
efi_com_speed=0
hint.smbios.0.mem=0x3ce36000
interpret=OK
loader.efi=1
module_verbose=2
prompt=${interpret}
script.lang=lua
smbios.bios.reldate=06/04/2018
smbios.bios.vendor=U-Boot
smbios.bios.version=2017.09-gc46c7b2
smbios.chassis.maker=rockchip
smbios.chassis.type=Desktop
smbios.planar.maker=rockchip
smbios.planar.product=rock64_rk3328
smbios.socket.enabled=1
smbios.system.maker=rockchip
smbios.system.product=rock64_rk3328
smbios.version=3.0
twiddle_divisor=16
 
Mine device shows up too at loader and starts booting kernel. Then bombs.

I see your loader currdev is empty.

Try set currdev=disk0p2 or set currdev=disk0p2: from loader prompt. Then boot.

Maybe check loader env for rootdev.
show rootdev=
If blank set that to the same spot.
 
That worked perfectly in my case now it's booted.
Code:
Feb 23 12:10:52 generic login[1082]: ROOT LOGIN (root) ON ttyu0
FreeBSD 14.0-CURRENT #0 main-n261074-fe5c211ba873: Thu Feb 23 11:16:47 UTC 2023     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List:        https://www.FreeBSD.org/lists/questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

To change this login announcement, see motd(5).
root@generic:~ #

Thank you for that tip.
 
Thank you for that tip.
Thank You for providing precisely needed information for debugging.

On CURRENT they use a DEBUG kernel by default. Look to the NODEBUG kernel instead if you stay there.
Otherwise lots of unneeded messages making it seem broke also slow.
It can also be broke because it is a development version. But better than a two year old 13.0-RELEASE.
 
That didn't work in my case. I even tried making a /boot/loader.conf.local instead but it didn't improve things.
 
After more work I believe that the error about lua and the invalid argument is causing the stage 3 bootloader to be interrupted. So if I can solve the issue relating to the lua invalid argument it should stop interrupting the stage 3 bootloader and it will continue to read the /boot/loader.conf as normal, thus setting currdev properly and finally booting up.

Not quite sure how to fix the lua issue yet but I think I can figure it out.

In other words the efi boot configuration isn't the issue. The problem with lua seems to be the root cause of this.

The lua issue seems to be a freebsd wide problem as it is also affecting products from netgate that use freebsd.
 
The lua issue seems to be a freebsd wide problem
Yes I agree with that. Many 'corner' cases to put it politely.

Thank You for inspiration in revisiting my Rock64 problem. I have to overcome my eMMC issue.
I built a GPIO connection board for it. So I need to get something going even if CURRENT.

If you have a ReconSentinel version with LCD than Andriy wrote a nice program for LCD output. gpiolcd.
I really think it's great learning experience.
 
Hi I downloaded this freebsd image.

I decompressed it and copied the .img file to the sd card. After that I inserted it into the rock64 I get this error message after it POSTS.
Code:
ERROR: cannot open /boot/lua/loader.lua: invalid argument.

I'm not sure what this means thus why I came here.

I think this issue is with freebsd specifically because I was able to get netbsd 9.3 to work on this same rock64 SBC.

Thank you for any help with this issue.
I had this problem also, Turned out that the image in the flash drive was corrupted. That is why it says "ERROR: Cannot open /boot/lua/loader.lua" because maybe /boot or /boot/lua directories do not exist. So I just wrote the same previously downloaded 13.1 image file to the USB flash disk drive stick ( in your case microSD card) and inserted into Raspberry Pi 4B and it booted just fine, going through the "first install" code,
 
Back
Top