You can create a website from the GitHub repository (or create a separate repository that is the website).
That being said, at this point I think we need to clarify that the kernel isn't necessarily ready to replace the FreeDOS kernel at this point.
After looking around other GitHubs (GitHubi? GitHubae? Idk...) and getting some feedback from Tony, I'm thinking maybe I was a bit overzealous in the "code only" approach. But I will say that we need to consciously work to make sure it contains only current, accurate, and useful information and not become a catch all for old files as it did before. If our project starts attracting more eyeballs, we don't need outdated information complicating the efforts of those who may be inclined to assist.
...that all being said...I'm thinking a single html-based documentation file containing basic info (such as what was requested) should suffice. What do you guys think?
I've skimmed the documentation, I see a slight change that needs to be made in the codebase.I think all the Mem functions that are in the AT driver should be moved into the core OS. That could probably be useful in more than one place and at some point will need to be included in the C runtime library that will invariably need to be created.I know how much you "love" when I bring up C, but since FreeDOS is mostly written in C (the kernel) at some point it's going to come into play in the development process.We'll talk offline on this if you'd like.-T
I made an update to the driver skeleton. I think you will like it. Just added some more dispatch points for the driver especially when dealing with hardware.
Oh, blblbplp, that is probably because my linker.ld specified it had to be elf-i386 which probably doesn't support that or anything that has the same thing in mind as the 'org' in Assembly.
FreeDOS can't load Windows PE files either. It just so happens that Windows PE files have a MZ EXE stub attached to them. However, FreeDOS wouldn't be loading anything. NightKernel is supposed
to replace the FreeDOS kernel and then run it inside a VM86 instance (at least that's what Mercury said)
It appears to still be up for debate if we should go for ELF or binary? I just want to say that if this is still up for debate, pointing at the majority doesn't say why we should do it. If we are still unsure, we have to come up with our goals and why ELF will benefit us.
It's not so much of a debate as it is looking at the project and re-assessing what the goals and outcomes are. It's a normal process of the Software Development Lifecycle. Initially, it sounded like a great idea to code NightDOS (now NightKernel) in 100% assembly as a flat binary to be a drop in replacement for FreeDOS. In the time since, a lot of code has been written, contributed, and tested.
The main benefit to ELF over binary is that it's relocatable, whereas a flat binary has to load into a specific place in memory, an ELF can be loaded anywhere and adjusted to run from that location. The DOS kernel because it was a binary file had built in relocation code that moved the kernel once loaded from one particular spot in memory either lower or higher. With an ELF kernel, that code wouldn't be needed, the kernel can load anywhere and the calls and data would get adjusted to match up. (Incidentally, that's the same process that is used for MZ .EXE files).
FreeDOS can't load Windows PE files either. It just so happens that Windows PE files have a MZ EXE stub attached to them. However, FreeDOS wouldn't be loading anything. NightKernel is supposed
to replace the FreeDOS kernel and then run it inside a VM86 instance (at least that's what Mercury said)The FreeDOS bootloader can't load us when we are an ELF binary, is what I meant last time. So, how can we run anything inside a VM86 instance if we can't be executed ourselves. We can edit the current bootloader to solve this, which goes against a drop-in replacement in my opinion.
Or we can write a second file which we then have to call kernel.sys so that it can be loaded by the FreeDOS loader, and that file can then load 'JustGiveItAName.sys' (Night Kernel) or something like that. ELF can't be loaded by a bootloader which loads flat binary's.
If we want to be a drop-in replacement of the FreeDOS kernel, that means (in my opinion) we need to leave the FreeDOS bootloader alone.
It's not so much of a debate as it is looking at the project and re-assessing what the goals and outcomes are.
That is/was an initial goal however, I think we should reassess the goal and scope of the project.
It's a normal process of the Software Development Lifecycle. Initially, it sounded like a great idea to code NightDOS (now NightKernel) in 100% assembly as a flat binary to be a drop in replacement for FreeDOS. In the time since, a lot of code has been written, contributed, and tested.
The main benefit to ELF over binary is that it's relocatable, whereas a flat binary has to load into a specific place in memory, an ELF can be loaded anywhere and adjusted to run from that location. The DOS kernel because it was a binary file had built in relocation code that moved the kernel once loaded from one particular spot in memory either lower or higher. With an ELF kernel, that code wouldn't be needed, the kernel can load anywhere and the calls and data would get adjusted to match up. (Incidentally, that's the same process that is used for MZ .EXE files).
There are multiple solutions to this:Solution 1: Take a page from the co-existing Windows NT and DOS/Windows environment, but instead of a bootloader, use GRUB. GRUB understands ELF so it can boot an ELF kernel. GRUB allows booting back into FreeDOS if so desired.
Solution 2: Take a page from the Windows 9x boot process: boot NightKernel with a similarly named KERNEL.SYS that then loads an ELF (or COFF Windows format) executable that contains the kernel.
That is/was an initial goal however, I think we should reassess the goal and scope of the project. Especially since it's no longer JUST a kernel, but now supporting utilities and applications, the primary one being the Virtual Machine Manager that is going to handle making NightKernel look like multiple isolated DOS machines with 2-16MB RAM, dynamic switching (depending on need) from XMS to EMS, support for VCPI and DPMI 0.9
I'm sorry in advance.
On Monday, August 20, 2018 at 9:03:34 PM UTC+2, Antony wrote:It's not so much of a debate as it is looking at the project and re-assessing what the goals and outcomes are.
Yeah...That is/was an initial goal however, I think we should reassess the goal and scope of the project.Anyway...It's a normal process of the Software Development Lifecycle. Initially, it sounded like a great idea to code NightDOS (now NightKernel) in 100% assembly as a flat binary to be a drop in replacement for FreeDOS. In the time since, a lot of code has been written, contributed, and tested.
The main benefit to ELF over binary is that it's relocatable, whereas a flat binary has to load into a specific place in memory, an ELF can be loaded anywhere and adjusted to run from that location. The DOS kernel because it was a binary file had built in relocation code that moved the kernel once loaded from one particular spot in memory either lower or higher. With an ELF kernel, that code wouldn't be needed, the kernel can load anywhere and the calls and data would get adjusted to match up. (Incidentally, that's the same process that is used for MZ .EXE files).
I didn't know that about ELF, but now the question sounds logical to me.So, if I understand correctly... More code, project becomes bigger, we need to be more flexible in memory?
There are multiple solutions to this:Solution 1: Take a page from the co-existing Windows NT and DOS/Windows environment, but instead of a bootloader, use GRUB. GRUB understands ELF so it can boot an ELF kernel. GRUB allows booting back into FreeDOS if so desired.Pros: We have a ready to go bootloader without us having to do a whole lot about it, it's an okay bootloader.Con: We aren't a drop-in anymore.
Solution 2: Take a page from the Windows 9x boot process: boot NightKernel with a similarly named KERNEL.SYS that then loads an ELF (or COFF Windows format) executable that contains the kernel.Pros: We can use ELF and we can still stay a drop-in.Con: More work.That is/was an initial goal however, I think we should reassess the goal and scope of the project. Especially since it's no longer JUST a kernel, but now supporting utilities and applications, the primary one being the Virtual Machine Manager that is going to handle making NightKernel look like multiple isolated DOS machines with 2-16MB RAM, dynamic switching (depending on need) from XMS to EMS, support for VCPI and DPMI 0.9We're already in FreeDOS's roadmap as a drop-in replacement for FreeDOS and FreeDOS tweeted about us being a drop-in replacement for FreeDOS. We market ourselves as a drop-in replacement. Even if we stay a replacement for FreeDOS we would break one of the biggest goals, not being a drop-in and using another bootloader (e.g. GRUB). I think that's important to know for when we are going to reasses the project. Now, on the other side we are still in dev, and we can still change.
You probably already noticed, I disagree with solution 1 (I do agree with number 2), this is because it's one of the biggest goals of the project, to be a drop-in replacement. It was part of the project; going away from that goal would be like starting with a simplistic monitor, but ending up with a big complicated TV only for the 1500 extra pixels. No, it isn't. But, if we are re-assessing the goals and scope of the project, I want to make an entire thread for it and get it as clear and detailed as we can. This would, I think, be necessary to keep everything clear and organized.
For what?
On Monday, August 20, 2018 at 9:03:34 PM UTC+2, Antony wrote:It's not so much of a debate as it is looking at the project and re-assessing what the goals and outcomes are.
Yeah...That is/was an initial goal however, I think we should reassess the goal and scope of the project.
I don't follow. Elaborate.
I think by the time this project is ready to ship, there will be way more than what could be considered "drop in" just by looking at the hardware platform changes. Intel plans to drop the legacy BIOS by 2020. What does that look like for NightKernel? How will FreeDOS work?
It doesn't have to be an entire thread, but it does have to be a development consideration. There is a lot to consider that wasn't probably thought about 2-3 years ago when this project was conceived and started.
This project is still evolving. FreeDOS's goal was to function 100% like MS-DOS. In that, it succeeded. The reason this project started is because the project owner for FreeDOS felt first and foremost that FreeDOS had to maintain it's 16-bit heritage to run classic DOS applications. There were some that were on the thread discussing improvements that would bring FreeDOS to 32-bit, but maintaining legacy prevented those changes.
The initial concept was to write a 32-bit kernel and replace 16-bit KERNEL.SYS with a 32-bit one. Looking at this kernel, and what has to be developed, I'm seeing a kernel, and eventually, all of the device handling will de done with separate device driver files that will be loaded based on the configuration. A very sophisticated SYSCALL feature to call into the kernel for various system calls and a virtual machine manager that will run for each DOS program that a user will want to run that will emulate as much as possible any environment from DOS 3.3x, 5.x, and 6.x depending on the needs of the program, which may require another Windows 3.1 carry over - some type of Program Information File (.PIF) to establish compatibility.This moves the project a long ways past dropping in a kernel and moving along. If you think all this can be done in one file, I'm all for it.
Although this seems a little more complex than a simple drop-in replacement of the FreeDOS kernel, it separates each purpose out into more or less its own executable, which may prove useful later on, especially if you want to add things like administration consoles, remote logins, etc. later on (DOS in RDP ;-)). The names are just examples of course, but I felt like staying in the "Night" theme for them,
This is my first post directly on this forum, so if I come off as a little forward, please forgive me.
On Wednesday, August 22, 2018 at 8:34:54 AM UTC+2, Antony wrote:For what?
On Monday, August 20, 2018 at 9:03:34 PM UTC+2, Antony wrote:It's not so much of a debate as it is looking at the project and re-assessing what the goals and outcomes are.
Yeah...That is/was an initial goal however, I think we should reassess the goal and scope of the project.For pointing that out in a not so nice way.
I don't follow. Elaborate.You actually answered the question already.I think by the time this project is ready to ship, there will be way more than what could be considered "drop in" just by looking at the hardware platform changes. Intel plans to drop the legacy BIOS by 2020. What does that look like for NightKernel? How will FreeDOS work?Well, FreeDOS will probably stick with the legacy BIOS, that means our (potential) userbase is too.
It doesn't have to be an entire thread, but it does have to be a development consideration. There is a lot to consider that wasn't probably thought about 2-3 years ago when this project was conceived and started.I think to keep it organized we should start a thread for it. Our official development thread already has like over 380 posts. Simply searching for past info isn't really fun. Yes, you can use the search function, but that shouldn't be our mentality. This thread is for feedback and issues, this is not feedback or an issue but an entire reconsideration of our goals and scope. That may become a large topic very soon. I think it's best to start a new thread for this. Then this topic can stay about Feedback and Issues from e.g. the community. And asking for feedback about a linker script does fit the meaning of this topic, and asking for a reassessment does too. But in my opinion, not the reassessment itself.This project is still evolving. FreeDOS's goal was to function 100% like MS-DOS. In that, it succeeded. The reason this project started is because the project owner for FreeDOS felt first and foremost that FreeDOS had to maintain it's 16-bit heritage to run classic DOS applications. There were some that were on the thread discussing improvements that would bring FreeDOS to 32-bit, but maintaining legacy prevented those changes.Yes, the general reply of everyone at that day in 2015 was "Why? There already is a FreeDOS-32".
So develop with no plan for the future outside of FreeDOS. Got it.
I'm still trying to figure out what I said that wasn't nice.
Just so we're clear, I was never upset or angry. I work with a bunch of software engineers and software architects so I have gotten accustomed to hitting "talking" points directly because everything is fast paced and since we're on 2 week sprints for projects (from tech design to deliverable) there's not a lot of time for back and forth on things.
I'm still trying to figure out what I said that wasn't nice.
For pointing that out in a not so nice way.
Since Maarten has used both Assembly and C for Bird OS, I decided to use his source to see just how compact a mixed binary could be. I managed to get the linker to generate a somewhat decent map file, but this revealed a bigger problem: GCC (or maybe the linker itself - I'm not certain of the exact culprit at this point) appears to be littering the output code with x86.get_pc_thunk calls at the start of every function, apparently to support position independent code. With the sheer number of tasks which the processor will need to complete every second, adding additional function calls and register loads is simply not acceptable. If we can somehow overcome this and make the resulting binary similar in efficiency to its pure Assembly counterpart, I would consider incorporating C.
Why, thank you! Always happy to provide some.
Btw, just for the fun of it and to see if I still 'got' it, I tried writing a NightDOS kernel loader (one that would be called kernel.sys and that would load the actual kernel from another file), unaware I was getting ahead of things. It's not finished yet, but I am happy to donate it to the project once it is, just in case you change your mind ;-). It contains assembly routines to search for and read a file from a FAT filesystem and it also moves itself out of the way for the real kernel to be able to load. I can't claim I wrote all of it myself, because it is cobbled together from ancient assembly programs I wrote, of which some of the code is really ancient, from my teenage years. Jeez, I sound old...
That said, I can see the benefit of keeping it all in one file as much as I can see the potential benefit of not doing so. One thing I did realize while writing the ill-fated bootloader is that it might be handy to divide your logical address space into kernel areas and user areas.
I have yet to dive into the MM part of the NightDOS kernel, but if you're not already doing so, it might be something to consider.
Borrow a page from the x86-64 approach and use the top half of the logical address space for kernel areas and the bottom half for user areas. Your VDM will not notice it (because it is in V86 mode), but the code you ultimately execute to start the VDM will benefit from it greatly, because it does not need to move any stuff out of the way by itself. Of course, with paging enabled, your code can be anywhere in physical memory, so it is just a matter of setting up the page tables appropiately.
We get more and more feedback from others. Well, not loads, but I think enough to make a thread for it. This thread is 'designed' for talking about GitHub Issues, emails and any other feedback we get.Feedback of the week:This is an issue from someone asking for documentation, so... Do we agree? And if so, who is going to make it. And... Where do we put it? (Documentation Hub?)It would be good to at least document which compiler we use and what build options.
I think it's better to look at the DOS API (which is primarily INT 21h and INT 2Fh, look at what's called and what is sent back and then map them to whatever the underlying OS will become.