QEMU Error 28: Selected item cannot fit into memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Locked
elijaheac
Posts: 8
Joined: Sat Jan 28, 2012 11:05 pm

QEMU Error 28: Selected item cannot fit into memory

Post by elijaheac »

Hi, I'm following the Bare Bones tutorial on the wiki (I'm using NASM, by the way). However, when I launch it in QEMU and type in

Code: Select all

kernel 200+18
I get the following error:

Code: Select all

Error 28: Selected item cannot fit into memory
I have tried Bochs too, and it doesn't give an error, but it freezes the open TTY device. I can switch to another, but the TTY device with X freezes (I can move my cursor around but it won't click). What is wrong and how might I go about fixing it?

Thanks in advance,
elijaheac
Last edited by elijaheac on Sun Jan 29, 2012 2:52 pm, edited 1 time in total.
FallenAvatar
Member
Member
Posts: 283
Joined: Mon Jan 03, 2011 6:58 pm

Re: QEMU Error 28: Selected item cannot fit into memory

Post by FallenAvatar »

How big is your kernel? Doesn't it need to be under 510 bytes? (At least the first stage of the bootloaded...)
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: QEMU Error 28: Selected item cannot fit into memory

Post by thepowersgang »

Are you using an ELF binary? Is it higher-half? Do you use the physical address hint? (in the linker script - AT( ADDR(.text) - kernel_base ) )

Also, that method of loading is a hack, get a grub image with a filesystem instead.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
elijaheac
Posts: 8
Joined: Sat Jan 28, 2012 11:05 pm

Re: QEMU Error 28: Selected item cannot fit into memory

Post by elijaheac »

thepowersgang wrote:Are you using an ELF binary? Is it higher-half? Do you use the physical address hint? (in the linker script - AT( ADDR(.text) - kernel_base ) )

Also, that method of loading is a hack, get a grub image with a filesystem instead.
I'm just following the tutorial, It is not higher half, it is ELF (I am on Ubuntu), and I do not use the physical address hint. I'm saving optimization for later. First I just want to get the base kernel running.
tjmonk15 wrote:How big is your kernel? Doesn't it need to be under 510 bytes? (At least the first stage of the bootloaded...)
I'm just following the Bare Bones tutorial. it shouldn't be any larger or smaller than the tutorial kernel.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: QEMU Error 28: Selected item cannot fit into memory

Post by AJ »

Locked