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

0 Members and 3 Guests are viewing this topic.

Offline crazyracer98

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #870 on: May 18, 2013, 07:44:37 am »
Sorry, but can someone help me, plz! I have the problem, that my TI Nspire CX CAS freeze at
Code: [Select]
r4:00000000 r3:00000000.
I had searched and found << http://ourl.ca/1713105 >>, read the article, but it still doesn't work.
I run linuxloader and type in:
Code: [Select]
kernel Linux/zImage.tns
initrd Linux/initrd.tns
(rdsize 0x4000)(<-- but it still freeze)

Offline qubicprograms

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #871 on: May 20, 2013, 02:14:54 pm »
Well, for one you don't have the "cmdline" command in there:

kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline root=/dev/ram
boot
You may also want to make sure all the files (including the bootloader) are up to date... Try deleting all the files related to Linux and installing fresh ones to the calc.
I support this kind of hacking: making things do things that those things weren't originally meant to do.

Offline crazyracer98

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #872 on: May 22, 2013, 12:05:18 pm »
I deleted the "Linux" folder on my calculator and on my computer, downloaded the latest files from "http://tiplanet.org/nspire-linux-builds/", loaded this on my calc, run bootloader, typed in the commands and still freeze at r3:00000000 r4:00000000. But this time, booting stocks at <RAMDISK: bzip2 image found at block 0> and then the calc freeze.

But thanks @qubicprograms

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #873 on: May 25, 2013, 08:30:51 am »
Hi,

Just dropping in to say that this project is not dead! Despite the lack of visible activity, progress is being made. This post will hopefully bring everyone up to date about what's been happening.

Right now, here are some of the things that has happened or is happening now.

  • Getting TI-Nspire support into mainline
  • Rewriting the TI-Nspire port to use device trees
  • Added support for device tree loading in linuxloader2
  • Debugging a very annoying and well hidden bootloader bug which has stumped us for weeks (shout outs to Vogtinator)
  • PTT LEDs finally unlocked

Mainline

We're in the process of getting TI-Nspire support into the mainline kernel. If this is successful, it'll make maintaining the kernel much easier and also have better code.

To start off with, we're just submitting the absolute basic platform code needed to boot Linux. It doesn't have support for any other hardware than the interrupt controller, timer, clock and keypad.
Once the base kernel is mainlined, we'll begin porting hardware support in again.

Device tree rewrite

Part of getting TI-Nspire support into the mainline kernel involved switching to using device trees. This means we can effectively use a file to describe our hardware configuration and we don't have to keep chucking code at the kernel for every new hardware supported which is always nice.

Unfortunately, it was easier to just begin writing the whole platform from scratch than fix up our old code. This was exactly what we did.

The old code was left as-is which is why you're not seeing any new updates in nightly builds.

Device tree support in linuxloader2

Obviously, to boot the newer, device tree kernels, the bootloader needed to be updated to support loading device tree blobs. It turned out adding support for it was a lot easier than originally anticipated. The first version did not have support for initrds and command line in DT kernels.

Support for it quickly improved and, thanks largely to Vogtinator's contributions, we had a initrd loading and command line loading working. There was a little confusion with 'initrds' and 'ramdisks' which caused the initial version with support for initrds to not work properly. This was due to my bad variable naming in the bootloader code which did not clearly differentiate between the two.

Just when we thought we had a good bootloader going, Vogtinator and I started noticing random things happening in the kernel. Drivers weren't being loaded properly, the LCD driver would work about fifty percent of the time. At the time I suspected something was broken in the kernel and a race condition was occurring. We were lucky to even make it to a shell. For the next couple of weeks, we were pulling hairs out trying to work out what was wrong (at least I was :P). Every now and then, someone would come up with a 'fix' that'd work for about an hour and break again. Other times, we'd blame the device tree handling code. Sure, we looked at the bootloader, Vogtinator shuffled some things around but the same things kept happening.

I assumed that if the device tree handling code was truly broken, there would surely be a kernel patch fixing it very soon so I waited to see if anyone else reported a similar problem. A few more weeks went by and the merge window opened again and nothing showed up. I started to suspect the bootloader again since it was unlikely a bug in the kernel since nobody has stumbled on it and went back to the ARM booting guide. A bit of trial and error and I had something that would now work 100% of the time! It was probably the bootloader's fault after all. I quickly sent a patch over to Vogtinator and voila, it was confirmed we had fixed the bug!

PTT LEDs finally unlocked

On the side, I was also researching how to unlock the PTT LEDs. A few months ago, I had partial success and managed to unlock one register (which was enough to control the LED). Now, the LED interface is fully cracked and unlocked - we can use the LED again!

The catch is, we can't unlock the LED in the TI-Nspire OS because it resets if it detects the LEDs have been unlocked. However, that doesn't bother us since we're booting Linux :) Being able to use the LEDs is really awesome for Linux since we can now have activity indicators for various things in the kernel (like NAND access)

Thanks

I don't think I've properly credited the few people who've contributed a lot to the project. Cheers to:

  • Lionel Debroux - for kindly hosting nightly builds of the kernel, pressuring me to mainline the kernel and providing assistance in managing the project
  • Vogtinator - for all the work he has contributed to linuxloader2, kernel and TI-Nspire documentation
  • All the end users - for your support and being guinea pigs testing the kernel for us

So, that's the state of Linux on TI-Nspire right now. It's moving slowly (it's my final year of school so things are pretty busy) but it's moving surely!

Offline AlexisVieira

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 100
  • Rating: +1/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #874 on: May 25, 2013, 10:12:43 am »
great news :) i hope that i can test that soon :)
I'm Portuguese, sorry bad English

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #875 on: May 27, 2013, 02:09:59 pm »
Well, I've still not been able to successfully boot into USB, but I've learned a lot about Linux through the Wii and Nspire because of you guys. Vog, tangrs, and all the testers, are awesome guys! Can you map the arrow keys with this kernel?
Keep trying.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #876 on: May 27, 2013, 03:06:08 pm »
Good to hear this project isn't dead and still progressing. The LED crack sounds lovely (flashing on 'disk' activity anyone? :P). Good luck :thumbsup:

Some people need a high five in the face... with a chair.
~EC

Offline crazyracer98

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +3/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #877 on: May 31, 2013, 04:09:24 pm »
Hi,
can someone make an installationguide for Linux on TI Nspire in German and French?
« Last Edit: May 31, 2013, 04:09:45 pm by crazyracer98 »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #878 on: June 08, 2013, 06:43:20 am »
That's pretty epic. Now that I have my Nspire I should check it out. :D

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: Calling all Linux Kernel developers!
« Reply #879 on: June 09, 2013, 01:13:20 am »
Hi,
can someone make an installationguide for Linux on TI Nspire in German and French?
There is a French Ndless installing tutorial, but sadly it is Windows-only I think. D: http://tiplanet.org/forum/viewtopic.php?f=57&t=11055

It is possible that an actual Linux one is hidden somewhere on TI-Planet, but I'm unsure.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Calling all Linux Kernel developers!
« Reply #880 on: June 09, 2013, 10:17:06 am »
It is possible that an actual Linux one is hidden somewhere on TI-Planet, but I'm unsure.
Just replace "TI-Nspire Computer Software" by TiLP and that's all.
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #881 on: June 09, 2013, 01:47:41 pm »
Quote
Can you map the arrow keys with this kernel?
That would require some ugly hacks within the touchpad driver, because:
-How to detect whether it's a button press or mouse click?
-It's the only synaptics touchpad with arrow keys and a tactile switch
-It's a mouse after all
So it would be very difficult to persuade the maintainers to accept our patches,
but I'll try to do my best if someone has a clue how to solve #1.

Quote
can someone make an installationguide for Linux on TI Nspire in German and French?
Linux is in English so it'd be a good practice :P
As tangrs posted, a new version will be coming soon.
It wouldn't be worth the time writing a tutorial, as the installation process will get a bit more complicated :/
Project Idea for someone familiar with libti{calcs,cables,files}: Automatic ndless (and possibly linux) installer with GUI.
Maybe even a kind of app store, who knows :D

Quote
booting stocks at <RAMDISK: bzip2 image found at block 0> and then the calc freeze.
Don't worry, it takes 1-2 minutes depending on the image size.
« Last Edit: June 09, 2013, 01:47:49 pm by Vogtinator »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #882 on: June 09, 2013, 01:59:55 pm »
Automatic ndless installer with GUI.
Are you kidding me ? Sneding two files to a calc isn't that hard.

BTW, I can't boot an external RootFS. If I load the BusyBox initrd and set root=/dev/sda2 (not an error), it can't find /dev/tty0 and if I don't load an initrd, it kernel panics. D: I'm sure my home made adapter works becaues it has no problem with MSD8x on my 84+. I have a CX (non CAS).

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #883 on: June 09, 2013, 02:06:27 pm »
Quote
Are you kidding me ? Sneding two files to a calc isn't that hard.
For some people at my school it seems to be. They f**ked it up and I had to do it for them.

Quote
BTW, I can't boot an external RootFS. If I load the BusyBox initrd and set root=/dev/sda2 (not an error), it can't find /dev/tty0
/dev/tty0 not found, you say? That's the case if the kernel isn't compiled with devtmpfs support.

Quote
and if I don't load an initrd, it kernel panics.
Very strange. Your ll2 contains
Code: [Select]
kernel linux/zImage.tns
cmdline root=/dev/sda2 rootdelay=5
boot
?
What's the error message exactly?

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 #884 on: June 09, 2013, 02:08:38 pm »
Automatic ndless installer with GUI.
Are you kidding me ? Sneding two files to a calc isn't that hard.
Ndless 1.0/1.1 used to have an automated installer with a GUI, using the TINCLS libraries, but it involved more operations than just sending a couple files.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.