This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jaredallard's profile picture

[Kernel] ccLinux

Started by jaredallard, 15 September 2014 - 11:31 PM
jaredallard #1
Posted 16 September 2014 - 01:31 AM
ccLinux


The modular, sensible, Linux based kernel


Stable Version: 0.1.0.1


Note: This is a work in progress and it will be constantly changed.


Q: What is ccLinux?
A: It's a kernel designed to mimic the Linux kernel and provide many of the features the current Linux kernel supports
such as; Process Management, vRam, init, device plugin/remove events, unique IDs, APIs allowing direct device interface,
hookin support for desktop environments and more…

Q: Why would I want the linux kernel running my operating system?
A: Well, the main reason is because the Linux kernel works. It's a real world kernel, and it's used widely.
Sure, you won't find support for hardware virtualization but it's still a model that can easily fit computer craft.

Q: Is this an operating system?
A: Yes and no. It provides a base for other operating systems, and aims to assist developers in creating
their on operating systems aswell as set a POSIX standard Single ComputerCraft Specification.

Q: Do you plan on designing an official OS for ccLinux?
A: Yes, it is planned, and will probably be used as a way to model the kernel itself. After development or alongside development
I plan to port over GNU coreutils and other essential GNU utils (there's a reason it's called GNU/Linux)

Q: Will this kernel support multi-threading, i.e multitasking?
A: Yes! It will support a listener -> call -> wait -> event system, and so far has such a system!

Source Code: https://github.com/ccLinux/kernel

Issues/Bugs: https://github.com/c...x/kernel/issues





Some Screenshots, (of the execution)


Thread utilization.



Boot Flags.



Grub (separate project, but being used)

Edited on 26 November 2014 - 06:40 PM
Lyqyd #2
Posted 16 September 2014 - 02:35 AM
Please report your topic when you have code to post so that it can be unlocked.

Unlocked so code may be posted.
Edited on 16 September 2014 - 01:48 PM
tenshae #3
Posted 17 September 2014 - 01:28 AM
Much good.
Very like.
Okay all bad doge may-mays aside, this is very good. I do indeed like it a lot.
…Could I use this in place of my kernel for my operating system?
Would be much appreciated, and I know the answer is probably "yes" due to the nature of this project but just want to make sure.
jaredallard #4
Posted 17 September 2014 - 01:41 AM
Much good.
Very like.
Okay all bad doge may-mays aside, this is very good. I do indeed like it a lot.
…Could I use this in place of my kernel for my operating system?
Would be much appreciated, and I know the answer is probably "yes" due to the nature of this project but just want to make sure.

Yes! This kernel is, by nature of the GNUGPLv2, usueable in anything you want; however– I would recommend waiting awhile as I pave out the path of the kernel and get a few standards for it set, but by all means (and this is for anyone) use the kernel in anyway shape or form! That is why I coded it ;)/>
tenshae #5
Posted 17 September 2014 - 02:21 AM
–snipper–

Yes! This kernel is, by nature of the GNUGPLv2, usueable in anything you want; however– I would recommend waiting awhile as I pave out the path of the kernel and get a few standards for it set, but by all means (and this is for anyone) use the kernel in anyway shape or form! That is why I coded it ;)/>
Simply beautiful.
Suggestion: Make it backwards compatible with every update so you can do like real linux where in distros you can just download recent kernel sources, compile, and replace kernel with your new one and reboot (which I think is awesome for Linux)
Suggestion 2: ELF-ish executable format for Lua. Yes.
Edited on 17 September 2014 - 12:23 AM
jaredallard #6
Posted 17 September 2014 - 03:08 AM
–snipper–

Yes! This kernel is, by nature of the GNUGPLv2, usueable in anything you want; however– I would recommend waiting awhile as I pave out the path of the kernel and get a few standards for it set, but by all means (and this is for anyone) use the kernel in anyway shape or form! That is why I coded it ;)/>
Simply beautiful.
Suggestion: Make it backwards compatible with every update so you can do like real linux where in distros you can just download recent kernel sources, compile, and replace kernel with your new one and reboot (which I think is awesome for Linux)
Suggestion 2: ELF-ish executable format for Lua. Yes.

Suggestion 1: Planned, all old functioins, methods, etc will be deprecated then in 0.1.0 release, it will be removed, beforehand notifying it being deprecated (meaning a 2-string version change)
Suggestion 2: Unlikely, but will add to considered features list in kernel.lua
tenshae #7
Posted 17 September 2014 - 03:15 AM
–snippety wizarding–

Suggestion 1: Planned, all old functioins, methods, etc will be deprecated then in 0.1.0 release, it will be removed, beforehand notifying it being deprecated (meaning a 2-string version change)
Suggestion 2: Unlikely, but will add to considered features list in kernel.lua
You forgot something.
Users.
EDIT: Would like to contribute to project. Noticed the kernel wouldn't run without some debugging, are you testing this thoroughly enough?
EDIT: Should probably go into specifics. Your modified getRunningPath(path) isn't working, just returning the old shell.getRunningPath(path) output. Why not assume root as directory? If people want it to be somewhere else, they can specify it in the KERNEL_DIR variable by editing the code (by people i mean OS devs). Leading me into another problem: Variable/Table protection. Entire system could break down if you just modified the KERNEL_DIR variable in runtime and set it to someplace like "/../nonexistantwow/files/wow" because of obvious reasons. How will you handle this?
Edited on 17 September 2014 - 01:47 AM
jaredallard #8
Posted 17 September 2014 - 03:24 AM
–snippet –
You forgot something.
Users.
EDIT: Would like to contribute to project. Noticed the kernel wouldn't run without some debugging, are you testing this thoroughly enough?

Ah, yes, users. Psch. How could I forget! xD
The version on the git is a tad bit behind, however it should run in an CCEmuRedux enviroment fine. Trust me, I test it in various ways.
elfin8er #9
Posted 17 September 2014 - 04:06 AM
This seems like an interesting project… I'll be keeping an eye on this.
tenshae #10
Posted 17 September 2014 - 04:19 AM

Ah, yes, users. Psch. How could I forget! xD
The version on the git is a tad bit behind, however it should run in an CCEmuRedux enviroment fine. Trust me, I test it in various ways.
Did you see my super-edit? Yes, check that out if you didn't see it.
jaredallard #11
Posted 17 September 2014 - 04:23 AM
Ah, yes, users. Psch. How could I forget! xD
The version on the git is a tad bit behind, however it should run in an CCEmuRedux enviroment fine. Trust me, I test it in various ways.
Did you see my super-edit? Yes, check that out if you didn't see it.

Yep, I adressed those issues onto the issues section of the Github, and they will be fixed as soon as possible. Also, if you wanna contribute by all means submit a pull request to the git with any changes you want in! :)/>
tenshae #12
Posted 17 September 2014 - 04:28 AM
–giant snippery–

Yep, I adressed those issues onto the issues section of the Github, and they will be fixed as soon as possible. Also, if you wanna contribute by all means submit a pull request to the git with any changes you want in! :)/>
Remember: In order for git's concept to work, you have to push updates daily or like Linus Torvalds, whenever you make a change, however small.
jaredallard #13
Posted 17 September 2014 - 04:31 AM
Yep, I adressed those issues onto the issues section of the Github, and they will be fixed as soon as possible. Also, if you wanna contribute by all means submit a pull request to the git with any changes you want in! :)/>
Remember: In order for git's concept to work, you have to push updates daily or like Linus Torvalds, whenever you make a change, however small.

Thanks for the pointer, but I've got git concept down– however I will push more frequently.
FUNCTION MAN! #14
Posted 17 September 2014 - 09:09 PM
Hmmm. Me likies. Are you in IRC? If not, use webchat, i'd like to talk to you about stuff.
Oh, and on-topic criticism :

The kernel.panic function does not ever return. Nor does it exit. The best way to do it would be, imho :



function kernel.panic(msg, code)
  -snip- panic code -snip-
  while true do sleep(0) end
Edited on 17 September 2014 - 07:09 PM
tenshae #15
Posted 18 September 2014 - 12:08 AM
w
Edited on 23 August 2016 - 10:27 PM
jaredallard #16
Posted 18 September 2014 - 03:24 AM
Hmmm. Me likies. Are you in IRC? If not, use webchat, i'd like to talk to you about stuff.
Oh, and on-topic criticism :

The kernel.panic function does not ever return. Nor does it exit. The best way to do it would be, imho :



function kernel.panic(msg, code)
  -snip- panic code -snip-
  while true do sleep(0) end

I am not on IRC, however depending on the network I can be. Twitter is also a viable method of contacting me or if you would like, Slack also works.
tenshae #17
Posted 18 September 2014 - 03:48 AM
-snip-
I am not on IRC, however depending on the network I can be. Twitter is also a viable method of contacting me or if you would like, Slack also works.
Perhaps you should attain a Skype.
jaredallard #18
Posted 18 September 2014 - 03:49 AM
-snip-
Perhaps you should attain a Skype.

I have one, but I don't use it due to the unknown aspect of what exactly skype does
FUNCTION MAN! #19
Posted 19 September 2014 - 04:42 PM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*
jaredallard #20
Posted 19 September 2014 - 07:35 PM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.
Saldor010 #21
Posted 19 September 2014 - 11:06 PM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>
tenshae #22
Posted 19 September 2014 - 11:11 PM
– snip –

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>
Just for fun, I suppose.
jaredallard #23
Posted 20 September 2014 - 06:00 AM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>

Well, it would in operation, but it could potentionaly faster, less resource consuming, and a hundered other factors.
Saldor010 #24
Posted 20 September 2014 - 03:00 PM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>

Well, it would in operation, but it could potentionaly faster, less resource consuming, and a hundered other factors.

…So running OneOS on top of another program (In this case, ccLinux) would make it faster and less resource consuming? Am I not understanding this right?
tenshae #25
Posted 20 September 2014 - 04:59 PM
*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

*dances about*
*is now a developer*
*will probably try to port OneOS to CCLinux*

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>

Well, it would in operation, but it could potentionaly faster, less resource consuming, and a hundered other factors.

…So running OneOS on top of another program (In this case, ccLinux) would make it faster and less resource consuming? Am I not understanding this right?
No. He means replacing the core of OneOS with ccLinux and making it work.
jaredallard #26
Posted 21 September 2014 - 07:56 AM
This seems like an interesting project… I'll be keeping an eye on this.

Sorry for not noticing this until now, but feel free to contribute or test it out. Or even just throw some feedback, afterall that's the foundation it's built on!
FUNCTION MAN! #27
Posted 22 September 2014 - 05:34 PM
This seems like an interesting project… I'll be keeping an eye on this.
Just remember to have fun.. wait this ain't a game.. just remember to test!
jaredallard #28
Posted 09 October 2014 - 04:47 AM
State of the ccLinux kernel: Been incredibly busy with school work, will try to pick up development soon! Apologies for any inconveniences!
logsys #29
Posted 11 October 2014 - 05:56 PM
How can I integrate it with my OS? Does it have multitasking?
jaredallard #30
Posted 12 October 2014 - 09:13 PM
How can I integrate it with my OS? Does it have multitasking?

Multi-Tasking: yes, via parallel API. (Can get status of parallel app, but /cannot/ kill a running thread at this point in time.)

How-To: (need to write docs for this)

source: /kernel.lua
Line | Code:
====|===================
334 | thread.start(function()
335 | –code to start os goes here.
336 | –local tid = tostring(thread.getThreadID())
337 | –thread.listener("/tests/parent.lua", tid)
338 | end)

Code is largely non-source code undocumented. View the source code of /etc/kernel/core/* to understand how most of the APIs work.

Need any more questions awnsered? Don't hesitate too hit me up on skype: diamondcreeper631 (sometimes on), or on twitter: @2root4you (always idleing)
Edited on 12 October 2014 - 07:15 PM
Luca_S #31
Posted 09 November 2014 - 10:06 AM
When I try to startup the Kernel it says:


(170) Kernel panic - at time 1.35

(170) Kernel panic - not syncing: Could not open /etc/rc3.d/ for a runlevel

(170) Stack trace witheld, run with 'debug' for one
(170): kernel.DIR:

Ok, after i started it up some times it worked. I dont know why but it only works if the folders:

/etc/rc0.d/
/etc/rc1.d/
/etc/rc2.d/
/etc/rc3.d/
/etc/rc4.d/
/etc/rc5.d/

exists. Strange :/
I haven't changed anything at the Kernel file.

Luca
Edited on 10 November 2014 - 03:58 PM
FUNCTION MAN! #32
Posted 16 November 2014 - 08:33 PM
When I try to startup the Kernel it says:


(170) Kernel panic - at time 1.35

(170) Kernel panic - not syncing: Could not open /etc/rc3.d/ for a runlevel

(170) Stack trace witheld, run with 'debug' for one
(170): kernel.DIR:

Ok, after i started it up some times it worked. I dont know why but it only works if the folders:

/etc/rc0.d/
/etc/rc1.d/
/etc/rc2.d/
/etc/rc3.d/
/etc/rc4.d/
/etc/rc5.d/

exists. Strange :/
I haven't changed anything at the Kernel file.

Luca

That's not a bug, it's intended.
I made it. But, as my github permissions have been revoked *sigh*, I can't change it.
Yes, it is very dumb at the moment.
tenshae #33
Posted 17 November 2014 - 06:02 PM
When I try to startup the Kernel it says:


(170) Kernel panic - at time 1.35

(170) Kernel panic - not syncing: Could not open /etc/rc3.d/ for a runlevel

(170) Stack trace witheld, run with 'debug' for one
(170): kernel.DIR:

Ok, after i started it up some times it worked. I dont know why but it only works if the folders:

/etc/rc0.d/
/etc/rc1.d/
/etc/rc2.d/
/etc/rc3.d/
/etc/rc4.d/
/etc/rc5.d/

exists. Strange :/
I haven't changed anything at the Kernel file.

Luca

That's not a bug, it's intended.
I made it. But, as my github permissions have been revoked *sigh*, I can't change it.
Yes, it is very dumb at the moment.
The project is very… slow… at the moment, as RainbowDashDC has seemingly just been sitting on his butt, and sucking his thumb. We found out about that bug weeks ago, and I thought it was fixed weeks ago.
Very unorganized, right?
Anyhow, the project is not dead.

Edit: That sounded extremely disrespectful, the sitting on butt sucking thumb remark. That was a joke, not an insult.
Another edit: For now, I'm mostly working on my own kernel project.
Edited on 17 November 2014 - 05:04 PM
FUNCTION MAN! #34
Posted 17 November 2014 - 06:11 PM
the project is very dead.
tenshae #35
Posted 17 November 2014 - 06:19 PM
the project is very dead.
I'm not sure if I agree or not. I'm just waiting to see if he ACTUALLY commits soon, then I can work on it more and such. If he doesn't, screw it, this thing is fubar'd.
tenshae #36
Posted 18 November 2014 - 08:01 PM
KASTER KERNEL FOR THE WIN #YOLOSWAG #YOUNGMONEY

Edit: ccLinux is now back in action and NOT DEAD
Edited on 18 November 2014 - 07:01 PM
FUNCTION MAN! #37
Posted 18 November 2014 - 08:20 PM
Because ME!
tenshae #38
Posted 18 November 2014 - 09:03 PM
Because ME!

NO. It was only because I started bugging him on Skype and GitHub XD
FUNCTION MAN! #39
Posted 18 November 2014 - 10:51 PM
yea, but I pushed.
tenshae #40
Posted 19 November 2014 - 12:48 AM
yea, but I pushed.

Working on ccLinux I am not. I'm working on Kaster, at least for the time being.
FUNCTION MAN! #41
Posted 19 November 2014 - 07:59 PM
"Kaster"
tenshae #42
Posted 20 November 2014 - 02:12 AM
"Kaster"

Yeah, I changed the name. It's now the last name of the Alpha Centauri stars: Kentaurus, which sounds at least three times as cool.
jaredallard #43
Posted 20 November 2014 - 08:49 PM
Yes, I've started working on this again. Along with Xepoof.
FUNCTION MAN! #44
Posted 22 November 2014 - 12:05 AM
Woop-doop.
fluffy #45
Posted 23 November 2014 - 09:29 PM
how do i "install" it
FUNCTION MAN! #46
Posted 23 November 2014 - 10:36 PM
You don't install a kernel. Plus, it's not ready, yet.
oeed #47
Posted 24 November 2014 - 07:04 AM
I know I'm really late to the "port OneOS to CCLinux" discussion, but really, there's no point.

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.
You'd be very surpised. I haven't had a huge look at how this works, but unless it can use CC APIs it'd be a huge job.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>
Exactly, there's really no advantage.

Well, it would in operation, but it could potentionaly faster, less resource consuming, and a hundered other factors.
Nope, nope and nope. OneOS could certainly be faster, but it's the OneOS code that's the issue. You can't really get any faster than directly interfacing with the system, so adding a layer on top would just slow everything down and be more resource intensive.

Sorry for being a bit ranty, but I just want to make clear that it's really not a great idea and I wouldn't bother.
cdel #48
Posted 24 November 2014 - 08:26 AM
If I use this for my desktop environment, will it auto update? I don't really want to continuously check for updates manually and I want users of my desktop environment to be updated with the newest stuff.
Edited on 24 November 2014 - 07:27 AM
FUNCTION MAN! #49
Posted 24 November 2014 - 02:59 PM
Connor, sure, it can auto-update. I can make a program to automatically update this and give it to you, sure; But the official method is updating manually.


I know I'm really late to the "port OneOS to CCLinux" discussion, but really, there's no point.

Shouldn't be that hard, just build off of the core APIs and if needed add some to the ext. Whole point of this kernel is to work with mostly anything.
You'd be very surpised. I haven't had a huge look at how this works, but unless it can use CC APIs it'd be a huge job.

What would be the point though..?
Wouldn't it just be the exact same thing as OneOS but rewritten? :mellow:/>
Exactly, there's really no advantage.

Well, it would in operation, but it could potentionaly faster, less resource consuming, and a hundered other factors.
Nope, nope and nope. OneOS could certainly be faster, but it's the OneOS code that's the issue. You can't really get any faster than directly interfacing with the system, so adding a layer on top would just slow everything down and be more resource intensive.

Sorry for being a bit ranty, but I just want to make clear that it's really not a great idea and I wouldn't bother.

I was expecting a rant from you. (not really). And, the point its not for it to be faster, it's just to have some fun. Working on a kernel and not working on an operating system gets a bit boring at times.
jaredallard #50
Posted 24 November 2014 - 11:08 PM
@oeed and @Xepoof

Sure, building OneOS in it's current state, ontop of ccLinux wouldn't do much. It would be like a Type 2 Hypervisor, not much gain and a little loss. What I atleast gathered from porting OneOS to ccLinux was that, as in most kernel changes, would not just be making a sandwich, but rather adapting it too use ccLinux better than it's own built in core. That means seperating the whole OS to begin with, and some more.

In the end, it's adaptation, which could in theory both be faster and more resource efficient.
jaredallard #51
Posted 25 November 2014 - 01:54 AM
If I use this for my desktop environment, will it auto update? I don't really want to continuously check for updates manually and I want users of my desktop environment to be updated with the newest stuff.

Well, It would be a bad idea to build off of this right now, it's constantly changing and isn't really production ready. However, you are free to build off of it. Now that threading has been patched, and VFS somewhat implemented, it's quite usable. A major change that will be coming soon is a single kernel "binary", aswell as luac implementation. If you want example on how to use this, Carch the official distro is something too base off of: http://github.com/ccLinux/Carch
_VoiceActorMan_ #52
Posted 01 January 2015 - 10:51 PM
I can not wait to see where this goes. This has a LOT of potential!
jaredallard #53
Posted 03 January 2015 - 07:34 PM
I can not wait to see where this goes. This has a LOT of potential!

It would have even more if I could find time to work on it more!
Mitchfizz05 #54
Posted 05 January 2015 - 06:19 AM
Now this looks very interesting indeed. :)/>

Once this project has stableized a bit I'll most likely be making an distro using this…

SpoilerI actually was working on a Linux based kernel a while back… Reinstalled Windows and forgot to rescue it…
This is the part where you give me the lecture about "backing up". :P/>
syfygirl #55
Posted 06 January 2015 - 05:21 AM
Now this looks very interesting indeed. :)/>

Once this project has stableized a bit I'll most likely be making an distro using this…

SpoilerI actually was working on a Linux based kernel a while back… Reinstalled Windows and forgot to rescue it…
This is the part where you give me the lecture about "backing up". :P/>

Yeah… i once installed xp sp1 which only recognizes 100 gb of space, i have a 500 gb hard drive, good by linux partition, xp formated the entire drive and made a 100gb ntfs partition.
Edited on 06 January 2015 - 04:22 AM
CreeperWiz #56
Posted 06 February 2015 - 12:20 AM
Couple things 1. Really cool Thank you 2. What computercraft emulator is that?
FUNCTION MAN! #57
Posted 06 February 2015 - 12:42 AM
Couple things 1. Really cool Thank you 2. What computercraft emulator is that?

1. Thanks!
2. CCEmuRedux.
jaredallard #58
Posted 21 April 2015 - 07:38 AM
Just a heads up, this project was shutdown for a few reasons but has been more or less migrated to Chameleon and the TARDIX Kernel that features some pretty cool developers such as awsumben13, MatAlcDev, and I! Check it out if anyone who was interested in ccLinux wants to: https://github.com/TARDIX