Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => Topic started by: imo_inx on August 03, 2011, 01:34:22 am

Title: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 01:34:22 am
Hi. I'm new at Omnimaga and don't own a calculator and am here to present ideas and use emulators. :D

One thing I think you've probably discussed already is putting linux on a calculator. I do have an idea though: If some people could make drivers for the calculators then I could compile then and carve then into a Linux/Ubuntu distribution called: CaBuntu (k-AE-buntoo). I can do this 'cause I've compiled ISO, IMG and other OS files. I also know a little programming. So if you could compile a driver file in ANY and I repeat ANY programming language and email it to me, I'd be happy to include it in CaBuntu. :w00t:
Title: Re: Putting Linux on a calculator
Post by: SirCmpwn on August 03, 2011, 01:36:03 am
What kind of calculator?

An extremely stripped down linux kernel might work on an 89 Titanium, and a moderately stripped down one might work on an Nspire, but there is no way to do this on an 83+ or it's relatives.  It won't be very good under any means, because there wouldn't be any room for the actual OS.

Also, welcome to the forums!
Title: Re: Putting Linux on a calculator
Post by: AngelFish on August 03, 2011, 01:38:40 am
What calculator model(s) are you talking about? The z80 calcs almost certainly don't have the processing power to run something as CPU intensive as Linux well. Things like the Nspire and the Prizm indeed run Linux, but they require specially compiled code (ARM5 and SuperH 3 respectively).

EDIT: Ninja'd
Title: Re: Putting Linux on a calculator
Post by: SirCmpwn on August 03, 2011, 01:39:36 am
They don't have the CPU to run Linux either, it isn't compatible.
Title: Re: Putting Linux on a calculator
Post by: AngelFish on August 03, 2011, 01:40:40 am
I imagine you could wrestle with SDCC enough to get it to compile. The interrupt and threading code might require a complete rewrite though, since the z80 doesn't have the hardware sophistication Linux expects.
Title: Re: Putting Linux on a calculator
Post by: Juju on August 03, 2011, 01:46:31 am
I remember we talked about porting CP/M on z80, that would be interesting. Otherwise, compiling Linux as a 3rd party OS for TI-Nspire would be awesome. (We can run 3rd-party OSes right, with Ndless or something?)
Title: Re: Putting Linux on a calculator
Post by: SirCmpwn on August 03, 2011, 01:47:51 am
On a z80, porting linux would be a massive undertaking.  There isn't any wrestling with SDCC to be had, but years of difficult, tedious work.  On ARM, you just flip a switch to get an ARM version.
Title: Re: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 01:57:16 am
I plan on putting the on a external hardrive w/ a mini-usb, using a double-ended mini-usb cable to connect them, and then using duct tape or rubber cement to secure the external hardrive. I'm also talking about the NSpire. Wut Fun. :crazy:
Title: Re: Putting Linux on a calculator
Post by: SirCmpwn on August 03, 2011, 01:58:17 am
An interesting adventure, but I think that the project would be more useful if it didn't require lots of hardware hacks to work.
Title: Re: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 02:02:01 am
Anyone else have any ideas?

I also plan on encoding the whole thing in two languages: Python for whole OS replacement, and a Python emulator written in AXE to run it inside your current OS.
Title: Re: Putting Linux on a calculator
Post by: AngelFish on August 03, 2011, 02:03:55 am
Um, Axe doesn't run natively on the Nspire. Are you planning on porting a z80 emulator or something?

I'm also not sure how you would solve the whole "No Goto" thing in Python if you're going to use a Python OS.
Title: Re: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 02:07:52 am
Yeah, I do plan on using a z80 emulator but I was creating my icon at the time and forgot to add TI-Nspire Basic to the languages. Sorry. :( *.*

EDIT: You proved me wrong. Geuss it's time to hit the books, strip down my hacked Ubuntu 11.04 .ISO and add a patch inside the Operating System...
Title: Re: Putting Linux on a calculator
Post by: DrDnar on August 03, 2011, 02:16:54 am
The Z80 doesn't support using an MMU. There's absolutely no way for the kernel to actually enforce anything. I think most people have also generally been of the opinion that relocation tables (needed for multitasking to be used with all programs) would waste more memory than they're worth.
Title: Re: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 02:26:07 am
Then I'll just create something similar to z80...
Title: Re: Putting Linux on a calculator
Post by: calcdude84se on August 03, 2011, 02:27:25 am
I think most people have also generally been of the opinion that relocation tables (needed for multitasking to be used with all programs) would waste more memory than they're worth.
How bad would it be? Probably the most efficient method in terms of space would cost only one and occasionally two bytes per address to be relocated.
Title: Re: Putting Linux on a calculator
Post by: DJ Omnimaga on August 03, 2011, 03:31:37 am
Heya and welcome to the forums. :)

By the way there used to be a topic about putting Linux on the Nspire a while ago, but it kinda died down (note that third-party OSes are even possible at all on the Nspire yet). Let me find it. EDIT: Here is it http://ourl.ca/9438

Note that making a calculator OS or porting an existing OS to the calculator is an huge undertaking, though. You really need lots of coding experience to make one, and it will take a while. Good luck whatever you decide.
Title: Re: Putting Linux on a calculator
Post by: harold on August 03, 2011, 07:08:45 am
The TI-83+/84+ hardware doesn't have any kind of support for virtual addressing, that will be a huge problem.
Title: Re: Putting Linux on a calculator
Post by: Spyro543 on August 03, 2011, 09:50:49 am
Hey nice to see my best friend joining Omnimaga (and starting a calc project O.o)! Do you know any Python yet? EDIT: I'm asking because you stated you were using a Python OS, and if you were going to code it, or if you were going to tell me what you want it to look like and have me code it. :P
Title: Re: Putting Linux on a calculator
Post by: Michael_Lee on August 03, 2011, 10:38:59 am
Um, Axe doesn't run natively on the Nspire. Are you planning on porting a z80 emulator or something?

I'm also not sure how you would solve the whole "No Goto" thing in Python if you're going to use a Python OS.

True, but you could hack it on :D
http://entrian.com/goto/ (http://entrian.com/goto/)

Welcome to the forums, by the way!  If you haven't already, you should definitely make an introduction topic and tell us a little about yourself.
Title: Re: Putting Linux on a calculator
Post by: imo_inx on August 03, 2011, 10:47:41 am
I've changed my mind and now want to use AXE.
Title: Re: Putting Linux on a calculator
Post by: Jim Bauwens on August 03, 2011, 10:52:18 am
Well, compiling Linux for the nspire isn't the hardest part, the hardest part is getting it boot. You will need to make a bootloader to do that.
To make this you will need to spend lots of hours in it, and lots of research. The link DJ posted contains interesting stuff, handy if you want to start.

Good luck :)
Title: Re: Putting Linux on a calculator
Post by: TIfanx1999 on August 03, 2011, 10:58:20 am
I've changed my mind and now want to use AXE.
I'm a bit confused. You want to use AXE to do what exactly? Just FYI AXE is only for the TI 83+ family(TI-83+,TI-83+SE,TI-84+,TI-84+SE)
Title: Re: Putting Linux on a calculator
Post by: TC01 on August 03, 2011, 11:08:41 am
Anyone else have any ideas?

I also plan on encoding the whole thing in two languages: Python for whole OS replacement, and a Python emulator written in AXE to run it inside your current OS.

Yeah, I do plan on using a z80 emulator but I was creating my icon at the time and forgot to add TI-Nspire Basic to the languages. Sorry. :( *.*

EDIT: You proved me wrong. Geuss it's time to hit the books, strip down my hacked Ubuntu 11.04 .ISO and add a patch inside the Operating System...

I've changed my mind and now want to use AXE.

I'm not sure what you're trying to do. Your first post suggests you want to compile (a lightweight version of) Ubuntu for ARM. The three posts I've quoted above, though, seem to suggest that you want to write something in Axe and have it running in a z80 emulator on the Nspire?

Are you trying to write software in Axe (or Python; which probably could be compiled in C for the Nspire) (or Nspire Basic?) to run on your port of Linux?
Title: Re: Putting Linux on a calculator
Post by: BlakPilar on August 03, 2011, 11:40:29 am
I can do this 'cause I've compiled ISO, IMG and other OS files. I also know a little programming.
ISOs and IMGs are disk-images, you can't just throw them on a calculator and expect them to work. To make something like what you want, you need to know more than "a little programming". :|

Then I'll just create something similar to z80...
Not as easy as it sounds. You would need to create an entire interpreter specifically for z80 (or "something similar"). (If that came out wrong, I know what I meant and that's all that matters :P)

Also, imo, it would be easier to write your own Linux-based OS for the calculator than stripping down an existing one; that is, if you could even get this to work.
Title: Re: Putting Linux on a calculator
Post by: Eeems on August 05, 2011, 08:18:34 am
I remember we talked about porting CP/M on z80, that would be interesting. Otherwise, compiling Linux as a 3rd party OS for TI-Nspire would be awesome. (We can run 3rd-party OSes right, with Ndless or something?)
I actually happen to have a copy of CP/M and a computer to run it sitting next to me :)

I'd say just wait, or help with KnightOS :) While Linux on a calc would be cool, it would be too much for the calculator, it also isn't designed for the hardware, instead we should focus on an OS that it tailored for the calc, like OS2 or KnightOS.
Title: Re: Putting Linux on a calculator
Post by: DJ Omnimaga on August 06, 2011, 02:33:33 pm
Or RogueOS :P *pokes Eeems to come back more often and also get to work on it :P*