Jump to content




Leadlined-Kernel: A Mostly Experimental Kernel


34 replies to this topic

#1 KillaVanilla

  • Members
  • 303 posts

Posted 01 November 2013 - 07:24 PM

LeadLined-Kernel (aka LeadLined-OS) is a system that is designed to do what an actual OS kernel does: Do stuff for the programmer.

It's heavy on the internals, with several different kernel modules extending the various APIs that you would find in a "vanilla" system.

Four of these kernel modules make up the majority of this functionality:
Spoiler

There is also a default shell, simply called "/bin/shell" that should be used to access LeadLined-Kernel's functionality. It includes a number of programs and functions "built-in" (for some odd reason).

The kernel should run most CraftOS programs without problems. If a particular program that you wrote for CraftOS doesn't work in LeadLined-Kernel, then post it here and I'll try to track down the cause, and possibly see if I can fix it. However, keep in mind that adding functionality is of a higher priority than maintaining compatibility.

If there are any applications that you would like to see for LeadLined-Kernel, please leave a message and get to it ASAP.

Github Repository (Tatantyler/LeadLined-OS)

Installer (Pastebin Code: 38a56FiF)

Edited by KillaVanilla, 05 January 2014 - 06:04 PM.


#2 sens

  • Members
  • 49 posts
  • LocationFrance

Posted 01 November 2013 - 08:05 PM

Looking forward to seeing the IPC in action, I've found that capability is missing from many of the others.

I'm curious, though - what is a "virtual peripheral"?

#3 LDShadowLord

  • Members
  • 115 posts

Posted 01 November 2013 - 08:12 PM

Bug report:
Could not concatenate string and nil. I encounter the error whenever I try to log in.Image showing error. I CANNOT get round this error, as such it is physically impossible to do anything on the computer after logging in.

EDIT: Updated conditions of error after further testing.

EDIT2:
Bug Report 2:
After logging in it prints a table to the screen. Cutting across the GUI. Image showing bug.

#4 KillaVanilla

  • Members
  • 303 posts

Posted 01 November 2013 - 09:38 PM

 LDShadowLord, on 01 November 2013 - 08:12 PM, said:

Bug report:
Could not concatenate string and nil. I encounter the error whenever I try to log in.Image showing error. I CANNOT get round this error, as such it is physically impossible to do anything on the computer after logging in.

EDIT: Updated conditions of error after further testing.

EDIT2:
Bug Report 2:
After logging in it prints a table to the screen. Cutting across the GUI. Image showing bug.

Bug report 1: Is there a line number or such reported? note to self: look at images, they can help you.
Found what causes this bug; apparently, os.computerLabel() can return nil.

Bug report 2: I've actually seen that bug myself. I can't find it. At all.
Found it! Turns out, it was in sys/apis/GUIFunctions, of all things...
You should reinstall.

#5 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 01 November 2013 - 09:42 PM

You hooked me at fsOverride...

Any APIs for terminal/monitor mirroring/extra features?

This looks pretty cool. The forums need more dev utility "OSes."

#6 KillaVanilla

  • Members
  • 303 posts

Posted 01 November 2013 - 09:57 PM

 sens, on 01 November 2013 - 08:05 PM, said:

Looking forward to seeing the IPC in action, I've found that capability is missing from many of the others.

I'm curious, though - what is a "virtual peripheral"?
I'm actually working on another form of IPC right now; input/output stream redirection.

I'm looking for ideas for applications that could take advantage of the kernel's functionality.

"Virtual peripherals" are supposed to be peripherals that call API functions or other code instead of calling Java code.
For example, you could have a virtual modem that transmits messages over a "higher-level" network instead of transmitting messages directly. This is what the crf_bridge driver is supposed to do, once it actually works.

 MudkipTheEpic, on 01 November 2013 - 09:42 PM, said:

You hooked me at fsOverride...

Any APIs for terminal/monitor mirroring/extra features?

This looks pretty cool. The forums need more dev utility "OSes."

Not yet. There was a system in the works to allow for a sort of screen multiplexing; you'll find it as "unused/screenHandler". I scrapped it because it simply didn't work and I wanted a mostly-working release ready.

#7 Wobbo

  • Members
  • 24 posts
  • LocationThe Netherlands

Posted 02 November 2013 - 05:43 AM

This is looking good! I am interested in seeing where you are going to take this.
IO redirection is something I wanted in an OS, are you going to make it work like UNIX pipes? So multiple commands in one line? Or API calls?

I did find some bugs however. Whenever I log in on a Advanced computer, the windows for logging in don't line up. This is not really a bug, but it does look weird.

Secondly, whenever I try to see what is in sys/filePerm, I get a bin/shell:526: attempt to get length of nil
I can cd into /sys/filePerm however. I should note that I am not logged in as root.
When I do log in as root, it just works.

When I am in the directory sys and want to look at apis(for example) I get a Not a directory error. When I type ls /sys/apis, it does work.

Also, if you try to shutdown the computer using exit, it just hangs.

But it looks really good. I will follow this OS.

#8 KillaVanilla

  • Members
  • 303 posts

Posted 02 November 2013 - 10:14 AM

 Wobbo, on 02 November 2013 - 05:43 AM, said:

This is looking good! I am interested in seeing where you are going to take this.
IO redirection is something I wanted in an OS, are you going to make it work like UNIX pipes? So multiple commands in one line? Or API calls?

I did find some bugs however. Whenever I log in on a Advanced computer, the windows for logging in don't line up. This is not really a bug, but it does look weird.

Secondly, whenever I try to see what is in sys/filePerm, I get a bin/shell:526: attempt to get length of nil
I can cd into /sys/filePerm however. I should note that I am not logged in as root.
When I do log in as root, it just works.

When I am in the directory sys and want to look at apis(for example) I get a Not a directory error. When I type ls /sys/apis, it does work.

Also, if you try to shutdown the computer using exit, it just hangs.

But it looks really good. I will follow this OS.
I/O redirection will work like UNIX pipes.

About using exit: the "exit" function actually just causes the /bin/shell program to exit, it doesn't actually shutdown the computer; this will be changed.
I will look into the other bugs; they're mostly issues with the fs function overrides. Some of them are actually not supposed to be bugs; attempting to look into another user's directory without the read permission for that directory will return what appears to be an empty directory. The fact that the functions return nil instead of an empty table or an error is a bug.

#9 Wobbo

  • Members
  • 24 posts
  • LocationThe Netherlands

Posted 02 November 2013 - 10:40 AM

 KillaVanilla, on 02 November 2013 - 10:14 AM, said:

 Wobbo, on 02 November 2013 - 05:43 AM, said:

This is looking good! I am interested in seeing where you are going to take this.
IO redirection is something I wanted in an OS, are you going to make it work like UNIX pipes? So multiple commands in one line? Or API calls?

I did find some bugs however. Whenever I log in on a Advanced computer, the windows for logging in don't line up. This is not really a bug, but it does look weird.

Secondly, whenever I try to see what is in sys/filePerm, I get a bin/shell:526: attempt to get length of nil
I can cd into /sys/filePerm however. I should note that I am not logged in as root.
When I do log in as root, it just works.

When I am in the directory sys and want to look at apis(for example) I get a Not a directory error. When I type ls /sys/apis, it does work.

Also, if you try to shutdown the computer using exit, it just hangs.

But it looks really good. I will follow this OS.
I/O redirection will work like UNIX pipes.

About using exit: the "exit" function actually just causes the /bin/shell program to exit, it doesn't actually shutdown the computer; this will be changed.
I will look into the other bugs; they're mostly issues with the fs function overrides. Some of them are actually not supposed to be bugs; attempting to look into another user's directory without the read permission for that directory will return what appears to be an empty directory. The fact that the functions return nil instead of an empty table or an error is a bug.

Neat. How are you going to redirect the IO? just overwriting read/write to read from/write to files? Or do you have a better approach?

I already guessed it had something to do with permissions. Instead of looking like an empty directory, it might be better to give a warning. Darwin(OS X) gives a Permission Denied error when you try to look into roots home directory for example.

#10 KillaVanilla

  • Members
  • 303 posts

Posted 02 November 2013 - 11:00 AM

 Wobbo, on 02 November 2013 - 10:40 AM, said:

Neat. How are you going to redirect the IO? just overwriting read/write to read from/write to files? Or do you have a better approach?

I already guessed it had something to do with permissions. Instead of looking like an empty directory, it might be better to give a warning. Darwin(OS X) gives a Permission Denied error when you try to look into roots home directory for example.
As for IO redirection: Yeah, we override read() and write(). Right now the supported output/input devices are: "term"/"key" (terminal and keyboard), "file" (guess), "func" (function, like an API call or such), and "pipe".
For the permissions "bugs": I'm changing the functionality to do that as we speak.

#11 lieudusty

  • Members
  • 419 posts

Posted 02 November 2013 - 12:44 PM

Looks great! :)

#12 Wobbo

  • Members
  • 24 posts
  • LocationThe Netherlands

Posted 03 November 2013 - 04:21 AM

Will you also implement io.popen when the redirection works? Then we could have a more complete io API and with the pipes it should be possible.

And how will the function get its input? Using read/write or with its function call or something?

I do ask a lot of questions, but that is because I am hyped to see an OS with actually IO redirection. I have been looking for this, to the point where I was planning my own OS.

#13 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 03 November 2013 - 05:02 AM

 MudkipTheEpic, on 01 November 2013 - 09:42 PM, said:

You hooked me at fsOverride...

Indeed.

#14 KillaVanilla

  • Members
  • 303 posts

Posted 03 November 2013 - 11:53 AM

 Wobbo, on 03 November 2013 - 04:21 AM, said:

Will you also implement io.popen when the redirection works? Then we could have a more complete io API and with the pipes it should be possible.

And how will the function get its input? Using read/write or with its function call or something?

I do ask a lot of questions, but that is because I am hyped to see an OS with actually IO redirection. I have been looking for this, to the point where I was planning my own OS.
For io.popen(): Sure. I'm implementing it right now.

As for your other question: programs/functions will receive input via the read() function, which will return a string as always.

io.popen might take a bit to implement. I'm going to have to extend functionality in parallelRunner and fsOverride.

#15 LDShadowLord

  • Members
  • 115 posts

Posted 03 November 2013 - 06:37 PM

Error Report:
list causes an error in parallel runner. Bad argument: string expected, got nil. Image of error.

Errory Edit. This happened when I tried to use the command "?" Exact same error on the same line.

#16 KillaVanilla

  • Members
  • 303 posts

Posted 04 November 2013 - 08:41 PM

 LDShadowLord, on 03 November 2013 - 06:37 PM, said:

Error Report:
list causes an error in parallel runner. Bad argument: string expected, got nil. Image of error.

Errory Edit. This happened when I tried to use the command "?" Exact same error on the same line.

Oops. The latest update kinda broke the shell. In short, I'm trying to implement command chaining in bin/shell. I really need to find a way to indicate the latest release and its commit, don't I...

#17 LDShadowLord

  • Members
  • 115 posts

Posted 06 November 2013 - 06:18 PM

Suggestion: Add an "update" command on the login screen. Not something which forces an update, in case of bugs, but just a button which you can press which initiates an update. Just a suggestion, might come in handy if this is always going to be bleeding edge.

#18 KillaVanilla

  • Members
  • 303 posts

Posted 06 November 2013 - 08:04 PM

 LDShadowLord, on 06 November 2013 - 06:18 PM, said:

Suggestion: Add an "update" command on the login screen. Not something which forces an update, in case of bugs, but just a button which you can press which initiates an update. Just a suggestion, might come in handy if this is always going to be bleeding edge.

Heh. Good idea.
Then again, maybe I can do something involving branches (perhaps a "release"/"wip" branch could be used?)
Regardless, I'm just going to rewrite shell's line parsing code; the last mechanism didn't really work.

Edited by KillaVanilla, 06 November 2013 - 10:23 PM.


#19 KillaVanilla

  • Members
  • 303 posts

Posted 21 November 2013 - 09:37 PM

Hello again (and sorry for the double-post)!

I've been hard at work writing in new features for the kernel since my last post here.

I've written in:
  • Command piping in /bin/shell
  • More forms of IPC (a rendezvous() call, semaphores)
  • Per-process environment sandboxing
  • Symbolic links
  • Improved filesystem drivers (loopFS and ramFS)
  • And probably a few other things that I forgot to mention in the commit logs
Anyways, is there anything else anyone would like to see in the kernel?
Or are there any user applications anyone would like me to write for this kernel?

#20 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 22 November 2013 - 09:59 AM

Uhmm.. I'm just getting this error all the time D:
Posted Image





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users