Date: Sun, 16 Jan 2022 12:59:00 -0500 From: Aryeh Friedman <aryeh.friedman@gmail.com> To: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> Cc: Bakul Shah <bakul@iitbombay.org>, "freebsd-virtualization@freebsd.org" <virtualization@freebsd.org> Subject: Re: Using bhyve to develop and OS -- tips on how? Message-ID: <CAGBxaXmYnTr2THmOXkNGpLS_EFcPjyLST81PHWk8Oy1vgOVkTg@mail.gmail.com> In-Reply-To: <CAOgwaMvYfpshBtu0JcBS07T4q4Wr5m%2BwzjE3N3GBVSqZ0LmjXg@mail.gmail.com> References: <CAGBxaXmJYkiAP99RvjMkyOUqz9=BzNOTjTiQgf7EppRw2KfmHQ@mail.gmail.com> <6B196318-29A4-479B-BC12-99EBBB69397E@iitbombay.org> <CAOgwaMvYfpshBtu0JcBS07T4q4Wr5m%2BwzjE3N3GBVSqZ0LmjXg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] It was/is off topic to discuss the motivations on the design I have in mind but after thinking for it over 10 years (and using FreeBSD to build a IaaS around bhyve) I have come to the conclusion that *NO* existing OS can meet the design requirements I have in mind. On Sun, Jan 16, 2022 at 11:13 AM Mehmet Erol Sanliturk < m.e.sanliturk@gmail.com> wrote: > > > > > On Sat, Jan 15, 2022 at 1:54 PM Bakul Shah <bakul@iitbombay.org> wrote: > >> You may be better off using qemu, at least initially as “legacy” booting >> requires jumping through a few more hoops. Another suggestion is to check >> out wiki.osdev.org. There are a lot of useful resources on this site. >> >> On Jan 15, 2022, at 1:29 AM, Aryeh Friedman <aryeh.friedman@gmail.com> >> wrote: >> >> >> I want to develop a OS completely from scratch, i.e. starting with the >> first instruction encountered after POST and everything above it (mostly >> for fun). >> >> I want to use bhyve to do this any tips on how to get started (I have >> found a few tutorials on how to do the asm part of a MBR but that's about >> as far as I have gotten). >> >> -- >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org >> >> > > Dear Aryeh , > > > https://wiki.osdev.org/Required_Knowledge > > From the beginning of above page : > > " > Required Knowledge > > If you think you can skip this, it's probably just for you. > > Writing an OS is not a beginner's task. > In fact, writing an OS is usually considered the most difficult > programming task. > You will need above-average programming skills before even considering > a project like this. ..... > " > > If you want to take such a difficult road to pursue , you may do the > following : > > Study the bug reports , or GSOC projects , or projects to be handled by the > FreeBSD Foundation > ( or if you want more difficult problems , please search my mailing list > messages > to see "crazy" ideas , or please ask me "Do you have more crazy ideas ?" . > You may be sure that I can find much "more crazy" ideas for you based on > my goal to write > a NEW operating system mainly based on FreeBSD , but from SCRATCH for > ( not "Very" but ) "Large scale software stacks ( distributed , expert > system based > meaning learning , etc ... . ) ) > > > If you confine your works on FreeBSD , if you want to be able to solve its > current problems , > this will mean that you are knowing how to write an OS because you are > knowing > the FreeBSD very well and are able to modify it toward a more mature state > . > At the end you will gain and FreeBSD will gain . > > > A few suggestions : > > (1) Make a list of "panic" points . > Eliminate as many of them as possible to protect the OS from crashing > by determining > whether the next application step will cause a panic or not ( check > panic conditions > before entering the next step ) and do not enter into it but return > safely back by taking > necessary actions other than "panic" . > > (2) At present many device behaviors are encoded into kernel related > routines > such as internal tables , constants , etc. . > Design a device definition *.XML file format and move these internal > definitions > into these files with file names generated from device > characteristics . > For the detected existing devices and newly attached devices , > generate the file > name and search that file . If it exists , load it , else give a > suitable error message . > This allows to add new devices by the users by using device producing > company > supplied device definitions , or device definitions without > requirement of > modifications of kernel related sources . > One more step would be to allow user supplied ( not "root" supplied ) > device definitions > and its associated device drivers loaded from userland . > > Such a system will be a very easy structure for the device producing > companies > because already they have device driver software , it is very easy > to generate a > device definition . The users will be able to use these devices > easily by only > attaching the device , storing its device driver and definition file > into her / his space . > > This will attract the companies to be interested in FreeBSD , and > produce more > such drivers , definitions . > This will increase number of possible FreeBSD users now repelled > back due to difficulty of > use of the devices or complete lack of their associated software > parts , by solving > their problems . > > > It is possible to define many more improvement points . > > If present problems are handled , they will inspire many new improvement > points > which means you may continue to contribute to FreeBSD as much as possible . > > This will supply what you want to do and its very pleasing happiness ( > with respect to my > understanding of your intentions ) . > > > > With my best wishes for all , > > Mehmet Erol Sanliturk > > > > > > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org [-- Attachment #2 --] <div dir="ltr">It was/is off topic to discuss the motivations on the design I have in mind but after thinking for it over 10 years (and using FreeBSD to build a IaaS around bhyve) I have come to the conclusion that *NO* existing OS can meet the design requirements I have in mind.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 16, 2022 at 11:13 AM Mehmet Erol Sanliturk <<a href="mailto:m.e.sanliturk@gmail.com">m.e.sanliturk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:large"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:large"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 15, 2022 at 1:54 PM Bakul Shah <<a href="mailto:bakul@iitbombay.org" target="_blank">bakul@iitbombay.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr">You may be better off using qemu, at least initially as “legacy” booting requires jumping through a few more hoops. Another suggestion is to check out <a href="http://wiki.osdev.org" target="_blank">wiki.osdev.org</a>. There are a lot of useful resources on this site.</div><div dir="ltr"><br><blockquote type="cite">On Jan 15, 2022, at 1:29 AM, Aryeh Friedman <<a href="mailto:aryeh.friedman@gmail.com" target="_blank">aryeh.friedman@gmail.com</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>I want to develop a OS completely from scratch, i.e. starting with the first instruction encountered after POST and everything above it (mostly for fun).</div><div><br></div><div>I want to use bhyve to do this any tips on how to get started (I have found a few tutorials on how to do the asm part of a MBR but that's about as far as I have gotten).<br></div><div><div><br>-- <br><div dir="ltr"><div dir="ltr">Aryeh M. Friedman, Lead Developer, <a href="http://www.PetiteCloud.org" target="_blank">http://www.PetiteCloud.org</a></div></div></div></div></div></div></blockquote></div></blockquote><div><br></div><div><br></div><div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">Dear Aryeh ,</div><br></div><div><br></div><div><a href="https://wiki.osdev.org/Required_Knowledge" target="_blank">https://wiki.osdev.org/Required_Knowledge</a></div><div><br></div><div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">From the beginning of above page :</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">"</div>Required Knowledge<br><br>If you think you can skip this, it's probably just for you.<br><br>Writing an OS is not a beginner's task. <br>In fact, writing an OS is usually considered the most difficult programming task. <br>You will need above-average programming skills before even considering <br>a project like this. <span class="gmail_default" style="font-family:tahoma,sans-serif;font-size:large"> .....</span><br><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">"</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">If you want to take such a difficult road to pursue , you may do the following :</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">Study the bug reports , or GSOC projects , or projects to be handled by the</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">FreeBSD Foundation <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">( or if you want more difficult problems , please search my mailing list messages <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">to see "crazy" ideas , or please ask me "Do you have more crazy ideas ?" . <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">You may be sure that I can find much "more crazy" ideas for you based on my goal to write</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">a NEW operating system mainly based on FreeBSD , but from SCRATCH for</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">( not "Very" but ) "Large scale software stacks ( distributed , expert system based</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">meaning learning , etc ... . ) )</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">If you confine your works on FreeBSD , if you want to be able to solve its current problems , <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">this will mean that you are knowing how to write an OS because you are knowing</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">the FreeBSD very well and are able to modify it toward a more mature state .<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">At the end you will gain and FreeBSD will gain .<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">A few suggestions :</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">(1) Make a list of "panic" points .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> Eliminate as many of them as possible to protect the OS from crashing by determining</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> whether the next application step will cause a panic or not ( check panic conditions</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> before entering the next step ) and do not enter into it but return safely back by taking</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> necessary actions other than "panic" .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">(2) At present many device behaviors are encoded into kernel related routines <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> such as internal tables , constants , etc. .<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> Design a device definition *.XML file format and move these internal definitions <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> into these files with file names generated from device characteristics .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> For the detected existing devices and newly attached devices , generate the file <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> name and search that file . If it exists , load it , else give a suitable error message .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> This allows to add new devices by the users by using device producing company <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> supplied device definitions , or device definitions without requirement of</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> modifications of kernel related sources .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> One more step would be to allow user supplied ( not "root" supplied ) device definitions</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> and its associated device drivers loaded from userland .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> Such a system will be a very easy structure for the device producing companies</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> because already they have device driver software , it is very easy to generate a</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> device definition . The users will be able to use these devices easily by only</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> attaching the device , storing its device driver and definition file into her / his space .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> This will attract the companies to be interested in FreeBSD , and produce more</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> such drivers , definitions .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> This will increase number of possible FreeBSD users now repelled back due to difficulty of</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> use of the devices or complete lack of their associated software parts , by solving</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"> their problems .<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">It is possible to define many more improvement points .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">If present problems are handled , they will inspire many new improvement points <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">which means you may continue to contribute to FreeBSD as much as possible .</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">This will supply what you want to do and its very pleasing happiness ( with respect to my</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">understanding of your intentions ) .<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">With my best wishes for all ,</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">Mehmet Erol Sanliturk<br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"></div><br><br></div><div><br></div><div><br></div><div> </div></div></div> </blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Aryeh M. Friedman, Lead Developer, <a href="http://www.PetiteCloud.org" target="_blank">http://www.PetiteCloud.org</a><br></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGBxaXmYnTr2THmOXkNGpLS_EFcPjyLST81PHWk8Oy1vgOVkTg>
