UEFI development with Go-lang

See demo: https://ablog.jc-lab.net/352


tinygo has made it possible to develop bare metal firmware such as MCUs with golang.

Seeing this possibility, I thought, why not make a UEFI application in Go? I thought about it and implemented it.


Development branch : https://github.com/jclab-joseph/tinygo/tree/feat/uefi

WIP PR : https://github.com/tinygo-org/tinygo/pull/3996


For traditional EFI development, there is a framework called edk2, but it is complicated to use and it is difficult to use various libraries effectively.

For example, I recently tried to implement curl instead of HttpDxe, but when I added the LibC dependency, OpenSsl wouldn't build, etc. There are issues.

The biggest difficulty is that it's a C language.


Unlike Java and Node.js, golang has the great advantage of being compiled and operated in machine language without the need for a VM, but if you implement platform-specific things well, you can implement cross-platform regardless of OS.

That's why UEFI is possible.


The call convention of golang and C is different, so it is a disadvantage to call a separate wrapper function for each native function call (you have to use go's syscall on other OS as well), but it seems to be useful if you make a good library for the UEFI protocol.

댓글

이 블로그의 인기 게시물

Fix "go get" error "invalid char ':'" when using custom-port.

EJBCA-CE Docker with HSM on Kubernetes

EJBCA: "no such algorithm" error when using PKCS11.