Author Topic: Linux on Nspire?  (Read 10284 times)

0 Members and 1 Guest are viewing this topic.

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
Re: Linux on Nspire?
« Reply #15 on: March 02, 2011, 12:52:03 am »
DJ my point was I wanted to see if we had the combined knowledge and manpower to do this before we had a 20 page thread about it. If and when things get going a 20 page thread+ML+wiki etc would be in order but I want to try and keep things organized since the first thing we need is a kernel and a bootloader then that is all the should focus on. Anything else is unneeded.

As I said our first step is to see if we can find a platform similar to the Nspire that already has Linux support, if none such device exists much more research will need to be done. I personally don't have the time to do this but I will assist if there is someone willing and knowledgeable enough to take the reigns.

For me PoC would be getting the kernel to spit something out on either the LCD or the rs-232 lines if we can get that then the rest will follow. The hard part is getting the ball rolling/the kernel booting, its mostly down hill from there thanks to the likes of angstrom and similar embedded Linux distros.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Linux on Nspire?
« Reply #16 on: March 02, 2011, 12:55:17 am »
Ok, I understand. Just make sure to stay within board rules about keeping the site "hostility-free". We don't want guests to look at this thread and refuse to sign up just because they get a bad impression of Omni based on it.

I appended one of your quote about the topic content in the first post. Would it be best later to include some important points to the first post, so people who are new and want to join don't have to read through 20 pages of posts?

SirCmpwn

  • Guest
Re: Linux on Nspire?
« Reply #17 on: March 02, 2011, 01:14:38 am »
What? It'd be like having KOS as an App, if that helps...not sure about the PC thing.
;)

I've put a little thought into Linux on Nspire myself, but never actually tried anything.  Sounds interesting, I'd love to help.

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: Linux on Nspire?
« Reply #18 on: March 02, 2011, 01:33:31 am »
To clarify this thread should be about getting the Linux kernel booting on the Nspire if you don't know what that means or you are not familiar with the Nspire hardware, ARM devices in general, the linux kernel, or arm bootloaders than this thread is not of interest to you. If you cannot contribute in one of those areas please keep this thread clear of unneeded cruft. Encouragement and questions are good except when they drown out the conversation and content the thread is intended to contain.

I think that sounds a bit harsh. Perhaps it might be better to say "Please attempt to make constructive and informative posts only."

Anyway, I may as well take my own medicine. Here's a dev board with the same processor running Linux:

http://www.teamfdi.com/development-tools-kits/products/3/LPC3180-DEV-KIT

Here's a much cheaper dev board using the same processor and running an apparently proprietary Linux based RTOS:

http://microcontrollershop.com/product_info.php?products_id=2185

It would appear that Google Android 1.7 supports the ARM926EJ-S, as this Android tablet uses that processor.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
Re: Linux on Nspire?
« Reply #19 on: March 02, 2011, 01:36:06 am »
Some quick googling came up with this as a good place to look at getting a bootloader setup. Someone familiar with ndless programming could look into implementing something based on this via an ndless program, assuming we have enough access to the hardware to do so.

http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

Ok thanks I will look into that, the patch that adds support for that board to the kernel is here http://www.phytec.com/products/linux/bsp-LPC3180.html I have started to look through it to get an idea of where we will want to start. Sadly it seems the patch contains a large amount of useless content and is for a rather old kernel version but its better than nothing, thanks.

Also again sorry for any harshness, but I felt I needed to define what was constructive was in relation to this thread.
« Last Edit: March 02, 2011, 01:53:09 am by JonimusPrime »

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Linux on Nspire?
« Reply #20 on: March 02, 2011, 01:52:13 am »
Looks like quite an informative article! I sure like the sound of those already existing bootloaders...:P U-Boot looks to be the most promising, IMO.
« Last Edit: March 02, 2011, 01:52:47 am by willrandship »

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
Re: Linux on Nspire?
« Reply #21 on: March 02, 2011, 02:01:01 am »
Just to get an idea of how many different Arm based Linux machine types there are and why getting Linux on an Arm device is harder than just installing via Live CD on a desktop here is a nice list of all the registered "machine types" most of which are not or may never have been supported by the mainline Linux kernel. http://www.arm.linux.org.uk/developer/machines/

But hopefully one of those is close to what we need, if not we'll have to start from scratch which may not be the end of the world, just means harder work, but it maybe less in the end depending on the situation.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Linux on Nspire?
« Reply #22 on: March 02, 2011, 02:02:42 am »
Don't worry, our particular processor is a fairy popular setup, actually one of TI's mainline ARM9s so it's quite common. I don't think there'll be too much of an issue finding a similar setup we could start with.

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
Re: Linux on Nspire?
« Reply #23 on: March 02, 2011, 02:04:34 am »
Well sadly its not just the processor, its the memory layout, peripheral chips, LCD, USB controller that we have to worry about, but the more I look into it the more sense starting from scratch seems to make, but that may just be me being tired. Once we have a way to boot things we'll know more.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Linux on Nspire?
« Reply #24 on: March 02, 2011, 02:07:37 am »
Ah. That is difficult. Hooray for hackspire I guess :/

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Linux on Nspire?
« Reply #25 on: March 02, 2011, 05:33:22 am »
I think the best way to boot Linux would be to copy the Linux kernel to ram and then execute it.
Linux will then take over the system (I think). As for a rootfs, it will be hard to make the kernel read the the flash, so the best thing would be to copy a little rootfs that contains a base system to ram.

Haret works in a similar way, and I think this is the best way instead of starting a bootloader like uboot.


Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Linux on Nspire?
« Reply #26 on: March 02, 2011, 05:56:24 am »
I looked into a kernel build on a proc similar to the nspires a few weeks ago, and turned up nothing very relevant. There are builds for that family of ARM cpus, but nothing that'd really directly run on the calc.

Also, just until we find a working kernel, I'd suggest loading it by using it as the flash1 image in nspire_emu(It's been renamed, but I can't remember what to). That *should*(to my knowledge) run it at a base of 0x0. You can use flash2 also, since there's never a point where the calc cuts off access to that. You'd have to look on hackspire or ask one of the resident gurus for what address that code is loaded at.



(Ignore any nonsense, I'm very tired.)
Omnimaga Admin

Offline JonimusPrime

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 389
  • Rating: +25/-5
    • View Profile
    • Jonimoose.net
Re: Linux on Nspire?
« Reply #27 on: March 02, 2011, 07:26:19 am »
I've started reading http://www.glomationinc.com/PortingLinuxKernel.pdf which seems to be a good starting place and so far has confirmed what I thought was the case when it comes to kernel side things. We'll want to see if the Nspire is similar enough to any existing machine types to base our work off we'll have to work from scratch but that doesn't seem to be as big of deal as I originally thought. Give this a read if your interested in helping as it seems to have very relevant info.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown

"If you've done something right no one will know that you've done anything at all" -Futurama

"Have a nice day, or not, the choice is yours." Tom Steiner