Author Topic: Calling all Linux Kernel developers!  (Read 399653 times)

0 Members and 7 Guests are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #135 on: October 31, 2012, 03:35:54 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
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #136 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 ;)

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #137 on: October 31, 2012, 03:41:40 am »
Here's a USB keyboard working :D


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: Calling all Linux Kernel developers!
« Reply #138 on: October 31, 2012, 03:45:40 am »
Wow I'm glad there's more USB stuff nowadays. A year ago people thought USB would never be possible on the TI-Nspire due to how locked down the calc is. Now imagine playing nCraft or the like with the calc keypad plus a mouse.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #139 on: October 31, 2012, 03:46:03 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 ;)
Here's a USB keyboard working :D
You should warn sensible people before posting awesome news like that :w00t:
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #140 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 :|

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #141 on: October 31, 2012, 05:30:48 am »
Indeed, we'll have to use powered hubs. I wrote about that earlier today in my news over at TI-Planet, http://tiplanet.org/forum/viewtopic.php?f=43&t=10659 :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Calling all Linux Kernel developers!
« Reply #142 on: October 31, 2012, 06:35:30 am »
Congratulations tangrs, excellent news !
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
Re: Re: Calling all Linux Kernel developers!
« Reply #143 on: October 31, 2012, 07:19:30 am »
I must see if I can try this when I get home tonight. This looks awesome, nice work Tangrs!
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #144 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
« Last Edit: October 31, 2012, 08:00:19 am by tangrs »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Calling all Linux Kernel developers!
« Reply #145 on: October 31, 2012, 09:49:26 am »
OH MY. THE EPICNESS.
By the way, we could call this linucx.
I'm not a nerd but I pretend:

Offline merauder75

  • LV3 Member (Next: 100)
  • ***
  • Posts: 75
  • Rating: +1/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #146 on: October 31, 2012, 10:45:12 am »
So were all the USB support changes on the kernel side? Could I just use an existing FS image and boot it correctly on a USB stick?

EDIT: Also, what kind of cable do I need to buy?
EDIT Again: What sort of other stuff is on the image? GCC? Lua?
« Last Edit: October 31, 2012, 10:49:59 am by merauder75 »
Known Programming Languages:
C++,C#,Java,Python,Lua,PHP,x86 ASM,TI-Basic(Z80 and Nspire),C

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #147 on: October 31, 2012, 11:10:34 am »
Now that the limitation on the size of the rootfs has been essentially lifted, it's easier to put GCC on the image, indeed... It will probably be able to compile simple C/C++ programs, but 64 MB of RAM, minus the kernel, minus the userspace (shells), aren't enough to compile very complex code.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Calling all Linux Kernel developers!
« Reply #148 on: October 31, 2012, 12:43:11 pm »
By the way, we could call this linucx.
dat awesome name :o    +1
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Calling all Linux Kernel developers!
« Reply #149 on: October 31, 2012, 02:26:22 pm »
Great work Tangrs! I assume it will be possible to have a Debian rootfs with an X-server?
Will try when I get some time.