RE: [Freedos-devel] Extracting filesystem from freeDOS
If we take a look at for example fat.h it uses some data structures like time but does not include the definitions for time (located in time.h). This is only one of many similar examples. How does this work. My compiler gets crazy and doesn't understand a thing. //Daniel NOTE: thanks to bart for information I wanted about the layers... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bart Oldeman Sent: Thursday, October 21, 2004 10:47 AM To: [EMAIL PROTECTED] Subject: Re: [Freedos-devel] Extracting filesystem from freeDOS On Thu, 21 Oct 2004, Daniel Gustafsson wrote: I am interested in building the FAT file system in freeDOS as a stand-alone module that works on a ramdisk. The system that I will work on is a SUN SOLARIS (UNIX). I have downloaded the source code KE2035. Can anyone tell me something about what to think of before I begin? Which files are nessecary? Which layers exist in the file system and which files is responsible for the layers? in general it works like int21 - entry.asm- inthndlr.c - dosfns.c (calls dosnames.c newstuff.c) (this was the uninteresting stuff for you) now we have a full qualified name (like C:\FOO\BAR.TXT, no .. or relative paths any more). This name is fed into the filesystem functions: fatfs.c (open, read, write, close etc), and fatdir.c (findfirst/findnext/dirread, etc) which use fattab.c to walk the FAT chain now we have a sector number, that is fed into the buffer code: blockio.c blockio.c calls execrh in execrh.asm, which calls the device driver. The default block device driver is in dsk.c, dsk.c then translates relative (partition) sector numbers into absolute (disk) sector numbers and (unless using LBA) cylinder/head/sector, and calls int13 BIOS functions via floppy.asm. Bart --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
RE: [Freedos-devel] Extracting filesystem from freeDOS
On Thu, 21 Oct 2004, Daniel Gustafsson wrote: If we take a look at for example fat.h it uses some data structures like time but does not include the definitions for time (located in time.h). This is only one of many similar examples. How does this work. My compiler gets crazy and doesn't understand a thing. Nobody said it's going to be easy ;) What happens is that almost all files do #include portab.h #include globals.h and globals.h includes all headers in the hdr directory. Don't ask me why, it's been that way as long as I can remember. if I change to the kernel directory and do (in Linux) gcc -DVA_CDECL= -D_SS=0 -D_CS=0 -I../hdr -c *.c then most things (except nls.c, task.c) compile. That doesn't mean they run, it's just that I used gcc as a sort of lint in the past, and gcc on Sun should be similar. You still have to deal with far pointers, 16 bits, ... Bart --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
RE: [Freedos-devel] Extracting filesystem from freeDOS
Hi! 21--2004 11:40 [EMAIL PROTECTED] (Daniel Gustafsson) wrote to [EMAIL PROTECTED]: DG If we take a look at for example fat.h it uses some data structures like DG time but does not include the definitions for time (located in time.h). This DG is only one of many similar examples. `time' type defined in time.h. This file along with fat.h indirectly included into most sources through globals.h and init-mod.h. DG How does this work. My compiler gets crazy and doesn't understand a thing. Which is your compiler and what it not understand? --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] Extracting filesystem from freeDOS
Hi! 21--2004 09:50 [EMAIL PROTECTED] (Daniel Gustafsson) wrote to [EMAIL PROTECTED]: DG I am interested in building the FAT file system in freeDOS as a stand-alone DG module that works on a ramdisk. (Free)DOS already makes FAT on ramdisks. DG Can anyone tell me something about what to think of before I begin? Which DG files are nessecary? Which layers exist in the file system and which files DG is responsible for the layers? Unfortunately, there are no layers and FAT supporting logic is spreaded accros most files. DOS (and FreeDOS) isn't modular system, which easily may be shuffled in different ways. --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
RE: [Freedos-devel] Extracting filesystem from freeDOS
Hello. I have three questions: 1. Does freeDOS have a ramdisk and if so how do I use it? 2. What does execrh do? 3. Bart wrote:The default block device driver is in dsk.c, dsk.c then translates relative (partition) sector numbers into absolute (disk) sector numbers and (unless using LBA) cylinder/head/sector, and calls int13BIOS functions via floppy.asm. unless using LBA: explain please... I need all the information you've got about the layers after blockio.c //Daniel Bart wrote: in general it works like int21 - entry.asm- inthndlr.c - dosfns.c (calls dosnames.c newstuff.c) (this was the uninteresting stuff for you) now we have a full qualified name (like C:\FOO\BAR.TXT, no .. or relative paths any more). This name is fed into the filesystem functions: fatfs.c (open, read, write, close etc), and fatdir.c (findfirst/findnext/dirread, etc) which use fattab.c to walk the FAT chain now we have a sector number, that is fed into the buffer code: blockio.c blockio.c calls execrh in execrh.asm, which calls the device driver. The default block device driver is in dsk.c, dsk.c then translates relative (partition) sector numbers into absolute (disk) sector numbers and (unless using LBA) cylinder/head/sector, and calls int13 BIOS functions via floppy.asm. Bart --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
RE: RE: [Freedos-devel] Extracting filesystem from freeDOS
Hi, Hello. I have three questions: 1. Does freeDOS have a ramdisk and if so how do I use it? Try TDISK: http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/ramdisk/ (up to mirrors) 2. What does execrh do? Execute a device driver request packet. That is, catch a device driver request coming from CharIO, BlockIO or IOCTL and deliver it to the appropriate handler of the corresponding device driver. Aitor --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] Extracting filesystem from freeDOS
Hello Daniel, I have three questions: 1. Does freeDOS have a ramdisk yes. XMSDSK. and if so how do I use it? pretty straight forward. * Port DosEmu from Linux to SUN SOLARIS * boot dos, giving it a lot of memory (for the RAMDISK) * start XMSDSK * start MS LANMANAGER as server, and make the ramdisk a shared resource. maybe I missed one step or too, but that's the general direction ;) 2. What does execrh do? call a device driver - you don't need that (see below) 3.Bart wrote:The default block device driver is in dsk.c, dsk.c then translates relative (partition) sectornumbers into absolute (disk) sector numbers and (unless using LBA) cylinder/head/sector, and calls int13 BIOS functions via floppy.asm. unless using LBA: explain please... I need all the information you've got about the layers after blockio.c you don't need blockio. you should replace the read/writeblock() in blockio.c; blockio.c is mostly about caching, and there's little sense in caching a ramdisk. tom --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] Extracting filesystem from freeDOS
Hi Tom, [...] * Port DosEmu from Linux to SUN SOLARIS * boot dos, giving it a lot of memory (for the RAMDISK) * start XMSDSK * start MS LANMANAGER as server, [...] DosEmu provides packet driver, have you been able to instal MS LANMANAGER using it? I spent a lot of time last month trying to instal MS-CLIENT over a packet driver and was unable to find a driver (shim?) for that. If you can do it, please point me at the right direction thanks, Alain --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
RE: [Freedos-devel] Extracting filesystem from freeDOS
Hi! 21--2004 17:09 [EMAIL PROTECTED] (Daniel Gustafsson) wrote to [EMAIL PROTECTED]: DG 1. Does freeDOS have a ramdisk Yes - it have (ie. there may be used) same ramdisks, as under MS-DOS. AFAIR, into FreeDOS distribution included one of them - TDSK. DG and if so how do I use it? Same, as under MS-DOS. DG 2. What does execrh do? Comment from execrh.asm: request handler for calling device drivers. Although DOS isn't modular system, but it allows to load device drivers and its own lowlevel functions accessed through common device drivers interface, Thus, all IO requests are passed to device drivers (and kernel provides some default drivers like CON:, C:, etc). execrh() performs device driver call itself. DG 3. Bart wrote:The default block device driver is in dsk.c, dsk.c then DG translates relative (partition) sector numbers into absolute (disk) DG sector DG numbers and (unless using LBA) cylinder/head/sector, and calls int13BIOS DG functions via floppy.asm. DG unless using LBA: explain please... Very old machines (below 486) doesn't support disk larger than 504Mb. This is because difference between IDE interface and BIOS API. This limitation was solved by introducing translation, when BIOS emulates one disk geometry, but inside uses real geometry (which is informed by disk itself). This allows to access through standard BIOSes up to 8064 Mb disks. But disks growth over this barrier, so there was introduced new BIOS API, which allows to access disks not through cylinder/head/sector, but directly through absolute sector number (so called Logical Block Addressing, when all disk sectors commonly enumerated). dsk.c translates LBA-sector number to CHS-numbers for drives, for which BIOS doesn't support LBA access, and uses LBA-sector number directly in other cases. --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] Extracting filesystem from freeDOS
Hello Alain, [...] * Port DosEmu from Linux to SUN SOLARIS * boot dos, giving it a lot of memory (for the RAMDISK) * start XMSDSK * start MS LANMANAGER as server, [...] DosEmu provides packet driver, have you been able to instal MS LANMANAGER using it? No. I spent a lot of time last month trying to instal MS-CLIENT over a packet driver and was unable to find a driver (shim?) for that. If you can do it, please point me at the right direction searching for 'ndis over odi' brings on top optics.ph.unimelb.edu.au/help/samba/wfw_slip.htm 'there is no NDIS over ODI skim. however, there's an ODI over PD and an NDIS over ODI shim' tom --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel
Re: [Freedos-devel] Extracting filesystem from freeDOS
On Thu, 21 Oct 2004, tom ehlert wrote: pretty straight forward. * Port DosEmu from Linux to SUN SOLARIS this is (unfortunately) not so easy. For one thing DOSEMU relies on a vm86 system call, that is most likely not present on SPARC CPUs. Having the thing available as a network drive to the rest of the system is another trick. But I'm not sure if you wanted that, or if the FAT filesystem is only for your program's internal use. you don't need blockio. you should replace the read/writeblock() in blockio.c; blockio.c is mostly about caching, and there's little sense in caching a ramdisk. true. The filesystem consists of fatdir.c, fatfs.c and fattab.c. The purpose of my post was just to explain how this fits in the FreeDOS scheme so you can write replacement functions for anything above (dosfns) and below (blockio) it. A ramdisk is just a chunk of memory, so the dskxfer becomes a memcpy to or from it. Exactly how you want to do that well you're on your own there. There's no shortage of FAT filesystem implementations in this world; you could also look at the Linux FAT code (which most definitely works on SPARC), the Free/Open/Net BSD FAT code, or mtools. A few years ago I remember a post from somebody who used the FreeDOS fatfs for a (non-x86) embedded platform, so it's been done before, but in your case after re-reading the initial post you are probably better off with another FAT implementation (that is 64bit clean, uses a flat memory model, deals with endian issues, etc). Bart --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel