Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tangrs

Pages: 1 ... 9 10 [11] 12 13 ... 16
151
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 07:38:56 am »
USB host support certainly opens a lot of doors! I had some video files playing off a USB drive and there's now basically no limit on the size of your rootfs.



I know some of you want to get in on the action so I've linked the latest snapshot I'm using :)

This isn't exactly stable though. There are a few quirks with the USB right now.

First, for some reason, if the last device plugged in is not an OTG-A end cable before launching Linux, no interrupts are sent and USB is completely dysfunctional. Easy way to work around this is to get the calculator OTG cable, plug the A end into the calculator with nothing connected to the B end before starting Linux. It's possible that something isn't being set in the OTG controller.

Second, only full speed devices are supported right now. There seems to be weird bugs with high-speed devices. There's a temporary workaround that forces highspeed devices to connect at full speed.

This can cause a bit of trouble for us because if we plug in a device before the workaround has a chance to run, it won't be detected or there'll be lots of errors. This is especially a problem if our rootfs is on a USB drive. The trick I used to work around this is to set a delay before the rootfs is mounted (in my config, it's 10 seconds). When the console message says "Waiting 10 seconds before mounting root filesystem", plug in the USB drive. 10 seconds should be plenty of time to connect the device and for it to be detected and initlialized.

Other things to watch out for include: make sure only one USB drive is connected during boot time or else the kernel might get mixed up between which is your real root device and that the calculator gives out very little power. If you're connecting a hub, it is best to make sure that it is externally powered or you'll see USB errors a lot.

After boot time, USB should work as normal. Remember not to disconnect the USB drive that is mounted as the rootfs!

So, in summary, to get this snapshot up and running:

1. Prepare your rootfs. Get a USB drive that you don't mind completely erasing. In my config, I didn't have a partition table. I just ran dd if=rootfs.ext2 of=/dev/X (replace X with your USB device).
2. Copy bootloader and bootloader script (ensure that the config inside is correct) to a place on your calc.
3. Connect your OTG cable's A end into your calculator.
4. Run the boot script.
5. Wait until the console reads "Waiting 10 seconds...". As soon as this happens, plug in your USB drive. A lot of text should scroll by - if not, you probably didn't do step 3 correctly.
6. Wait a little and you should eventually be dumped to a shell. If you get a kernel panic, it probably means you didn't do it fast enough or your USB isn't supported by the kernel.

To get mplayer working:

1. Plug in a USB drive with the movie/video you want to play and mount it as usual. This snapshot has support for MSDOS FAT and VFAT filesystems.
2. Run mplayer -vo fbdev2 -nosound -framedrop [filename]

Link to snapshot

This snapshot also has a non-working X server. If you can get xcalc or xterm to run, please email me!

Have fun!

Edit: I also highly recommend connecting a hub + keyboard. Typing on the keypad sucks!
Edit: Oh and overclock for movie playing :)

Ideas to expand on:
  • Swap file to increase memory
  • Add support for wireless dongles for interwebs

152
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 05:21:37 am »
The one thing I've noticed that the Nspire doesn't give USB devices much power to work with. So even with one USB drive + a hub is enough to hit the limit. Looks like we'll need to use powered-hubs :|

153
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 03:41:40 am »
Here's a USB keyboard working :D


154
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 03:36:49 am »
Does that mean that we will be able to boot on Linux from a USB stick ? O.O
If so, then it is awesome :D
If not, then it is still awesome :D :P

Yes! That's why things will get interesting now :D

We could also connect USB wireless dongles if you get where I'm coming from ;)

155
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 03:34:21 am »
What did you change in the code to achieve this ?

It was seriously simple. I just had to set a DMA mask.

All that documentation studying was useless >.>

But I don't care, it works now :D

Edit: There are still a few kinks to work out but it works.

156
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 03:26:19 am »
YES. YES. YES. USB host works!

I have literally spent 5 minutes screaming and running in circles when USB host worked! After 3 weeks of trial and error, I finally got it to work.



There'll be another video soon demonstrating a USB keyboard working :D

Things will be getting very interesting, very soon!

157
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 31, 2012, 12:23:02 am »
Hopefully, I can get Python to compile and run, though I think it might be too big. Can't hurt to try it :)

Currently, it fails on compiling the unicodeobject.h file, don't know why, something about variable declaration errors.

Python 2.7 on an Nspire, now THAT would be cool.


I got it to work a while ago but it increased the ramdisk size to ~20MB and the loading time wasn't really worth it XD

How'd you do that? I just tried messing with the broken header file, but to no avail. I mostly want to do it simply because I can, like everything else I do to my calculator  ;). Do you have to use the python source code from their site, not from buildroot?

Were you trying to rebuild? You might need to make clean and rebuild from scratch. I had troubles where the toolchain wasn't being updated and couldn't compile Python problem but they went away when I deleted the output folder and rebuilt everything.

158
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 30, 2012, 09:35:26 pm »
When (if?) you eventually get it to cross compile and you've secured the binaries, you need to add it to an existing ramdisk image. You can often do this by mounting the file as a filesystem and copy the binary(ies) into /usr/bin or wherever.

How would you mount the file as a filesystem (on a mac)?

I use OSXFuse and a fuse filesystem that lets you mount ext2/3 drives.

159
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 30, 2012, 05:45:18 pm »
I am new to this, can someone make a video on how to get a linux file to run on the calculator?

It's a tricky process to say the least. Best you didn't attempt unless you have some idea of what to do. It's still an area most people hate going into.

If the Linux program you want to get working can be provided by buildroot, I would just use that and let it create a new image for you.

Otherwise, you'd need a Linux cross-compiler toolchain to cross-compile the program. There is a tool called crosstools-ng or something like that which will create a toolchain for you automagically. Otherwise, when you create a image with buildroot, you also get a bonus toolchain which you can use.

You'll then have to pass your toolchain triplet to the configure script of whatever you're compiling to get it to cross compile.

When (if?) you eventually get it to cross compile and you've secured the binaries, you need to add it to an existing ramdisk image. You can often do this by mounting the file as a filesystem and copy the binary(ies) into /usr/bin or wherever.

After that, unmount and pass the modified ramdisk to the bootloader and boot Linux as usual. Then hope that you cross compiled it correctly :)

160
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 30, 2012, 05:36:36 pm »
Hopefully, I can get Python to compile and run, though I think it might be too big. Can't hurt to try it :)

Currently, it fails on compiling the unicodeobject.h file, don't know why, something about variable declaration errors.

Python 2.7 on an Nspire, now THAT would be cool.


I got it to work a while ago but it increased the ramdisk size to ~20MB and the loading time wasn't really worth it XD

161
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 30, 2012, 06:19:21 am »
Overclocking shouldn't kill anything :S

Are you sure you used the latest kernel? The first kernel has a bug where it freezes when you touch the touchpad.

[ignorant message]does this have any uses at this time?[/ignorant]
As in, what can you do with this?

For the cool factor :) Why else do we program stuff for calculators? :P

Though, eventually, I would love it to have a OSS CAS software replacement. But that's a while away :P

162
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 26, 2012, 05:59:42 am »
Just a progress update. I believe I know why the Linux USB driver isn't working on the Nspire.

Hidden in a corner of the documentation for the USB controller lies this:

Quote
However, the queue heads (dQH) must be placed in on-chip RAM. A design limita- tion on burst size does not allow the queue heads to be placed in DRAM.

Basically, I think this means that queue heads must go in the SRAM. Linux isn't aware of this and is handing out DMA addresses that point to the SDRAM. Unfortunately there doesn't seem to be an obvious way to tell Linux to hand out SRAM DMA addresses to the USB driver.

In other words, this sucks because I know what's wrong but not actually sure how to solve this problem. :\

163
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 22, 2012, 06:47:26 am »
hm dang, I was hoping for snes9x

No, I think snes9x is a very real possibility.

164
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 21, 2012, 07:59:48 pm »
Sorry, does this allow you to run linux programs?

Yep.
Wait, so I could download a linux program and run it on my nspire right now?
Yup. Well, it depends what's its dependencies (graphical programs are unlikely to work), but basically, yes.

It's also likely you'd also have to compile it from source too since most Linux binaries aren't compiled for ARM.

Buildroot is very handy as it can build a crosscompiling toolchain and a ramdisk for you to use.

165
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 21, 2012, 07:00:56 pm »
Oh, that much space for X.Org ? I expected somewhat less.
Of course you could save space by not including the full X installation, as in, only the framebuffer or nspire driver. Even tho, not even sure the nspire one it exists, so someone would have to port it, unless the framebuffer driver works fine.

Anyway there's the framebuffer with SDL, and you can play good games with them.

The framebuffer one should work fine. I just used a default installation provided by buildroot so I'm not sure how much of X.org is being included.

Pages: 1 ... 9 10 [11] 12 13 ... 16