ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/02/02/13:46:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT nohavenot DOT cmm>
Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer
Subject: Re: TRYING TO MAKE EXE RUN ON FRIENDS MACHINE
Date: Mon, 2 Feb 2009 13:32:10 -0500
Organization: TornevallNET - http://news.tornevall.net
Lines: 64
Message-ID: <gm7obc$rq7$1@news.tornevall.net>
References: <cc2668db-926c-41e1-9836-5a42a1210ed6 AT s9g2000prg DOT googlegroups DOT com> <9941ccce-87a6-4ace-9f78-9b15710643bd AT x8g2000yqk DOT googlegroups DOT com> <gjve0m$2rt$1 AT news DOT tornevall DOT net> <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>
NNTP-Posting-Host: 014f4b44abb5a42fd7cd847f42ecd20f
X-Trace: d207c88e25ac35b4a19ea1c8604828ab
X-Complaints-To: abuse AT tornevall DOT net
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE!
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-Validate-Post: http://news.tornevall.net/validate.php?trace=d207c88e25ac35b4a19ea1c8604828ab
X-SpeedUI: 1505
X-Complaints-Italiano: Parlo la lingua non è italiano
X-Posting-User: c1d3d0c1b6b92a0da8bd6a8e58acbe20
X-Priority: 3
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"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 -


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