limine-bootloader / limine-zig-template Goto Github PK
View Code? Open in Web Editor NEWA simple template for building a Limine-compliant kernel in Zig.
License: BSD Zero Clause License
A simple template for building a Limine-compliant kernel in Zig.
License: BSD Zero Clause License
Is there a template for Limine running on ARM? Probably assuming a specific platform like the Raspberry Pi or the plain "virt" target on qemu, I guess (to avoid having too much trouble from platforms being too different?)
I tried modifying the example to work with a terminal, but no matter what the terminal response will be null
even thought the framebuffer response will be present.
Example code:
const std = @import("std");
inline fn done() noreturn {
while (true) {
asm volatile ("hlt");
}
}
pub export var framebuffer_request: @import("limine").FramebufferRequest = .{};
pub export var terminal_request: @import("limine").TerminalRequest = .{};
export fn _start() callconv(.C) noreturn {
// From the example repo; works
if (framebuffer_request.response) |framebuffer_response| {
if (framebuffer_response.framebuffer_count < 1) {
done();
}
const framebuffer = framebuffer_response.framebuffers()[0];
for (0..100) |i| {
const pixel_offset = i * framebuffer.pitch + i * 4;
@as(*u32, @ptrCast(@alignCast(framebuffer.address + pixel_offset))).* = 0xFFFFFFFF;
}
}
// Written by me, doesn't work
if (terminal_request.response) |response| {
if (response.terminal_count < 1) {
done();
}
const term = response.terminals()[0];
// Neither of these are called, because control flow doesn't get here
response.write(term, "Hello, World\n");
response.write_fn(term, "Hello, World\n", 13);
}
done();
}
Using zig 0.11.0
I wanted to try zig osdev with limine again with the updated template but for some odd reason the updated download link (Commit with the update) doesn't seem to provide a working firmware?
I tried using the old link and it worked without any issue (although it would seem that it hasn't been updated for a while?).
My current issue is that limine doesn't even boot, it gets stuck on "Guest has not initialized display (yet)". -d in_asm
does show that the firmware seem to be running.
Software info:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.