OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 6:45 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Testing The Mobius + Clicker
PostPosted: Sun Dec 28, 2003 9:31 pm 
I set up Bochs on Mac OS X to boot from the hard disk. When I tryed to boot with both kernels they failed. Clicker says "800080008000DEAD" and The Mobius gets no further than "Loading...". On an older verion of The Mobius it got to the GRUB screen. I'm assuming this is all problems caused by Bochs and not the kernels?

btw I'm posting this here because there was no "reply" button in the other thead ??? Maybe a Moderator can move it.


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Sun Dec 28, 2003 9:35 pm 
Code:
00000340075i[KBD  ] reset-disable command received
00000537859i[HD   ] enabling LBA mode
00000543465i[BIOS ] ata0-0: PCHS=940/6/17 translation=none LCHS=940/6/17
00000561128e[HD   ] device set to 1 which does not exist
00000583096i[BIOS ] int13_harddisk: function 02, parameters out of range 0000/0001/0012!
00125530000i[CTRL ] quit_sim called with exit code 0


Here is the bottom bit of bochsout.txt. Maybe some one can make sense of it?


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Sun Dec 28, 2003 9:43 pm 
Hmm... DLX Linux works fine on MacBochs. I guess i'll have to wait for Tim and Pype's comments.

Here is the bochsrc.txt btw

Code:
# how much memory the emulated machine will have
megs: 32

# filename of ROM images
romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000
vgaromimage: $BXSHARE/VGABIOS-elpin-2.40

# hard disk
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="floppy.img", cylinders=306, heads=4, spt=17

# choose the boot disk.
boot: c

# default config interface is textconfig.
config_interface: textconfig
#config_interface: wx


#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term

# where do we send log messages?
log: bochsout.txt

# disable the mouse
mouse: enabled=0

# enable key mapping, using US layout as default.

keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map


It's currently set on The Mobius's image...


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 7:02 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
err. Clicker can only boot from floppy so far, so setting 'floppy.img' as the hard disk image is certainly no good idea.

What you'll have to do is attaching the clicker-generated 'disk.bin' to the floppy and set "boot: a"
Then use bximage to generate a fake hard disk file (hda.img, for instance) and attach that one to ata0-master.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 10:16 am 
There is no floppy drive ??? I've made the hd image.


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 10:36 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
you do not need a floppy drive on your real machine in order to simulate a floppy drive in bochs. They are different kind of beasts.
Clicker does not boot from a HDD so far. Period.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 11:41 am 
Ok I fixed it, it boots Clicker properly now. Thanks! :)

One more question though: My kernel uses GRUB, and so far i've just been replacing the kernel file on the GRUB disk to test it. What needs to be done to make my own images so I can test them in bochs, since I now have no floppy?


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 1:27 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
if you create a 1.44Mb blank file and run "mkdosfs" on it, and then mount it as a loop device (provided that MacOS X accept it), you should be able to put the files you want on the floppy image even without a floppy drive. Then unmount the loop device and you can just run bochs on the image ...

Code:

         mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024



see man mount for more info ...

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 2:17 pm 
mkdosfs doesn't exist on *BSD, they use newfs (newfs_msdos). I'm not sure how to create a 1.44MB file but I create a 1 byte one called bleh (touch bleh) then ran the following:

[Aurora:/tmp] chris% newfs_msdos bleh
newfs_msdos: /dev/bleh: No such file or directory
[Aurora:/tmp] chris% newfs_msdos /tmp/bleh
newfs_msdos: warning: /tmp/bleh is not a character device
newfs_msdos: ioctl (GDINFO): Inappropriate ioctl for device
newfs_msdos: /tmp/bleh: can't figure out partition info

I don't think it'd change if the file was 1.44MB? So, is there any other way it is possible to do this? Also /dev/loop3 doesn't exist and I'm not sure if the "loop=" is a possible option for mount (on *BSD). I looked through mount's man file for it and found nothing. man mount | grep loop found nothing either :-\

...bah why does OS dev have to involve floppys ;)


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 5:18 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 1076
that was linux instructions. my guess is you want freebsd type instructions for the macosx userland....

in freebsd i do;

first, create image file..

Code:
dd if=/dev/zero of=image.bin bs=1k count=1440


mount it;

Code:
vnconfig -c vn0c floppy.img


make the FS

Code:
newfs_msdos -f 1440 /dev/vn0c


then you can moun it

Code:
mount -t msdos /dev/vn0c /mnt/floppyimage


dont forget to
Code:
umount /mnt/floppyimage
vnconfig -u /dev/vn0c


to unmount it cleanly...

(if macosx userland is updated to freebsd5.0, then it uses mdconfig instead of vnconfig, which is similar. just man mdconfig)

_________________
-- Stu --


Top
 Profile  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 7:39 pm 
Hmm.. weird, MacOS X doesn't have vnconfig or mdconfig. Maybe their is an alternative or maybe i'll be able to find it. Thanks for the info.


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 9:54 pm 
I have Disk Utility that can make disk images, and there is bximage that came with Bochs that can make disk and floppy images. I copied the contents of a previously setup floppy disk (GRUB + kern) onto my hd and then created a floppy image using bximage but it didn't boot properly. I'm assuming this isn't the proper way to do it?


Top
  
 
 Post subject: Re:Testing The Mobius + Clicker
PostPosted: Tue Dec 30, 2003 10:16 pm 
I am going to repost the current problem in the main forum, where it is relevant.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group