Home | Reviews | GUIpedia | Forum | Fun500
trolly | working on a new osHi, I'm working on a new OS.
it's a operating system like DOS but in 32 bit protected mode.
Application have full access to the hardware,
kernel support dynamic modules loading (relocatable or position independent executable), It use GRUB for booting and loading initial modules and shell.
it's written in C and assembly (FASM, NASM and GAS)
The kernel allow Modules to handle IRQ or add new syscall function, so the OS is highly customizable.
I've implemented a keyboard module, a mouse module, a VESA driver and the begin of a GDI driver to manage GUI widget (for now button's are implemented) and mouse pointer.
Thanks to the GDI driver, app's code are very little because it don't embed the GUI codes, but use interrupt to use GDI functions.
If somebody are interested in this project, you can tell me | 2009-01-04 | 4:16 PM |
Brandon | Re:working on a new osWill it be able to multitask at all?
I have a system thats CPU is like a Pentium 100Mhz, with a network card and a DOS packet driver. Id like an OS with a simple web/rss browser and an AIM client at the same time. | 2009-01-04 | 4:22 PM |
trolly | Re:working on a new osi's a DOS flavor, no multitasking | 2009-01-04 | 4:28 PM |
Brandon | Re:working on a new osWould it be possible to set up a fancy system of app management, like a Linux Package Manager? | 2009-01-04 | 5:24 PM |
trolly | Re:working on a new osnow, i working only on the gui,... network will be (very) latter | 2009-01-04 | 6:06 PM |
Brandon | Re:working on a new osDoes it have any long term plans?
(Obviously I am interested, thats why there is so many questions) | 2009-01-04 | 6:58 PM |
SonicBrit | Re:working on a new ossomething you can do to create a pseudo multitasker is to set something up on the timer, and have the handler save the current context and switch to another context when returning. (just an idea) | 2009-01-04 | 8:40 PM |
rCX | Re:working on a new osWhat file system does it use. What types of disks can it boot from? (floopy, CD, hard drive, pen drive) | 2009-01-05 | 1:24 AM |
trolly | Re:working on a new osfor now it don't use filesystem. it can only read/write block from floppy or hard drive.
there is some screen shots
[img]http://7a1pjw.bay.livefilestore.com/y1p5GRuZczCzeFbS9x2e4rQkSczcBd1rNJnNK-zLvv_SKmIuMiHoqnzJ3o_IZ3YCA4kBeCcz1sNzDu1bNhlrkERAw/textshell.png[/img]
[img]http://7a1pjw.bay.livefilestore.com/y1p34bGmJibkn2ufSKB1ltirPEpfoBeHgp39q4ZhrFtOcLVYx2zlycEz2qDklabcGCNFsUfonOsXtRgDt1P83Ksrg/guishell.png[/img] | 2009-01-06 | 7:16 PM |
Brandon | Re:working on a new osWill it be translated to English? | 2009-01-06 | 7:50 PM |
trolly | Re:working on a new osi worked a lot to my os,
for now it's in french, but it will be translated later.
i'ved added new improvement:
- ressource manager: a device driver can export his ressource, when a program or an other part of code need to work with a device, he ask to the kernel the ressource address, in the resource is the address of the ioctl function (the app can call it directly).
- a file system : fat12 is well supported, fat16 too but (but it's a bug with the root directory:he show the files and directory to many times) and fat32 is worth supporter for now. when a program need to work with the file system he get his exported resource (alias is ="filesystem") with the function get_ressource("filesystem"). after that he should use the "select" command with the name of the device. the file system look for his ressoure (the code is fs_ressource->ioctl(fs_ressource,CmdSelect,"device alias"). and the drive will be ready for working.
- if added a ramdisk driver: he load the desired floppy image in memory and create a block device accessible wit the filesystem layer (the alias for the ramdrive is "rd0")
- keyboard driver, graphic display driver use the ressource manager insteat of interrupt vector or syscall, and the programms can work directly with the driver without the kernel (after he got the ressource of course).
- i've made a gui server (he work now with the interrupt vector) with some q-step widget (button, textbox and console for now) and the ondin's menu.
the client has to call the initialize for each widget, and says the server with witch function an widget is linked, after that he call DrawGUI to draw all widget at once, and at last he call "ManageGUI", when a event occurs, the linked function is automaticaly called.
the last version is attached.
to run the os you must have a virtual machine, and use the floppy.img as floppy disq
(with "qemu: qemu -fda floppy.img -boot a")
or copy it to a real floppy ("dd if=floppy.img of=/dev/fd0" in linux or use rawrite if you are in dos or windows)
[file name=kernel.zip size=339935]http://theguiblog.com/images/fbfiles/files/kernel.zip[/file] | 2009-01-16 | 12:15 AM |
trolly | Re:working on a new osif now coded a file system manager.
he's plug-in based, the file system driver export his function to the manager,
and they're automatically called.
Example, if a user select a drive and chose a xxx file system, if this fs is supported, the manager will automatically call the xxx functions.
the user can pass parameter to the filesystem. for the ramdrive, we give the floppy image file name, and the file system will give this parameter to the ramdisk driver:
some commands:
select fat:hda1 | 2009-01-16 | 11:35 PM |
trolly | Re:working on a new osI've also worked on the gui layer (gdi.bin)
from the gui shell you can execute an application (in gui mode)
[img size=808]http://theguiblog.com/images/fbfiles/images/gui3.png[/img] | 2009-01-16 | 11:38 PM |
Brandon | Re:working on a new osIts not looking too bad. Thanks for keeping us up to date :) | 2009-01-17 | 9:28 AM |
| Re:working on a new osI couldn't get the GUI to work
Maybe it's cause I used Microsoft Virtual PC? | 2009-01-17 | 2:31 PM |
trolly | Re:working on a new osi know, ... microsoft virtual pc dont handle right the vesa standard,
you can download qemu for windows | 2009-01-17 | 4:03 PM |
Todd | Re:working on a new osI prefer QEMU too. There's Bochs but that's a little slow. QEMU is the fastest I've seen. One guy I know said he uses VMware and says it runs pretty fast. | 2009-01-17 | 8:56 PM |
Brandon | Re:working on a new osFor anyone else who is cool here and runs OS X, there is a QEMU port called Q,which seems to run pretty well.
But for DOS Emulation, DOSEMU is the best in Linux, and DOSBox in everything else. | 2009-01-18 | 6:26 AM |
jasonwoodland | Re:working on a new osI use dosemu, dosbox just seems to slow to run anything now..
Great OS Trolly! I've noticed that I havn't wrote anything on this thread yet :ohmy: | 2009-01-18 | 5:02 PM |
trolly | Re:working on a new osfat driver (12 16 et 32) is now fully functional:
writefile,rmfile, mkdir,rmdir,chdir, and lsdir work on all three fat format. now, he load the whole fat into a memory cache, and it's never written to the disk until the filesystem is unselected (unmounted) by the user (this is for more performance when allocating freeing or searching cluster on the fat).
i've updated the ata driver , it use LBA48 instead of LBA28 (it allow use of disk up to 2Tib instead of 128Gib)
i changed the memory allocation politic: he use a bitmap of free memory blocks instead of using a chained list of block (this prevent the overwriting of the memory block header)
I've added the "unselect" function to the file system (comparable to "umount") this allow the file system driver to properly write the the cache to the drive. the drive is also unselected on the shutdown.
next step : working on an Ethernet driver (first the qemu ne2000 model) and an tcp/ip stack.
I must really think about a name for my os!!! An idea? [file name=kernel-7fc1ac3a36910f549313d011672c9ec2.zip size=353900]http://theguiblog.com/images/fbfiles/files/kernel-7fc1ac3a36910f549313d011672c9ec2.zip[/file] | 2009-01-20 | 8:07 PM |
SonicBrit | Re:working on a new osDude thats awesome.
As for the name what embodies your os the most, or the philosophy of your os? | 2009-01-20 | 11:09 PM |
trolly | Re:working on a new osi dont know, ... le first goal of my os is to have a "dos-like"(or cp/m like) os but in 32 bit that allow full acces to the computer hardware. And the final goal is to port q-step to it (in C and asm of course) | 2009-01-21 | 8:37 AM |
SonicBrit | Re:working on a new osas long as you dont mind looking at gpl code, you could possibly port dosemu or possibly freedos?
dosemu might be better do to the fact its doing translations, ie file system to file system etc. freedos might be harder since its designed to be an os from the ground up, also along with freedos there is a project to get a 32-bit dos (freedos-32), that might also be good to look at. | 2009-01-21 | 11:01 AM |
Brandon | Re:working on a new osMy vote still goes to multitasking, really another CLI OS won't be able to beat DOS, altho, if the goal is to add a GUI on top, maybe it will get somewhere. | 2009-01-21 | 11:38 AM |
Todd | Re:working on a new osAnother CLI OS? What about Linux without the GUI? Just plain Debian or FreeBSD?
Trolly, did you write all that code yourself? | 2009-01-21 | 12:08 PM |
Brandon | Re:working on a new osI'd never use them. Its DOS or multitasking/GUI for me. | 2009-01-21 | 2:00 PM |
Todd | Re:working on a new osAwwww.... :(
I'll go "bash" my head on my computer. | 2009-01-21 | 2:15 PM |
Brandon | Re:working on a new osBASH is ok, but are you telling me you'd ditch your Window Manager and run BASH and command line apps for a week? | 2009-01-21 | 2:20 PM |
Todd | Re:working on a new osNo but you're telling me you'd ditch a GUI and run DOS for a week? It's fun to use it but I couldn't do it forever since most of my apps require some sort of GUI environment. | 2009-01-21 | 5:16 PM |
Brandon | Re:working on a new osI could do it for 1 week. | 2009-01-21 | 6:29 PM |
| Re:working on a new osI could live with bash ( and no X ) for a week no problem. It might be a fun idea to try. Maybe you'll find more respect for GUI's, and maybe you'll lose some. | 2009-01-21 | 8:49 PM |
Todd | Re:working on a new osI could but not right now since my classes require internet use at times. In the summer, I could probably do it and might enjoy it. I'd probably just write code like I always do. lol | 2009-01-21 | 9:21 PM |
trolly | Re:working on a new os[b]tlsuess wrote:[/b]
[quote]Another CLI OS? What about Linux without the GUI? Just plain Debian or FreeBSD?
Trolly, did you write all that code yourself?[/quote]
yes i write it myself, with a lot of docs about hardware I/O, there's interesting sites about os coding (osdev.org is the best). | 2009-01-22 | 12:08 AM |
ikongui | Re:working on a new osThat's cool that your working on an OS. My name is kubeos over at osdev.org. I'm working on Kube OS. (pretty original username eh?) :laugh:
Anyway, it looks like both of our OS's are similar. Mine is 32-bit and DOS-like, with no multi-tasking. My GUI is in the works and will support only cooperative multitasking with, most likely, coff executables.
It's nice to see someone else working on something that isn't just another Linux. Do you have a website for your project? | 2009-01-22 | 2:11 AM |
| Re:working on a new osInternet use you say? There is a pretty good text-based wb browser called elinks. And there are many text-based/command line email clients out there? Unless you are using internet for viewing images and stuff or some internet program. | 2009-01-22 | 4:23 PM |
Brandon | Re:working on a new osTrolly, If you want another subdomain for your OS, just ask.
Really, anyone who wants hosting can just ask. | 2009-01-22 | 4:26 PM |
trolly | Re:working on a new osi'm working now on the ethernet driver
(first the ne2000 isa card)
i can send packet to the network, now i manage to receive packet (it's more hard) | 2009-01-25 | 10:53 PM |
trolly | Re:working on a new osupdate: ARP request work!!! i can now get MAC address from local network ip address | 2009-01-26 | 1:37 PM |
Todd | Re:working on a new osThat's awesome! Can't wait to see what the final version will be. | 2009-01-26 | 2:17 PM |
SonicBrit | Re:working on a new oswow dude thats awesome, just wondering do you do any checks to make sure it resolves its own ip as well as the 127.x.x.x range?
So have you just built the IP part, (I'm presuming since you have ARP running?)
You might want to look into implementing UDP first since it doesnt require guaranteed delivery and all the extra overhead that TCP uses(sending SYN, ACK and keeping a sliding window for packets etc.), and is useful since DNS runs over UDP. | 2009-01-26 | 4:19 PM |
trolly | Re:working on a new osfor now, i've only arp running, in the os, it's a "resource" like any other "resources" (in my os "resources" is an abstraction witch allow easy cooperation between different part (devices, shared library, file system, anything can be a ressource)
the arp ressource main function is called from an other part, who want to know the MAC addr from an ip. it look into the table (arp cache) to find an entry, if he find one, it return the value, else he send a broadcast request in the network and wait for receiving response.
because my system is not multi-threaded, i've only a basic queue: the network driver store incoming packet to an buffer, application can "pool" the buffer to get the packet from the beginning of the queue , if the app it's not interested by this packet , it push it at the end of the queue ("unpool") and can ask for an other packet.
I try to implement DNS,
to do it, i believe that the dns query must be encapsulated into an udp datagram witch is encapsulated into the ip datagram witch is encapsulated into the ethernet datagram. I mus also pay attention to the endianness (byte order) (x86 are little-endian but network packet are big-endian).
in practice i dont get it to work, ... the os in qemy says that the packet is transfered , but i never get a reply from the gateway (qemu emulate also the gateway)
i've displayed an hexadecimal dump of the whole packet frame , i don't see something wrong. i work night and day to resolve the problem unsuccessful
[b]sonicbrit wrote:[/b]
[quote]wow dude thats awesome, just wondering do you do any checks to make sure it resolves its own ip as well as the 127.x.x.x range?
So have you just built the IP part, (I'm presuming since you have ARP running?)
You might want to look into implementing UDP first since it doesnt require guaranteed delivery and all the extra overhead that TCP uses(sending SYN, ACK and keeping a sliding window for packets etc.), and is useful since DNS runs over UDP.[/quote]
i have only a few knowledge about network and you like to have more knowledge as me, maybe can you help me | 2009-01-27 | 6:38 PM |
SonicBrit | Re:working on a new osI've read some of internetworking with TCP IP volume 1, so have some basic understanding of packets and the encapsulation layers.
I've written a mail server in the past (SMTP just basic not the ESMTP stuff and a pop3 server to retrieve the mail) and started work on a DNS server but sadly like most of my projects I lose motivation and never work on it again.
If you send me a hex dump of your packet I'll take a look. | 2009-01-27 | 8:54 PM |
trolly | Re:working on a new osthere is a screen shot with the
hex values from the packet (dns query,dns header,udp header,ip header) [img size=720]http://theguiblog.com/images/fbfiles/images/screendump.png[/img] | 2009-01-27 | 9:35 PM |
SonicBrit | Re:working on a new osjust looking at it quickly here at work
So your sending a udp (11) packet from 10.0.2.123 to 10.0.2.2 (I dont think the fragment bit needs to be set)
Sending from source port 15 to dest port 53
DNS Query Header
Transaction Id 1
Flags 0x100 standard query
Questions 1
Answers 0
Authority 0
Additional 0
DNS Query
Counted String
3 www
6 google
2 be
0 Terminate
Type 1 A Record
Class 1 In
You have an extra byte on the end that isn't needed
But it looks ok I'd try this though
Remove the fragment bit (40 to 0 in the header)
And cut the extra byte in the packet
Not seeing the ethernet packet, I would just add make sure the packet type is 0x800 (IP) not 0x806 (ARP) | 2009-01-28 | 6:01 PM |
Other
2021 Brandon Cornell