Hi Patrick,
In principle, FORMAT /s simply formats your drive, which
you can already do well with Linux tools, and then runs
SYS to make it bootable. Alternatively, it can provide a
boot sector built into FORMAT itself and fetch a copy of
kernel & shell from e.g. the current drive, or the drive
which you have booted DOS from, and copy it to the drive
just formatted. For floppy disks, FORMAT can also do low
level formatting. For that, too, Linux tools are available.
In short, you do not want to port a DOS version of FORMAT
to Linux. Instead, just use the corresponding Linux tools.
Long ago, I have written a small Linux script which adds
a copy of a FreeDOS boot sector code of your choice to
the boot sector of a drive or drive image of your choice.
It was rather simplistic, so I assume you will find more
user friendly tools for this now. In FreeDOS, you do not
need to pay special attention to how the kernel and the
FreeCOM command.com are placed on the boot drive, so you
can simply copy them with any normal Linux file copy tool.
Regarding your thoughts of FreeDOS as "real-time" operating
system: I have used it for that before, with limitations.
FreeDOS will not suddenly pause user apps to do slow stuff
like running antivirus or updates like Windows might do,
but it has no real-time features either. So what I did was
let my app just NOT ask DOS to do anything for it in time
critical periods, buffer measurement results in RAM, which
is easy because DJGPP compiled apps can use gigabytes of it,
and then use DOS to save the results to disk while there are
no ongoing measurements.
Note that even my BIOS was a factor for this: I had noticed
that using a simple USB mouse, presented to DOS as a PS/2
device thanks to BIOS USB legacy support mode, would cause
significant pauses in my measurements. So I switched to an
actual PS/2 mouse instead, greatly reducing measurement lag.
So in short, DOS is not great for real-time stuff, but it
certainly is not as bad as Windows :-p
Regards, Eric
PS: There also are various Windows tools to create bootable
USB sticks with DOS or Linux, those may be interesting, too.
Hi Everyone
This is my first post here.
I was thinking about using a Linux-DJGPP cross compiler and FreeDOS as a
basic RTOS.
If I could run format \s right from Linux, I could use all of my
existing toolchain and I would not have to run this command on a USB key
from within qemu.
Could this be done?
Thanks-Pat
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel