, Posted: Jul 31, 2008 4:06:19 am:
>My style is good? Thanks, but I got beat up about it when I submitted stuff to
the Open Watcom group. Michal >would crap on me so I learned to follow the style
) >the best I could and
since I am so forgetful I comment the hell out of everything.
The style itself is good, but it can interfere with other projects' style.
According testing cases -- I use bochs for testing/debugging -- I have four emulators under
OS/2 -- bochs and qemu from Dmitry Froloff site (qemu is good for debugging to commport
without debug terminal attached -- it has serial console and even parallel console accessed
by pressing Ctrl-Alt-2[-3]. I could, for example, test Merlin kernel with its kernel debugger,
and switching between serial console and main screen is very easy. -- It is yet unofficial and
not released yet, but if you interested, I can give you a link (and, I myself tried to port qemu
to OS/2, I compiled it, but it is non-working now, I plan to finish that port because Froloff
included only qemu-system-x86 and not other emulators and utilities, and Froloff's version
didn't updated for a long time)) and VPC and VBOX. VPC is very fast. VBOX is also very fast,
it inherits qemu functionality. But what is bad, it don't support raw inages, only compressed ones.
With bochs and qemu (and even, with VPC, but not with vbox ;() I can use raw images. It is useful
for quick testing. You can make raw HDD image with partitions on it -- boot with needed OS and
fdisk and format. After that you can exchange files on host system and VM very quickly, using
mtools (if the drive is formatted in FAT, of course). -- mcopy command can be included in
script or makefile, so loader can be built and copied to HDD image at once. With JFS and
HPFS it is not so fast because you must boot into eCS and copy manually. But in our old versions
of loader we used ext2fs. -- We decided to use ext2_os2.ifs and its uFSD because it was the only
uFSD available in sources. This uFSD is somewhat big to fit into ext2 bootblock -- ext2 bootblock
takes only 2 sectors (1024 bytes) and ext2 uFSD was 15 KBytes long. So, Matthieu Willm, the
author of ext2_os2, decided to use LILO linux loader for starting uFSD instead of linux kernel (and
because it was long time ago, the current LILO versions don't work, and LILO and ext2 must be
taken from very old version of Linux, like RedHat 5.0 and Slackware 3.0 (I have them)). In the
case of ext2 we could not use mtools (as mtools are for FAT only), but there are ltools (utilities
for accessing ext2 and (readonly) reiserfs from DOS). I started to port them, but again not
finished ;( My attempts are yet in osfree\tools\ltools directory in osFree sources.
And other posibility for fast exchanging files with ext2 HDD image: I started small Linux
installation from 10 Mb HDD image, along with test ext2 HDDimage; and in bash profile I wrote
a command for mounting, copying and unmounting ext2 test partition. -- Actually, I used 3 HDD
images -- first one with Linux, 2nd one with test ext2 partition, and 3rd one with FAT filesystem.
I built a loader, copied it automatically to FAT image, then qemu was started with 3 mentioned
images. The ext2 image was mounted automatically, then loader was copied to ext2 partition
from the FAT one, then ext2 partition was unmounted, then Linux was shut down. And after a
reboot without Linux a loader was ready for testing. The testing is very convenient with bochs.
-- I used bochs for debvugging with breakpoints, tracing etc. -- Even bootsectors were debugged
And also, I made a simple REXX script genhdd.cmd (in osfreetoolsbin directory) which can
generate a full HDD image with several primary partitions from partition images. The MBR PT
fields were generated automatically. The partition image with ext2 filesystem was generated
with genext2fs program, which we ported from UNIX. So, the goal was to automate generation
of full HDD image from a set of files (like mkisofs does) and automatically write MBR and
bootsector to point to uFSD, which must load a loader. But again, we did not finished it. It was
assumed that ext2fs uFSD is non-fragmented. And if it was so, all may be working. But in reality
it didn't, because uFSD _was_ fragmented. So, it almost worked, with exception of a
fragmented uFSD support.
And the last time, when we switched to GRUB filesystem support, I decided to use uFSD
which is based on GRUB ext2 driver, it was more compact than the one from ext2_os2. And
I decided no more use ext2 because GRUB contains iso9660 (cdfs) driver, and bootable iso
image is much simpler to generate.
So, now I compile the loader first, and second, I launch mkiso.cmd script, which launches
mkisofs with proper parameters, and the ISO image is copied to images directory. All can be
done in one click/keypress
I can suggest you to use my method of testing -- no need in booting into eCS etc.
do not use windows, try doors first