Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2022 21:10:08 +0300
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Aryeh Friedman <aryeh.friedman@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:  <CAOgwaMvYk3n_5hxvXvbXZweT%2B4fETm9mN=CCq0ss=UicvDZ3Eg@mail.gmail.com>
In-Reply-To: <CAGBxaXmYnTr2THmOXkNGpLS_EFcPjyLST81PHWk8Oy1vgOVkTg@mail.gmail.com>
References:  <CAGBxaXmJYkiAP99RvjMkyOUqz9=BzNOTjTiQgf7EppRw2KfmHQ@mail.gmail.com> <6B196318-29A4-479B-BC12-99EBBB69397E@iitbombay.org> <CAOgwaMvYfpshBtu0JcBS07T4q4Wr5m%2BwzjE3N3GBVSqZ0LmjXg@mail.gmail.com> <CAGBxaXmYnTr2THmOXkNGpLS_EFcPjyLST81PHWk8Oy1vgOVkTg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000005f59f605d5b6f458
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 16, 2022 at 8:59 PM Aryeh Friedman <aryeh.friedman@gmail.com>
wrote:

> 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 ca=
n
> meet the design requirements I have in mind.
>
>

If you say this , it is understood that you are on the correct path .
Please continue .
My understanding was based on your  "(mostly for fun)"  phrase.
I beg your pardon .



With my best wishes for all , and additionally success in your efforts .

Mehmet Erol Sanliturk








> 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 =E2=80=9Clegacy=
=E2=80=9D booting
>>> requires jumping through a few more hoops. Another suggestion is to che=
ck
>>> 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:
>>>
>>> =EF=BB=BF
>>> I want to develop a OS completely from scratch, i.e. starting with the
>>> first instruction encountered after POST and everything above it (mostl=
y
>>> 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 abo=
ut
>>> 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 possibl=
e
>> .
>>
>> 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
>

--0000000000005f59f605d5b6f458
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:tahoma,sans-serif;font-size:large"><br></div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 16, 2022=
 at 8:59 PM Aryeh Friedman &lt;<a href=3D"mailto:aryeh.friedman@gmail.com">=
aryeh.friedman@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex"><div dir=3D"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></blockquote><div><br></div><div><br></div><div><div st=
yle=3D"font-family:tahoma,sans-serif;font-size:large" class=3D"gmail_defaul=
t">If you say this , it is understood that you are on the correct path .</d=
iv><div style=3D"font-family:tahoma,sans-serif;font-size:large" class=3D"gm=
ail_default">Please continue .</div><div style=3D"font-family:tahoma,sans-s=
erif;font-size:large" class=3D"gmail_default">My understanding was based on=
 your=C2=A0 &quot;(mostly for fun)&quot;=C2=A0 phrase.</div><div style=3D"f=
ont-family:tahoma,sans-serif;font-size:large" class=3D"gmail_default">I beg=
 your pardon .</div><div style=3D"font-family:tahoma,sans-serif;font-size:l=
arge" class=3D"gmail_default"><br></div><div style=3D"font-family:tahoma,sa=
ns-serif;font-size:large" class=3D"gmail_default"><br></div><div style=3D"f=
ont-family:tahoma,sans-serif;font-size:large" class=3D"gmail_default"><div =
style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div><div styl=
e=3D"font-family:tahoma,sans-serif;font-size:large">With my best wishes for=
 all , and additionally success in your efforts .<br></div><div style=3D"fo=
nt-family:tahoma,sans-serif;font-size:large"><br></div><div style=3D"font-f=
amily:tahoma,sans-serif;font-size:large">Mehmet Erol Sanliturk<br></div><br=
><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:large" cla=
ss=3D"gmail_default"><br></div><br></div><div><br></div><div><br></div><div=
>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 16, 2022=
 at 11:13 AM Mehmet Erol Sanliturk &lt;<a href=3D"mailto:m.e.sanliturk@gmai=
l.com" target=3D"_blank">m.e.sanliturk@gmail.com</a>&gt; wrote:<br></div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=
=3D"ltr"><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br><=
/div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div=
><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div></d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On =
Sat, Jan 15, 2022 at 1:54 PM Bakul Shah &lt;<a href=3D"mailto:bakul@iitbomb=
ay.org" target=3D"_blank">bakul@iitbombay.org</a>&gt; wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:=
1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div dir=3D"=
ltr"></div><div dir=3D"ltr">You may be better off using qemu, at least init=
ially as =E2=80=9Clegacy=E2=80=9D booting requires jumping through a few mo=
re hoops. Another suggestion is to check out <a href=3D"http://wiki.osdev.o=
rg" target=3D"_blank">wiki.osdev.org</a>. There are a lot of useful resourc=
es on this site.</div><div dir=3D"ltr"><br><blockquote type=3D"cite">On Jan=
 15, 2022, at 1:29 AM, Aryeh Friedman &lt;<a href=3D"mailto:aryeh.friedman@=
gmail.com" target=3D"_blank">aryeh.friedman@gmail.com</a>&gt; wrote:<br><br=
></blockquote></div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<di=
v dir=3D"ltr"><div>I want to develop a OS completely from scratch, i.e. sta=
rting with the first instruction encountered after POST and everything abov=
e it (mostly for fun).</div><div><br></div><div>I want to use bhyve to do t=
his 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&#39;s about as far as I have gotten).<br>=
</div><div><div><br>-- <br><div dir=3D"ltr"><div dir=3D"ltr">Aryeh M. Fried=
man, Lead Developer, <a href=3D"http://www.PetiteCloud.org" target=3D"_blan=
k">http://www.PetiteCloud.org</a></div></div></div></div></div></div></bloc=
kquote></div></blockquote><div><br></div><div><br></div><div><div style=3D"=
font-family:tahoma,sans-serif;font-size:large">Dear Aryeh ,</div><br></div>=
<div><br></div><div><a href=3D"https://wiki.osdev.org/Required_Knowledge" t=
arget=3D"_blank">https://wiki.osdev.org/Required_Knowledge</a></div><div><b=
r></div><div><div style=3D"font-family:tahoma,sans-serif;font-size:large">F=
rom the beginning of above page :</div><div style=3D"font-family:tahoma,san=
s-serif;font-size:large"><br></div><div style=3D"font-family:tahoma,sans-se=
rif;font-size:large">&quot;</div>Required Knowledge<br><br>If you think you=
 can skip this, it&#39;s probably just for you.<br><br>Writing an OS is not=
 a beginner&#39;s task. <br>In fact, writing an OS is usually considered th=
e most difficult programming task. <br>You will need above-average programm=
ing skills before even considering <br>a project like this. <span class=3D"=
gmail_default" style=3D"font-family:tahoma,sans-serif;font-size:large"> ...=
..</span><br><div style=3D"font-family:tahoma,sans-serif;font-size:large">&=
quot;</div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br=
></div><div style=3D"font-family:tahoma,sans-serif;font-size:large">If you =
want to take such a difficult road to pursue , you may do the following :</=
div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div>=
<div style=3D"font-family:tahoma,sans-serif;font-size:large">Study the bug =
reports , or GSOC projects , or projects to be handled by the</div><div sty=
le=3D"font-family:tahoma,sans-serif;font-size:large">FreeBSD Foundation <br=
></div><div style=3D"font-family:tahoma,sans-serif;font-size:large">( or if=
 you want more difficult problems , please search my mailing list messages =
<br></div><div style=3D"font-family:tahoma,sans-serif;font-size:large">to s=
ee &quot;crazy&quot; ideas , or please ask me &quot;Do you have more crazy =
ideas ?&quot; . <br></div><div style=3D"font-family:tahoma,sans-serif;font-=
size:large">You may be sure that I can find much &quot;more crazy&quot; ide=
as for you based on my goal to write</div><div style=3D"font-family:tahoma,=
sans-serif;font-size:large">a NEW operating system mainly based on FreeBSD =
, but from SCRATCH for</div><div style=3D"font-family:tahoma,sans-serif;fon=
t-size:large">( not &quot;Very&quot; but ) &quot;Large scale software stack=
s (=C2=A0 distributed , expert system based</div><div style=3D"font-family:=
tahoma,sans-serif;font-size:large">meaning learning=C2=A0 , etc ... . ) )</=
div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div>=
<div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div><div=
 style=3D"font-family:tahoma,sans-serif;font-size:large">If you confine you=
r works on FreeBSD , if you want to be able to solve its current problems ,=
 <br></div><div style=3D"font-family:tahoma,sans-serif;font-size:large">thi=
s will mean that you are knowing how to write an OS because you are knowing=
</div><div style=3D"font-family:tahoma,sans-serif;font-size:large">the Free=
BSD very well and are able to modify it toward a more mature state .<br></d=
iv><div style=3D"font-family:tahoma,sans-serif;font-size:large">At the end =
you will gain and FreeBSD will gain .<br></div><div style=3D"font-family:ta=
homa,sans-serif;font-size:large"><br></div><div style=3D"font-family:tahoma=
,sans-serif;font-size:large"><br></div><div style=3D"font-family:tahoma,san=
s-serif;font-size:large">A few suggestions :</div><div style=3D"font-family=
:tahoma,sans-serif;font-size:large"><br></div><div style=3D"font-family:tah=
oma,sans-serif;font-size:large">(1) Make a list of &quot;panic&quot; points=
 .</div><div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=
=C2=A0=C2=A0=C2=A0 Eliminate as many of them as possible to protect the OS =
from crashing by determining</div><div style=3D"font-family:tahoma,sans-ser=
if;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0 whether the next application s=
tep will cause a panic or not ( check panic conditions</div><div style=3D"f=
ont-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0 befo=
re entering the next step ) and do not enter into it but return safely back=
 by taking</div><div style=3D"font-family:tahoma,sans-serif;font-size:large=
">=C2=A0=C2=A0=C2=A0=C2=A0 necessary actions other than &quot;panic&quot; .=
</div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></di=
v><div style=3D"font-family:tahoma,sans-serif;font-size:large">(2) At prese=
nt many device behaviors are encoded into kernel related routines <br></div=
><div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=
=C2=A0=C2=A0 such as internal tables , constants , etc. .<br></div><div sty=
le=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=
=A0 Design a device definition=C2=A0 *.XML file format and move these inter=
nal definitions <br></div><div style=3D"font-family:tahoma,sans-serif;font-=
size:large">=C2=A0=C2=A0=C2=A0=C2=A0 into these files with file names gener=
ated from device characteristics .</div><div style=3D"font-family:tahoma,sa=
ns-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0 For the detected existin=
g devices and newly attached devices , generate the file <br></div><div sty=
le=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=
=A0 name and search that file . If it exists , load it , else give a suitab=
le error message .</div><div style=3D"font-family:tahoma,sans-serif;font-si=
ze:large">=C2=A0=C2=A0=C2=A0=C2=A0 This allows to add new devices by the us=
ers by using device producing company <br></div><div style=3D"font-family:t=
ahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0 supplied=C2=A0=
=C2=A0=C2=A0 device definitions=C2=A0 , or device definitions without requi=
rement of</div><div style=3D"font-family:tahoma,sans-serif;font-size:large"=
>=C2=A0 =C2=A0=C2=A0 modifications of kernel related sources=C2=A0 .</div><=
div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=
=A0=C2=A0 One more step would be to allow user supplied ( not &quot;root&qu=
ot; supplied ) device definitions</div><div style=3D"font-family:tahoma,san=
s-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0 and its associated device=
 drivers loaded from userland .</div><div style=3D"font-family:tahoma,sans-=
serif;font-size:large"><br></div><div style=3D"font-family:tahoma,sans-seri=
f;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Such a system will be a v=
ery easy structure for the device producing companies</div><div style=3D"fo=
nt-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 because already they have device driver software , it is very easy to gene=
rate a</div><div style=3D"font-family:tahoma,sans-serif;font-size:large">=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 device definition . The users will be able t=
o use these devices easily by only</div><div style=3D"font-family:tahoma,sa=
ns-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 attaching the devi=
ce , storing its device driver and definition file into her / his space .</=
div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div>=
<div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 This will attract the companies to be interested in Free=
BSD , and produce more</div><div style=3D"font-family:tahoma,sans-serif;fon=
t-size:large">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 such drivers , definitions .</=
div><div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 This will increase number of possible FreeBSD users n=
ow repelled back due to difficulty of</div><div style=3D"font-family:tahoma=
,sans-serif;font-size:large">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 use of the devi=
ces or complete lack of their associated software parts , by solving</div><=
div style=3D"font-family:tahoma,sans-serif;font-size:large">=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 their problems .<br></div><div style=3D"font-family:tahoma,=
sans-serif;font-size:large"><br></div><div style=3D"font-family:tahoma,sans=
-serif;font-size:large"><br></div><div style=3D"font-family:tahoma,sans-ser=
if;font-size:large">It is possible to define many more improvement points .=
</div><div style=3D"font-family:tahoma,sans-serif;font-size:large"><br></di=
v><div style=3D"font-family:tahoma,sans-serif;font-size:large">If present p=
roblems are handled , they will inspire many new improvement points <br></d=
iv><div style=3D"font-family:tahoma,sans-serif;font-size:large">which means=
 you may continue to contribute to FreeBSD as much as possible .</div><div =
style=3D"font-family:tahoma,sans-serif;font-size:large"><br></div><div styl=
e=3D"font-family:tahoma,sans-serif;font-size:large">This will supply what y=
ou want to do and its very pleasing happiness ( with respect to my</div><di=
v style=3D"font-family:tahoma,sans-serif;font-size:large">understanding of =
your intentions ) .<br></div><div style=3D"font-family:tahoma,sans-serif;fo=
nt-size:large"><br></div><div style=3D"font-family:tahoma,sans-serif;font-s=
ize:large"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:=
large"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:larg=
e">With my best wishes for all ,</div><div style=3D"font-family:tahoma,sans=
-serif;font-size:large"><br></div><div style=3D"font-family:tahoma,sans-ser=
if;font-size:large">Mehmet Erol Sanliturk<br></div><div style=3D"font-famil=
y:tahoma,sans-serif;font-size:large"></div><br><br></div><div><br></div><di=
v><br></div><div>=C2=A0</div></div></div>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr"><div dir=
=3D"ltr">Aryeh M. Friedman, Lead Developer, <a href=3D"http://www.PetiteClo=
ud.org" target=3D"_blank">http://www.PetiteCloud.org</a><br></div></div>;
</blockquote></div></div>

--0000000000005f59f605d5b6f458--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMvYk3n_5hxvXvbXZweT%2B4fETm9mN=CCq0ss=UicvDZ3Eg>