Page 1 of 1

GRUB Error 28: Selected item cannot fit in memory

Posted: Tue Oct 12, 2021 12:39 pm
by ClemensU42
Hi everyone.

I've just started my first serious attempt at os development and I already set up a cmake system for the os. But now when I try adding C scripts, I get this error:

Code: Select all

kernel /boot/kernel.elf
   [Multiboot-elf, <0xff000:0x154:0x0>

Error 28: Selected item cannot fit into memory
I already looked for possible solutions but none of them worked for me. The kernel itself looks fine though and the multiboot header is also working so I don't really have any idea why this error does occur.

The repo with all the code is here: https://github.com/ClemensU42/ShadowOS

Re: GRUB Error 28: Selected item cannot fit in memory

Posted: Tue Oct 12, 2021 6:21 pm
by Octocontrabass
It's probably because you're not using a cross-compiler.

You really should be using a cross-compiler.

Re: GRUB Error 28: Selected item cannot fit in memory

Posted: Fri Oct 15, 2021 8:07 pm
by deadmutex
Are you sure your linker flags are set properly? You'd need to pass your linker script to ld.