Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
25 May, 2013, 08:19:45 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 13 14 [15] 16 17 ... 59   Go Down
  Print  
Author Topic: Calling all Linux Kernel developers! -  (Read 38201 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: 23 May, 2013, 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #210 on: 12 November, 2012, 18:36:48 »
0

Brace yourselves, visites are coming on Omnimaga Tongue
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
_Nicco_
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: Yesterday at 05:04:48
Date Registered: 31 December, 2011, 13:10:55
Posts: 168

Total Post Ratings: +4

View Profile
« Reply #211 on: 12 November, 2012, 20:12:20 »
0

So the next big thing was Linux on a calculator not another game or emulator.
Logged

They say that your signature is supposed to go here...
noobnonin
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 12 May, 2013, 05:42:38
Date Registered: 03 November, 2012, 18:45:21
Posts: 103

Total Post Ratings: -11

View Profile
« Reply #212 on: 12 November, 2012, 23:11:25 »
0

vogtinator,

could you please tell me how you did for the snapshot to run, i have problems with it, i used linux and put the command dd if=rootfs.ext2 of=/dev/sdb1  "sdb1 is my usb device" and when i connect it to the tinspire in the lap of the 10 seconds, nothing happens....
oh, im using an "on the go" female usb cable, i only connect my usb, no hub, just the usb with the rootfs.ext2

btw great job tangrs!!! Cheesy
Regards
« Last Edit: 12 November, 2012, 23:17:18 by noobnonin » Logged
Vogtinator
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 09 May, 2013, 13:29:07
Date Registered: 08 November, 2012, 23:17:13
Location: Germany
Posts: 430


Total Post Ratings: +24

View Profile
« Reply #213 on: 12 November, 2012, 23:43:40 »
0

Quote
nothing happens....
Does really nothing happen?
I think there should be some usb-device-messages.
Try to plug your stick in after you can see the "waiting for root device"-message.

BTW: Don't use /dev/sdb1. The kernel waits for /dev/sdb (WITHOUT any partitions on it, only a plain filesystem).
But if you cant see any messages, we have some other problems.

I cant't get directfb to work. It says "current mode not supported".
I can see the current mode with "fbset -i" and filled /etc/fb.modes with "fbset >> /etc/fb.modes" but it still can't find any suitable modes.
Logged
linuxgeek96
LV3 Member (Next: 100)
***
Offline Offline

Last Login: Today at 04:12:09
Date Registered: 17 October, 2011, 18:15:24
Location: WLHS
Posts: 97


Total Post Ratings: +3

View Profile WWW
« Reply #214 on: 12 November, 2012, 23:59:33 »
0

does anyone here know a good way to make a new snapshot?
Logged

noobnonin
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 12 May, 2013, 05:42:38
Date Registered: 03 November, 2012, 18:45:21
Posts: 103

Total Post Ratings: -11

View Profile
« Reply #215 on: 13 November, 2012, 04:13:26 »
0

ok this is what i have until now
you can see the picture that i attached  of "what i have.png"

and there is a video of me failing o.O
<a href="http://www.youtube.com/watch?v=7SsAgbqk2aU" target="_blank">http://www.youtube.com/watch?v=7SsAgbqk2aU</a>
vogtinator, or someone, if im doing something wrong please tell me

Regards...


* what i have.png (234.89 KB, 1280x1024 - viewed 476 times.)
Logged
Rhombicuboctahedron
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: Yesterday at 01:00:32
Date Registered: 11 October, 2012, 04:11:39
Location: Texas
Posts: 437


Total Post Ratings: +35

View Profile
« Reply #216 on: 13 November, 2012, 05:56:19 »
0

Well, it didn’t look like you had the initrd file, which, unlike the zimage file, I don’t think it is necessary to get something on the screen, but it is necessary to do anything.
I believe you can find a link to it at very first post here.
This is how far I got on linux
I can use the keyboard, which is awesome, but I can’t use a flashdrive, and it freezes when I use the bootscript_usb
Sorry if you can’t see the screen very well
<a href="http://www.youtube.com/watch?v=B2MiVkXhAYs" target="_blank">http://www.youtube.com/watch?v=B2MiVkXhAYs</a>
Logged

Vogtinator
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 09 May, 2013, 13:29:07
Date Registered: 08 November, 2012, 23:17:13
Location: Germany
Posts: 430


Total Post Ratings: +24

View Profile
« Reply #217 on: 13 November, 2012, 10:55:13 »
0

If you boot from USB, you don't need an initrd, as there don't exists any modules needed to mount USB.
The zImage contains the kernel, without it it'd be useless.
« Last Edit: 13 November, 2012, 10:55:28 by Vogtinator » Logged
tangrs
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: Today at 04:56:05
Date Registered: 13 July, 2011, 04:32:25
Location: Australia
Posts: 188

Topic starter
Total Post Ratings: +84

View Profile WWW
« Reply #218 on: 13 November, 2012, 11:39:16 »
+3

Updated at 7th Feb 2013

Since this is getting a little more popular (thanks to Hackaday), I decided to write up a little FAQ.

Is this really Linux?

Yes.

Which models does this support?

All current models - Clickpads, Touchpads and CX models.

What distro does this run?

Uh, Buildroot? Does that even count? Technically though, it can run any distro that supports ARM EABI. Debian ARM port should work but needs some effort.

Wait, so I can like, run Linux programs on this?

It depends. The answer is: most likely but might require a fair bit of effort.

Basically, the calculator doesn't run on your typical AMD/Intel x86 architecture. It runs on an ARM CPU core (similar to most android phones and iPhones/iPads/iPod Touches nowadays).

The software you can get on Ubuntu, Mint, Fedora, [insert favourite distro] are mostly binary packages. They've been precompiled by others and you just need to pretty much package-manager install package.

Now installing it like that on Nspire Linux most likely isn't exactly possible because:

A. Those packages are compiled for x86, not ARM.
B. The initrd/images that I've provided are built from Buildroot and almost won't have a package manager with everything pre-provided.

If you're the average user, you can stop reading now. The answer is no, it won't run whatever Linux program you want unless someone cross-compiled the program for you.

If you're feeling a little more adventurous, you can dive into the ugly world of cross-compiling. Now, the answer becomes "yes but only if you endure hours of pain".

The beauty about OSS is that you aren't restricted to using the binaries that you're given by others. To make your own programs run on Nspire Linux, we're going to need  the source code of the program you want and to cross compile for ARM.

Obviously, you'll need a cross-compiling toolchain. When you make a Buildroot, you get a cross-compile toolchain for free. You can use that to cross compile whatever package you want.

I won't go into the details. You can use Google for that.

Finally, if you hate dealing with compiling, there is one other solution. You can load up and run your favourite distro* onto the calc and use a package manager as usual. The Nspire won't have enough memory to hold it all but it does support booting from USB with the right options.

Again, Google is your friend.

* = provided they have an ARM port. I've had success with Debian ARM port.

Can this run Android?

Theoretically, yes but it's too much work for it to be worth it.

Does this run on top of the stock operating system?

No. Once loaded, it replaces the stock OS completely in memory.

How does this get loaded?

In-place loading. Basically, loading the kernel into memory using the stock OS functions, then let Linux take over (which replaces the Nspire OS).

Does this have X running?

Yes. The full configs at http://tiplanet.org/nspire-linux-builds/ will have an Xserver that you can run.

Can this run like KDE, Gnome, Xfce, Fluxbox, [insert favourite window manager]?

Yes but it'll probably suck (not that I've tried anything apart from TWM). Try not to forget that this is a 120MHz device with 64MB of RAM.

Why doesn't this run on the emulator?

I'm not sure. I think some co-processor instructions that Linux requires but not the stock OS weren't implemented in the emulator.

OMG, how to internetz?

The video/s of my calculator going on the internet are just a little personal distraction. The program is links and I'm just using a USB wireless dongle to connect to a wireless network.

Please don't ask me how I did it because it will vary depending on your hardware. Very generally speaking though, you'll need the kernel modules for your USB dongle and possibly  some firmware files. During run time, just load the kernel drivers, use a little wpa_supplicant and udhcpd magic and bam, you've got net.

But seriously, don't email me about this (unless it is a very specific/technical question) because I probably don't have time to help you step by step.

Won't this, like, make it easier for people to cheat?

Well, I don't believe so. Considering the amount of hardware you have to connect to the Nspire (I'm talking a USB hub, a USB drive and a power adapter) to make the internet work, I doubt a exam supervisor/teacher wouldn't notice it.

Besides, I'm pretty sure the stock OS doesn't have lots of white on black text and a picture of a penguin on it Wink

I need help.

The quick links at the top of the front page can help you.

You should run the stock OS on an emulator inside Linux. That'd be cool.

It would indeed be amusing.

Can this run emulators?

See "Wait, so I can like, run Linux programs on this?"

Does this support C++?

Of course. Linux isn't Ndless and don't share the same restrctions.

Though, that being said, a C++ toolchain is possible on Ndless - there are some notes on my blog.

So, what does this thing do exactly?

Nothing really. It's just cool!

Why are my USB devices causing Linux to go crazy on the console?

Your USB device is probably trying to draw too much power. You might need an external, powered hub.

The Nspire USB hardware only gives out something like 8mA compared to the 500mA in the USB specs.

"Will this run Crisis?"

Yes. Yes it will.
« Last Edit: 07 February, 2013, 08:26:58 by tangrs » Logged
Eeems
THE GAME
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 07:21:39
Date Registered: 14 March, 2009, 03:32:57
Location: Edmonton, Alberta
Posts: 5080


Total Post Ratings: +231

View Profile WWW
« Reply #219 on: 13 November, 2012, 18:25:35 »
0

Lol, crysis Tongue
Nice faq. There has been something I was wondering when I noticed that you said that the linux kernel completely replaces the nspire os in memory when you start it. How do you manage the transistion? How do you manage using the nspire OSes functions to load the linux kernel and then replace themselves with linux?
Logged

compu
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: Yesterday at 23:13:20
Date Registered: 09 January, 2011, 22:45:52
Location: Germany
Posts: 226

Total Post Ratings: +53

View Profile
« Reply #220 on: 13 November, 2012, 19:01:00 »
0

Basically the same way as OSLauncher: while overwriting the OS, you have to make sure not to rely on any OS code, so your loader has to deliver all the functions it needs (in the case of OSLauncher, e.g. zlib for decompressing the OS, or GCC's builtin memory functions).
After removing all traces of the previous OS (things like clearing cache), you can pass control to the new OS.
Logged

Nspire I/O Discussion|Website - cross-compatible with Prizm!
TI-Nspire Programming Statistics
Eeems
THE GAME
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 07:21:39
Date Registered: 14 March, 2009, 03:32:57
Location: Edmonton, Alberta
Posts: 5080


Total Post Ratings: +231

View Profile WWW
« Reply #221 on: 13 November, 2012, 19:10:42 »
0

Quote
Basically the same way as OSLauncher: while overwriting the OS, you have to make sure not to rely on any OS code, so your loader has to deliver all the functions it needs     
   (in the case of OSLauncher, e.g. zlib for decompressing the OS, or GCC's builtin memory functions).                                                                           
   After removing all traces of the previous OS (things like clearing cache), you can pass control to the new OS.
Quote
How does this get loaded?
   In-place loading. Basically, loading the kernel into memory using the stock OS functions, then let Linux take over.
From what he says here he does rely on stock os functions. So if he does use the stock functions, how does he handle loading the linux kernel into ram and not overwriting these functions?
I'm kind of interested in a more technical explanation of how it is done. Not just a simple gloss over.
Logged

compu
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: Yesterday at 23:13:20
Date Registered: 09 January, 2011, 22:45:52
Location: Germany
Posts: 226

Total Post Ratings: +53

View Profile
« Reply #222 on: 13 November, 2012, 20:52:00 »
0

Oh well, my explanation was a bit wrong. I assumed he loads the kernel to 0x1000000 (that's what OSLauncher does), which would be the SDRAM starting address (and the place where the stock OS lies, so OSLauncher has to take care not to use any functions of it, furthermore interrupts are disabled during the process, so we can't use syscalls at all, not even ndless functions), but after a quick look at the source he just mallocs as much memory as possible (with stock OS functions) and loads kernel + ramdisk into it (with stock OS functions) and then passes control to the kernel.
So there's no need to provide own functions, he can use syscalls the whole time because he isn't overwriting any functions of the OS.

But yeah, maybe tangrs can explain this better (and correct me if I'm wrong) Cheesy
Logged

Nspire I/O Discussion|Website - cross-compatible with Prizm!
TI-Nspire Programming Statistics
Eeems
THE GAME
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 07:21:39
Date Registered: 14 March, 2009, 03:32:57
Location: Edmonton, Alberta
Posts: 5080


Total Post Ratings: +231

View Profile WWW
« Reply #223 on: 13 November, 2012, 20:57:41 »
0

Ah ok, hmm, does the linux kernel then reallocate itself to an earlier place in ram? I'll wait for tangers before I ask any more questions Tongue
Logged

DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 04:23:20
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50233


Total Post Ratings: +2615

View Profile WWW
« Reply #224 on: 13 November, 2012, 20:59:17 »
0

Darn this is nice to see on Hackaday Cheesy
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Pages: 1 ... 13 14 [15] 16 17 ... 59   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.279 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.