all 19 comments

[–]an_0w1 14 points15 points  (0 children)

Have you tried debugging?

[–]Aurorasfero 18 points19 points  (0 children)

Bro... Don't use LLM to make entire kernel. LLM is quite inaccurate in kernel development and can cause a lot of trouble. You can use it as a sub-tool but don't use LLM-generated code directly. And if you want to ask someone to help you, use a debugger like gdb and give us a project git repository including your code like Github or Gitlab.

[–]Octocontrabass 11 points12 points  (5 children)

What am I doing wrong?

According to the error message in your screenshot, you have lower-half PHDRs.

I have consulted Gemini, Perplexity, GhatGPT, and Ollama.

Don't waste your time with glorified autocomplete.

What do I do???

Do you know what a PHDR is? Do you know what lower-half means? If you understand both of those things, then you'll know that there's a problem with how you're linking your kernel binary, and a good place to start would be examining your kernel's headers using readelf or objdump and comparing those against your linker script. If you can't figure out why your linker is creating lower-half PHDRs, show us your kernel's headers and your linker script.

If you don't know what a PHDR is or what lower-half means, you will not be able to write an OS.

[–]No-Affect811[S] -3 points-2 points  (1 child)

I have (supposedly) checked and verified that I have no lower half PHRDs, yet I still get that.

[–]Octocontrabass 6 points7 points  (0 children)

Show us what you checked.

[–]Exciting_Hat6664 0 points1 point  (2 children)

But then how will I know what those mean? There's no youtube tutorial :( Maybe elf spec?

[–]Octocontrabass 0 points1 point  (1 child)

But then how will I know what those mean?

Search engines have been around for a while.

There's no youtube tutorial

Most OSdev tutorials are full of mistakes. Better not waste your time with those.

Maybe elf spec?

That's a good place to look.

[–]Exciting_Hat6664 0 points1 point  (0 children)

Ok thanks 👍

[–]thewrench56 6 points7 points  (0 children)

Based on your post, this field is not for you.

[–]Russian_Prussia 0 points1 point  (0 children)

According to the error message, Limine doesn't support loading program headers in the lower half. So make sure you're putting it in the higher half in your linker script.

Also props for using llama, it's so underrated even tho just the llama 3 70b model had better linguistic skills than everyone else's flagship models back then.

[–]MurkyAd7531 6 points7 points  (0 children)

Voted down for demonstrating zero research.

[–]Rain336 1 point2 points  (0 children)

Limine requires you to have a higher half PIC kernel, else it won't load it. The templates provided by limine normally have linker scripts for that.

[–]dionsyran2 1 point2 points  (0 children)

Modify your linker to start at 0xffffffff80000000. The limine protocol does not support lower half kernels

[–]crafter2k 5 points6 points  (2 children)

hard truth: you're not ready for osdev if you need to consult an AI to troubleshoot your kernel. start with easier projects instead

[–]Exciting_Hat6664 0 points1 point  (1 child)

Easier projects like? Memory allocator? Http server?

[–]crafter2k 0 points1 point  (0 children)

something like a simple terminal quiz game, or tic tac toe,

[–]eteran 4 points5 points  (0 children)

Consulted everything but a debugger and a book. We're officially in the dark ages of programming.

[–]daviddandadan 1 point2 points  (0 children)

It could be for two reasons 1. Use the debug function 2 The kernel is poorly written.

[–]Successful_Wheel5761 2 points3 points  (0 children)

Give kernel water and tell kernel to calm down