Trouble with the barebones (wiki) tutorial, bochs error;

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.
Post Reply
kindyroot
Posts: 12
Joined: Sun Oct 19, 2008 3:57 am

Trouble with the barebones (wiki) tutorial, bochs error;

Post by kindyroot »

i have followed the Bare-Bones tutorial (osdev wiki) available in http://wiki.osdev.org/Bare_bones , it went all OK (or looked like going ok, i haven't tested the resulting disk image yet) until i had to start Bochs and load the kernel (so to call it) in it, i have solved various Panic type of errors, until it said:

Code: Select all

Event type: PANIC  Device: [XGUI ]  Message: bochs: cannot connect to X server :0
Then i couldn't know what i had to do, no explanation is available on the search engines, ..
Here's my Bochsrc.txt:

Code: Select all

boot: floppy
floppya: 1_44="floppy.img", status=inserted
vgaromimage: /usr/share/vgabios/vgabios.bin
megs: 10
cpu: count=1, ips=500000
Thank you in advance.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by Combuster »

It has nothing to do with your kernel (yet). Bochs panicks because its display couldn't start.

Apparently its trying to use the X server, which means you must be running bochs under some form of linux.
If you are working under linux, try selecting the sdl frontend (tends to work better than directly talking with the X server), if you're under windows, you must set it to win32

i.e. try changing between the following lines:
display_library: x
display_library: win32
display_library: sdl
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by 01000101 »

if you're on ubuntu you need to get the 'bochs-x' and 'vgabios' packages in order to get video out of bochs. You can find those in synaptic.
kindyroot
Posts: 12
Joined: Sun Oct 19, 2008 3:57 am

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by kindyroot »

I had already apt-gotten bochs-x, vgabios was already there so i indicated its location to bochs in its config file, now i have just installed the bochs-sdl package and added a line for it in the config file but bochs panics again and says:

Code: Select all

(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
    --> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
    --> Initialization error!
00000000000p[SDL  ] >>PANIC<< Unable to initialize SDL libraries
PS: i am running Debian.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by Combuster »

SDL's trying to use the framebuffer console :shock:
Funky distributors that distribute SDL with fb support and a kernel without it. Get a better distro

Anyway you can try this:
http://www.libsdl.org/faq.php?action=li ... category=9
But your system looks kindof uninhabitable - do you even have graphics support?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
kindyroot
Posts: 12
Joined: Sun Oct 19, 2008 3:57 am

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by kindyroot »

graphics support? are you joking :mrgreen: ? i even have OpenGL working with no problem, i am running Debian Etch (Kernel 2.6.18), i think it's second to last Debian, not old at all!
I am having some success meanwhile with qemu, i am starting to love it, but i always have been told that Bochs was better, so i am not giving that up, the link that you gave me (to the SDL site) unfortunately doesn't help a lot since i already have the latest SDL binaries, there's not much to do with that then.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by Combuster »

kindyroot wrote:the link that you gave me (to the SDL site) unfortunately doesn't help a lot since i already have the latest SDL binaries, there's not much to do with that then.
Have you even read what's on that particular page?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
kindyroot
Posts: 12
Joined: Sun Oct 19, 2008 3:57 am

Re: Trouble with the barebones (wiki) tutorial, bochs error;

Post by kindyroot »

You were dead right :D , it's okay now i sat the SDL_FBACCEL env var to 0 and bochs worked for me alright, thank you very much :wink:
Post Reply