mintsuki / flanterm

Fast and reasonably complete (framebuffer) terminal emulator.
BSD 2-Clause "Simplified" License
73 stars 7 forks source link

blank black screen #13

Open seven1240 opened 1 month ago

seven1240 commented 1 month ago

this might be related to #11 but I'm using C.

I can reproduce with:

git clone https://github.com/limine-bootloader/limine-c-template-portable
make
make run

to make sure everything works

then

cd kernel/src
git clone https://github.com/mintsuki/flanterm.git
cd ../..
make
make run

The GNUMakefile looks great, it can builds everything into the kernel, and works fine.

add headers to kernel/src/main.c .

#include <flanterm/flanterm.h>
#include <flanterm/backends/fb.h>

add the following code to kernel/src/main.c, just before hcf();

struct flanterm_context *ft_ctx = flanterm_fb_init(
        NULL,
        NULL,
        framebuffer->address, framebuffer->width, framebuffer->height, framebuffer->pitch,
        framebuffer->red_mask_size, framebuffer->red_mask_shift,
        framebuffer->green_mask_size, framebuffer->green_mask_shift,
        framebuffer->blue_mask_size, framebuffer->blue_mask_shift,
        NULL,
        NULL, NULL,
        NULL, NULL,
        NULL, NULL,
        NULL, 0, 0, 1,
        0, 0,
        0
    );

build and restart the template OS, I see a blank black screen instead of the line.

Thanks.

mintsuki commented 1 month ago

Make sure that you have mem*() functions and that they work correctly and are standard compliant.

seven1240 commented 1 month ago

Thanks for your reply. mem*() functions are included in limine-c-template-portable I just retried on a new debian 12 x86_64 with the above steps and I still see a blank black screen.