Mail Archives: djgpp/2009/02/02/13:46:07
"Rugxulo" <rugxulo AT gmail DOT com> wrote in message
news:06631d19-297f-4622-b8e8-9f2b5fc8c892 AT a12g2000pro DOT googlegroups DOT com...
> Just try this: create a small (50 MB) HD image via QEMU-IMG,
> "format" and "sys c:" it via FreeDOS to make it FAT, use the -hdb fat:/
> mydir/blah QEMU option to let you read from your host OS (e.g. put the
> BasicLinux .ZIP there as well as the MOSS Linux cross-compiler), then
> just use normal DOS tool (e.g. DJTAR) to unpack the BasicLinux .ZIP
> from D:\ to that HD image. Then you should be able to boot BasicLinux
> on top of FreeDOS and then mount D:\ drive (/dev/hdb1 or whatever) in
> Linux and "cd / ; tar xvzf /tmp/moss-0.90-bin-linux.tar.gz ; export
> PATH=/usr/local/i386-moss/bin:$PATH" and then type "gcc -v" and see
> what happens. (Should work. At least it did for me.)
Okay, I must've been thinking way too hard... ;) I just realized it is
quite simple with QEMU. Since there is no .iso for BasicLinux to use with
QEMU, it must be expanded into a DOS directory. Instead of trying to insert
the baslin directory into a DOS harddisk image, the solution is to mount the
directory as a harddrive using the "fat:" option.
What I've done is use QEMU on Win98SE
1) to boot a MS-DOS floppy image as QEMU A:
2) use a blank floppy image as QEMU B:
3) use a directory on my C: as QEMU C:
I probably could've thrown command.com etc. into QEMU C: and booted it, but
I have many floppy boot images available.
qemu.exe -L . -m 128 -no-kqemu -net none -std-vga -boot a -fda dos.img -fdb
blank.img -hda fat:.\project -localtime
QEMU boots DOS to A:, CD C:\baslin, "boot" to use BasicLinux's boot.bat to
boot Linux using loadlin.exe.
Magically, QEMU C: has a link and is mounted in BasicLinux... (Great!)
In QEMU C:, I've got BasicLinux in baslin, moss sources, moss Linux bin,
decompressed 7zdec.
I unzipped the moss sources and moss bins. However, exiting QEMU or
rebooting Linux looses the changes. This happens whether I expand into
BasicLinux's fs.img or the QEMU C:. I added floppy QEMU B: because QEMU at
the moment only seems to save into images... I was able to mount the floppy
images in BasicLinux, although I'm not quite sure what the proper command
is. Normally, I'd use something like:
mount /dev/fd0 /tmp -t fat
mount /dev/fd0 /tmp -t vfat
However, that won't mount them for me... I also tried -t option immediately
after "mount." So, I'm using:
mount /dev/fd0 /tmp
This complains about a missing ext2 filesystem, but mounts the images
correctly...
Anyway, the environment is setup or useable. gcc -v works. I'll let you
know if/when I get back around to this, or more likely, if I make any
progress.
Rod Pemberton
- Raw text -