Author Topic: KnightOS  (Read 226399 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: KnightOS
« Reply #525 on: November 15, 2010, 01:03:32 am »
I wonder how large the kernel alone is.  I fear that the hardware restrictions may be our downfall in porting Linux to the Nspire.


History of the size of the Linux kernel:

Quote
In 1993 a Linux 0.99 kernel zImage weighed in at 210 kBytes
In 1994 a Linux 1.0.x kernel zImage weighed in at 230 kBytes
In 1995 a Linux 1.2.x kernel zImage weighed in at 310 kBytes
In 1996 a Linux 2.0.x kernel zImage weighed in at 380 kBytes
In 1998 a Linux 2.2.x kernel bzImage weighed in at 650 kBytes
In 2000 a Linux 2.4.x kernel bzImage weighed in at 1000 kBytes
In 2003 a Linux 2.6.x kernel bzImage weighed in at 1300 kBytes
In 2007 a Linux 2.6.x kernel bzImage weighed in at 1500 kBytes

Since the Nspire is effectively '90s hardware in terms of power, I see no reason why it couldn't be ported to the Nspire.

EDIT: I've decompressed an old 0.95 linux version and the decompressed tar is 590 KB in total. I'm not exactly sure what relation the .tar file has to a working OS kernel, but that seems reasonable.

All of the Linux kernels can be found here.
« Last Edit: November 15, 2010, 01:26:20 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: KnightOS
« Reply #526 on: November 15, 2010, 03:06:27 am »
I bet with a minimal GUI (not just command line but still a simple GUI) it would still be considerably smaller than the Nspire OSes, even 1.1. OS 2.1 is 21 MB or so, I think.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: KnightOS
« Reply #527 on: November 15, 2010, 03:24:31 am »
21 MB? In that case, a quick bit of Googling brings up the Model K variant of Knoppix. Supposedly it got down to around 20MB. I can't find a download version, but I'll bet that OS could easily be stripped down to make it calc friendly.

I just found out about Tiny Core Linux. The Microcore version fits in under 10MB.
« Last Edit: November 15, 2010, 03:30:07 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #528 on: November 15, 2010, 08:14:57 am »
Cool but why is there no assembly program support in the 2011 dev version? I can think of some reasons my-self but since it's your project I'd like to hear it from you, Sir. Anyway, there will be assemly support later on right?
Lol that's the only thing that is supported in the Dev version :P
My bad.

As for the backup battery 'issue' well, I suggest you'd do only the neccesary stuff like saving the registers and maybe the OP's...stuff like that. I'd just clear the RAM but if you could built-in a option that will duplicate the RAM every now and then into ROM...gah..that is just inpractical....hmm, how about savestates? or system-restore points? problem is how do you make these (assuming you make 'em beforehand) and how do you keep the size of them feasible...

Anyway what worries me is that KOS clears RAM every time the OS starts, the memory chips can't be erased and rewritten forever, 'only' a million times and well...it just bugs me a little cause it simply decreases the calc's lifespan a little (though not significant).

Last thing, erm...maybe there are some more ways to save power when its off? I mean TIOS only turns the LCD off maybe there are some more things we could turn off? just to save power? (I don't know if it's possible, just saying)

I like the way this is going so far, KOS will indeed be awesome!

Edit: If I am going to make a library for KOS I want it to be registration number 1337 :P
« Last Edit: November 15, 2010, 08:15:41 am by matthias1992 »
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2913
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: KnightOS
« Reply #529 on: November 15, 2010, 08:24:07 am »
Anyway what worries me is that KOS clears RAM every time the OS starts, the memory chips can't be erased and rewritten forever, 'only' a million times and well...it just bugs me a little cause it simply decreases the calc's lifespan a little (though not significant).
That's the Flash chip you're thinking of. You can do whatever you want as much as you want to RAM, that's why it's RAM.

Last thing, erm...maybe there are some more ways to save power when its off? I mean TIOS only turns the LCD off maybe there are some more things we could turn off? just to save power? (I don't know if it's possible, just saying)
TI-OS goes into low-power mode when it is "off".
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #530 on: November 15, 2010, 08:39:35 am »
Anyway what worries me is that KOS clears RAM every time the OS starts, the memory chips can't be erased and rewritten forever, 'only' a million times and well...it just bugs me a little cause it simply decreases the calc's lifespan a little (though not significant).
That's the Flash chip you're thinking of. You can do whatever you want as much as you want to RAM, that's why it's RAM.

Last thing, erm...maybe there are some more ways to save power when its off? I mean TIOS only turns the LCD off maybe there are some more things we could turn off? just to save power? (I don't know if it's possible, just saying)
TI-OS goes into low-power mode when it is "off".
ok thanks for explaining. Altough nothing in 'Random Access Memory' tells me that erasing it so often is good...I still think it might be a lightly unwanted habit...but anyways, you ahve comforted me enough by pointing out it's the flash not the RAM, thanks.
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

SirCmpwn

  • Guest
Re: KnightOS
« Reply #531 on: November 15, 2010, 08:41:14 am »
Anyway what worries me is that KOS clears RAM every time the OS starts
You know, it just so happens that I have the source code that does this, and can easily change it to not clear RAM if there is a hibernated state :P

Last thing, erm...maybe there are some more ways to save power when its off? I mean TIOS only turns the LCD off maybe there are some more things we could turn off? just to save power? (I don't know if it's possible, just saying)
TI-OS goes into low-power mode when it is "off".
And so does KnightOS.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: KnightOS
« Reply #532 on: November 15, 2010, 08:54:19 am »
Would there be a way to have KOS do both and let the user pick which one they want to have?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #533 on: November 15, 2010, 09:09:17 am »
Would there be a way to have KOS do both and let the user pick which one they want to have?
I'd prefer that option personally, no pressure though...
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: KnightOS
« Reply #534 on: November 15, 2010, 11:19:30 am »
21 MB? In that case, a quick bit of Googling brings up the Model K variant of Knoppix. Supposedly it got down to around 20MB. I can't find a download version, but I'll bet that OS could easily be stripped down to make it calc friendly.

I just found out about Tiny Core Linux. The Microcore version fits in under 10MB.
In any case, if a new OS is made for the Nspire, it would be nice to maybe have something that is like 100-200 KB large, if not smaller, to allow the user to use almost all of the 32 MB of memory the calc has.

SirCmpwn

  • Guest
Re: KnightOS
« Reply #535 on: November 15, 2010, 04:45:49 pm »
Would there be a way to have KOS do both and let the user pick which one they want to have?
That could be done, possibly.  The problem is that I don't have a lot of time to look up the settings and hibernate before the backup battery give up.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: KnightOS
« Reply #536 on: November 15, 2010, 04:54:14 pm »
What if you designated a unused bit in one of the registers to hold the value and refreshed the register on startup? That would make the read a one command instruction from a very fast location in RAM.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

SirCmpwn

  • Guest
Re: KnightOS
« Reply #537 on: November 15, 2010, 04:55:17 pm »
I could use RAM somewhere, I guess.

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: KnightOS
« Reply #538 on: November 15, 2010, 05:26:15 pm »
What if you designated a unused bit in one of the registers to hold the value and refreshed the register on startup? That would make the read a one command instruction from a very fast location in RAM.
maybe the refresh register?
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

SirCmpwn

  • Guest
Re: KnightOS
« Reply #539 on: November 15, 2010, 05:27:05 pm »
I'm not using a register, although refresh is a good idea.