Choosing a license

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
Espanish
Posts: 24
Joined: Fri Nov 21, 2014 6:30 am

Choosing a license

Post by Espanish »

I have read the Wiki page on [Licensing].
I am aware that code in the Wiki is licensed as [CC0].

However, neither Bran Friesen's nor James Molloy's tutorials make any mention of the license they use.
So considering I use (modified) code from both tutorials and also the Wiki, what license can I use for my own work?

I want to use something that will allow people to reuse my code and binaries however they want.
Currently I am considering CC0 or Expat, if those are possible to use in this case.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Choosing a license

Post by Kevin »

If you don't have an explicit license to use some code, that doesn't mean that you can do what you want. The copyright law applies, which varies by country, but essentially means that without permission of the copyright holder you can't do anything with the code (except reading it).

I seem to remember that James once gave a very permissive license for all of his tutorial code, but I don't remember the details. I don't know about the other tutorial.

In any case, it's better to understand what needs to be done and write the code to do it all by yourself.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Choosing a license

Post by sortie »

It would defeat the purpose if you couldn't use the tutorial code as your own.

In these cases, please completely disregard those tutorials. The code isn't that good. They are old and do not contain any of the experience the community has learned over the past years, they'll give you trouble and bad advise. I suggest you read http://wiki.osdev.org/Bran%27s_Known_Bugs and http://wiki.osdev.org/James_Molloy%27s_ ... Known_Bugs to undo the damage that may have occurred. The osdev wiki may not be a complete replacement for those tutorials, if that is the case, please notify me what you would like to see, and I'll write a wiki article on the matter.
User avatar
Espanish
Posts: 24
Joined: Fri Nov 21, 2014 6:30 am

Re: Choosing a license

Post by Espanish »

Kevin wrote:I seem to remember that James once gave a very permissive license for all of his tutorial code, but I don't remember the details. I don't know about the other tutorial.
I have sent JamesM a PM asking about the license, waiting for a reply.
Kevin wrote:In any case, it's better to understand what needs to be done and write the code to do it all by yourself.
For simple things like printing colored text, that's not so difficult, and even I could do it on my own.
However when it gets to loading the GDT and IDT and generating the code for IRQ's and ISR's, that's suddenly nasty. And it feels like reinventing the wheel, together with small things like the linker.ld script. So honestly I just copy-pasted those parts.
sortie wrote:It would defeat the purpose if you couldn't use the tutorial code as your own.
Indeed, it would. However the tutorial code should have a license to clarify how it can be reused.
sortie wrote:In these cases, please completely disregard those tutorials. The code isn't that good. They are old and do not contain any of the experience the community has learned over the past years, they'll give you trouble and bad advise. I suggest you read http://wiki.osdev.org/Bran%27s_Known_Bugs and http://wiki.osdev.org/James_Molloy%27s_ ... Known_Bugs to undo the damage that may have occurred.
Thank you for the links.
Regarding possible bugs, I had to fix the linker.ld script to prevent Grub from giving Error 13, but I'm not sure if that's a bug in the original Molloy tutorial or in an early Grub which I was using (pre 0.97). If nobody else had this problem then it's probably just me.
sortie wrote:The osdev wiki may not be a complete replacement for those tutorials, if that is the case, please notify me what you would like to see, and I'll write a wiki article on the matter.
I will just say that setting up the GDT and IDT feels like homework more than anything else.
There's a discussion to be had about why (not) to use bit fields in the GDT, but for actually loading it it's better to just copy-paste somebody else's tested code, IMO.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Choosing a license

Post by Kevin »

Espanish wrote:However when it gets to loading the GDT and IDT and generating the code for IRQ's and ISR's, that's suddenly nasty. And it feels like reinventing the wheel, together with small things like the linker.ld script. So honestly I just copy-pasted those parts.
OS development is all about reinventing the wheel. Otherwise you could just take a Linux kernel.

Also, failing to understand the code you use in your OS means that you won't be able to debug it.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
Espanish
Posts: 24
Joined: Fri Nov 21, 2014 6:30 am

Re: Choosing a license

Post by Espanish »

Kevin wrote:OS development is all about reinventing the wheel. Otherwise you could just take a Linux kernel.
"Reinventing the wheel" in this case is just an expression for "rewriting the same code".
I can think of my own unique way to print colored text, but not to load the GDT.
Kevin wrote:Also, failing to understand the code you use in your OS means that you won't be able to debug it.
True, but that's only if I have to debug it. If it's well-tested by at least one knowledgeable person (the tutorial author) then it's likely that I won't have problems with it, and I can focus on creatively reinventing the wheel and pursuing my own goals.

As for the topic of this thread, I don't mind if it's slowly derailed. However, I'd like to hear from others who have been in my situation, with the licenses and following the above tutorials.
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: Choosing a license

Post by eryjus »

Espanish wrote:True, but that's only if I have to debug it.
You will.
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: Choosing a license

Post by Kazinsal »

Espanish wrote:If it's well-tested by at least one knowledgeable person (the tutorial author) [...]
There's a reason we're not advocating use of those tutorials anymore.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: Choosing a license

Post by Kevin »

Espanish wrote:I can think of my own unique way to print colored text, but not to load the GDT.
Only shows that you still got a bit to learn about the GDT. (If there weren't more than one way to fill it, it wouldn't exist.)
If it's well-tested by at least one knowledgeable person (the tutorial author) then it's likely that I won't have problems with it, and I can focus on creatively reinventing the wheel and pursuing my own goals.
Chances are that you'll have to modify this code at some point in order to implement your own goals.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Choosing a license

Post by sortie »

Espanish wrote:I will just say that setting up the GDT and IDT feels like homework more than anything else. There's a discussion to be had about why (not) to use bit fields in the GDT, but for actually loading it it's better to just copy-paste somebody else's tested code, IMO.
Yes, by all means use somebody's else GDT code. For instance, use mine! My point is that these tutorials have copy-pasted that same GDT code from other tutorials, and everyone uses this code. There is no improvement going on, everyone has the same crappy GDT code. Obvious improvements include initializing it at compile time rather than with code, loading the GDT in the bootstrap assembly immediately, and so on. That's my problem with these tutorials, there is no improvement or community-based improvement going on.
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: Choosing a license

Post by Antti »

@sortie: What is your "struct gdt_entry gdt[]" guaranteed alignment? Is it 2 (uint16_t) or 8 (struct gdt_entry)? This is an honest question because I am not sure what the standard says here. This same applies to IDT.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Choosing a license

Post by sortie »

Antti wrote:@sortie: What is your "struct gdt_entry gdt[]" guaranteed alignment? Is it 2 (uint16_t) or 8 (struct gdt_entry)? This is an honest question because I am not sure what the standard says here. This same applies to IDT.
The alignment is at least the alignment of all the struct members. I expect it to be 2-byte aligned as uint16_t is the largest. I realize now that might not be good enough. I'll check the manual.
User avatar
Espanish
Posts: 24
Joined: Fri Nov 21, 2014 6:30 am

Re: Choosing a license

Post by Espanish »

Still waiting for JamesM to reply, but seeing as his last activity was April this year, I'm not holding my breath.
Also I find it curious that he didn't fix his tutorial code despite of the Wiki page dedicated to it.
Post Reply