Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Running on darwin/arm64 stuck after EFI boot loader #3

Closed
andig opened this issue Jan 23, 2025 · 5 comments
Closed

Running on darwin/arm64 stuck after EFI boot loader #3

andig opened this issue Jan 23, 2025 · 5 comments

Comments

@andig
Copy link

andig commented Jan 23, 2025

Thank you for this great repo! I'm trying to setup the emulator for evcc-io/evcc#18209, but failing to run it. After having built the image with

${GOK} overwrite --full=$(IMAGE_FILE) --target_storage_bytes=1258299392

booting into it on darwin/arm64 gets stuck in the EFI loader:

EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...

Any hint why this might be the case would be greatly appreciated, thank you!

@damdo
Copy link
Owner

damdo commented Jan 23, 2025

Hey @andig thanks for using this repo.
At this point I moved on from this repo as we worked on an improved version of this.

gokrazy now officially supports this! In fact gok now has gok vm with which reuses the logic on this repo but wraps this in go.

You can leverage to run arm64 and amd64 vms, also with native macos hardware acceleration: see for cli arguments gokrazy/tools@b8ffcd4

I suggest moving to the officially supported project. If issues like this arise also there, we can work on that together to fix them.

Let me know if this helps.

@andig
Copy link
Author

andig commented Jan 23, 2025

Wow, that's amazing- much appreciated!

@andig andig closed this as completed Jan 23, 2025
@andig
Copy link
Author

andig commented Jan 23, 2025

Can't get it to run:

To interact with the device, gokrazy provides a web interface reachable at:

	https://gokrazy:HjJv6aBX51G4wT8EueCc@evcc:8080/

In addition, the following Linux consoles are set up:

	1. foreground Linux framebuffer console on HDMI


The TLS Certificate of the gokrazy web interface is located under
	packaging/gokrazy/evcc/config.json
The fingerprint of the Certificate is
	07502ac4915a397b2f4a11ba65f66e29f96fbb59
The certificate is valid until
	2023-01-04 11:01:46 +0000 UTC
Please verify the certificate, before adding an exception to your browser!
2025/01/23 19:07:15 running QEMU
[qemu-system-aarch64 -name evcc -boot order=d -drive file=/tmp/gokrazy-vm1807775912,format=raw -device i6300esb,id=watchdog0 -watchdog-action reset -smp 8 -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::8022-:22 -m 1024 -machine virt,highmem=off -cpu cortex-a72 -bios /tmp/gokrazy-vm4024096838/arm64-QEMU_EFI.fd -accel hvf]

after running as sudo, can't connect to :8080 on arm64 Mac M1. Should I open gokrazy issue?

@damdo
Copy link
Owner

damdo commented Jan 23, 2025

Yes better to have a chat there. It works for me but I had to set GOOS=linux in front of gok. We can chat about potential issues there

@andig
Copy link
Author

andig commented Jan 24, 2025

It works for me but I had to set GOOS=linux in front of gok

Oh yeah... forgot all my Go-foo in light of the gokrazy magic ;). Did that now but still can't boot the image. Issue opened.

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

No branches or pull requests

2 participants