Page 1 of 1

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

Posted: Mon Nov 03, 2008 1:46 am
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.

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

Posted: Mon Nov 03, 2008 4:03 am
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

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

Posted: Mon Nov 03, 2008 5:58 am
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.

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

Posted: Mon Nov 03, 2008 7:39 am
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.

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

Posted: Mon Nov 03, 2008 9:46 am
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?

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

Posted: Mon Nov 03, 2008 10:27 am
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.

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

Posted: Mon Nov 03, 2008 5:26 pm
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?

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

Posted: Wed Nov 05, 2008 3:03 pm
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: