Mail Archives: djgpp/2009/02/02/18:30:05
Hi Rod, long time no see! :-)
On Feb 2, 12:32=A0pm, "Rod Pemberton" <do_not_h DOT DOT DOT AT nohavenot DOT cmm> wrote:
> "Rugxulo" <rugx DOT DOT DOT AT gmail DOT com> wrote in message
>
> news:06631d19-297f-4622-b8e8-9f2b5fc8c892 AT a12g2000pro DOT googlegroups DOT com...
>
> > Just try this: =A0 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=3D/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... ;) =A0I just realized it is
> quite simple with QEMU. =A0Since there is no .iso for BasicLinux to use w=
ith
> QEMU, it must be expanded into a DOS directory. =A0Instead of trying to i=
nsert
> 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
> =A0 1) to boot a MS-DOS floppy image as QEMU A:
> =A0 2) use a blank floppy image as QEMU B:
> =A0 3) use a directory on my C: as QEMU C:
>
> I probably could've thrown command.com etc. into QEMU C: and booted it, b=
ut
> I have many floppy boot images available.
>
> =A0qemu.exe -L . -m 128 -no-kqemu -net none -std-vga -boot a -fda dos.img=
-fdb
> blank.img -hda fat:.\project -localtime
I never bother with "-no-kqemu -net none -std-vga -localtime", and it
works fine. Just to save you some typing. ;-)
> QEMU boots DOS to A:, CD C:\baslin, "boot" to use BasicLinux's boot.bat t=
o
> 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. =A0However, exiting QEMU or
> rebooting Linux looses the changes. =A0This happens whether I expand into
> BasicLinux's fs.img or the QEMU C:. =A0I added floppy QEMU B: because QEM=
U at
> the moment only seems to save into images... =A0
Right, QEMU won't save to fat:/ (i.e. host drive), only to virtual
images (e.g. -fda floppy.img or -hda filename.img). I think it will
never support that, IIRC. Kinda a bummer. What I did was QEMU-IMG
create a blank image file, boot QEMU with FreeDOS, format that image
file (as if it was a real hard drive), then unpack BasicLinux on the
fake image, and run from there (not boot from locally since I knew it
wouldn't save changes that way). You do have to transfer files
manually via floppy images or FTP or whatever. It's a known
shortcoming of QEMU (or at least I never bothered / learned any other
way, not sure about the experimental USB support).
> I was able to mount the floppy
> images in BasicLinux, although I'm not quite sure what the proper command
> is. =A0Normally, I'd use something like:
>
> =A0mount /dev/fd0 /tmp -t fat
> =A0mount /dev/fd0 /tmp -t vfat
>
> However, that won't mount them for me... =A0I also tried -t option immedi=
ately
> after "mount." =A0So, I'm using:
>
> =A0mount /dev/fd0 /tmp
That looks right, so I dunno (although I do normally use "-t vfat"
also). Normally you mount to /mnt (or /mnt/floppy or whatever dir is
free, but the dir must already exist).
> Anyway, the environment is setup or useable. =A0gcc -v works. =A0I'll let=
you
> know if/when I get back around to this, or more likely, if I make any
> progress.
Note that the only reason to use that version is in case it (might)
possibly be easier to recompile with it. Good luck! (But I'm not
holding my breath.) Maybe I should try too, but it looks a bit
confusing with all those billions of little files. (I also meant to
install BasicLinux on my old DOS machine, maybe I'll hurry up and do
that.)
P.S. Okay, lemme add a few other cross-compiling links I was saving:
http://gnuwin32.sourceforge.net/packages/libgw32c.htm
"This is an implementation of a small part of GLibC, just enough to
compile most Unix programs on MS Windows. It contains functions for
passwords, process id's groups, and strings. Most are interfaces to
the MS-Windows Win32 API. Some are just dummy functions that do
nothing. "
...
Hmmm, actually all I had otherwise was just a bunch of links to GCC /
EMX / FPC cross-compiler stuff (e.g. BinUtils Win32 cross-tools from
FreePascal for various targets, various EMX DOS+OS/2 compilers +
updates, various RSX + RSXNT + RSXNTDJ + NT09D files which are
apparently very hard to find, as well as the old FPC 1.0.10 DOS+OS/2
EMX version). I guess that's not hugely relevant here, but at least I
found it interesting. ;-)
- Raw text -