GithubHelp home page GithubHelp logo

limine-bootloader / limine-zig-template Goto Github PK

View Code? Open in Web Editor NEW
28.0 1.0 4.0 48 KB

A simple template for building a Limine-compliant kernel in Zig.

License: BSD Zero Clause License

Makefile 51.82% Zig 48.18%
amd64 bare-bones barebones kernel limine limine-bootloader template x86-64 zig ziglang

limine-zig-template's People

Contributors

48cf avatar anerruption avatar cyberwordpl avatar mintsuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

limine-zig-template's Issues

Question: Limine on non-x86 systems

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?)

Terminal Request returning a null response

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

New edk2 ovmf downloaded firmware not working

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:

  • Ubuntu 22.04.3 LTS on Windows 10 x86_64
  • Kernel: 5.15.133.1-microsoft-standard-WSL2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.