-
Notifications
You must be signed in to change notification settings - Fork 852
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
Support UEFI OS #3996
base: dev
Are you sure you want to change the base?
Support UEFI OS #3996
Conversation
aa5bce9
to
575ab46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick pass over the code (not a full review).
My main comment is this: can you make this more like any other baremetal target instead of making it its own thing besides baremetal and regular OSes? A baremetal target is much easier to maintain than what you have here (for example, the existing Nintendo Switch support is more work than any weird chip someone added support for years ago).
Also, please add a smoke test so we can see how it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it will be a huge PR, so I suggest working on ways to simplify it. It can only be merged if it is maintainable, and right now it's so invasive I honestly don't want to merge it like this.
- Don't copy code like you did for
findGlobals
. Instead, find ways to reuse it. For example, you can move it to a new gc_windows.go file that is compiled in both Windows and UEFI. - Do not make this a new GOOS. Instead, create targets/uefi.json that sets all the necessary properties (and adds at least the
uefi
andbaremetal
build tags). This probably means usingGOOS=linux
, like all the other baremetal targets. Then you can compile for UEFI usingtinygo build -target=uefi ...
. - Add a smoke test to GNUmakefile (there are lots of smoke tests already in there).
(To be clear: there is a difference between big and invasive. Right now it modifies many parts that shouldn't need to be modified by a PR that adds a new build target. If you need to use many lines of code to implement UEFI support, that's fine as long as it doesn't affect the common code too much).
Yes, it's not a good looking code right now.
|
a877214
to
0bbef2a
Compare
Adds support for UEFI OS.
not goal
Usage :