www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - PowerNex - My 64bit kernel written in D

reply Wild <xwildn00bx gmail.com> writes:
Hey!

I have recently started working on a 64bit kernel written in only 
D (and a little bit of assembly where it is really needed).
I finally got it to boot today in 64bit mode. All it currently do 
is just print some text and numbers to the screen.

It uses Adam D. Ruppes minimal D runtime, with some small 
modifications.

I have a precompiled ISO here, if anyone wants to try it: 
https://github.com/Vild/PowerNex/releases/tag/v0.0.0-ALPHA

The project is fully opensource and located at 
https://github.com/Vild/PowerNex
I livestream the development of this almost everyday at 
https://livecoding.tv/Wild/

Hopefully someone will find this interesting.
All feedback is appreciated.

//Dan
Nov 17 2015
next sibling parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 18/11/15 12:35 PM, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel written in only D (and
 a little bit of assembly where it is really needed).
 I finally got it to boot today in 64bit mode. All it currently do is
 just print some text and numbers to the screen.

 It uses Adam D. Ruppes minimal D runtime, with some small modifications.

 I have a precompiled ISO here, if anyone wants to try it:
 https://github.com/Vild/PowerNex/releases/tag/v0.0.0-ALPHA

 The project is fully opensource and located at
 https://github.com/Vild/PowerNex
 I livestream the development of this almost everyday at
 https://livecoding.tv/Wild/

 Hopefully someone will find this interesting.
 All feedback is appreciated.

 //Dan
So whats the plan? - 32bit support - ARM support What else?
Nov 17 2015
next sibling parent reply lobo <swamplobo gmail.com> writes:
On Wednesday, 18 November 2015 at 03:04:49 UTC, Rikki Cattermole 
wrote:
 On 18/11/15 12:35 PM, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel written in 
 only D (and
 a little bit of assembly where it is really needed).
 I finally got it to boot today in 64bit mode. All it currently 
 do is
 just print some text and numbers to the screen.

 It uses Adam D. Ruppes minimal D runtime, with some small 
 modifications.

 I have a precompiled ISO here, if anyone wants to try it:
 https://github.com/Vild/PowerNex/releases/tag/v0.0.0-ALPHA

 The project is fully opensource and located at
 https://github.com/Vild/PowerNex
 I livestream the development of this almost everyday at
 https://livecoding.tv/Wild/

 Hopefully someone will find this interesting.
 All feedback is appreciated.

 //Dan
So whats the plan? - 32bit support - ARM support What else?
Well, from the README I'd say the goal is a complete x86-64 OS
 The goal is to have a whole OS written in D, where PowerNex 
 powers the core.
This project looks great and it's not easy writing a x86-64 bootloader even with GRUB and a reference to work from, Nice work! bye, lobo
Nov 17 2015
parent Wild <xwildn00bx gmail.com> writes:
On Wednesday, 18 November 2015 at 06:06:52 UTC, lobo wrote:
 This project looks great and it's not easy writing a x86-64 
 bootloader even with GRUB and a reference to work from, Nice 
 work!
Thanks :D
Nov 18 2015
prev sibling parent reply Wild <xwildn00bx gmail.com> writes:
On Wednesday, 18 November 2015 at 03:04:49 UTC, Rikki Cattermole 
wrote:
 So whats the plan?
 - 32bit support
 - ARM support

 What else?
Well don't have a fixed plan on what I want to implement. I might do 32bit, I have not decided yet, but I think I will skip it. I will not add ARM support because this would require alot more research. Maybe in the future when PowerNex is in a more feature complete state. The long term goal is that userspace programs should be able to use phobos.
Nov 18 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 19/11/15 12:19 AM, Wild wrote:
 On Wednesday, 18 November 2015 at 03:04:49 UTC, Rikki Cattermole wrote:
 So whats the plan?
 - 32bit support
 - ARM support

 What else?
Well don't have a fixed plan on what I want to implement. I might do 32bit, I have not decided yet, but I think I will skip it. I will not add ARM support because this would require alot more research. Maybe in the future when PowerNex is in a more feature complete state. The long term goal is that userspace programs should be able to use phobos.
Ahh neato. Will you being going down the path of libc/posix compat layer or straight up D all the way?
Nov 18 2015
parent reply Wild <xwildn00bx gmail.com> writes:
On Wednesday, 18 November 2015 at 11:20:58 UTC, Rikki Cattermole 
wrote:
 Will you being going down the path of libc/posix compat layer 
 or straight up D all the way?
I want to go D all the way. But if I have to get a libc, I will try and implement one in D.
Nov 18 2015
next sibling parent karabuta <karabutaworld gmail.com> writes:
On Wednesday, 18 November 2015 at 11:25:55 UTC, Wild wrote:
 On Wednesday, 18 November 2015 at 11:20:58 UTC, Rikki 
 Cattermole wrote:
 Will you being going down the path of libc/posix compat layer 
 or straight up D all the way?
I want to go D all the way. But if I have to get a libc, I will try and implement one in D.
Cool. Really cool!!
Nov 18 2015
prev sibling parent James Larkby-Lahet <definitely.not.james xomb.org> writes:
On Wednesday, 18 November 2015 at 11:25:55 UTC, Wild wrote:
 On Wednesday, 18 November 2015 at 11:20:58 UTC, Rikki 
 Cattermole wrote:
 Will you being going down the path of libc/posix compat layer 
 or straight up D all the way?
I want to go D all the way. But if I have to get a libc, I will try and implement one in D.
it is possible to implement libC on top of your code standard library in D so that D-only applications don't rely on legacy C code. Newlib is a portable libC implementation that is relatively easy (the linker errors might take you longer to sort than the code :) to get going. initially we implemented its '13 system calls' in C: https://github.com/wolfwood/buildtools/blob/xomb/newlib-files/syscalls.c but we eventually moved most of that code into D: https://github.com/wolfwood/xomb/blob/unborn/user/c/cbindings.d obviously most of the details will be different for your OS.
Nov 22 2015
prev sibling next sibling parent reply Luis <luis.panadero gmail.com> writes:
On Tuesday, 17 November 2015 at 23:35:58 UTC, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel written in 
 only D (and a little bit of assembly where it is really needed).
 I finally got it to boot today in 64bit mode. All it currently 
 do is just print some text and numbers to the screen.

 It uses Adam D. Ruppes minimal D runtime, with some small 
 modifications.

 I have a precompiled ISO here, if anyone wants to try it: 
 https://github.com/Vild/PowerNex/releases/tag/v0.0.0-ALPHA

 The project is fully opensource and located at 
 https://github.com/Vild/PowerNex
 I livestream the development of this almost everyday at 
 https://livecoding.tv/Wild/

 Hopefully someone will find this interesting.
 All feedback is appreciated.

 //Dan
Nice! https://github.com/Vild/PowerNex/blob/master/kernel/src/io/textmode.d#L64 not should be "cast(slot[w*h] *)" ?
Nov 18 2015
parent Wild <xwildn00bx gmail.com> writes:
On Wednesday, 18 November 2015 at 09:31:04 UTC, Luis wrote:
 Nice!

 https://github.com/Vild/PowerNex/blob/master/kernel/src/io/textmode.d#L64 not
should be "cast(slot[w*h] *)" ?
Fixed and pushed, Thanks!
Nov 18 2015
prev sibling parent reply Piotrek <nodata nodata.pl> writes:
On Tuesday, 17 November 2015 at 23:35:58 UTC, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel ...
Hi, Good to see more work in the OS area. I am even more happy there is more developers interested in GUI stuff. I have one fundamental question though: Is it possible for you to pick the Boost license (especially for libs)? This is my general concern for all libs developed by the D community. IMO license other than Boost is very cumbersome and doesn't comply with the D core libs. Piotrek
Nov 21 2015
next sibling parent reply cym13 <cpicard openmailbox.org> writes:
On Saturday, 21 November 2015 at 11:34:57 UTC, Piotrek wrote:
 This is my general concern for all libs developed by the D 
 community. IMO license other than Boost is very cumbersome and 
 doesn't comply with the D core libs.
Just re-read the boost license and it says nothing about incompatibility with other libraries written in other licenses. How would it be a problem then that the D core libs are licensed with boost and this program isn't? Heck, even the GPL is compatible! http://www.gnu.org/licenses/license-list.html#boost
Nov 22 2015
parent Piotrek <nodata nodata.pl> writes:
On Sunday, 22 November 2015 at 21:05:29 UTC, cym13 wrote:
 Heck, even the GPL is compatible! 
 http://www.gnu.org/licenses/license-list.html#boost
Hi, No. It isn't. It is the other way around "Boost Software License ... is compatible with the GNU GPL.". But GPL is not compatible with the Boost license. Piotrek
Nov 25 2015
prev sibling next sibling parent reply Wild <xwildn00bx gmail.com> writes:
On Saturday, 21 November 2015 at 11:34:57 UTC, Piotrek wrote:
 On Tuesday, 17 November 2015 at 23:35:58 UTC, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel ...
Hi, Good to see more work in the OS area. I am even more happy there is more developers interested in GUI stuff. I have one fundamental question though: Is it possible for you to pick the Boost license (especially for libs)? This is my general concern for all libs developed by the D community. IMO license other than Boost is very cumbersome and doesn't comply with the D core libs. Piotrek
Like cym13 said, there should not be any problems with the MPLv2 license. MPLv2 is basically LGPL but at a file level and it won't "infect" any other files. My code can included in any close source projects. The only thing is that if any of my files are changed, those changes need to published. - Dan
Nov 25 2015
parent reply Piotrek <nodata nodata.pl> writes:
On Wednesday, 25 November 2015 at 14:44:09 UTC, Wild wrote:
 On Saturday, 21 November 2015 at 11:34:57 UTC, Piotrek wrote:
 On Tuesday, 17 November 2015 at 23:35:58 UTC, Wild wrote:
 Hey!

 I have recently started working on a 64bit kernel ...
Hi, Good to see more work in the OS area. I am even more happy there is more developers interested in GUI stuff. I have one fundamental question though: Is it possible for you to pick the Boost license (especially for libs)? This is my general concern for all libs developed by the D community. IMO license other than Boost is very cumbersome and doesn't comply with the D core libs. Piotrek
Like cym13 said, there should not be any problems with the MPLv2 license. MPLv2 is basically LGPL but at a file level and it won't "infect" any other files. My code can included in any close source projects. The only thing is that if any of my files are changed, those changes need to published. - Dan
Hi, No worries :) Feel free to use whatever license you want. It is your code. However my point was that the code released with license other than Boost (or similar) cannot be included in Phobos. That's one thing. The second is, non liberal licenses put burden on commercial adoption and put risk on legal actions. I know that from the employee POV who worked for many corporations and was obliged to follow the rules. The bottom line is that viral licenses (with varying aggressiveness) are in opposition to business. Yes, I know GPL is used by companies but the cost is high. To use analogy: you can live with viruses, but you need money for medicines. BTW. Sorry if I sounded to harsh and forgive me stealing your announcement for my propaganda ;) I'll try to figure out a way to present my ideas in proper way before I have to many enemies. Piotrek
Nov 25 2015
parent reply Wild <xwildn00bx gmail.com> writes:
On Wednesday, 25 November 2015 at 16:18:56 UTC, Piotrek wrote:
 Hi,

 No worries :) Feel free to use whatever license you want. It is 
 your code.

 However my point was that the code released with license other 
 than  Boost (or similar) cannot be included in Phobos. That's 
 one thing. The second is, non liberal licenses put burden on 
 commercial adoption and put risk on legal actions. I know that 
 from the employee POV who worked for many corporations and was 
 obliged to follow the rules.

 The bottom line is that viral licenses (with varying 
 aggressiveness) are in opposition to business. Yes, I know GPL 
 is used by companies but the cost is high. To use analogy: you 
 can live with viruses, but you need money for medicines.

 BTW. Sorry if I sounded to harsh and forgive me stealing your 
 announcement for my propaganda ;) I'll try to figure out a way 
 to present my ideas in proper way before I have to many enemies.

 Piotrek
No offense taken. It's important for a project to have a fitting license. I chose MPLv2 because I like the code to be free like BSD, for it to be able to be located in all sorts of project, but I still want the code to remain open source. I will maybe change the license in the future, if needed. But currently I don't see a reason to do it. - Dan
Nov 25 2015
parent John Colvin <john.loughran.colvin gmail.com> writes:
On Wednesday, 25 November 2015 at 18:06:45 UTC, Wild wrote:
 On Wednesday, 25 November 2015 at 16:18:56 UTC, Piotrek wrote:
 Hi,

 No worries :) Feel free to use whatever license you want. It 
 is your code.

 However my point was that the code released with license other 
 than  Boost (or similar) cannot be included in Phobos. That's 
 one thing. The second is, non liberal licenses put burden on 
 commercial adoption and put risk on legal actions. I know that 
 from the employee POV who worked for many corporations and was 
 obliged to follow the rules.

 The bottom line is that viral licenses (with varying 
 aggressiveness) are in opposition to business. Yes, I know GPL 
 is used by companies but the cost is high. To use analogy: you 
 can live with viruses, but you need money for medicines.

 BTW. Sorry if I sounded to harsh and forgive me stealing your 
 announcement for my propaganda ;) I'll try to figure out a way 
 to present my ideas in proper way before I have to many 
 enemies.

 Piotrek
No offense taken. It's important for a project to have a fitting license. I chose MPLv2 because I like the code to be free like BSD, for it to be able to be located in all sorts of project, but I still want the code to remain open source. I will maybe change the license in the future, if needed. But currently I don't see a reason to do it. - Dan
For phobos contributions it doesn't really matter what licence the code previously had as long as you can give permission for it to be used, which is easy if you're the only author. The difficulty comes when you have many authors over many years and you need to get all their permissions.
Nov 26 2015
prev sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Saturday, 21 November 2015 at 11:34:57 UTC, Piotrek wrote:
 Is it possible for you to pick the Boost license (especially 
 for libs)?
Honestly, if I were to urge anything (I don't really feel like doing so), I would urge the opposite. If the experience of Linux versus other free/open-source operating systems is anything to go by, it matters that an operating system kernel is strong copyleft. Boost is absolutely the right choice of license for druntime and phobos because of their use-cases, but that doesn't mean that it's the right choice for all D code. Dan/Wild: congratulations on a cool project, it will be fun to see what comes of this :-)
Nov 25 2015