Choosing a license
Choosing a license
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.
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.
Re: Choosing a license
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.
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.
Re: Choosing a license
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.
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.
Re: Choosing a license
I have sent JamesM a PM asking about the license, waiting for a reply.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.
For simple things like printing colored text, that's not so difficult, and even I could do it on my own.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.
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.
Indeed, it would. However the tutorial code should have a license to clarify how it can be reused.sortie wrote:It would defeat the purpose if you couldn't use the tutorial code as your own.
Thank you for the links.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.
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.
I will just say that setting up the GDT and IDT feels like homework more than anything else.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.
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.
Re: Choosing a license
OS development is all about reinventing the wheel. Otherwise you could just take a Linux kernel.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.
Also, failing to understand the code you use in your OS means that you won't be able to debug it.
Re: Choosing a license
"Reinventing the wheel" in this case is just an expression for "rewriting the same code".Kevin wrote:OS development is all about reinventing the wheel. Otherwise you could just take a Linux kernel.
I can think of my own unique way to print colored text, but not to load the GDT.
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.Kevin wrote:Also, failing to understand the code you use in your OS means that you won't be able to debug it.
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.
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Re: Choosing a license
You will.Espanish wrote:True, but that's only if I have to debug it.
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
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
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Choosing a license
There's a reason we're not advocating use of those tutorials anymore.Espanish wrote:If it's well-tested by at least one knowledgeable person (the tutorial author) [...]
Re: Choosing a license
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.)Espanish wrote:I can think of my own unique way to print colored text, but not to load the GDT.
Chances are that you'll have to modify this code at some point in order to implement your own goals.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.
Re: Choosing a license
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.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.
Re: Choosing a license
@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.
Re: Choosing a license
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.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.
Re: Choosing a license
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.
Also I find it curious that he didn't fix his tutorial code despite of the Wiki page dedicated to it.