ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/02/02/18:30:05

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: TRYING TO MAKE EXE RUN ON FRIENDS MACHINE
Date: Mon, 2 Feb 2009 15:15:44 -0800 (PST)
Organization: http://groups.google.com
Lines: 126
Message-ID: <5a8fd366-52e8-4389-adde-8ea41684279c@t39g2000prh.googlegroups.com>
References: <cc2668db-926c-41e1-9836-5a42a1210ed6 AT s9g2000prg DOT googlegroups DOT com>
<4563e62e-7382-4c6a-b986-d4c8a8ff9d47 AT i18g2000prf DOT googlegroups DOT com>
<0541cc98-689c-4e6c-ae02-d6f5a1b4a9cb AT l37g2000vba DOT googlegroups DOT com>
<gk54mb$i0$1 AT news DOT tornevall DOT net> <886d17b9-399f-48ed-ac4d-45ca11d3879f AT s20g2000yqh DOT googlegroups DOT com>
<gk5qld$euh$1 AT news DOT tornevall DOT net> <d0ac44e3-772a-44f7-9528-2d6f3f6f1a2c AT h20g2000yqn DOT googlegroups DOT com>
<gk6cuo$qor$1 AT news DOT tornevall DOT net> <eec87f79-da47-45ca-9f26-b55dc37ba7ab AT e3g2000vbe DOT googlegroups DOT com>
<gkahb5$ecb$1 AT news DOT tornevall DOT net> <59d15676-685a-4ad8-a43a-7715035abbaa AT f3g2000yqf DOT googlegroups DOT com>
<gkj2p9$r5j$1 AT news DOT tornevall DOT net> <fed9d4c7-d6a7-4780-bc31-7bdd66aed79b AT r40g2000yqj DOT googlegroups DOT com>
<gkk3fk$fqi$1 AT news DOT tornevall DOT net> <06631d19-297f-4622-b8e8-9f2b5fc8c892 AT a12g2000pro DOT googlegroups DOT com>
<gm7obc$rq7$1 AT news DOT tornevall DOT net>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1233616545 20895 127.0.0.1 (2 Feb 2009 23:15:45 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Mon, 2 Feb 2009 23:15:45 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: t39g2000prh.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.63 (Windows NT 6.0; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019