OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:20 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sat Apr 29, 2017 5:28 pm 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1225
Watch the video tutorial (contains download, compilation and a test run in a 386DX):
http://www.youtube.com/watch?v=Uwk91x5KgPc


After watching this 40-minute tutorial and trying out the accompanying sample source distribution ZIP file, you should be able to compile and install FreeDOS 1.2, that is, the kernel and the COMMAND.COM console by yourself with no complications.

It shows you how to install to a floppy, but you can use Rufus to set up other media such as USB drives. You just need to replace the FreeDOS core system files created by Rufus, by the ones you compile.


For this tutorial you can use DOSBox, any 16 or 32-bit Windows or Wine, anything that has access to DOS.

For this we need:

- To compile the FreeDOS kernel with Turbo C++ 2.01.
- To compile COMMAND.COM (FreeCOM) with Turbo C++ 1.01.

It is critical that we use those versions, mainly for COMMAND.COM. If we don't , the console will lock up as soon as we execute a DIR command, before showing the file/free/size bytes information.

Apparently we can also use OpenWatcom for the kernel, but the cleanest tool options are indicated by default in the MAK scripts and BAT files (CLEAN.BAT, CONFIG.BAT and BUILD.BAT).


Source code and tools to install (contains a directory with the kernel and COMMAND.COM already compiled, and the config/build scripts already set up to make the process totally clear):
https://archive.org/download/FreeDOS1.2_2017_04_28/FreeDOS%201.2.zip



For FreeDOS 1.2, it's vital that we execute a DIR command right after it finishes loading, since it will show us if COMMAND.COM has been correctly compiled with the right tools (Turbo C++ 1.01).
_______________________________________________
_______________________________________________


Baseically, we need to set the following variables using SET, in CONFIG.BAT:


XNASM - Must point to the absolute path to NASM 0.98 for DOS.

TC2_BASE - Turbo C 2.01 - Base directory that contains BIN, H, LIB, BGI (for the kernel)...

TP1_BASE - Turbo C 1.01 - Base directory that contains BIN, H, LIB, BGI (for COMMAND.COM/FreeCOM)...

XUPX - We must comment it out or the compilation will think that the binaries are too big for a COM (or search an adequate UPX version).

XCPU - For Turbo C it must be 86, for OpenWatcom it can be 386.

XFAT - It's better for it to be 32 unless we don't want FAT32 support.

PATH - Must contain %TC2_BASE% and probably %TC2BASE%\bin . It must also contain %TP1_BASE% and probably %TP1_BASE%\bin .

NOTE: Once we compile the kernel, we must delete the install directory for Turbo C 2.01 or remove it from the PATH and start a new DOS console, for being able to cleanly use Turbo C 1.01 to compile COMMAND.COM .

_________________
Live PC 1: Image Live PC 2: Image

YouTube:
http://youtube.com/@AltComp126/streams
http://youtube.com/@proyectos/streams

http://master.dl.sourceforge.net/projec ... 7z?viasf=1


Top
 Profile  
 
 Post subject: Re: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sun Apr 30, 2017 1:46 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
If you feel that the information presented in the documentation for the FreeDOS project is inadequate, and that you are providing information of substance that is lacking there (which I'm not convinced is the case), wouldn't it be more productive to offer your material to them? It could then be incorporated into their documentation, where it would be read by anyone interested in compiling FreeDOS. If that doesn't appeal to you, would it not be more appropriate as an article in the Wiki? As it is, posting it on this forum, where 99.9% of the readers will have no interest in it, means that it will soon be lost to view and all your work will be in vain.

As an aside, is this an Announcement, a Test Request, or a Job Opening?


Top
 Profile  
 
 Post subject: Re: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sun Apr 30, 2017 2:15 pm 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1225
iansjack wrote:
If you feel that the information presented in the documentation for the FreeDOS project is inadequate, and that you are providing information of substance that is lacking there (which I'm not convinced is the case), wouldn't it be more productive to offer your material to them? It could then be incorporated into their documentation, where it would be read by anyone interested in compiling FreeDOS. If that doesn't appeal to you, would it not be more appropriate as an article in the Wiki? As it is, posting it on this forum, where 99.9% of the readers will have no interest in it, means that it will soon be lost to view and all your work will be in vain.

As an aside, is this an Announcement, a Test Request, or a Job Opening?
It's a tutorial like those from neon, directly related to an important OS project for the PC.

It took me 1 day to figure out how to compile FreeDOS 1.2, and another day to figure out how to compile the old DOS-C 0.90 IPL.SYS and the COMMAND.COM from DOS-C 1.0b2 and join them.

I know that it will greatly help many people to learn to handle the FreeDOS code in just 40 minutes, not days, months nor years.

_________________
Live PC 1: Image Live PC 2: Image

YouTube:
http://youtube.com/@AltComp126/streams
http://youtube.com/@proyectos/streams

http://master.dl.sourceforge.net/projec ... 7z?viasf=1


Top
 Profile  
 
 Post subject: Re: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sun Apr 30, 2017 2:35 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
~ wrote:
It's a tutorial like those from neon, directly related to an important OS project for the PC.
Let's not get into the question of whether a clone of an ancient, 16-bit operating system is "an important OS project for the PC". I can't find any tutorials by neon in this forum, just links to tutorials hosted elsewhere. But I didn't spend too much time searching, so I'll take your word for it. If I saw any I would make the same comment - they would more appropriately appear in the Wiki or (as in the cases I found) be links to tutorials elsewhere.
Quote:
I know that it will greatly help many people to learn to handle the FreeDOS code in just 40 minutes, not days, months nor years.
Then you should certainly offer your tutorial to the FreeDOS project rather than just hiding it here.


Top
 Profile  
 
 Post subject: Re: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sun Apr 30, 2017 2:52 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

iansjack wrote:
~ wrote:
It's a tutorial like those from neon, directly related to an important OS project for the PC.
Let's not get into the question of whether a clone of an ancient, 16-bit operating system is "an important OS project for the PC". I can't find any tutorials by neon in this forum, just links to tutorials hosted elsewhere. But I didn't spend too much time searching, so I'll take your word for it. If I saw any I would make the same comment - they would more appropriately appear in the Wiki or (as in the cases I found) be links to tutorials elsewhere.


Even if FreeDOS was the most important OS that ever existed, and even if that video was the best possible video; I'd still be tempted to suggest that the video isn't useful for people creating their own OS (who aren't working on any existing OS and have no reason to want to build FreeDOS) and therefore doesn't really belong here (in these forums or on the wiki).

~ wrote:
I know that it will greatly help many people to learn to handle the FreeDOS code in just 40 minutes, not days, months nor years.


It takes about 5 minutes to read something like this; and somehow you've managed to turn that into a massive 40 whole minutes?


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: Tutorial: Compile and Use FreeDOS 1.2
PostPosted: Sun Apr 30, 2017 3:12 pm 
Offline
Member
Member
User avatar

Joined: Sun Feb 18, 2007 7:28 pm
Posts: 1564
Hello,

We don't release video tutorials -- we release publications that we believe might be helpful or interesting to future system programmers and operating system developers. It is the feedback that is important to us, and this community provides excellent feedback.

I can see that you put a lot of work in making this tutorial. Consider the target audience -- they would be able to provide the best feedback for you. I suppose the confusion here is that you are sharing a video on FreeDOS on an OS development forum. I suspect you are targeting the wrong audience. It would be better to post this on a forum dedicated to FreeDOS since they would be able to provide the best feedback. (Of course, if you want to discuss ideas or research into implementations or concepts used by FreeDOS or other operating systems that pertain to OS design and theory, that would certainly be something for this forum.)

_________________
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group