-
Notifications
You must be signed in to change notification settings - Fork 31
Add infrastructure for build options #62
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ const vga = @import("vga.zig"); | |
| const log = @import("log.zig"); | ||
| const serial = @import("serial.zig"); | ||
| const mem = @import("mem.zig"); | ||
| const options = @import("build_options"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is cool, how can you just pass in this string like that?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that it's a hardcoded thing in the compiler and it just finds the right build options file :) |
||
|
|
||
| // Need to import this as we need the panic to be in the root source file, or zig will just use the | ||
| // builtin panic and just loop, which is what we don't want | ||
|
|
@@ -31,7 +32,7 @@ pub export fn kmain(mb_info: *multiboot.multiboot_info_t, mb_magic: u32) void { | |
| serial.init(serial.DEFAULT_BAUDRATE, serial.Port.COM1) catch unreachable; | ||
|
|
||
| log.logInfo("Init arch " ++ @tagName(builtin.arch) ++ "\n"); | ||
| arch.init(&mem_profile, &fixed_allocator.allocator); | ||
| arch.init(&mem_profile, &fixed_allocator.allocator, options); | ||
| log.logInfo("Arch init done\n"); | ||
| vga.init(); | ||
| tty.init(); | ||
|
|
||
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.
Surely you would also have a normal build as well, as adding the testing and setting to true would have the OS be in testing mode when released. Then with the build OS with runtime testing enabled, add a command to start the kernel which would trigger the runtime tests
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.
There is actually a normal build without runtime testing enabled earlier on in the pipeline, check the "Build kernel" step.