Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: tangrs on October 02, 2012, 06:10:36 am

Title: Calling all Linux Kernel developers!
Post by: tangrs on October 02, 2012, 06:10:36 am
Quick links

Most up to date information: About 95% of the things you need to know about Nspire Linux are available on the Linux page on Hackspire (http://hackspire.unsads.com/wiki/index.php/Linux).
Downloads: Nightly builds of just about everything you need can be found on TI-Planet (http://tiplanet.org/nspire-linux-builds/), courtesy of Lionel and Fabian (Vogtinator).
Bug reports: They are very welcome! Don't hesitate to contact myself, Lionel or Fabian or simply post in this thread if you're experiencing kernel panics or just general weirdness and it isn't already documented on Hackspire (http://hackspire.unsads.com/wiki/index.php/Linux). We're relying on users to report bugs and strange behavior. However, if you just need general help on how to get things running, you're better off getting help at...
Getting help: If you need any help booting, getting a working rootfs, etc... there is a thread (http://ourl.ca/17509) dedicated to this that you can post in. The kind members of the community can help you quickly and efficiently and leave the rest of us time for developing!
Feature requests: We're working as hard as we can making all the hardware available in Linux but if there's a feature or certain behavior that you think could improve Linux (e.g. a better function for an unused key), feel free to post in this thread for discussion.


Original post below:

Hiya!

After finally getting my head around the basics of Linux kernel developing, I've completed a basic, shaky port of Linux to the TI-Nspire CAS CX.

It boots to userland with minimal hardware support (just an interrupt controller, timer and an early boot console on the UART).

(http://blog.tangrs.id.au/wp-content/uploads/2012/10/Screen-Shot-2012-10-02-at-6.18.34-PM.png)

(The kernel panic is just Linux complaining about the lack of a root fs but it otherwise boots fine)

Unfortunately, as much as I'd like to work on this alone, I have exams soon so I'll need some helpers.

If anyone wants to help, give me a yell and I'll clean up the code a litte and upload it somewhere.

Blog post (http://blog.tangrs.id.au/?p=758)

Edit: Kernel and bootloader sources are up!

New bootloader source code (use this) (https://github.com/tangrs/nspire-linux-loader2)
Old bootloader source code (https://github.com/tangrs/nspire-linux-loader)
Linux source code (https://github.com/tangrs/linux)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 02, 2012, 06:38:31 am
what o.o
do you mean you are making linux for the TI-nspire?
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 02, 2012, 06:39:15 am
Wow awesome o_O
Coming from such a talented developer as you are, you will surely get some more people interested and I truly hope this is going to be a great step towards ... a new world ?

(also, you should modify the topic title to make it more attractive :P)


EDIT : cross-posted/newsed on tiplanet (http://tiplanet.org/forum/viewtopic.php?f=43&t=10488&p=130345#p130345)

btw tangrs : you're using XCode for nspire dev too ? :o
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 02, 2012, 06:40:10 am
Tangrs, the community loves you !
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 02, 2012, 06:40:50 am
So any chances that this will be available for the non-cas ever?
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 02, 2012, 06:47:10 am
So any chances that this will be available for the non-cas ever?
I believe that's not a problem :)
(However, CX is probably a pre-requisite)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 02, 2012, 06:47:28 am
Great. :D
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 02, 2012, 07:10:07 am
Extremely interesting :)
Of course you should upload the source code (of the kernel, device tree definitions, U-Boot, etc.) somewhere in public, tangrs ;)

Note that a Linux port for the Clickpad series would be even much more interesting than a port for the CX series, because on the Clickpad series, it is certainly possible to install Linux permanently (because it is definitely possible to change the contents of the boot1), and thereby be completely free of whatever lockdown TI will try - and fail, as usual - to put forth (instead of embracing developers and making its calculator more useful as a result) :)

And indeed, CAS vs. non-CAS (especially on the CX, which does not have interchangeable keyboards) is, for all practical purposes, only a difference of several bits in the ASIC ("CAS bit" and two leading hex digits of the product ID), as shown by RunOS (never released, in 2010) and OSLauncher (independently reimplemented, and released, in 2011).
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 02, 2012, 08:22:00 am
what o.o
do you mean you are making linux for the TI-nspire?

Yep. Well hopefully XD

Wow awesome o_O
Coming from such a talented developer as you are, you will surely get some more people interested and I truly hope this is going to be a great step towards ... a new world ?

(also, you should modify the topic title to make it more attractive :P)


EDIT : cross-posted/newsed on tiplanet (http://tiplanet.org/forum/viewtopic.php?f=43&t=10488&p=130345#p130345)

btw tangrs : you're using XCode for nspire dev too ? :o

No, I usually just use a simple text editor :P

So any chances that this will be available for the non-cas ever?
I believe that's not a problem :)
(However, CX is probably a pre-requisite)

It's CX only right now because that's the only hardware I have right now to test on. I've found that the nspire emulator can't emulate some of the instructions Linux uses (especially to do with caches) so I actually need real devices to test on.

It is definitely possible to make it work on the older calculators - there's no reason why it wouldn't work. Linux only needs ~4MB of RAM which even the old calculators have plenty of.

Extremely interesting :)
Of course you should upload the source code (of the kernel, device tree definitions, U-Boot, etc.) somewhere in public, tangrs ;)

Note that a Linux port for the Clickpad series would be even much more interesting than a port for the CX series, because on the Clickpad series, it is certainly possible to install Linux permanently (because it is definitely possible to change the contents of the boot1), and thereby be completely free of whatever lockdown TI will try - and fail, as usual - to put forth (instead of embracing developers and making its calculator more useful as a result) :)

And indeed, CAS vs. non-CAS (especially on the CX, which does not have interchangeable keyboards) is, for all practical purposes, only a difference of several bits in the ASIC ("CAS bit" and two leading hex digits of the product ID), as shown by RunOS (never released, in 2010) and OSLauncher (independently reimplemented, and released, in 2011).

Alright. In that case, I'll post up sources some time tonight - but beware! I'm new to kernel developing and the code is quite messy to say the least. :P


Edit: Added links to source code
Title: Re: Re: Calling all Linux Kernel developers!
Post by: Juju on October 02, 2012, 09:42:24 am
Hey that's pretty awesome, that would even lead to a first third-party OS on the clickpad (using a bootloader in the boot1 and the rest follows)? Anyway, great job :D
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 02, 2012, 11:39:53 am
Don't know if https://patchwork.kernel.org/patch/1478361/ can help you, seems to be a patch to support the PL111 PrimeCell color controller (the one that the Nspire uses). Might be useful to get the framebuffer working.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 02, 2012, 01:09:07 pm
Strictly speaking, the first third-party OS for Clickpad calculators, DummyOS, was made in 2011, as a companion project for OSLauncher ;)
But a port of Linux + userspace, assuming we reach that state, would be the first usable third-party OS for Nspire calculators. DummyOS is just a PoC, but it's completely useless in practice :D
Being the author of both OSLauncher and DummyOS, I get to criticize them - especially DummyOS - as much as I want ^^
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on October 02, 2012, 01:36:31 pm
Darn this is awesome. I wonder, however, if we'll need OSLauncher to run this? (knowing it's practically impossible to crack the 2048 bits RSA keys to sign third-party OSes)

REgardless, it will be a big step for the community to be able to actually run Linux on a calc.
Title: Re: Calling all Linux Kernel developers!
Post by: ExtendeD on October 02, 2012, 01:42:26 pm
Another major step, good job tangrs :)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 02, 2012, 01:42:46 pm
Quote
I wonder, however, if we'll need OSLauncher to run this?
Not OSLauncher as we know it, but Linux does need a launcher, indeed :)
Therefore, the Linux port is dependent on arbitrary code execution vulnerabilities in the calculator's software.
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 02, 2012, 01:47:25 pm
(knowing it's practically impossible to crack the 2048 bits RSA keys to sign third-party OSes)
2048 bits o.0
On topic:
No freaking way! This is so awesome, I don't even have words for it! Really hope this finishes. If only I could help in some way :(

Maybe with ndless USB support we can have a hook up a hard/flashdrive and use that as filesystem?
Title: Re: Calling all Linux Kernel developers!
Post by: Sorunome on October 02, 2012, 08:00:49 pm
wow, linux on a calculator?
This is awesome! :D
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 03, 2012, 01:07:41 am
Quote
Maybe with ndless USB support we can have a hook up a hard/flashdrive and use that as filesystem?
With a working Linux port, we won't need Ndless' USB support: Linux will be running on bare metal ;)
(assuming the USB controller has a Linux driver, otherwise it will have to be made for this Linux port - in which case, the work on USB support for Ndless would prove useful for reverse-engineering and reimplementing)

Quote
wow, linux on a calculator?
This is awesome! :P
We're not there yet, but agreed :)
Title: Re: Calling all Linux Kernel developers!
Post by: SpiroH on October 03, 2012, 09:25:15 am
...knowing it's practically impossible to crack the 2048 bits RSA keys to sign third-party OSes
Well, with 'all due respect for you sir', i wouldn't rely on that. Impossible is nothing remember?
...Maybe with ndless USB support we can have a hook up a hard/flashdrive and use that as filesystem?
Well, he can always try to use a ram disk to install the initial file system: http://lwn.net/Articles/210046/  and more http://www.ibm.com/developerworks/linux/library/l-initrd/index.html
Good luck. ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 03, 2012, 09:33:18 am
It's unlikely to be possible to 2048-bit RSA keys before two or three decades (if it ever becomes practical), i.e. a complete eternity in the field of computing ;)
Even factoring RSA-1024 is currently pretty much out of the question, though the leading researchers of the field believed in 2009 (when they factored RSA-768) that factoring RSA-1024 could be done by 2020 (but probably no sooner than 2015).
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 03, 2012, 09:35:05 am
Well maybe TI will share the key with us... sooner or later... but I'm not too sure of that :\
Title: Re: Calling all Linux Kernel developers!
Post by: SpiroH on October 03, 2012, 09:49:39 am
Well maybe TI will share the key with us... sooner or later... but I'm not too sure of that :\
That's a pretty good idea, i'd say. Maybe in the end TI will give up on their OS and just install an open-source os, like Google (well rebranded mind you), and still make a lot of money. Who knows what the future has in store for us? ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 03, 2012, 12:12:04 pm
Even back when they made open-minded calculators (which was the case when I started programming said calculators), they didn't provide the RSA private keys for the OS. Nowadays, where they think that not giving such keys protects their assets for standardized testing, why on earth would they provide the private keys ?
Don't set your hopes anywhere with TI's openness ;)

We're off-topic, though ;)
Back to topic:

* on the "nspire" branch of the nspire-linux repository, I can see the following commit:
Code: [Select]
commit a1c7b431150faccea6866e6ff66ddebbc29b1d3c
Author: Daniel Tang <[email protected]>
Date:   Thu Oct 4 00:59:18 2012 +1000

    working framebuffer

When you have set everything up correctly, we're eager to see a picture ;)

* it's clearly a good thing to make everything built-in, but you should select a single compression type, probably XZ (slowest, but best compression ratio, which is desirable for us because and the amount of available Flash memory is pretty limited, especially on the Clickpad & Touchpad):
Code: [Select]
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y

CONFIG_ZLIB_INFLATE=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 03, 2012, 01:05:41 pm
Thank you for relaying the info to here Lionel :)

Hat of to Tangrs, for taking the time to work on this.
If this port gets successful (and I have a feeling it will), it will change the entire Nspire scene.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 03, 2012, 03:57:22 pm
But we won't be able to make it an os w/o the RSA keys so yeah :\
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 03, 2012, 03:59:55 pm
Quote
But we won't be able to make it an os w/o the RSA keys so yeah :\
On the Clickpad (both prototypes and production models), we could, see http://ourl.ca/17131;msg=264341 ;)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 03, 2012, 04:00:27 pm
I have a CX touchpad D:
Title: Re: Calling all Linux Kernel developers!
Post by: alberthrocks on October 03, 2012, 04:38:47 pm
Quote
But we won't be able to make it an os w/o the RSA keys so yeah :\
On the Clickpad (both prototypes and production models), we could, see http://ourl.ca/17131;msg=264341 ;)
Also, the OS can be "hot-launched" - basically, it can replace the currently running Nspire OS. :)

Great job on this! :D Reminds me that I should be contributing more to the ndless side of things... ;)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 03, 2012, 11:48:23 pm
When you have set everything up correctly, we're eager to see a picture ;)

Hehe, you can have a video :P



I have a busybox ramdisk booting successfully and it dumps me to a shell. Next up, I'll be working on a key pad driver.
Title: Re: Calling all Linux Kernel developers!
Post by: shmibs on October 03, 2012, 11:51:57 pm
sorry about that, but the youtube embedding feature is really picky. you have to use the link obtainable by pressing the share button and selecting long link or it doesn't recognise it.
and that's pretty fantastic =D
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 04, 2012, 07:00:33 am
Awesome work Tangrs !
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 04, 2012, 07:23:12 am
Yep, awesome :)
Pretty fast too to load so far !
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 04, 2012, 08:25:42 am
Good news and bad news!

Good news is that I now have a working userspace and rebooting has been fixed as well. I also just finished writing a keypad driver but it weirdly freezes sometimes for no reason.

Bad news is that I just realised how crap my code is. I read up on kernel coding conventions and my copy-pasta code (yes, most of the porting was just copying and adapting existing code) breaks quite a lot of it XD

Oh well. My excuse is "I'll fix it up later" :P

Anyhow, enjoy the demonstration video:

Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 04, 2012, 09:33:32 am
It boots up pretty fast. That's awesome. If it keeps going at this speed, the project will be done in no-time. Keep it up!
Any chance of a snapshot download or anything, to show to everyone I know :P
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 04, 2012, 09:40:53 am
Excellent work, as usual ;)

Indeed, some documentation about the building process (even if just to redirect to appropriate online documentation) would be good.
Some IT pros know how to build native and cross-compiled buildroot and Linux kernel, but in our community, many users are not IT pros ;)

Fun idea: adding some file in /proc, or char device in /dev, that exposes the calculator's product ID to read() (mmap() access is not mandatory as a first step) :)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 04, 2012, 11:35:15 am
how did you manage to boot this w/o RSA code?
Woah cool O.o
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 04, 2012, 11:35:16 am
how did you manage to boot this w/o RSA code?
Title: Re: Calling all Linux Kernel developers!
Post by: alberthrocks on October 04, 2012, 12:01:21 pm
how did you manage to boot this w/o RSA code?
Also, the OS can be "hot-launched" - basically, it can replace the currently running Nspire OS. :)

(Basically, you can pretty much launch an OS on top of the currently running OS. A good example is Gujin (http://gujin.sourceforge.net/) or LinLD (http://busybox.net/~vda/linld/), or Loadlin (http://en.wikipedia.org/wiki/Loadlin).)

EDIT: I haven't seen the video (I'm at school) - if he is launching from the documents screen, then it's a "hot" launch. If it's booted from the booting sequence, then it's "cold". I'm currently describing a "hot" launch.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 04, 2012, 12:29:16 pm
Yes, tangrs' work is based on a hot launcher, like RunOS and OSLauncher (but more evolved than those).

EDIT: BTW, tangrs, besides the documentation about the building process, in order to lower the barrier even further for users, you should also provide the config that you used for buildroot (or similar tools) ;)
Programmers who have already dabbled with Linux can recreate configs for buildroot / similar, but that would be work duplication, and therefore a waste of time :)
Title: Re: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on October 04, 2012, 03:20:31 pm
This is awesome. Thank you, tangrs!
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 05, 2012, 01:33:12 am
I actually had a brief readme written up for someone who wanted to compile the kernel for himself. I'll post it here.

Code: [Select]
How to boot:

1. Make folder called 'linux' (no quotes).
2. Copy 'initrd.tns', 'zImage.tns' and 'linuxloader.tns' to folder.
3. Run 'linuxloader.tns'

How to build from scratch (if you love pain)

Userspace image
1. Download buildroot (http://buildroot.uclibc.org/)
2. make menuconfig
3. Target architecture is 'arm little endian'
4. Variant can be 'arm generic' or 'arm926t'
5. In target filesystems, select ext2 image
6. make
7. Get cup of coffee
8. Copy and rename output/images/rootfs.ext to initrd.tns

Kernel
1. Add toolchain bin to PATH: buildroot-dir/output/toolchain/usr/bin (or something like that)
2. make ARCH=arm nspire_defconfig
3a. make
or for moar speed:
3b. make -jn (Where n is number of CPU cores you have + 1)
4. Coffee
5. Copy and rename arch/arm/boot/zImage to zImage.tns

Bootloader
1. Get source from tangrs github
2. Get Ndless SDK
3. make

I'll include the latest snapshot as an attachment for those who dislike pain :P

Excellent work, as usual ;)

Indeed, some documentation about the building process (even if just to redirect to appropriate online documentation) would be good.
Some IT pros know how to build native and cross-compiled buildroot and Linux kernel, but in our community, many users are not IT pros ;)

Fun idea: adding some file in /proc, or char device in /dev, that exposes the calculator's product ID to read() (mmap() access is not mandatory as a first step) :)

That's actually the boot loader's job XD I'll implement it soon.
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 05, 2012, 04:31:49 am
I've just tested this on my CX CAS (didn't go the pain way), and it works great.
It's already very functional, and all the utilities I tried work fine (top, nano, mkdir, ls, dmesg, etc).

Very very good work !
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 05, 2012, 04:32:09 am
Attached is a .config for buildroot 2012.08, which yields bzip2'ed rootfs, binutils 2.22, GCC 4.7.1 with C++ support, and several extra goodies such as, but not limited to, lua / luac / luajit, less, nano for simple text edition, SDL (with framebuffer support, sdl_gfx, sdl_image with BMP, JPEG and PNG support), expat, libusb, minicom.

Needless to say, the size of the rootfs raised a bit, to 7.2 MB uncompressed and 2.6 MB bzip2'ed; it can be reduced to ~5 MB uncompressed by disabling several bits:
Code: [Select]
$ diff -ub .config .config.old
--- .config     2012-10-05 10:25:55.703430432 +0200
+++ .config.old 2012-10-05 09:49:53.599394584 +0200
@@ -483,7 +483,7 @@
 #
 # memtester requires a toolchain with LARGEFILE support
 #
-BR2_PACKAGE_MINICOM=y
+# BR2_PACKAGE_MINICOM is not set
 # BR2_PACKAGE_MTD is not set
 # BR2_PACKAGE_NANOCOM is not set
 
@@ -530,8 +530,7 @@
 # unionfs requires a toolchain with LARGEFILE support
 #
 # BR2_PACKAGE_USB_MODESWITCH is not set
-BR2_PACKAGE_USBUTILS=y
-# BR2_PACKAGE_USBUTILS_ZLIB is not set
+# BR2_PACKAGE_USBUTILS is not set
 # BR2_PACKAGE_WIPE is not set
 
 #
@@ -677,8 +676,7 @@
 # BR2_PACKAGE_LIBIQRF is not set
 # BR2_PACKAGE_LIBNFC is not set
 # BR2_PACKAGE_LIBNFC_LLCP is not set
-BR2_PACKAGE_LIBUSB=y
-# BR2_PACKAGE_LIBUSB_COMPAT is not set
+# BR2_PACKAGE_LIBUSB is not set
 
 #
 # libv4l requires a toolchain with LARGEFILE support
@@ -796,7 +794,7 @@
 #
 # BR2_PACKAGE_ENCHANT is not set
 # BR2_PACKAGE_ICU is not set
-BR2_PACKAGE_LIBICONV=y
+# BR2_PACKAGE_LIBICONV is not set
 BR2_PACKAGE_NCURSES=y
 # BR2_PACKAGE_NCURSES_TARGET_PANEL is not set
 # BR2_PACKAGE_NCURSES_TARGET_FORM is not set
@@ -810,8 +808,8 @@
 #
 # JSON/XML
 #
-BR2_PACKAGE_CJSON=y
-BR2_PACKAGE_EXPAT=y
+# BR2_PACKAGE_CJSON is not set
+# BR2_PACKAGE_EXPAT is not set
 # BR2_PACKAGE_EZXML is not set
 # BR2_PACKAGE_JSON_C is not set
 # BR2_PACKAGE_LIBROXML is not set
@@ -1037,7 +1035,7 @@
 # Text editors and viewers
 #
 # BR2_PACKAGE_ED is not set
-BR2_PACKAGE_LESS=y
+# BR2_PACKAGE_LESS is not set
 BR2_PACKAGE_NANO=y
 BR2_PACKAGE_NANO_TINY=y
 # BR2_PACKAGE_UEMACS is not set


I cannot test it on my CX because it needs to stick to OS 3.0.1...
tangrs, should one of us send you a Clickpad (prototype or production model) to speed up your process ?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 05, 2012, 04:37:53 am
Attached is a .config for buildroot 2012.08, which yields bzip2'ed rootfs, binutils 2.22, GCC 4.7.1 with C++ support, and several extra goodies such as, but not limited to, lua / luac / luajit, less, nano for simple text edition, SDL (with framebuffer support, sdl_gfx, sdl_image with BMP, JPEG and PNG support), expat, libusb, minicom.

Needless to say, the size of the rootfs raised a bit, to 7.2 MB uncompressed and 2.6 MB bzip2'ed; it can be reduced to ~5 MB uncompressed by disabling several bits:

Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 05, 2012, 04:43:45 am
Quote
Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.
ACK :)
It's easy to reach 8 MB without even attempting to add an X server + its libraries.

EDIT1: Given that you wrote "until I rework the bootloader to lift it", I take it that raising the limit involves more than modifying MAX_RAMDISK_SIZE in main.c ?
EDIT2: you replied to me while I was editing :D
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 05, 2012, 04:45:15 am
tangrs, should one of us send you a Clickpad (prototype or production model) to speed up your process ?

I might have to work on the Clickpad/Touchpad models a bit later. Their memio ports are a bit different to the CX and the hackspire documentation doesn't specify what hardware it uses :( The reason I was able to get the CX up and running so fast was due to the most of the essential hardware on the CX was already supported by Linux.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 05, 2012, 04:48:03 am
Quote
Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.
ACK :)
It's easy to reach 8 MB without even attempting to add an X server + its libraries.


Hmmmm. If you get the source for the bootloader you could try changing MAX_RAMDISK_SIZE to something higher. But I can't guarantee it'll work without hitches since it might overwrite the bootloader code.

The solution is to relocate the bootloader itself into SRAM or somewhere out of the way before loading. That way, the max ramdisk size is limited by the amount of physical memory. I'll get the done soon

Edit: Random thoughts: snes9x SDL on Linux on CX?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 05, 2012, 05:01:52 am
+1 on relocating the bootloader to SRAM.

Quote
Edit: Random thoughts: snes9x SDL on Linux on CX?
We have the same kind of thoughts ;)
SDL applications are the reason why I selected both C++ support in the toolchain and SDL support in the target rootfs for the buildroot config :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 05, 2012, 11:52:53 pm
+1 on relocating the bootloader to SRAM.

Do you happen to know the size of the SRAM? I'm not sure now much space I am restricted to.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 06, 2012, 12:01:50 am
moar random thoughts: vba-m on sdl on linux on cx?
this is awesome :D
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 06, 2012, 01:32:43 am
The SRAM of the CX is probably not smaller than the SRAM of the Clickpad/Touchpad, which is at least 80 KB :)

As it's necessary to use Phoenix OS functions for reading from NAND Flash, the size of the kernel and initrd will remain limited by the amount of free RAM on the host Phoenix OS.
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 08, 2012, 01:31:39 pm
I've made a boring vid that can be found at
&feature=youtu.be .

Also Tangrs, sometimes boot halts just after keypad initialization. It appears to occur at random, although I've a feeling it might have to do with me (accidentally) pressing a key sometimes after it started to boot. Not sure if that's even possible though ..
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 08, 2012, 04:40:49 pm
I've made a boring vid that can be found at
&feature=youtu.be .

Also Tangrs, sometimes boot halts just after keypad initialization. It appears to occur at random, although I've a feeling it might have to do with me (accidentally) pressing a key sometimes after it started to boot. Not sure if that's even possible though ..

It might be related to touching the touchpad before the driver had a chance to init.
Title: Re: Calling all Linux Kernel developers!
Post by: compu on October 08, 2012, 04:56:00 pm
OSLauncher shows the same behaviour when launching an OS on a touchpad calc.
Title: Re: Calling all Linux Kernel developers!
Post by: SpiroH on October 09, 2012, 09:32:45 am
Hi tangrs, first off congratz for your nice and hard work. I'm having a problem when trying to run it on the emulator, though. I get the following straight jump into the debugger:
(http://imageshack.us/a/img84/1802/linuxcrashkarmticxn128.png)
Any ideas from the snapshot? Do you see any reason why it shouldn't run on the emulator? Thanks.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 09, 2012, 09:44:02 am
From http://ourl.ca/17131/318466 :
Quote
I've found that the nspire emulator can't emulate some of the instructions Linux uses (especially to do with caches) so I actually need real devices to test on.
;)
Title: Re: Calling all Linux Kernel developers!
Post by: SpiroH on October 09, 2012, 09:59:30 am
Thanks Lionel. I've missed that one. If that's the case, it's a real shame.  I hope Goplat (still) sees this and comes back to 'work' to fix it, sometime soon. Cheers. ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 09, 2012, 10:14:12 am
Goplat has been pretty silent for the past few months...

And there remains a major unresolved problem with Nspire emulation, which is preventing forward progress: your closed-source fork of nspire_emu, based on an outdated version of nspire_emu ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 09, 2012, 12:31:22 pm
Yup SpiroH, it would indeed be nice. But as Lionel said, development is a bit barred because of your fork. I think you should see to work together with the Nspire devs (Goplat, amonng others). Should help progress a lot :)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 09, 2012, 12:37:52 pm
Let's add that ncubate_emu was a fork as well, but unlike SpiroH's fork, ncubate_emu didn't prevent nspire_emu development from going forward, as it was open source.
There's no good reason to keep kArmTI closed source, and there are good reasons to provide the sources, so that both users and developers can benefit from the best in a single program :)
Title: Re: Calling all Linux Kernel developers!
Post by: critor on October 09, 2012, 12:40:01 pm
Goplat has been pretty silent for the past few months...

And there remains a major unresolved problem with Nspire emulation, which is preventing forward progress: your closed-source fork of nspire_emu, based on an outdated version of nspire_emu ;)

What? It still hasn't been updated to the latest version of nspire_emu after all those months and especially after all those posts about it?...
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 13, 2012, 05:32:28 am
Lately, I've been working on a USB host driver. I must say, I really hate working with USB.
(http://i50.tinypic.com/x3gv7.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 13, 2012, 05:54:54 am
Ah well, good luck !

(Isn't there some official driver or at least documentation for the usb hardware btw ?)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on October 13, 2012, 05:58:04 am
I was under the impression it used a standard USB chip, meaning there's probably already a linux driver floating around somewhere.

Now, whether that driver is going to be a drop-in replacement or more work than it's worth is a different story.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 13, 2012, 06:28:58 am
There is a generic EHCI platform driver which is what I'm using at the moment. Unfortunately that doesn't work well with the OTG controller since the generic driver was made for host-only controllers.

As of yet, I haven't found a way to configure the controller in a way which to completely disable device mode and become host-only which somewhat complicates things.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on October 14, 2012, 06:58:38 pm
Extremely interesting :)
Of course you should upload the source code (of the kernel, device tree definitions, U-Boot, etc.) somewhere in public, tangrs ;)

Note that a Linux port for the Clickpad series would be even much more interesting than a port for the CX series, because on the Clickpad series, it is certainly possible to install Linux permanently (because it is definitely possible to change the contents of the boot1), and thereby be completely free of whatever lockdown TI will try - and fail, as usual - to put forth (instead of embracing developers and making its calculator more useful as a result) :)

And indeed, CAS vs. non-CAS (especially on the CX, which does not have interchangeable keyboards) is, for all practical purposes, only a difference of several bits in the ASIC ("CAS bit" and two leading hex digits of the product ID), as shown by RunOS (never released, in 2010) and OSLauncher (independently reimplemented, and released, in 2011).
Oh wow I didn't know we could replace Boot1 on the first OS or at least didn't remember. I guess that's a nice workaround to having to crack the RSA keys, but too bad the clickpad is discontinued...
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 15, 2012, 02:21:21 am
Quote
Oh wow I didn't know we could replace Boot1 on the first OS or at least didn't remember.
It's a recent development, though it predates tangrs' Linux port :)
An easy, temporary hardware modification turns production Clickpad calculators into prototype Clickpad calculators.

Modifying the boot1 in arbitrary ways opens the door to permanent install of arbitrary boot1, boot2 and OS (official in pristine state, modified official, or third-party). With more changes, we could sign stuff with our own RSA keys, and refuse official software if it hasn't been resigned ^^
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 16, 2012, 07:46:41 am
Hands up for new, sexy bootloader! Woooo :P

(http://i48.tinypic.com/a2d839.jpg)

This bootloader is a lot more stable and can load bigger ramdisks now (up to ~40MB on CX). It also uses nspireio to give the user a shell for changing various options before booting.

This version does no relocating by default which means the bootloader won't trash the Nspire OS at all (until Linux is booted of course).

Binary is attached.
Source code and documentation on Github (https://github.com/tangrs/nspire-linux-loader2)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 16, 2012, 08:06:02 am
Good job, as usual ;)

EDIT: one of the ways to detect the calculator model is the leading byte / leading two hex digits of the calculator's serial ID.
* CAS+, Clickpad CAS and Touchpad CAS: 0C;
* (Lab Cradle: 0D)
* Clickpad non-CAS, Touchpad non-CAS: 0E;
* CX CAS: 0F;
* CX non-CAS: 10;
* CM CAS: 11;
* CM non-CAS: 12.
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 16, 2012, 08:25:25 am
Very nice :)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 16, 2012, 01:31:11 pm
Congratulations indeed :D
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 16, 2012, 02:05:29 pm
 :thumbsup:
So how can I use it? I'm not familiar with setting these kind of thins up  ???
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 16, 2012, 02:19:18 pm
I assume that you've watched the videos and read the documentation ? ;)

When Linux has booted, init has run and you've got a shell, you type commands like you can do on other Linux platforms :)
(nowadays, most users don't use the terminal on desktop or mobile Linux)
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on October 16, 2012, 08:42:37 pm
I assume that you've watched the videos and read the documentation ? ;)

When Linux has booted, init has run and you've got a shell, you type commands like you can do on other Linux platforms :)
(nowadays, most users don't use the terminal on desktop or mobile Linux)
I guess I'm not most users lol. I can't survive without a terminal on linux :P
Title: Re: Calling all Linux Kernel developers!
Post by: Sorunome on October 16, 2012, 09:39:13 pm
Woo, looking nice!
I assume that you've watched the videos and read the documentation ? ;)

When Linux has booted, init has run and you've got a shell, you type commands like you can do on other Linux platforms :)
(nowadays, most users don't use the terminal on desktop or mobile Linux)
Can you make it connect to the internet and do sudo apt-get install gnome? :P
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 17, 2012, 01:12:24 am
Quote
Can you make it connect to the internet
When USB host support works, Mass Storage Devices and USB network adapters should follow quickly :)

Quote
and do sudo apt-get install gnome? :P
Not only it wouldn't fit into the poor little calculator's memory, but it's way too heavyweight for the underpowered CPU of the Nspire, and additionally, Gnome is not designed for a 320x240 screen :D
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 17, 2012, 02:25:54 am
I assume that you've watched the videos and read the documentation ? ;)

When Linux has booted, init has run and you've got a shell, you type commands like you can do on other Linux platforms :)
(nowadays, most users don't use the terminal on desktop or mobile Linux)
Yeah but I need some sort of image of linux right? That's where my problem is. I've never done that :P The files were in the topic, silly me XD
[edit] But how to use the new bootloader. It doens't automatically load linux when run. Is there a command for it or something?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 21, 2012, 05:49:29 am
It's as Lionel said. Once USB host works, things will get interesting very quickly (easier said than done though :( )

I understand the boot loader is confusing.

The best way is to write a boot script to avoid typing everything in all the time. Copy and paste the following into a file, name it something.ll2.tns and copy it to your calculator. Make sure you have ext.ll2=linuxloader2 in your ndless.cfg and you can just run the script every time you need to boot Linux. This script assumes your kernel and initrd are all in a folder called linux

Code: [Select]
kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline debug root=/dev/ram console=tty0 console=ttyAMA0,115200n8
boot

(there's a bug in the command line parsing so ensure you have a newline after boot)

I've also attached the latest development kernel and ramdisk. As usual, run at your own risk :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 21, 2012, 05:53:48 am
Quote
Can you make it connect to the internet
When USB host support works, Mass Storage Devices and USB network adapters should follow quickly :)

Quote
and do sudo apt-get install gnome? :P
Not only it wouldn't fit into the poor little calculator's memory, but it's way too heavyweight for the underpowered CPU of the Nspire, and additionally, Gnome is not designed for a 320x240 screen :D


I was hoping to try and get an X server running on the frame buffer but X.org is a teensy too big for the ramdisk (~50MB) - not enough RAM to extract even when compressed. :(
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 21, 2012, 06:14:47 am
Oh, that much space for X.Org ? I expected somewhat less.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on October 21, 2012, 06:32:15 pm
Sorry, does this allow you to run linux programs?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 21, 2012, 06:54:33 pm
Sorry, does this allow you to run linux programs?

Yep.
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on October 21, 2012, 06:59:17 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.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on October 21, 2012, 07:17:58 pm
You could look into getting wayland to work instead. It's suppose to be much lighter weight then X
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on October 21, 2012, 07:20:34 pm
I thought of Wayland as well, it looks pretty promising once it goes stable.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on October 21, 2012, 07:29:36 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?
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on October 21, 2012, 07:43:17 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.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on October 21, 2012, 09:41:22 pm
hm dang, I was hoping for snes9x
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 22, 2012, 06:47:26 am
hm dang, I was hoping for snes9x

No, I think snes9x is a very real possibility.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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. :\
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 26, 2012, 08:38:42 am
Excellent work, tangrs!

Would there be a way to include more software in the linux image? Like have vim, gcc, g++, etc?

I would love to see something like that happen.

Title: Re: Calling all Linux Kernel developers!
Post by: Juju on October 26, 2012, 08:56:00 am
I assume you can install new stuff with those commands under Linux:
Code: [Select]
mkdir /mnt/initrd
mount -o loop initrd.tns /mnt/initrd
Then you would throw additional ARM-compiled binaries in /mnt/initrd/usr/bin. That or you can always generate a new image with buildroot (http://buildroot.uclibc.org/) with the stuff you want on it, just take care the resulting image size will not exceed the Nspire memory.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 26, 2012, 09:05:49 am
gcc and g++ might be a bit heavyweight for the poor little Nspire, even the CX :)
At http://ourl.ca/17131/318757 , I posted a sample buildroot config.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 26, 2012, 09:49:19 am
Thanks, I think ill try what Juju suggested, it seems safer.

I have basically no ability to build a new image, since I have only basic skill with linux.

Hopefully, someone would be willing to post a pre-made image with the stuff that Lionel Debroux put in his config.

Anyway, what is the limit of the Nspire CX CAS's memory? I'd rather not accidentally kill my calculator. :)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 26, 2012, 10:00:12 am
Don't worry, it's basically impossible to kill a Nspire through pure software, unless you're doing it on purpose ;)
The only model where it's possible (and even then, it does require a program flat out aiming at killing the calculator) is prototype Clickpads; on production Clickpads, it requires a hardware modification, and on the newer models, it's not known to be possible.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 26, 2012, 01:33:19 pm
Good, so linux is effectively in a sandbox, and can't mess with the regular TI-OS image/bootloader.

There is so much potential for this project. Sorry to keep bugging you guys for info :P

Ah well, one more newbie question, after I mount and put my stuff onto the image, do I just unmount it and my changes to it will be saved?
Title: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on October 26, 2012, 10:40:10 pm
I'm somewhat a Linux noob, so...
How do you start Linux on the new bootloader?
Are Classic models supported? I'm confused...
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 27, 2012, 01:57:04 am
Clickpad & Touchpad models are not supported yet.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 27, 2012, 10:42:56 am
How the heck did my build get to be 60MB ??? All I added was gcc to the default config
Title: Re: Re: Calling all Linux Kernel developers!
Post by: Juju on October 27, 2012, 10:51:49 am
Told ya gcc would be pretty heavyweight. When you download the tar.gz it's something like 80MB.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 27, 2012, 05:41:13 pm
Ah well, I wonder if there are smaller compilers than gcc available, or even just compilers for other languages that would fit in the 30MB limit. Heck, any language or toolset is better than nothing
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 27, 2012, 05:43:26 pm
Pretty small: http://bellard.org/tcc/
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 28, 2012, 05:13:29 am
ARM seems to be a second-class citizen in TCC, and last I checked, TCC wasn't actively maintained anymore.

FWIW, the buildroot config I posted contains Lua compiler, interpreter and LuaJIT (but not some extra libraries) :)
MicroPerl shouldn't consume much space either.

Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 28, 2012, 07:20:43 am
I'm somewhat a Linux noob, so...
How do you start Linux on the new bootloader?
It confused me too first time. You can find the readme here: https://github.com/tangrs/nspire-linux-loader2
First you need the files: initrd.tns, zImage.tns and bootloader2.tns. Put those in a folder and run bootloader. To boot linux, do "kernel <path to zImage.tns>" followed by "initrd <path to initrd.tns>" and finally "boot" (all without the quotes ofc) I also suggest reading the readme, which I did not at first XD
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 28, 2012, 07:22:34 am
[ignorant message]does this have any uses at this time?[/ignorant]
As in, what can you do with this?
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 28, 2012, 12:04:11 pm
ARM seems to be a second-class citizen in TCC, and last I checked, TCC wasn't actively maintained anymore.

FWIW, the buildroot config I posted contains Lua compiler, interpreter and LuaJIT (but not some extra libraries) :)
MicroPerl shouldn't consume much space either.



Didn't it also include gcc? How did it end up being only ~8MB?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 28, 2012, 12:13:16 pm
Nope, it did not include GCC on the target filesystem.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 28, 2012, 12:59:36 pm
Arg, accidentally deleted my last post.

Compiled the image, only 30MB :)

Has lua, microperl, and some libraries.

I'll upload it later on after I am done with my schoolwork.

EDIT: Dang it, i only get a colorful screen of garbage when I boot it. (Using the pre made zImage)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 28, 2012, 02:04:36 pm
The kernel image posted somewhere above should do the job :)
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 29, 2012, 12:23:04 pm
Got my image working. Has lua and nano

Log in is a bit messed up, the user is "default"

Lua works nicely, including io stuff.

I attached the image for people who want it.

Also, note for others who want to build their own image, change the default getty console from "ttyS0" to "tty0", so login will work.
Title: Re: Calling all Linux Kernel developers!
Post by: Augs on October 29, 2012, 02:23:36 pm
Does this work for the Ti-nspire CX? If not is there anyway to get it working on a Ti-nspire CX?
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 29, 2012, 02:30:14 pm
It definitely works on the CX CAS, it might work on the regular CX, don't really know. It's worth a try.
Title: Re: Calling all Linux Kernel developers!
Post by: Augs on October 29, 2012, 08:34:21 pm
Noob question: how do I exit this?

edit: never-mind, you have to type exit. I feel like an idiot -_-
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 30, 2012, 05:05:42 am
It works fine on a normal CX, though if using nover too it seems to fail. To me it always fails if I have my nspire overclocked. It hangs on the "keyboard p2/ mouse" message (don't know the exact message, but that one)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 30, 2012, 05:06:34 am
Weird? overclocking shouldn't have any effect on running programs (except that they run faster)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 30, 2012, 06:19:21 am
Overclocking shouldn't kill anything :S

Are you sure you used the latest kernel (http://ourl.ca/17131;msg=266194)? 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
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on October 30, 2012, 07:13:17 am
Though, eventually, I would love it to have a OSS CAS software replacement. But that's a while away :P

I've have had plans for that for some time now, even before Nspire Linux was there.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 30, 2012, 08:55:25 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 30, 2012, 08:57:27 am
Cool, certainly; but upstream Python is usually regarded as a fairly heavyweight language, and is unlikely to be a very good fit for the Nspire ;)
The simpler p14p would be more lightweight... but it was quite slow on the TI-68k series, so even on the Nspire series, it wouldn't be that fast.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 30, 2012, 09:11:30 am
Good point, I think I'll stick with just Lua and Microperl on this one. I'll try and add Ruby too, and see how big the image gets.

If it works, ill post it later so others dont have to wait forever for the thing to compile.
Title: Re: Calling all Linux Kernel developers!
Post by: Augs on October 30, 2012, 09:31:27 am
I am new to this, can someone make a video on how to get a linux file to run on the calculator?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 30, 2012, 10:02:54 am
Have you attempted to follow the text instructions ? :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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 :)
Title: Re: Calling all Linux Kernel developers!
Post by: Augs on October 30, 2012, 06:03:23 pm
Well that sounds darn complicated, sorry, but I will have to back down. Thanks for the help anyway.
Title: Re: Calling all Linux Kernel developers!
Post by: jessedog3 on October 30, 2012, 09:11:24 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)?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 30, 2012, 10:39:29 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

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?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on October 31, 2012, 12:28:10 am
that makes sense, since the toolchain would need wchar support, and thats the error im getting with the header file. I guess ill just set up to build clean,

thanks :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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!
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 31, 2012, 03:27:42 am
Congratulations ;)

What did you change in the code to achieve this ?

Indeed, things will become pretty interesting very soon :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia 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
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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 ;)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 31, 2012, 03:41:40 am
Here's a USB keyboard working :D

Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia 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:
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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 :|
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux 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 :)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 31, 2012, 06:35:30 am
Congratulations tangrs, excellent news !
Title: Re: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne 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!
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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 (http://tangrs.id.au/linux_snapshots/31-10-2012/snapshot.zip)

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:
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on October 31, 2012, 09:49:26 am
OH MY. THE EPICNESS.
By the way, we could call this linucx.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 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?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 31, 2012, 12:43:11 pm
By the way, we could call this linucx.
dat awesome name :o    +1
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens 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.
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on October 31, 2012, 02:36:56 pm
wow 0.0 now i really want to find a mini usb to female usb cable to plug in harddrives in my nspire :D
Title: Re: Calling all Linux Kernel developers!
Post by: Netham45 on October 31, 2012, 02:39:01 pm
That's very impressive.

Out of curiosity, are there any plans to backport this to the first Nspires? :D
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on October 31, 2012, 02:44:16 pm
Actually I think he wanted to have Touchpad/Clickpad compatibility, but the hardware is apparently different and less documented on Hackspire, making it harder to develop for those older models. I could be wrong, though.
Quote
Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.
ACK :)
It's easy to reach 8 MB without even attempting to add an X server + its libraries.


Hmmmm. If you get the source for the bootloader you could try changing MAX_RAMDISK_SIZE to something higher. But I can't guarantee it'll work without hitches since it might overwrite the bootloader code.

The solution is to relocate the bootloader itself into SRAM or somewhere out of the way before loading. That way, the max ramdisk size is limited by the amount of physical memory. I'll get the done soon

Edit: Random thoughts: snes9x SDL on Linux on CX?
One concern I have about that is that it would be running an emulator in an emulator, right? Wouldn't the SNES emu run way too slow due to the Nspire CPU being all used for SDL emulation to begin with?
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on October 31, 2012, 03:27:25 pm
SDL isn't emulated, that's just the graphical frontend. I guess you would have to set some frameskip to snes9x to make it work at 60 FPS.

Also mplayer lags o.o
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on October 31, 2012, 03:38:07 pm
Quote
Actually I think he wanted to have Touchpad/Clickpad compatibility, but the hardware is apparently different and less documented on Hackspire, making it harder to develop for those older models.
The hardware of the Clickpad & Touchpad has better documentation on Hackspire than the CX hardware (though the delta is blurring, as part of this work) :)
Linux + some userspace does fit in 32 MB of RAM (16 or even 8 would work), but needless to say, it can do less than in 64 MB of RAM (CX).
tangrs doesn't have a real Clickpad or Touchpad, though.

Quote
Also mplayer lags o.o
Well, the Nspire is no Raspberry Pi (basically > 5x more powerful for 1/6 to 1/4 the price, with some hardware video acceleration) or better :)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on October 31, 2012, 03:42:33 pm
SDL isn't emulated, that's just the graphical frontend. I guess you would have to set some frameskip to snes9x to make it work at 60 FPS.

Also mplayer lags o.o
Well, that's why TI advertises is as a calculator (actually rather a math&science handheld thing - meh, stupid vocabulary :P) and not a developer board :D (also @debrouxl)

But yeah, with some overclocking, it's good enough ?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on October 31, 2012, 03:54:37 pm
Quote
Actually I think he wanted to have Touchpad/Clickpad compatibility, but the hardware is apparently different and less documented on Hackspire, making it harder to develop for those older models.
The hardware of the Clickpad & Touchpad has better documentation on Hackspire than the CX hardware (though the delta is blurring, as part of this work) :)
Linux + some userspace does fit in 32 MB of RAM (16 or even 8 would work), but needless to say, it can do less than in 64 MB of RAM (CX).
tangrs doesn't have a real Clickpad or Touchpad, though.

Quote
Also mplayer lags o.o
Well, the Nspire is no Raspberry Pi (basically > 5x more powerful for 1/6 to 1/4 the price, with some hardware video acceleration) or better :)
Ah ok I thought about the opposite due to this post http://ourl.ca/17131/318760

Well, that's why TI advertises is as a calculator

The Nspire can do maths?? O.O
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on October 31, 2012, 08:20:05 pm
This is awesome, and the usb recognition works so well.
I’ve tested my keyboard, mouse, ipod, camera, TI 83, and two flash drives.
It tells the correct manufacturer and product for each, though the only one I could get to do anything was the keyboard.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 31, 2012, 08:51:09 pm
This is awesome, and the usb recognition works so well.
I’ve tested my keyboard, mouse, ipod, camera, TI 83, and two flash drives.
It tells the correct manufacturer and product for each, though the only one I could get to do anything was the keyboard.


Excellent. That's good to hear :)

SDL isn't emulated, that's just the graphical frontend. I guess you would have to set some frameskip to snes9x to make it work at 60 FPS.

Also mplayer lags o.o
Well, that's why TI advertises is as a calculator (actually rather a math&science handheld thing - meh, stupid vocabulary :P) and not a developer board :D (also @debrouxl)

But yeah, with some overclocking, it's good enough ?

Not quite. The fastest I could get it to run was about 8FPS.

That's very impressive.

Out of curiosity, are there any plans to backport this to the first Nspires? :D

Yep. I'm hoping to secure a Touchpad and Clickpad from some seniors after they've finished their exams.

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.

Already working on it :)

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?

Yep, all the USB stuff is on the kernel side.

Depending on what you want to connect, there are many you can buy. If you're only connecting one device, a mini-usb A to USB female adapter should work. Something like this one (https://dx.com/p/mini-5pin-to-usb-female-otg-data-cable-black-129670) should work.

Though, I highly recommend just buying a powered USB hub that has a mini-usb B upstream port so you can just use the OTG cable that came with your calculator. I happened to have a spare one lying around so that's what I used.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on October 31, 2012, 09:08:50 pm
Isn't this kernel running on top of TI's OS already? That could explain some of the issues performance-wise.

Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 31, 2012, 09:09:48 pm
Isn't this kernel running on top of TI's OS already? That could explain some of the issues performance-wise.



Nope, once booted, it has replaced TI's OS completely in memory.
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on October 31, 2012, 09:36:38 pm
Quote
Depending on what you want to connect, there are many you can buy. If you're only connecting one device, a mini-usb A to USB female adapter should work. Something like this one should work.

Though, I highly recommend just buying a powered USB hub that has a mini-usb B upstream port so you can just use the OTG cable that came with your calculator. I happened to have a spare one lying around so that's what I used.
I got one with at best buy for $15 that has four usb ports and one mini usb port
So I can connect my cx and still have room for four more devices
Quote
Nope, once booted, it has replaced TI's OS completely in memory.
Wait, so is there no possibility for a keyboard during normal OS? Because a keyboard would make oclua so much cooler.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on October 31, 2012, 09:37:29 pm
Quote
Depending on what you want to connect, there are many you can buy. If you're only connecting one device, a mini-usb A to USB female adapter should work. Something like this one should work.

Though, I highly recommend just buying a powered USB hub that has a mini-usb B upstream port so you can just use the OTG cable that came with your calculator. I happened to have a spare one lying around so that's what I used.
I got one with at best buy for $15 that has four usb ports and one mini usb port
So I can connect my cx and still hav room for four more devices
Quote
Nope, once booted, it has replaced TI's OS completely in memory.
Wait, so is there no possibility for a keyboard during normal OS? Because a keyboard would make oclua so much cooler.


Yep, that's pretty much true.
Title: Re: Calling all Linux Kernel developers!
Post by: TIfanx1999 on October 31, 2012, 10:38:57 pm
@tangrs: Congrats on getting usb working, that's awesome! :D
@aeTIos: Liking the Linucx name. :thumbsup:
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 01, 2012, 03:15:52 am
Edit: Random thoughts: snes9x SDL on Linux on CX?
But to make snes9x work, is there a need for linux ? If it is coded with SDL, can't it be ported with nSDL without linux ?
Sorry if it is a stupid question but I didn't even know about snes9x before it was mentionned in this topic -.-°
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 01, 2012, 03:35:55 am
snes9x is written in C++, and Ndless doesn't yet support proper program relocation - which is one of the prerequisites to such basic C++ features as vtables (see http://blog.tangrs.id.au/?p=719 for more detailed technical information).
I know that ExtendeD has worked on integrating tangrs' bFLT loader into Ndless, I don't know what the current state of that work is.
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 01, 2012, 03:42:20 am
Ah ok. Sorry again if the question was stupid, I didn't know anything about that snes emulator. Thanks for answering me with a lot of details :)
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on November 01, 2012, 06:24:46 am
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.

Already working on it :)

Great! :)
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 02, 2012, 04:42:08 am
Two questions:
What is the build login for. I just enter root and it works but are there other locations we can login to as well?
Does it matter what cmdline you set?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 02, 2012, 04:44:39 am
* for logging in with a password / with other users, you'd have to create entries in /etc/passwd, passwords in /etc/shadow, and such things :)
* if you're talking about the cmdline passed to the kernel, it does indeed matter.
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 02, 2012, 04:52:58 am
I see, so what does the cmdline do?
Also found out how to get the | key so ls | less can be used :D shift + flag does the trick (flag is in the lower right corner, below the ?! button) Scrolling can be done with b and f and exiting with q (sorry if someone else already found this, I thought it could be useful)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 02, 2012, 04:55:12 am
I see, so what does the cmdline do?
Also found out how to get the | key so ls | less can be used :D shift + flag does the trick (flag is in the lower right corner, below the ?! button) Scrolling can be done with b and f and exiting with q (sorry if someone else already found this, I thought it could be useful)

The keymap can be found in the source code at arch/arm/mach-nspire/nspire.c at around line 197. Match it up with the touchpad keymap found on the hackspire.

Btw, Doc is PgUp, Menu is PgDown. Hold shift while pressing them to scroll in the framebuffer.
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 02, 2012, 06:52:13 am
Took some time to write them all out in a text file :) It can be found in the attachment or here (http://pastebin.com/B9Q66VPu). Please notify when something is wrong :)
Title: Re: Calling all Linux Kernel developers!
Post by: Netham45 on November 02, 2012, 06:10:37 pm
Have you considered trying to use one of the Nspire emulators to get it running on the non-CX's?
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on November 02, 2012, 07:07:09 pm
Have you considered trying to use one of the Nspire emulators to get it running on the non-CX's?

Right now it can't run Linux because of some emulation issues.
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 02, 2012, 10:06:03 pm
Just wondering, how to you get video to work?

I didn’t do anything about the rootfs because I didn’t know where I needed to change that. (also I don’t really know what it means by “your usb device”)

Many different things happen when I try many different things. If I boot with linuxloader2, wait for it to get to the login request, and then put my flash drive in the dongle, it just spews out that the cache failed
If I put the flash drive in immediately after running bootloader in linuxloader2, it seems to register it, I think, but when I run mplayer, it outputs –sh mplayer: not found.
Then it outputs some error about the flashdrive, with /64

Whenever I do it the normal way by just running the bootloader_usb.ll2.tns file, depending when I put the flash drive in, it displayes different things, but it always, ALWAYS, results in it kind of freezing with the last text being (ret_from_fork+0x14/0x24)

Anyone know what I’m doing wrong?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 02, 2012, 10:10:33 pm
Just wondering, how to you get video to work?

I didn’t do anything about the rootfs because I didn’t know where I needed to change that. (also I don’t really know what it means by “your usb device”)

Many different things happen when I try many different things. If I boot with linuxloader2, wait for it to get to the login request, and then put my flash drive in the dongle, it just spews out that the cache failed
If I put the flash drive in immediately after running bootloader in linuxloader2, it seems to register it, I think, but when I run mplayer, it outputs –sh mplayer: not found.
Then it outputs some error about the flashdrive, with /64

Whenever I do it the normal way by just running the bootloader_usb.ll2.tns file, depending when I put the flash drive in, it displayes different things, but it always, ALWAYS, results in it kind of freezing with the last text being (ret_from_fork+0x14/0x24)

Anyone know what I’m doing wrong?


Are you sure you're using the USB host kernel (http://ourl.ca/17131;msg=267453)? And did you image the rootfs onto the USB drive?
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 02, 2012, 10:35:59 pm
No, I’m using everything in the snapshot download, and the most recent initrd, and I was able to get the keyboard working, but I never did
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).
And my dongle has 4 usb ports, with my calc connected to the mini usb port, using the cord meant for calc to calc transfers, if that makes any difference.
And I don't think I imaged the rootfs onto the USB drive.
Could you make a tutorial?

-- Posts Merged --

Also, do you have a usb to headphone jack?
Because I notice in the video it says nosound, so would it be easily possible to get sound on the nspire?
Because it would be awesome to watch videos with sound and listen to music on an nspire.

-- Posts Merged --

This is some of the output when I plug flash drive
sd 6:0:0:0:[sdb] Media changed
sd 6:0:0:0:[sdb]
sd 6:0:0:0:[sdb]
sd 6:0:0:0:[sdb]
sd 6:0:0:0:[sdb] CDB:
end_request: I/O error, dev sdb, sector 0,
Buffer I/O error on device sdb, logical block 0 sdb: unable to read partition table
sd 6:0:0:0:[sdb] No Caching mode page present
sd 6:0:0:0:[sdb] Assuming drove cache: write through
sd 6:0:0:0:[sdb] Attached SCSI removable disk
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 02, 2012, 10:58:46 pm
No, I’m using everything in the snapshot download, and the most recent initrd, and I was able to get the keyboard working, but I never did
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).
And my dongle has 4 usb ports, with my calc connected to the mini usb port, using the cord meant for calc to calc transfers, if that makes any difference.
And I don't think I imaged the rootfs onto the USB drive.
Could you make a tutorial?


For Linux/Mac/BSD/*nix, it's basically just using dd. Something like sudo dd if=rootfs.ext2 of=/dev/sdX (replace sdX with your USB device - make sure you get it right or else say bye bye to your data)

Unfortunately, I haven't used Windows for a while so I don't know what they use for drive imaging.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 02, 2012, 11:57:18 pm
This Project (http://sourceforge.net/projects/windd/) should do the job, or something similar.

I still think that it would be more worthwhile to port an ARM-specific SNES emulator than it would Snes9x. It would probably be easier, too. Dr. PocketSNES (http://wiki.gp2x.org/wiki/DrPocketSNES), for instance, ran most games at 100% on the GP2x, and might do even better sans sound.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 03, 2012, 12:49:48 pm


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 (http://tangrs.id.au/linux_snapshots/31-10-2012/snapshot.zip)

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

Have fun!




i have a problem with the steps T.T
when i download the snapshot and put it in my ti nspire cx and i open the linux loader, the command line screen is white and  it always says uknown command, also when i type boot says no kernel loaded,

i dont understand step 1 either

can someone help me pls?
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 03, 2012, 01:05:52 pm
When you run linuxloader2, you need to get your ramdisk and kernel loaded.
So type initrd then type the initrd file location (initrd.tns, or maybe linux/initrd.tns) and press enter.
Then type kernel, the location of zimage.tns, and press enter.
The type boot and enter.

Use this
https://github.com/tangrs/nspire-linux-loader2

An alternative way is to just use the bootloader script, but you have to add this to ndless.cfg
ext.ll2=linuxloader2
 
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 03, 2012, 02:06:00 pm
thanks for before
it boots but it doesnt displays me the delay or doesnt gets the usb, am i doing something wrong? o.O

err sorry, i dont understand whats in that link you gave me, imagine that you are explaining this to a baby XD, ive never coded linux or anything T.T

EDIT(Eeems): Joined double post.
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 03, 2012, 02:24:48 pm
I only get the delay when I run the bootloader_usb.ll2.ext file, but you have to have changed the ndless.cfg file.
Do you have the initrd and zimage files on your calc?
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 03, 2012, 02:27:21 pm
oh i have zimage and initrd :D but i havent changed ndless cfg, ill do it :DD

ok now i have the delay but when i connect something.... nothing happens T-T

btw, what do i do with the linux loader 2 master archive that u linked? o.O
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 03, 2012, 03:02:26 pm
Yeah, that is the problem I have when running the bootloader, it just freezes. If you have a mac, then you can use their tutorial to allow your flash drive to work.
Elsewise, boot it from the white screen, with typing initrd initrd.tns and what not. When I do that, it doesn’t freeze, I still can’t get a flash drive  to work, but I can get the keyboard to work.
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 04, 2012, 01:38:24 pm
I just had a great idea that would probably not work.
Would it possible to port the nspire emulator onto the calculator with Linux?
So maybe you could use the keyboard on an nspire.
Title: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on November 04, 2012, 08:48:53 pm
I'm trying to get the USB support working. I use the boot script and right image, etc. I plug in my flashdrive at the right time and when I do it, it seems to work but then spews out stuff with lines like "[<c01f0704>] (kernel_init+0x0/0x2a4) from [<c00092f0>] (ret_from_fork+0x14/0x24)". That example line is the last one the calc outputs before it freezes (the cursor doesn't flash, nothing happens even if I let it sit for 5 minutes). Any ideas on how to get it to work?
On a related note, nice work tangrs!
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 04, 2012, 09:44:30 pm
I believe you have to follow step one and change the partition on your flash drive.
I never got that to work.
If want to use a little bit of USB, just boot it from linuxloader2, and you can use a keyboard, but not a flash drive or video.
Title: Re: Calling all Linux Kernel developers!
Post by: xacto on November 05, 2012, 01:17:38 am
I added the linuxloader and the bootscript to my calc and I added ext.ll2=linuxloader2 to my ndless.cfg. I started it up and realized I had forgotten to send the ZImage and initrd files so I rebooted my calc using the reset button since I couldn't figure out how to exit the linuxloader witha particular command or button. Now the calculator hangs at the grayscreen right after the TI-Nspire loading screen and it won't do anything else. I have already tried uninstalling and reinstalling the os as well as formatting the calculator but it does not work. HELP!!
Title: Re: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on November 05, 2012, 07:09:33 am
xacto, hold Esc+Menu+Minus while booting. AFAIK, this happens when the bootloader doesn't boot anything and then resets.
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 05, 2012, 07:26:49 am
Do that, and if that doesn’t work, for some strange reason I think it might also help to send os 3.2, and then downgrade if it works again.
Title: Re: Calling all Linux Kernel developers!
Post by: xacto on November 05, 2012, 12:22:24 pm
xacto, hold Esc+Menu+Minus while booting. AFAIK, this happens when the bootloader doesn't boot anything and then resets.
Thank you so much it worked! I was starting to get worried for a moment.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 05, 2012, 10:18:42 pm
i still cant get it to work..... T.T
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 06, 2012, 12:18:35 am
On the idea of porting the nspire emu to the nspire, it would run unbearably slow, and I don't think all the libraries necessary to run it are ported. Also, running it would require an equal amount of RAM and Flash to what the calculator has, plus whatever runs underneath it.

Sorry. Not gonna happen. It would be far easier to make a mod that added keyboard support.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 08, 2012, 04:27:48 pm
Hi,
I downloaded the lates snapshot and it worked perfectly for me, but my USB Keyboard (2,4 GHz Dongle) won't get accepted as a keyboard.
How can I compile your kernel to add the missing driver?
If I clone you linux-git-tree, configure it with the obvious settings for nspire it can't find any USB-Devices ("doesn't acceppt address").
Could it be I forgot to disable High Speed? But I couldn't find anything.

With my custom rootfs I can get X running .. a bit. The screen slowly goes brighter until it's completely white but the console still stays active in the background.
If I type "reboot\n" it works.
I haven't tested swap but gcc works fine without it.

Edit: If I use your config (through /proc/config.gz) it still can't find any usb-devices.
Edit2: It seems I'm hitting a buildroot issue with X: http://lists.busybox.net/pipermail/buildroot/2012-September/058504.html

Thanks for your Linux port :D
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 11, 2012, 05:48:43 am
Hi,
I downloaded the lates snapshot and it worked perfectly for me, but my USB Keyboard (2,4 GHz Dongle) won't get accepted as a keyboard.
How can I compile your kernel to add the missing driver?
If I clone you linux-git-tree, configure it with the obvious settings for nspire it can't find any USB-Devices ("doesn't acceppt address").
Could it be I forgot to disable High Speed? But I couldn't find anything.

With my custom rootfs I can get X running .. a bit. The screen slowly goes brighter until it's completely white but the console still stays active in the background.
If I type "reboot\n" it works.
I haven't tested swap but gcc works fine without it.

Edit: If I use your config (through /proc/config.gz) it still can't find any usb-devices.
Edit2: It seems I'm hitting a buildroot issue with X: http://lists.busybox.net/pipermail/buildroot/2012-September/058504.html

Thanks for your Linux port :D

The screen slowing turning white is a problem with the framebuffer driver. It should only happen when the LCD screen goes to standby or turns off.

Regarding the USB keyboard, are you connecting directly from the calculator or via a powered hub? Wireless dongles draw a lot of power and the USB controller might not be able to keep up (AFAIK, the calculator can only provide something like 8mA of current compared to the 500mA mandated by the USB specs).

Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 11, 2012, 09:46:55 am
Quote
The screen slowing turning white is a problem with the framebuffer driver. It should only happen when the LCD screen goes to standby or turns off.
Every second line goes white and then it's like turning off an old Gameboy Color.
Even if X exits, I can't get the fb to work again.
Maybe wrong mode set, I'll try to get rid of that.

Quote
Regarding the USB keyboard, are you connecting directly from the calculator or via a powered hub? Wireless dongles draw a lot of power and the USB controller might not be able to keep up (AFAIK, the calculator can only provide something like 8mA of current compared to the 500mA mandated by the USB specs).
I use an external powered 7-port hub. With my custom kernel on my laptop it doesn't work, too, but with a standard kernel it does.
It's a sunplus adapter, I think I only have to compile HID_SUNPLUS into the kernel.
Edit: The keyboard works perfectly. EXT4 too, with its journal the filesystem will survive system crashes.

Sadly I don't have an USB WLAN dongle but a Fritz!BOX Fon WLAN 7050 with integrated USB-Network card, do you know which modules it needs?
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 11, 2012, 10:01:12 am
Quote
The screen slowing turning white is a problem with the framebuffer driver. It should only happen when the LCD screen goes to standby or turns off.
This also happens to me on ubuntu :p
Title: Re: Calling all Linux Kernel developers!
Post by: Nosferatu Arucard 1983 on November 11, 2012, 11:16:04 am
@tangrs
Have you tried to build Octave or Maxima to run on Nspire Linux ?
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 11, 2012, 06:42:24 pm
@tangrs
Have you tried to build Octave or Maxima to run on Nspire Linux ?
I don't think so. Are those programs written in C or in C++? since C++ currently can't be run.
Title: Re: Calling all Linux Kernel developers!
Post by: lkj on November 11, 2012, 07:28:45 pm
C++ is only impossible with ndless programs, with Linux programs it's no problem.
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 11, 2012, 07:35:02 pm
C++ is possible actually, to a certain extent :
http://blog.tangrs.id.au/?p=712
Title: Re: Calling all Linux Kernel developers!
Post by: Nosferatu Arucard 1983 on November 11, 2012, 08:13:18 pm
The Maxima is actually programmed in Common Lisp which in turn requires a Lisp interpreter / Just in Time compiler normally written in C. Since have few dependences, this program can be compiled and run on Nspire Linux.
(And is the core software of my Linux from Scratch project called Maxima OS, as may on the future this communit to try build a new indie calculator)
Ginac is a CAS library written in C++ and is even more portable than Maxima.
The only constrain in Linux is the RAM and Flash disk size of the calculator.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 11, 2012, 09:17:48 pm
porting the nspire emu to the nspire

Inception, much?? :crazy:
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 11, 2012, 10:05:29 pm
porting the nspire emu to the nspire

Inception, much?? :crazy:
No, nception
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 12, 2012, 12:25:17 am
Nception or nCeption definitively would fit really well for the name of such emulator.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 12, 2012, 02:12:45 am
kinda :p
Title: Re: Calling all Linux Kernel developers!
Post by: compu on November 12, 2012, 10:42:09 am
Hey, hackaday wrote about this :)

http://hackaday.com/2012/11/12/linux-on-a-nspire-cas-cx-calculator/
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 12, 2012, 11:35:27 am
Now that's what I call good advertising :D
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 12, 2012, 11:36:48 am
Brace yourselves, visites are coming on Omnimaga :P
Title: Re: Calling all Linux Kernel developers!
Post by: _Nicco_ on November 12, 2012, 01:12:20 pm
So the next big thing was Linux on a calculator not another game or emulator.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 12, 2012, 04:11:25 pm
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!!! :D
Regards
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 12, 2012, 04:43:40 pm
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.
Title: Re: Calling all Linux Kernel developers!
Post by: linuxgeek96 on November 12, 2012, 04:59:33 pm
does anyone here know a good way to make a new snapshot?
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 12, 2012, 09:13:26 pm
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

vogtinator, or someone, if im doing something wrong please tell me

Regards...
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 12, 2012, 10:56:19 pm
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
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 13, 2012, 03:55:13 am
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.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 13, 2012, 04:39:16 am
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/ (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 ;)

I need help.

The quick links at the top of the front page (http://ourl.ca/17131) 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 13, 2012, 11:25:35 am
Lol, crysis :P
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?
Title: Re: Calling all Linux Kernel developers!
Post by: compu on November 13, 2012, 12:01:00 pm
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.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 13, 2012, 12:10:42 pm
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.
Title: Re: Calling all Linux Kernel developers!
Post by: compu on November 13, 2012, 01:52:00 pm
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) :D
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 13, 2012, 01:57:41 pm
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 :P
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 13, 2012, 01:59:17 pm
Darn this is nice to see on Hackaday :D
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 13, 2012, 01:59:44 pm
The loader relocates it to the right place before launching the OS.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 13, 2012, 02:03:54 pm
Quote
The loader relocates it to the right place before launching the OS.
Ah ok, so I'm assuming it handles protecting it's relocating code so that it isn't written over during the relocation process. I haven't actually looked at the code myself yet. I probably should take a peek at what I can before asking questions :P
Title: Re: Calling all Linux Kernel developers!
Post by: ExtendeD on November 13, 2012, 04:23:26 pm
Nice FAQ tangrs :)

Quote
Can this run like KDE, Gnome, Xfce, dwm, Fluxbox, [insert favourite window manager]?
Yes but it'll probably suck. Try not to forget that this is a 120MHz device with 64MB of RAM.

Isn't there any window manager for suited embedded environments?

Quote
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.

You should contact Goplat about this if not already done, he will surely have an idea on this.

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

Then anyone who have configured successfully wireless network should post hints here to help you enrich the FAQ.

The loader relocates it to the right place before launching the OS.

There's no relocator in tangrs's loader, I suppose the Linux kernel relocates itself (http://amitshah.bizhat.com/arm/arm_linux_boot-1.html).

tangrs, do you plan to make the loader replace the TI-Nspire OS instead of using its realloc() function? I suppose this would leave more RAM to Linux.
BTW what is the roadmap of all this? :) This could help to gather developers to help you.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 13, 2012, 04:32:03 pm
X and directfb are working!
Now we're one step closer to minecraft :D
Note: I can't login on SSH because of an german umlaut in my password and I haven't changed the keyboard-layout yet.
Note2: I don't know where that segfault came from, maybe too much ctrl-c? ;-)
[/youtube]
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on November 13, 2012, 04:41:44 pm
Very nice work Vogtinator :)
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 13, 2012, 06:09:24 pm
rhomicubo, can you please tell me what kind of hub you are using? thank you
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 13, 2012, 06:22:59 pm
rhomicubo, can you please tell me what kind of hub you are using? thank you
http://www.rocketfishproducts.com/products/computer-accessories/RFNBSKHB.html
bought it at bestbuy
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 13, 2012, 06:47:36 pm
Don't count on straight minecraft. Maybe one of the clones.

I would recommend something tiny, like nano-X (http://www.microwindows.org/) for the WM. It lists as being 100 kb on 32 bit systems. It also says that it should run on any 32 bit system with a kernel framebuffer (which we now have :D )
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 13, 2012, 06:58:39 pm
Amazing, Vogtinator !

Edit : can you share your files ? :D
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 13, 2012, 09:04:55 pm
There's no relocator in tangrs's loader, I suppose the Linux kernel relocates itself (http://amitshah.bizhat.com/arm/arm_linux_boot-1.html).

Yep, this is pretty much it.

We first load Linux into memory no different than loading anything into memory. I.e. we follow the rules and use malloc, etc... Right up until we actually boot it, the bootloader follows the OS's rules and is capable of exiting without having corrupted anything. After we boot and transfer control to Linux, Linux will relocate itself.

This is a much cleaner approach than say, loading directly into RAM since we can potentially overwrite OS data structures/code while loading.

X and directfb are working!
Now we're one step closer to minecraft :D
Note: I can't login on SSH because of an german umlaut in my password and I haven't changed the keyboard-layout yet.
Note2: I don't know where that segfault came from, maybe too much ctrl-c? ;-)
[/youtube]

Nice work! I better start catching up and getting my own X to work :)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 14, 2012, 02:55:03 am
this is becoming really impressive.

You should try compiling gnuplot. It allows real-time rotating 3D graphs! It also uses, from what I understand, relatively few libs to do so. (libjpeg, among others)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 14, 2012, 12:06:36 pm
Quote
You should try compiling gnuplot.
Although you can get a better performance with the built-in from TI, here you go:
http://imgur.com/a/TlFSf (http://imgur.com/a/TlFSf)

Here's a snapshot of both files (zImage.tns and rootfs.tar.bz2 (smaller and tar)):
http://ritter-vogt.dyndns.biz/lowlevel/rootfs.tar.bz2 (http://ritter-vogt.dyndns.biz/lowlevel/rootfs.tar.bz2) (29 MiB)
http://ritter-vogt.dyndns.biz/lowlevel/zImage.tns (http://ritter-vogt.dyndns.biz/lowlevel/zImage.tns) (2 MiB)
If your firewall blocks dyndns, I'll upload it to dropbox.
Use `tar -xvf rootfs.tar.bz2 -C <mountpoint of usb-stick>`!
Then, if you don't want to wait at boottime, you can rename everything within /etc/init.d (e.g. `mv S85tinyhttpd tinyhttpd`).

Contents of rootfs.tar:
modular x.org (Needs some time to start)
links
Some directfb tests and examples
dhcp client (Preconfigured for eth0)
ethtool
wget (not tested)
blackbox window manager (runs perfectly, to run it create /etc/X11/xinit/xinitrc)
xterm, xcalc, xclock, twm
gnuplot (warning: slow as hell!; you have to `export GNUPLOT_DRIVER_DIR=/bin` first; I was to lazy to search, I symlinked :D)
mplayer (not tested)
fbv picture viewer
e2fsprogs (not tested)
ntfs3g (not tested)
fdisk (not tested)
hdparm (128 KiB/s read from USB :-/ )
minicom (not tested)
iw, wpa_supplicant, wireless tools (not tested, needs own kernel to be built)
tinyhttpd, openssh
bash
rsyslog
Not working "reset" cmd
nano
vim (not tested)
No locale support (but keyboard layouts)
Crysis

Of course you can also use debian or openSUSE armv5.

Kernel:
devtmpfs support
cdc_ether for networking
Swap support
Framebuffer with a dirty hack you don't wanna see (but it works and it didn't destroy my calc)
USB HID support
Sunplus Wireless Desktop support
No support for modules
No Initrd support (as it'd be useless without modules)
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 14, 2012, 02:18:07 pm
i made it.... great job tangrs,

but how did u opened lynx? o.O
regards,
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 14, 2012, 02:27:14 pm
There's no lynx in the image.
You can use links, it's nearly the same.
To open a page, press "g", to quit "q".

Edit: How did you made it? Was it a mistake or an hardware error?
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 14, 2012, 05:01:50 pm

hardware error vogt, my hub wasnt compatible, btw vogt your error is just that: in the bootscript you dont load the initrd, so you just have to modify the bootscrip with a text editor and add the initrd
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 14, 2012, 05:15:41 pm
Any ideas why Vogtinator's video got so many dislikes? O.O
Title: Re: Calling all Linux Kernel developers!
Post by: ExtendeD on November 14, 2012, 05:32:55 pm
TI officials? :p
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 14, 2012, 05:46:59 pm
I don't know but it was weird because most other Linux on TI-Nspire vids barely had any. At first I thought the video was fake or misleading or that teachers hating to see calcs being used for stuff other than math ran into just that video, but then watched it and it was legit. So I guess maybe it was hit by a votebot or just that video that was noticed by calc haters (the typical people who see using calcs other than for maths as being nerds)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 14, 2012, 08:52:12 pm
Nice to see gnuplot's working! I wasn't expecting amazing performance on the 3D. How much time does it take to render a frame? Is it just too slow for real-time rotation?
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 15, 2012, 01:13:55 am
Any ideas why Vogtinator's video got so many dislikes? O.O
I think they come from people who don't follow the Linux portage to the Nspire. Some might think it is fake, others might think that there is a typo in Linucx.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 15, 2012, 03:59:36 am
Quote
btw vogt your error is just that: in the bootscript you dont load the initrd, so you just have to modify the bootscrip with a text editor and add the initrd
? It works fine, I don't need an initrd! My kernel doesn't support it!
Quote
How much time does it take to render a frame? Is it just too slow for real-time rotation?
45 sec - 1 Minute without overclocking :-(

Quote
At first I thought the video was fake or misleading or that teachers hating to see calcs being used for stuff other than math ran into just that video, but then watched it and it was legit.
Yeah, maybe I should have shown my complete setup..

Quote
Some might think it is fake, others might think that there is a typo in Linucx.
That would be  :banghead:.. I know some who wouldn't understand it..
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 15, 2012, 04:08:23 am
All I can say each time is how awesome this is :D. I really need to get some mini-usb > usb cables and a hub :P
Title: Re: Calling all Linux Kernel developers!
Post by: macfan74318 on November 15, 2012, 11:15:03 am
First of all this is amazing.

Next I would like to run this on mine, and I know that this is a dev thread, but I would just like to know if I am on the right track. From what I can tell, I am going to need a powered USB hub, keyboard, USB drive, and mouse. On the Ti-Nspire I think I will need about 10 Mb of space. What needs to go on the flash drive, and what need to go on the Nspire?

Thank you so much and sorry for disturbing the thread,
macfan74318
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 15, 2012, 12:17:43 pm
Quote
From what I can tell, I am going to need a powered USB hub, keyboard, USB drive, and mouse.
Yes, that's enough.

Quote
On the Ti-Nspire I think I will need about 10 Mb of space. What needs to go on the flash drive, and what need to go on the Nspire?
The flash drive contains the root file system, the nspire only the kernel (2 MB), bootloader and scripts (too small to mention).
Title: Re: Calling all Linux Kernel developers!
Post by: linuxgeek96 on November 15, 2012, 01:34:55 pm
Vogtinator, do you have an actual partition on the USB drive? And if so, what type?
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 15, 2012, 02:05:54 pm
From what I can tell it's already in the image. Just type links in the command line, press enter and it should work.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 15, 2012, 02:09:53 pm
Quote
Vogtinator, do you have an actual partition on the USB drive? And if so, what type?
Yes, /dev/sda1 for / (you need to customize bootscript_usb.lls) and /dev/sda2 for swap (/etc/fstab).

Quote
can you please tell me how to install the links on the ti nspire or if its already posted can you tell me where and how
thanks..
1. Copy linuxloader2.tns and bootscript_usb.lls onto your calc
2. Assign the lls extension to linuxloader2 (/ndless/ndless.cfg)
3. Untar the root filesystem onto your usb-stick (`tar -xvf rootfs.tar.bz2 -C <mountpoint of usb-stick>`)
Title: Re: Calling all Linux Kernel developers!
Post by: ExtendeD on November 15, 2012, 02:15:15 pm
This may be a stupid question, but could binary distributions such as Fedora ARM (https://fedoraproject.org/wiki/Architectures/ARM) be used with it?
I unfortunately only have a Clickpad and can't test anything.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 15, 2012, 02:18:38 pm
If it's compiled for the right arm chip I would assume so
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 15, 2012, 02:40:36 pm
Quote
This may be a stupid question, but could binary distributions such as Fedora ARM be used with it?
Nope, all supported devices have a Cortex A9, the nspire an armv5. openSUSE and debian work fine.

Quote
waiting 10 sec before mounting root device..
Ramdisk: ext2  filesystem found at block 0
Ramdisk: Loading 2061Kib (1disk) into ram disk.. done
Don't use a initrd! It's not needed and you can't save anything!
Use an USB-Stick as root fs!
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 16, 2012, 03:53:17 am
Update: Just bought a Clickpad. Work on porting to it will begin soon!
Title: Re: Calling all Linux Kernel developers!
Post by: Netham45 on November 16, 2012, 04:19:26 am
Update: Just bought a Clickpad. Work on porting to it will begin soon!

Woo. Not to pressure you, but any ETA? :P
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 16, 2012, 05:24:27 am
Good, tangrs :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 16, 2012, 12:31:49 pm
Quote
Update: Just bought a Clickpad. Work on porting to it will begin soon!
Yay, finally my friend can use linucx too :-)
At the moment he calls it useless, dumb and ugly, but he's only jealous...

Tangrs, did you get my patch for the framebuffer?
It's sent in Opera, but not in the webinterface..
Please give me your opinion, it's my first patch ever :D
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 16, 2012, 12:49:27 pm
Have you used scripts/checkpatch.pl on that patch, and fixed the warnings/errors if any ? :)
(the code base in tangrs' repository contains several dozens of 80+-character lines, so I don't think you have to split lines to appease checkpatch)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 16, 2012, 01:22:12 pm
Quote
Have you used scripts/checkpatch.pl on that patch, and fixed the warnings/errors if any ?
Whoops, no, I forgot  ::)
But now I don't get any errors besides one 80+ character line ^^
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 17, 2012, 02:05:26 pm

yeah..... thats why my username is noobnonin xd

ok used wget



[email protected]:~$ su -
Password:
[email protected]:~# wget http://ritter-vogt.dyndns.biz/lowlevel/rootfs.tar.bz2
--2012-11-17 14:02:40--  http://ritter-vogt.dyndns.biz/lowlevel/rootfs.tar.bz2
Resolving ritter-vogt.dyndns.biz (ritter-vogt.dyndns.biz)... 91.13.18.219
Connecting to ritter-vogt.dyndns.biz (ritter-vogt.dyndns.biz)|91.13.18.219|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 29449790 (28M) [application/x-bzip]
Saving to: `rootfs.tar.bz2.1'

100%[======================================>] 29,449,790   258K/s   in 1m 52s 

2012-11-17 14:04:32 (257 KB/s) - `rootfs.tar.bz2.1' saved [29449790/29449790]

[email protected]:~#
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 17, 2012, 02:08:17 pm
I am not sure what is the above, but did you just post your computer password in public?? O.O
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 17, 2012, 02:27:25 pm
I am not sure what is the above, but did you just post your computer password in public?? O.O

xd thats not there xd

btw vogtinator i downloaded it, your rootfs.tar.bz2, and mounted it on the usb
the problem was that i didnt downloaded it with wget. thanks..
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 17, 2012, 02:30:13 pm
Ok phew. Also you might want to continue the help discussion in another topic that was created for it here: http://ourl.ca/17509/324046;topicseen#new

Else this clutters the main topic a lot. Thanks.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 17, 2012, 02:40:17 pm
Quote
I am not sure what is the above, but did you just post your computer password in public??
Did I miss something? I want it tooooo  >:D

Quote
and mounted it on the usb
That's not what you should do.. If it still doesn't work, post it in your own thread :D
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 17, 2012, 02:42:39 pm
Nah, I just don't have much clue what you guys are doing, being a Windows user, and I saw the word "password" in his post, so I was a bit worried (since people accidentally leaking password for one of their stuff did happen before here).

Btw shouldn't this project have its own sub-forum in major projects? ???
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 17, 2012, 02:53:52 pm
Quote
Nah, I just don't have much clue what you guys are doing, being a Windows user, and I saw the word "password" in his post, so I was a bit worried (since people accidentally leaking password for one of their stuff did happen before here).
Do you think his username is "username"? :P

Quote
Btw shouldn't this project have its own sub-forum in major projects?
Yeah, but first we need some more developers and more Ideas, what we could do with a working kernel, so we could create a roadmap
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 17, 2012, 02:55:53 pm
you should try linux is so different and have so many different things is so like for programmers xd
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 17, 2012, 02:59:38 pm
I saw people use such username before for various unrelated stuff (even people having passwords identical to their nicknames)

you should try linux is so different and have so many different things is so like for programmers xd

I don't program. :P All I do is play Starcraft (the first has terrible online gameplay in Wine) and MTV Music Generator on ePSXe
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 17, 2012, 03:01:40 pm
Quote
you should try linux is so different and have so many different things is so like for programmers xd
If you have the time, you could compile the kernel on your calculator.

Quote
I saw people use such username before for various unrelated stuff (even people having passwords identical to their nicknames)
I'd do that too, but "asdf" is most times occupied.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 17, 2012, 03:08:30 pm
Quote from: DJ_O on today
...Also you might want to continue the help discussion in another topic that was created for it here: http://ourl.ca/17509/324046;topicseen#new

Else this clutters the main topic a lot. Thanks.
Please do this :) We're happy to help you there.
And it is VERY hard to get internet working on the nspire using Linux. only a few people succeeded in it because you need to make your own hardware iirc.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 17, 2012, 03:10:59 pm
Hard? Compiling the kernel with included network drivers?

Quote
just one last last question xd
That you ask in your own thread, please. I'll answer you there.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 18, 2012, 12:12:34 am
Could there just be some dependencies from calc to calc or even computer to computer? I remember, for example, that OSLauncher only ran on certain TI-Nspire Touchpad calcs with a very small success rate, while on other Touchpad calcs it didn't work at all. TI changes its hardware from a revision to another, the most notable example being the TI-84 Plus with older versions of TI-Boy SE or the blank screen bug in Ndless 1.0 that only happened on certain calcs made around 2008. Another example was how in 2003, Starcraft ran on only about 8 of the school computers in the lab, even though all 30 computers had the same specs and the very same hard drive content (when rebooting, DeepFreeze reverted it to its original school set-up state).
Title: Re: Re: Calling all Linux Kernel developers!
Post by: Juju on November 18, 2012, 12:45:39 am
UNIX-like command-line password fields doesn't output anything, not even stars or bullets, when inputing the password. (People often wonder why it doesn't write anything like GUI password fields, but it's actually normal.) This way, it's more secure and nobody can see your password nor its length when copy-pasted in public.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 18, 2012, 10:40:06 pm
That is good, then. At one point I wanted to give Linux a try, but not on this computer (unless it's possible to partition an hard drive while keeping its current content/installs/windows install intact and not touching anything/reformatting). I was gonna use my old computer, but it broke and is currently being dismantled, so I guess that will wait. I might instead try it on my Nspire,
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on November 18, 2012, 11:10:44 pm
You can always shrink your Windows partition while keeping its contents (provided you have enough space) with gparted. Else you can install Ubuntu from Windows with Wubi (comes with the Ubuntu CD), it doesn't even touches your partition table, installing the OS into a disk image file and using the Windows bootloader to boot into it.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 18, 2012, 11:29:49 pm
Ok, and no chance of Ubuntu screwing with my Windows install or something? (like I heard with other people such as AaroneusTheGreat a few years ago)

Back on topic, this was slashdotted O.O (at first I was worried the high guest count on Omni were the spambots that have been attacking us lately)
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on November 18, 2012, 11:32:58 pm
Ok, and no chance of Ubuntu screwing with my Windows install or something? (like I heard with other people such as AaroneusTheGreat a few years ago)
Not at all, that's like installing it in a VM. But it's running on real hardware.

Back on topic, this was slashdotted O.O (at first I was worried the high guest count on Omni were the spambots that have been attacking us lately)
Nice :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 19, 2012, 01:24:28 am
Update: Just bought a Clickpad. Work on porting to it will begin soon!
I created an account just to get updates on Linux for the Nspire, Really excited about it...
Anyway, I only have a touchpad right now, so if it gets ported to the clickpad, will you have to re-map all of the buttons in order to get it to work with a touchpad model, or could you use the CX for that?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 19, 2012, 01:28:29 am
The CX and Touchpad keyboards are the same; but for all other aspects, the parameters for the Touchpad are the same as for the Clickpad.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 19, 2012, 01:28:34 am
Heya and welcome here. :) I think the Touchpad layout is the same as the CX keypad, but I could be wrong. All I know is that the button layout is the same or close, so hopefully re-mapping the keys shouldn't be hard. The main problem is that to do it, Tangrs might have to buy both Clickpad and Touchpad models (which he lacks).
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 19, 2012, 01:37:30 am
The touchpad vs clickpad isn't really an issue. (identical hardware, which is why you can just 'upgrade' by buying a touch keypad) He'd just use the clickpad port (due to the slightly different specs from the CX) with the CX's layout.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 19, 2012, 03:44:48 am
@All who replied about the keys,
The CX and Touchpad models have the same keys, my biggest question is if they use a different code to actually be used, which I would think not, because that would make life so much harder for TI, but anyway, I was just curious lol...
And Tangrs should buy a touchpad keypad lol they are only 10 bucks
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 19, 2012, 05:58:12 am
The touchpad vs clickpad isn't really an issue. (identical hardware, which is why you can just 'upgrade' by buying a touch keypad) He'd just use the clickpad port (due to the slightly different specs from the CX) with the CX's layout.

AFAIK, Clickpads don't have removable keypads.

Ah well, it doesn't mattter, I just got myself a second hand Touchpad which completes the collection (I now have all three).

In addition, mini-updates on progress will be posted on my twitter (https://twitter.com/tangrs).
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 19, 2012, 06:04:45 am
The touchpad vs clickpad isn't really an issue. (identical hardware, which is why you can just 'upgrade' by buying a touch keypad) He'd just use the clickpad port (due to the slightly different specs from the CX) with the CX's layout.

AFAIK, Clickpads don't have removable keypads.

Ah well, it doesn't mattter, I just got myself a second hand Touchpad which completes the collection (I now have all three).

In addition, mini-updates on progress will be posted on my twitter (https://twitter.com/tangrs).
Clickpads don't have removable keypads?
(http://naimalett.com/wp-content/uploads/2012/02/what.jpg)(http://www.usedcalculators.com/assets/images/TI-clickpad.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 19, 2012, 06:05:46 am
That's a touchpad with interchangeable clickpad. But I dunno.
I loled at the meme tho.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 19, 2012, 06:06:22 am
That's a touchpad with interchangeable clickpad. But I dunno.
I loled at the meme tho.
No, its a clickpad. Touchpads are dark blue... lol
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 19, 2012, 06:06:24 am
CAS Clickpad calculators do not have removable keyboards, but CAS-capable Clickpad calculators sold as non-CAS do :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 19, 2012, 06:06:56 am
OOOOOOH you guys are talking about CAS calcs! lol all he said was "clickpad", so I didn't know lol

(Edit by Netham45): Reduced font size, that was huge.
Title: Re: Calling all Linux Kernel developers!
Post by: TIfanx1999 on November 19, 2012, 07:06:44 am
Hey, chill with the Gigantic font. That's really unnecessary. Thanks. :)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 19, 2012, 09:09:07 am
Liking the updates :D
Just one questio: will this come with some sort of GUI when it's released officially?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 10:51:40 am
Quote
will this come with some sort of GUI when it's released officially?
First, we need to answer another question:
What do we want to do with linux?
Just do something, gcc, movies or minecraft?
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 19, 2012, 11:16:08 am
Quote
will this come with some sort of GUI when it's released officially?
First, we need to answer another question:
What do we want to do with linux?
Just do something, gcc, movies or minecraft?
Well, browsing the Internet to be able to visit Omnimaga anywhere of course :D
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 19, 2012, 11:18:49 am
Well you have a point there vogtinator.
By the way (and yes I know I'm too lazy to check) does the terminal have a help command which lists all commands?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 11:24:54 am
Quote
By the way (and yes I know I'm too lazy to check) does the terminal have a help command which lists all commands?
Yes, and you can use "<tab><tab>" too.

Quote
Well, browsing the Internet to be able to visit Omnimaga anywhere of course
It's already possible if you have an UMTS-Stick and 5V battery for the hub, so, we're finished, bye  ;D

Quote
Well you have a point there vogtinator.
At the moment we're only trying to reach the limits of the possibilities..
If something does theoretically run (e.g. GNOME or KDE) someone will do it, even if it's unusable.

BTW: Could it be that the battery isn't loading while running linucx?
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 19, 2012, 11:26:38 am
Quote
Quote
Well, browsing the Internet to be able to visit Omnimaga anywhere of course
It's already possible if you have an UMTS-Stick and 5V battery for the hub, so, we're finished, bye  ;D
This doesn't really sound kind. :-\ Especially since I think he means a graphical web browser.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 11:29:21 am
Quote
This doesn't really sound kind.  Especially since I think he means a graphical web browser.
No problem, midori is integrated in buildroot and ONLY needs QT and webkit..
I didn't try that, I don't want to have to wait until it's compiled.
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 19, 2012, 11:29:29 am
Quote
Quote
Well, browsing the Internet to be able to visit Omnimaga anywhere of course
It's already possible if you have an UMTS-Stick and 5V battery for the hub, so, we're finished, bye  ;D
This doesn't really sound kind. :-\ Especially since I think he means a graphical web browser.
Yeah, that was not a very kind way of telling me something I already knew. Moreover, as aeTIos said, I was talking about a graphical web browser because there is no interest to browse Omni without being able to see the projects' screenshots.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 12:19:47 pm
Quote
Yeah, that was not a very kind way of telling me something I already knew. Moreover, as aeTIos said, I was talking about a graphical web browser because there is no interest to browse Omni without being able to see the projects' screenshots.
But links has support for graphics! X11 or directfb, both works (see my video)
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on November 19, 2012, 12:44:47 pm
links -g, yup, that would work. Right now I'm browsing using elinks without graphics, it's a pretty nice text-mode browser.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 01:30:30 pm
By
Quote
Quote
Well, browsing the Internet to be able to visit Omnimaga anywhere of course
It's already possible if you have an UMTS-Stick and 5V battery for the hub, so, we're finished, bye  ;D
I meant your target for this project is already reached.. Sorry if you misunderstood

I can't get snes9x to run.. It starts, loads the file without any problems/warnings and shows a black screen..
Should I just wait or does it just simply not run?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 19, 2012, 01:40:08 pm
Did you try multiple ROMs? Some ROMs might not work in it.
Title: Re: Calling all Linux Kernel developers!
Post by: Eiyeron on November 19, 2012, 01:42:42 pm
SnesX?... My childhood is almost in Snesx... Θ.Θ
Please make him work, for the love of Yoshi Island, Earthbound, FZero, etc...
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 19, 2012, 01:46:03 pm
I wonder what will be the speed of Snes9x... I think I read somewhere that you need about 10-30 times the console's processor speed in order to emulate it properly, add to that the extra chips that certain SNES games use (I think Starfox Super FX chip was 20-30 MHz)
But links has support for graphics! X11 or directfb, both works (see my video)

Maybe he just wants to watch Youtube videos on his calculator. :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 01:48:07 pm
Quote
Did you try multiple ROMs? Some ROMs might not work in it.
Super Mario World (it's not even illegal, I own it  ;) ) works on my desktop..
I'll give it another try and wait longer

Quote
I think I read somewhere that you need about 10-30 times the console's processor speed in order to emulate it properly, add to that the extra chips that certain SNES games use (I think Starfox Super FX chip was 20-30 MHz)
No prob at all, at least for games without superFX 240 MHz should be enough..
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on November 19, 2012, 01:48:12 pm
I wonder what will be the speed of Snes9x... I think I read somewhere that you need about 10-30 times the console's processor speed in order to emulate it properly, add to that the extra chips that certain SNES games use (I think Starfox Super FX chip was 20-30 MHz)
But links has support for graphics! X11 or directfb, both works (see my video)


Maybe he just wants to watch Youtube videos on his calculator. :P


He can forget about that right now :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 02:03:05 pm
Quote
He can forget about that right now
Not if someone compiles webkit, qt and midori, midori supports Youtube HTML5.
But I think it'll be even slower than a slide show..
Title: Re: Calling all Linux Kernel developers!
Post by: Jim Bauwens on November 19, 2012, 02:05:33 pm
Quote
He can forget about that right now
Not if someone compiles webkit, qt and midori, midori supports Youtube HTML5.
But I think it'll be even slower than a slide show..
My point exactly ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 19, 2012, 02:13:29 pm
Hm, I don't think snes9x will work, 5 min should be enough for the nintendo-logo.
Title: Re: Calling all Linux Kernel developers!
Post by: Keoni29 on November 19, 2012, 02:29:25 pm
Wow nice. I heard some students talking about this! They aren't even into calculators!
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 19, 2012, 02:30:15 pm
But links has support for graphics! X11 or directfb, both works (see my video)
Maybe he just wants to watch Youtube videos on his calculator. :P
Lol, that would be great but I don't hope that much :P
The thing I'd like is the support for images, including gifs, so I can browse Omnimaga and see people's projects :)
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 19, 2012, 03:16:36 pm
Wow nice. I heard some students talking about this! They aren't even into calculators!
Really? What did you say?
*puts sunglasses on*
Let me show you my calc...
Title: Re: Calling all Linux Kernel developers!
Post by: ExtendeD on November 19, 2012, 04:12:02 pm
Wow nice. I heard some students talking about this! They aren't even into calculators!

My blog post about it was echoed by Slashdot and is in the top Linux topics on Reddit, and this may have helped.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 19, 2012, 04:22:32 pm
Yeah I saw your blog was posted there too. As for your school Keoni29 I am glad to read that a bunch of people are into Linux there. In my schools, I never heard anyone using something else than Windows or Mac.
Title: Re: Calling all Linux Kernel developers!
Post by: ruler501 on November 19, 2012, 04:28:13 pm
I know maybe two other people at my school who use linux. One programs the other just likes computers

EDIT: also congrats on this. If only I had a CX to run this on...
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 19, 2012, 07:05:13 pm
made it to reddit (http://reddit.com/r/linux/comments/13ew98/linux_has_been_ported_to_the_tinspire_calculator)
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 20, 2012, 12:12:23 am
I actually posted it on Reddit last week, but then it was posted 4-5 times again. This link only leads to the Ndless blog, though.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 20, 2012, 02:11:13 am
I actually posted it on Reddit last week, but then it was posted 4-5 times again. This link only leads to the Ndless blog, though.
Always happens on Reddit. Reposts galore :/
Yeah, it may go to the Ndless blog, but there are links on there to us :)
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 20, 2012, 02:14:27 am
True, I remember also on Cemetech when the 84+C news was posted, some blogs linked to TPM instead of them x.x

EDIT: By the way, has anyone who managed to run Linux and connect to the Internet also managed to get on IRC from their calc?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 20, 2012, 05:40:25 am
CAS Clickpad calculators do not have removable keyboards, but CAS-capable Clickpad calculators sold as non-CAS do :)

Ah, I see. I didn't know that. All the TI-Nspires at my school are CAS-capable so I've never seen one that was removable. XD
Title: Re: Calling all Linux Kernel developers!
Post by: Keoni29 on November 20, 2012, 12:11:11 pm
Yeah I saw your blog was posted there too. As for your school Keoni29 I am glad to read that a bunch of people are into Linux there. In my schools, I never heard anyone using something else than Windows or Mac.
I study at the university of technology, so that helps :P
Title: Re: Calling all Linux Kernel developers!
Post by: blweldon2 on November 20, 2012, 01:36:26 pm
You might be interested in mednafen as an emulator. I believe there is arm source code available.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 20, 2012, 01:40:09 pm
But the question is: will it run fast enough?
Edit: plus we have already 3 emulators for nspire :p
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 20, 2012, 01:54:32 pm
I tried to compile mednafen, but it needs opengl and there's no way to disable it  >:(
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 20, 2012, 04:23:18 pm
I registered in this forum because of this great topic and I want to support the people here as best as I can. :)

I can code, but I never made (big) things in C/C++...

I'm also going to build a USB Hub for my CAS, with power supply from a battery ;)...
If someone is interested, I will publish the parts and the wirings...
Title: Re: Calling all Linux Kernel developers!
Post by: shmibs on November 20, 2012, 05:03:50 pm
external power support would be really helpful, so i'm betting people will be interested if you can get it working =)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 20, 2012, 05:56:19 pm
It's probably better to port an emulator for a specific system. Mednafen uses a lot of the same code for various systems, so it has to abstract certain components, adding extra complexity. Same goes for RetroArch and MAME.

If zSNES wasn't written half in Assembly I'd recommend it. Then again, if zSNES wasn't half assembly, it wouldn't be nearly as fast as it is :P. SnemulDS seems like a good choice to look at.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 20, 2012, 05:59:05 pm
As long as those emulators are more efficient than Snes9x. On my Pentium II 350 MHz, Snes9x lagged like crazy (about 15 FPS), while ZSNES ran at about 30 FPS. Don't get me started about how slow Snes9x was on on the Pentium 200 MHz school computers.

If a 350 MHz computer with 256 MB of RAM and 8 MB graphic card could barely even run Snes9x at a playable speed, then imagine how slow it would be on a 220-240 MHz TI-Nspire CX with 64 MB of RAM and no graphic card.

Also welcome here InspiredByCas :)
Title: Re: Calling all Linux Kernel developers!
Post by: blweldon2 on November 20, 2012, 06:37:37 pm
Is there any way we could possibly get an x86 emulator such as dosbox running? That would open up quite a few doors for programs and games.
Title: Re: Calling all Linux Kernel developers!
Post by: Hayleia on November 21, 2012, 01:12:34 am
(
This is a bit offtopic but that concerns this topic so I post it here.
Why did almost everyone get +1s ? *.*
)
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on November 21, 2012, 01:17:12 am
How's the clickpad development going tangrs?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 21, 2012, 06:36:16 am
external power support would be really helpful, so i'm betting people will be interested if you can get it working =)
Yeah. I opened a mini USB b plug and shortened the ground (5. pin) with with sense (4. pin) by putting some solder on the back of the contacts. then I used a file to remove a bit of the solder which was too much and would have blocked the metal case of the plug.
If I connect this cable to my CAS and start linux, it gives 5 volts output at the other end of the cable, so that proves the calculator recognizes the short between ground and sense and acts like a USB host.
I found a picture which describes that:
top part is normal usb cable, lower part is OTG cable with pin 4 and 5 shortened.
(http://im.tech2.in.com/gallery/2012/jun/difference_circuit_271738111300_640x360.jpg)

Now I will cut the cable and add the external power supply. It will a 9 volt battery (or accu) which is connected to a L7805 (a thing with 3 pins and a heatsink connection on the back, can be found in some devices, I found one in a automtic call responser (<= I think there is a better word for that ;)), that will make exactely 5.00 volts independent of input voltage. This power will go into the output of my power supply, but it should not go out to the input, that would destroy my CAS I think.
With a switch, a 'low batt' warnig LED or something like that, it is ideal to use it everywhere and cheat everywhere :D
The output can be connected to any regular USB Hub and I think with a full battery it can supply power to very 'hungry' devices :) The only problem with much devices would be that the L7805 can become very very hot (much more than 100°C)...

I will inform you about my progress...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 21, 2012, 10:07:01 am
Wow, I just checked the comments on my video, and I saw THAT:
http://www.youtube.com/watch?v=K8P7lxQ9bcw (http://www.youtube.com/watch?v=K8P7lxQ9bcw)
Some a**hole motherf****r stole my video, I already reported it!
Title: Re: Calling all Linux Kernel developers!
Post by: Rhombicuboctahedron on November 21, 2012, 11:54:31 am
Oh yeah, I saw that yesterday and I was just about to post about it.
I checked one or two of his other videos, and in the suggested section, there were also identical videos, so he must steal all the videos.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 21, 2012, 12:11:42 pm
People do that all the time on youtube to steal views... It's really annoying. You could probably do a copyright takedown of it or something.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 21, 2012, 02:39:46 pm
Haha, if you short any wires on on the connected CAS with OTG cable it displays a weird message that I should reconnect the device... :w00t:

Yes, i know if I do this too often, it will brick my calc...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 21, 2012, 04:06:26 pm
Is it already possible to use GPIOs?

Edit:
http://www.youtube.com/watch?v=K8P7lxQ9bcw (http://www.youtube.com/watch?v=K8P7lxQ9bcw) Yeah, got removed!
Title: Re: Calling all Linux Kernel developers!
Post by: Nosferatu Arucard 1983 on November 21, 2012, 08:32:05 pm
And a Neo Geo emulator on Nspire ? I think the gngeo is the best possible solution, since it only requires SDL and on any Linux distro with framebuffer video driver is a possible solution.
Playing Metal Slug on a calculator would be awesome!
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 22, 2012, 07:16:46 am
I changed my plan a bit and decided to make two USB A connectors: At one the input from my self-made OTG cable comes in (so I don't have to cut my cable) and on the other the data and 5 volt comes out (going to a USB hub for example). This is because I didn't want to buy parts which I need (I hate waiting for deliveries), so I want to use parts I found in some old devices. And I just found a double USB A connector on a old mainboard... You can desolder them with a hot air pistol (min. 550°C). :devil: Watch out for dangerous gases when some parts (eg. plastics) melt and the mainboard makes bubbles...
These gases make a good headache. XD

And I think a transistor will do the on/off switching thing, just a LED will display state...
Title: Re: Calling all Linux Kernel developers!
Post by: Stennwellara on November 22, 2012, 04:06:20 pm
So, I really like linux on ti-nspire, but I want to improve the kernel a little bit, with new commands, inbuild apps and something. But I don't know how  ??? . O can not get the zimage file extracted  :banghead: . So i thought its identic with the files uploaded to Github , but these files have a size of 125mb.

It would be nice if someone could gelp me or if someone could upload the extracted zimage file.

Greetings and waiting for response Stennwellara.

Edit: I usually use Windows(7), but if it not works with windows I could use Ubuntu to.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 23, 2012, 07:27:59 am
So, I really like linux on ti-nspire, but I want to improve the kernel a little bit, with new commands, inbuild apps and something. But I don't know how  ??? . O can not get the zimage file extracted  :banghead: . So i thought its identic with the files uploaded to Github , but these files have a size of 125mb.

It would be nice if someone could gelp me or if someone could upload the extracted zimage file.

Greetings and waiting for response Stennwellara.

Maybe this helps: http://www.linuxquestions.org/questions/programming-9/how-to-obtain-image-from-zimage-824499/
First link googleing 'decompress zimage'.

But I think, it would be better to compile the kernel new from source. Use buildroot for that, somewhere in the output folder there is a cross-compiler or so... I dodn't understand that, too.
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on November 23, 2012, 07:35:41 am
WHO is giving all those random +1s? Is it OK if I undo them?
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 23, 2012, 07:44:23 am
Hi,
I'm sorry to popup like this without having the kind to read the 20 pages, but is there somewhere any information on how to
 * setup a cross compiler in order to compile files and run them on the calculator ?
 * send files or use binaries without usb adaptator (like mounting the nspire file system or something else like having an already setup kernel) ?

Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 23, 2012, 07:59:36 am
* as mentioned two posts above yours, a suitable cross-compiler is built by buildroot ;)
* launching Linux+userspace with an initrd/initramfs, without an external USB Mass Storage Device, is a matter of using the launcher;
* no way to mount the Nspire's filesystem, as it seems that there's no FLOSS driver for FlashFX + Datalight Reliance.
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 23, 2012, 11:07:21 am
I know who is doing all the upvotes and I'll deal with it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 23, 2012, 01:35:55 pm
How to compile your kernel (not using buildroot):
1. Build yourself a cross compiler for arm (little endian), you can use buildroot and the nspire-scripts.
Than add the binarys to your PATH (if they dont have a prefix like "arm-gcc", add one)
2. Create a new folder for your build
3. clone tangrs git tree with "git clone git://github.com/tangrs/linux" and "cd linux"
4. Download my patch (for X, directfb...) "wget http://dl.dropbox.com/u/105478372/fbdev.patch" and apply it "git apply fbdev.patch"
5. Edit "Makefile" and search for "ARCH ?= $(SUBARCH)" and change it to "ARCH := arm".
    Do the same for "CROSS_COMPILE ?= <something>" and change it to "CROSS_COMPILE := <your arm-gcc-prefix e.g. 'arm-elf-'>"
6. "make nspire_defconfig"
7. "make menuconfig", "make xconfig" or "make gconfig"
Configure it suitable for your needs, but enable (Search using "/"):
CONFIG_EXT4_FS
EXT4_USE_FOR_EXT23
CONFIG_SCSI
CONFIG_BLK_DEV_SD
CONFIG_USB_STORAGE
CONFIG_SWAP if you want to use swap
CONFIG_STRIP_ASM_SYMS if you dont want to debug the kernel
disable CONFIG_LOGO if you want to see longer errors on your screen without scrolling ;D

For internet you will need:
CONFIG_INET
CONFIG_NETDEVICES
For WLAN:
CONFIG_CFG80211
CONFIG_MAC80211
and the driver for your WLAN-dongle, you can get the name with "lsusb -v".

If something doesn't work, there are many tutorials on configuring your kernel.
8. Compile: "make zImage -j"
9. Make cup of coffee
10. Drink it, but be careful, it may be hot
11. "mv arch/arm/boot/zImage zImage.tns"
12. Copy it onto your calculator
13. Boot
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 23, 2012, 04:17:26 pm
Thank you for your patience and effort. It is much appreciated.

Sadly I do not have the time for the moment (it may be so until holidays, with luck) to apply your tutorial.
I can see how things are going just by reading the steps, but some points look shadowed to me :
How to compile your kernel (not using buildroot):
1. Build yourself a cross compiler for arm (little endian), you can use buildroot and the nspire-scripts.

Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say ?
I've never built any sort of kernel in the past, nor used cross compilers and have no idea of the way to go.
If you think the answer is easy to find on Google, don't waste your time to answer that point =)

Quote
9. Make cup of coffee
I cannot see the rule "cup", nor "of", nor "coffee" in the Makefile. Were you talking about the rule "some" and "tea" ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 23, 2012, 04:30:52 pm
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.

Quote
Where you talking about the rule "some" and "tea"?
That'd be possible to, but the configuration is much more complicated..

Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on November 23, 2012, 04:37:04 pm
can someone tell me where to find linuxloader2.tns? is there a place where i can find all the files i need?(already compiled)
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 23, 2012, 07:56:07 pm
floris, attached is the bootscript, remember that to run it you have to add the command to the ndless.cfg

hey vogtinator, theres something i dont understand, once i have everything you have and i want just to add a wifidongle driver, do i have to follow all the steps u posted?

one more thing, does that driver has to be in the rootfs or can i put it in the zimage.tns??


Regards...
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on November 23, 2012, 08:02:51 pm
he wanted linuxloader and, did you download that file or make it? It is illegal to put other's programs up for download without their permission
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 23, 2012, 08:07:35 pm
nonono, i made that bootscipt, its like the bootscript of tangrs but tangrs doesnt have the initrd just the zimage
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on November 23, 2012, 08:08:45 pm
Ok, nvm I wasn't sure.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 24, 2012, 03:15:49 am
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.
Ah ! For sure I already have that.
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).
Maybe I've missed one post, but I cannot figure out how you're dealing with the *double* cross compiler (linux <> arm nspire <> arm linux).
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 24, 2012, 03:47:10 am
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.
Ah ! For sure I already have that.
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).
Maybe I've missed one post, but I cannot figure out how you're dealing with the *double* cross compiler (linux <> arm nspire <> arm linux).

Other stuff which is not a driver, is in the initial ramdisk (initrd) which contains the root filesystem, or, since we have USB support, this root filesystem can be copied to a USB stick and it is mounted at boot time like a real hard disk in a real desktop PC running linux.
So once all drivers and stuff which should be in the kernel, is there, boot it and start install apps on the nspire. For that, a USB stick is needed, because it can be mounted writeable.

So I understand this so far, or am I wrong?


btw: how can I give +1 to a post?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 24, 2012, 04:20:48 am
Buildroot enables one to build and install a number of programs and libraries to a given location on the host disk, forming the target FS. The contents of that location are recursively compressed (for initrd), or can be recursively copied as is to external USB Mass Storage Device.
For other programs/libraries not directly provided by buildroot, just tell the build system of said programs/libraries that it should use an install prefix relative to the root of the target FS.

Provided the arm-none-eabi and arm-linux-gnueabi toolchains have different names, dealing with them requires nothing special.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 24, 2012, 04:24:36 am
Wow, I just checked the comments on my video, and I saw THAT:
http://www.youtube.com/watch?v=K8P7lxQ9bcw (http://www.youtube.com/watch?v=K8P7lxQ9bcw)
Some a**hole motherf****r stole my video, I already reported it!

Yeah that happened with the nDoom vid I made >.<. Thankfully the other ones never got as many views as mine, though (most didn't even hit 100 views)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 24, 2012, 08:23:45 am
Quote
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).

Ok, guide for buildroot:
1. "git clone git://git.buildroot.org/buildroot" and "cd buildroot"
2. "make menuconfig"
3. Target Architecture -> ARM (little endian)
4. Target Architecture Variant -> arm926t
5. Enable BR2_CCACHE for faster recompilings
6. System Configuration -> Port to run a getty (login prompt) on -> tty0
7. Configure what you want, but use GCC 4.6.x as 4.7 introduces some preprocessor bugs.
8. Edit system/skeleton/etc/passwd and change "root:x:0" to "root::0"
9. "make"
10. "tar -xvf output/images/rootfs.tar -C <usb-stick>"
11. boot
12. Play crysis if you chose to build it (may need some time)

Of course you can use whatever arm(v5) linux distro you like. But most of them are waaay to slow.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 24, 2012, 09:08:47 am
And some .config files suitable for buildroot were posted somewhere in this topic or its siblings :)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 24, 2012, 09:48:35 am
Yeah! ;D(http://www.omnimaga.org/Themes/default/images/gpbp_arrow_up.gif)
My 'USB power upgrader' works!
It automatically switches on when input voltage from the CAS comes and switches off automatically when input voltage is off (when the calc is off through ctrl+on). A little green LED displays the state.
I can connect the output to a USB fan, and it's working...

BUT: when i connect to USB stick, the calc reboots instantly, even if it is running linux. (edit: oh, only with the very first version of linucx, with the newer the stick lights up) I think I connected the data wires wrong, so that data+ is connected to data- and vise versa. Not even one device is displayed by lsusb (watch -n1 lsusb).
So it restarts to prevent corruption of any devices...
Connecting to a hub doesn't do anything... not even hub LED is working... Only power consumption goes up to 550 mA.
I will try swapping the data wires...

If it is finished, I will post pictures.


If it is totally off, it doesn't need any power from the batteries (0 mA), when input comes in, it needs about 5 mA, and with my USB fan it needs 200 mA.
The power consumption at the batteries should be double as at the USB output port, because the L7805 has a efficiency of ~50% with 9 volts input.


1. EDIT: Just the power works, data transfer is not working, because of the two separated input/output power circuits, but the USB host needs to connect the data wires to ground to enumerate USB devices.

Now inventing a complete different circuit...

2. EDIT: My new circuit works! Even hubs are working with less power consumption than before :D Just the off-switching part does not work correctly, there is always a output... Working on it.
The trick was - as I thought - the GND, which must be the same for input and output.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 24, 2012, 06:24:01 pm
Minecraft has now been ported to the raspberry pi!
If we can get mesa software-rendering running, we can "play" minecraft(which will be waiting for the first frame from the game..)
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 01:08:34 am
vogtinator, i have problem with the steps, i have an error ***
*** Can't find default configuration "arch/x86/configs/nspire_defconfig"!
***
make[1]: *** [nspire_defconfig] Error 1
make: *** [nspire_defconfig] Error 2

btw, how can i make an arm compiler? i dont understand that.

Regards,
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 25, 2012, 02:13:55 am
Quote
*** Can't find default configuration "arch/x86/configs/nspire_defconfig"!
***
make[1]: *** [nspire_defconfig] Error 1
make: *** [nspire_defconfig] Error 2
The arch is wrong, it should be ARCH=arm :)

Quote
btw, how can i make an arm compiler? i dont understand that.
Just let buildroot do its job :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 05:58:04 am
noobnonin, you did not follow my guide.
You forgot to edit the Makefile (or "export ARCH=arm").
you can use the toolchain from buildroot as well as the toolchain for ndless.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 09:01:30 am
ok i did export ARCH=arm

but now i have this [email protected]:~/linux# make nspire_defconfig
#
# configuration written to .config
#
[email protected]:~/linux# make menuconfig
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 09:04:13 am
admin, could you move this to another topic called how to compile your kernel on your calculator? pls and thanks
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 09:24:08 am
But why did you post it here?
PS: Read your error messages..
Quote
Install ncurses (ncurses-devel) and try again.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 09:56:22 am
because ur tutorial was here XD

ok i found it, if someone doesnt have ncurses you have to type this in ur console: " apt-get install libncurses5-dev"
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 10:01:54 am
Don't forget to install gcc and binutils.

I built a kernel with every WLAN driver selected. Don't know whether it works, I don't have any wlan dongles.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 10:02:43 am
does your kernel have the driver i posted??
btw, why do i need the gcc and bin utilities?, when i look for gcc i find first class? whats that...

Regards,
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 10:06:07 am
Yes, it should.
Link: http://dl.dropbox.com/u/105478372/zImage.tns (http://dl.dropbox.com/u/105478372/zImage.tns)
Hm, I override my other zImage on dropbox, I hope it does still work..

Edit:
"apt-get install gcc binutils" should work.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 10:14:15 am
is that the same kernel as yours or is it a new one? o.O
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 10:25:17 am
I built another one.
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 10:26:11 am
oh, i have some problems with the final steps,
[email protected]:~/linux# make zimage -j
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make: arm-none-eabi-gcc: Command not found
make: *** No rule to make target `zimage'.  Stop.
[email protected]:~/linux# mv arch/arm/boot/zimage zimage.tns
mv: cannot stat `arch/arm/boot/zimage': No such file or directory
[email protected]:~/linux#
Title: Re: Calling all Linux Kernel developers!
Post by: alberthrocks on November 25, 2012, 10:29:04 am
It's probably a good idea to take a look at this (http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux). I'm not sure if this will work, but this will certainly help you get a working ARM compiler on your Linux box.

Alternatively, if you have a newer version of Ubuntu/Debian, you can probably find an ARM toolchain package in your repos.
EDIT: arm-linux-gnueabi should work (I think). Grab gcc-arm-linux-gnueabi (sudo apt-get install gcc-arm-linux-gnueabi) and it should work. (This should pull in a few other dependencies as well.) The package page is located here (http://packages.ubuntu.com/quantal/gcc-arm-linux-gnueabi). Note that this is only for the more recent versions of Ubuntu. For Debian, you must be on version 7 (testing), and the package might be named differently.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 25, 2012, 10:35:55 am
oh, i have some problems with the final steps,
[email protected]:~/linux# make zimage -j
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make: arm-none-eabi-gcc: Command not found
make: *** No rule to make target `zimage'.  Stop.
[email protected]:~/linux# mv arch/arm/boot/zimage zimage.tns
mv: cannot stat `arch/arm/boot/zimage': No such file or directory
[email protected]:~/linux#


Simply read the error.
Makefiles are case sensitive.

Also, if your arm compiler is not found, try in a terminal arm-<tab><tab> and check if it is the correct one.

Edit ;
By the way, the -j option forkbombed my pc. I recommand to use -j8 instead.

Also, compiled a zImage and used buildroot to produce a rootfs (which is initrd ?) and can't boot on it.
I have this :
(http://i.imgur.com/pbWhil.jpg) (http://i.imgur.com/pbWhi.jpg)
my script is :
Code: [Select]
kernel linux/zImage.tns
initrd linux/initrd.tns
boot
Am I missing something ?
Title: Re: Calling all Linux Kernel developers!
Post by: noobnonin on November 25, 2012, 11:03:50 am
im sorry if i offend you with this questions but, do you have a hub? does it turns on when u connect it with the calculator?

vogtinator: hey, i used ur kernel and when i connect my wifi dingle and put iwconfig it appears wlan0 but it says: no wireless extensions,

does it means its working and i dont have wifi? or does it means that it still doesnt recognize my dongle?
Regards,
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 12:22:00 pm
Quote
Am I missing something ?
Yes, you need the bootscript from tangrs.
You don't give the kernel the parameter "root=/dev/sda" or "root=/dev/sda1".

Quote
By the way, the -j option forkbombed my pc. I recommand to use -j8 instead.
Really? It runs fine for me, if I run it on tty1.

Quote
It's probably a good idea to take a look at this. I'm not sure if this will work, but this will certainly help you get a working ARM compiler on your Linux box.
Yes, I used this script and it works fine for compiling the kernel.

Quote
does it means its working and i dont have wifi? or does it means that it still doesnt recognize my dongle?
It can't find the firmware. You need to find it and put it in the right directory on your usb-stick.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 25, 2012, 12:45:13 pm
Quote
Am I missing something ?
Yes, you need the bootscript from tangrs.
You don't give the kernel the parameter "root=/dev/sda" or "root=/dev/sda1".

I think I may have had misunderstood.
My Initial question was talking about no-usb-related mehtod to load personnal stuff.
So, I may not have usb drives connected to it. Is there any way to produce a valid initrd like the one tangrs gave but with personnal stuff (again, without launching it via usb) ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 01:16:04 pm
If you want to use an initrd, use tangrs first bootloader script, before USB was working.
I think it was "root=/dev/mem".
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 25, 2012, 02:05:46 pm
If you want to use an initrd, use tangrs first bootloader script, before USB was working.
I think it was "root=/dev/mem".
Indeed, cmdline root=/dev/ram

But this does not help, same kernel panic as before...
Here is what I do after buildroot finished :

mv buildroot/output/target/rootfs.tns initrd.tns

> send to calc
> script :
Code: [Select]
kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline root=/dev/ram
boot
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 25, 2012, 02:06:42 pm
Does your kernel support initrds?
Which output format did you choose for buildroot?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 26, 2012, 03:19:06 pm
Today I wanted to test initrds, I had to recompile the kernel as I disabled initrd support.
But the framebuffer didn't work anymore! Same error as before my patch..
Does the patch I posted earlier work at all?
I don't think so, I had to change nspire_clcd_check(...) to { return 0; }
Strange..
I could even have tested the wrong kernel  :-[
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on November 26, 2012, 03:27:14 pm
Does your kernel support initrds?
Which output format did you choose for buildroot?
Okay, so I'm not dumb.

I did not choosed any format. What should I specify in order to generate an initrd that the kernel will launch like you managed to do today (even if the framebuffer doesn't work) ?

Thanks.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 26, 2012, 03:28:56 pm
Quote
I did not choosed any format. What should I specify in order to generate an initrd that the kernel will launch like you managed to do today?
Tangrs used the ext2 image format as initrd.
At least "file initrd.img" says so.
BTW: I couldn't get it to run, but that may be because it's too large to be decompressed (27MB).
I was too busy to solve the problem with the framebuffer, so I couldn't build a new (smaller) rootfs.

Quote
(even if the framebuffer doesn't work)
I don't think the initrd and framebuffer problem are related..
I could really have tested the wrong kernel the whole time *embarrassed*
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 27, 2012, 06:40:44 am
Quote
(even if the framebuffer doesn't work)
I don't think the initrd and framebuffer problem are related..
I could really have tested the wrong kernel the whole time *embarrassed*

Try making a different login text for each kernel...
That will help maybe.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 27, 2012, 09:33:44 am
The login text is displayed by the rootfs.
And I'm too lazy to change the version number every 10 minutes..
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 27, 2012, 11:14:23 am
Quote
And I'm too lazy to change the version number every 10 minutes..
Add an automated script that adds a timestamp to the version number so you don't have to?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 27, 2012, 11:54:22 am
Quote
And I'm too lazy to change the version number every 10 minutes..
Add an automated script that adds a timestamp to the version number so you don't have to?

The main problem was that he don't know which kernel with which features he is testing.....
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on November 27, 2012, 11:57:02 am
So have the automated script also document what the options are so that you can quickly check what is and isnt' enabled by comparing the version number with the timestamp to the document.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 28, 2012, 03:39:20 pm
I don't think it'll happen again.
The previous versions of my kernel were all "NewzImage.tns" and with that version I switched over to "zImage.tns"
but forgot to change the bootscripts.

So, now even midori is working:
(http://i.imgur.com/obGRms.jpg) (http://imgur.com/obGRm) (http://i.imgur.com/1e0AZs.jpg) (http://imgur.com/1e0AZ)

LxPanel:
(http://i.imgur.com/Qw2jMs.jpg) (http://imgur.com/Qw2jM)

PcManFM:
(http://i.imgur.com/VCiAis.jpg) (http://imgur.com/VCiAi)

What's next? ;D
LxPanel and PcManFM are running pretty smoothly, but midori is not really usable. But it knows CSS, which links doesn't.
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 28, 2012, 04:02:23 pm
Awesome screenshots, congrats :)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 29, 2012, 02:52:55 am
Wow. Never expected to see a full-featured webkit browser running on there.
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 29, 2012, 02:55:59 am
Is this only a GUI browser or also linux with GUI (judging from the last screen I guess it is?)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 29, 2012, 03:04:07 am
Linux with GUI.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 29, 2012, 03:07:30 am
This is a full-on X.org window system. We could run lxde at this point if we wanted to, but it would be slow....(lxde panel is running now)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 29, 2012, 03:55:05 am
Actually, lxpanel is running quite fast.
If we don't use lxdm (lxde window manager), the only problem will be the screen, as it's very small.
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 29, 2012, 04:19:23 am
Call me crazy, but ... Is an USB external screen (well, at least some kidn of display) possible ? :D
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 29, 2012, 04:24:13 am
I guess it would be doable wouldn't it? They do exist: http://www.displaylink.com/shop/monitors
and http://www.trustedreviews.com/aoc-e2251fwu-22in-usb-monitor_Monitor_review
Imagine your nspire with 22" full HD screen :P
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on November 29, 2012, 11:14:39 am
Is there any chance that it will support USB 2.0?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 29, 2012, 11:16:22 am
Somewhere I read it hasn't even got an USB 2.0 controller.
But why is it an EHCI then? That doesn't make any sense..
I hope it's a real EHCI, the whole thing would run much faster.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on November 29, 2012, 05:32:11 pm
It had better be USB 2.0, since OTG mode (where you can be either a host or a slave) wasn't introduced as a specification for 1.1.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on November 30, 2012, 12:34:02 am
I love to see those screenshots showing Google opened on a calculator with image support O.O
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 30, 2012, 01:19:01 am
The latest commit of Nspire Linux can now boot successfully on a Touchpad! :) (therefore, it'll most likely work on a Clickpad too but it's unimplemented right now)

Here's the bootlog (some unrelated parts editted out to take less space):

Code: [Select]
Linux in-place bootloader v2
Allocated memory:
   ATAGs:                 32512 bytes
   Kernel and ramdisk:    11272192 bytes
Machine number: 4442
Detected a non-CX
Physical memory at: 0x10000000-0x12000000
Serial number: [...] rev1 (CAS)
kernel linux/zImage.tns
Kernel successfully loaded
initrd linux/initrd.tns
Ramdisk successfully loaded
cmdline earlyprintk debug console=ttyS0,115200n8
Kernel command line: "earlyprintk debug console=ttyS0,115200n8"
boot
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.7.0-rc2+ ([email protected]) (gcc version 4.6.2 (GCC) ) #494 Fri Nov 30 16:32:14 EST2
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat c02e8de8, node_mem_map c0315000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: earlyprintk debug console=ttyS0,115200n8
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 26680k/26680k available, 6088k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc2800000 - 0xff000000   ( 968 MB)
    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc02a9000   (2692 kB)
      .init : 0xc02a9000 - 0xc02c601c   ( 117 kB)
      .data : 0xc02c8000 - 0xc02e9500   ( 134 kB)
       .bss : 0xc02e9524 - 0xc0314200   ( 172 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:32
jiffies = 4294937296
Clock source registered
Timer mode set to 1, evt->mode = 1
Timer mode set to 3, evt->mode = 3
Clock events registered
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 59.39 BogoMIPS (lpj=296960)
[...]
sram pool: 128 [email protected]
Serial: AMBA PL011 UART driver
[...]
Switching to clocksource clocksource
[...]
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (junk in compressed archive); looks like an initrd
Freeing initrd memory: 2600K
io scheduler noop registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x90020000 (irq = 1) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
[...]
TI-NSPIRE keypad
input: nspire-keypad as /devices/platform/nspire-keypad.0/input/input0
[...]
BOOT1 ROM mapped to /proc/boot1_rom
Contrast settings mapped to /proc/backlight
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 2601KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem) on device 1:0.

Welcome to Buildroot
buildroot login: root
#
# uname -a
Linux buildroot 3.7.0-rc2+ #494 Fri Nov 30 16:32:14 EST 2012 armv5tejl GNU/Linux
#
#
# cat /proc/cpuinfo
Processor       : ARM926EJ-S rev 4 (v5l)
BogoMIPS        : 59.39
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 4

Hardware        : TI-NSPIRE Touchpad Calculator
Revision        : 0001
Serial          : [...]
# sleep 1
# sleep 10
#

No display (all output is through serial at the moment) or USB support yet though. Will come soon! Aside from that, I will need lots of testing.

On the CX port, I also need to merge vloginator's patches for the LCD (I will do it together with the Clickpad/Touchpad display support).
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 30, 2012, 01:21:07 am
Somewhere I read it hasn't even got an USB 2.0 controller.
But why is it an EHCI then? That doesn't make any sense..
I hope it's a real EHCI, the whole thing would run much faster.

It is indeed a USB 2.0 controller so it does have a EHCI interface.

Unfortunately, there's a weird bug/problem (possibly to do with keeping queue heads in DRAM instead of the faster SRAM) somewhere that prevents all high-speed devices from working so the workaround right now is to force all devices to only connect at full speed.
Title: Re: Calling all Linux Kernel developers!
Post by: Eiyeron on November 30, 2012, 04:46:14 am
Is there any tut? I would be vey interessed by testing that! :p
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 30, 2012, 05:37:37 am
Which calculator?
For CX I wrote some kind of tutorial in this thread.
If you have an older (Click-/Touchpad) nspire, you have to clone, config and build a kernel yourself.

BTW: Tangrs, you double-posted :-P
And my name is not "vloginator" xD

I'll send you a new patch (again, last time mail didn't work..) later.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 30, 2012, 08:26:53 am
Which calculator?
For CX I wrote some kind of tutorial in this thread.
If you have an older (Click-/Touchpad) nspire, you have to clone, config and build a kernel yourself.

BTW: Tangrs, you double-posted :-P
And my name is not "vloginator" xD

I'll send you a new patch (again, last time mail didn't work..) later.

Oh my apologies on both counts - I was a little too excited :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 30, 2012, 08:31:56 am
What are the differences between the Touchpad, the Clickpad and the CX?
Are there also major differences between these and their CAS models?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 30, 2012, 08:37:42 am
Quote
What are the differences between the Touchpad, the Clickpad and the CX?
On the one side, Clickpad and Touchpad calculators, which are pretty much similar, save for the keyboard and its handling.
On the other side, the CX, with more RAM, more Flash, color screen, a newer USB controller, different interrupt controllers, etc. The CM-C is, in principle, a watered-down CX (half the amount of RAM) with a chinese keyboard, but little else different, AFAWCT.
You can find more detail about the hardware differences on Hackspire (e.g. memory-mapped I/O page) :)

Quote
Are there also major differences between these and their CAS models?
Nope. The non-CAS Nspires can run the CAS OS just fine (well, with some persistence: on some calculators, it can be necessary to make dozens of attempts to yield a success, while it succeeds pretty quickly on others), as showed by the unreleased RunOS and the released OSLauncher.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 30, 2012, 08:52:55 am
Quote
On the other side, the CX, with more RAM, more Flash, color screen, a newer USB controller, different interrupt controllers, etc.
Same display controller with just an other pixel format (4bpp iirc) too?

Edit:
I just saw the linux kernel option "Kernel Execute In-Place from ROM".
At the moment linuxloader2 copies the complete kernel image to ram.
Wouldn't it be possible to use that option (more free ram)?

Edit2:
I just read
Quote
Notes: This memory does not support "Execute In Place" (XIP).
Is this still valid for the CX models?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 30, 2012, 09:13:47 am
Yeah, by default, the extremely crappy screen of the Clickpad & Touchpad is used for 4 bpp screen, though the driver supports 8 bpp (used by e.g. nDOOM, and some nSDL-based games). I don't remember whether Clickpad/Touchpad and CX have the same display driver.

Quote
I just saw the linux kernel option "Kernel Execute In-Place from ROM".
At the moment linuxloader2 copies the complete kernel image to ram.
Wouldn't it be possible to use that option (more free ram)?
Nope, it wouldn't be possible: XIP requires random access, but NAND Flash can only be read page by page. NOR Flash would do the job: it's precisely used for XIP in TI-Z80 & TI-68k calcs (and also for the boot1 in Nspire Clickpad / Touchpad calcs).
Even if it were possible, execution from Flash would be slower than execution from the main RAM, due to narrower (at the very least, not wider) data bus.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 30, 2012, 12:49:27 pm
I think someone downvoted you for
Quote
the extremely crappy screen of the Clickpad & Touchpad
xD

The framebuffer does already work, I don't have to send you a patch, tangrs..
I don't know why it does now and not with kernel 3.7.0-rc2, I'll read the commits and find out.

Edit: The framebuffer works with startx, but not with directfb.. WTF.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 30, 2012, 01:28:41 pm
Yeah, looks like someone is having fun downvoting posts, no matter they contain technical content relevant to the discussion :)

Sorting out the nspire-related patch needles in the Linux kernel patch haystack is possible through directory filtering, arch/arm/mach-nspire being the most interesting one.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 30, 2012, 03:27:27 pm
I just mailed the (working and tested) patch to tangrs.

I noticed, after the screen goes off, it starts to flicker when you activate it again. Could this be a refresh rate problem?
I gonna try it.

The next thing the kernel needs is support for GPIOs.
When this works, i²c for the touchpad will be extremely simple (there's an i²c gpio driver already).
Are there any differences regarding i²c, gpio ports for i²c and the touchpad between the models?
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on November 30, 2012, 07:08:24 pm
Congratz :)

Just a little question, maybe it will sound silly to those who know ^^ :

The log says :
"Processor       : ARM926EJ-S rev 4 (v5l)
BogoMIPS        : 59.39"

Looking that proc reference I found this : http://pastebin.com/dFSsVaBe, which reads a BogoMIPS of 103.68.
How can it be different if it'as actually the exact same processor ?
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on November 30, 2012, 07:52:32 pm
Not same clock speed I guess... Is overclocking increasing the bogoMIPS?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 30, 2012, 08:08:50 pm
Congratz :)

Just a little question, maybe it will sound silly to those who know ^^ :

The log says :
"Processor       : ARM926EJ-S rev 4 (v5l)
BogoMIPS        : 59.39"

Looking that proc reference I found this : http://pastebin.com/dFSsVaBe, which reads a BogoMIPS of 103.68.
How can it be different if it'as actually the exact same processor ?

Different clock speeds. You can see it will increase if you overclock with Nover before booting the kernel.

Is there any tut? I would be vey interessed by testing that! :p

I'm planning to set up nightly builds sometime so people can test the latest and greatest (and to see if I've accidentally broken something).

In other news, LCD support on Touchpads is now working :)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on December 01, 2012, 06:45:18 am
Ah yeah, obviously, thanks :)

And congratz for the touchpad LCD :)
(Also, Clickpad coming soon, as ou said it should actually work ?)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 01, 2012, 06:47:34 am
Ah yeah, obviously, thanks :)

And congratz for the touchpad LCD :)
(Also, Clickpad coming soon, as ou said it should actually work ?)

Yeah, Clickpads and Touchpads are pretty much exactly the same (AFAIK). Pretty much the only difference is the keypad.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 07:27:23 am
My friend owns a clickpad cas. Maybe I can persuade him to try it.
I'll try writing support for the adc (battery voltage) today, so we can see the power consumption.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 01, 2012, 07:30:14 am
My friend owns a clickpad cas. Maybe I can persuade him to try it.

Support for clickpad isn't really ready yet so you can probably hold it off until a bit later.

I'll try writing support for the adc (battery voltage) today, so we can see the power consumption.

Awesome!
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 08:07:23 am
The struct clcd_panel classic_lcd_panel uses values < 6 for margin's and hsync_len too, so clcdfb_check will return -EINVAL.
Could you test whether X and directfb work on touch- and clickpads?

Edit: I just wrote the driver for the adc, but reads from 0xC4000000 - 0xC40001DF (mapped to 0xfed7ee21 - 0xfed7f000) always return 0.
Frustrated I began to write a driver for the LEDs (in AHB region), but they're always off, even if I turn them on manually.
# echo 1 > /proc/red_led
Red LED turned ON
# cat /proc/red_led
Red LED is OFF
Same for green LEDs.
Could the problems be related?

Edit 2: Everytime reads from the led control register return 0x1643 (0b01011001000011: Green blink data, green iteration, red blink data, red iteration).
I think writes are just ignored.
Could the cause be
Quote
900B0018 (R/W): Disable bus access to peripherals. Reads will just return the last word read from anywhere in the address range, and writes will be ignored.
?
Title: Re: Calling all Linux Kernel developers!
Post by: compu on December 01, 2012, 11:50:02 am
I think the LED has a Lock register similar to the watchdog.
The OS seems to write 0x1ACCE551 to 0x90110C00 before accessing LED registers, but I've tried that and it doesn't work.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 11:55:06 am
ACCE55? Very funny, TI..
I just found a way how to turn the device into standby:
Code: [Select]
writel(~0, NSPIRE_APB_VIRTIO(NSPIRE_APB_POWER + 0x18));Display is off, only reset turns on (and resets). ;-)
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on December 01, 2012, 11:58:07 am
ACCE55? Very funny, TI..

That's just awesome x)

And what you did too :)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 01, 2012, 12:03:32 pm
Disabling bus access to all bus peripherals ? Bad.
Fiddling with the LED ? Good.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 12:06:58 pm
Not if you want to do it :P
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 01, 2012, 02:00:57 pm
Try starting linucx in Press-to-test Mode. If you put the linuxloader (or the script) in the ndless startup folder, it should be executed, even in Press-to-test Mode. I am not sure if it works with linuxloader, but other things in ndless startup folder are executed in Press-to-test Mode.
The reason why I write this, is that Norse (the cool app for morsing around with the LED, not compiled for 3.1) worked sometimes when started i Press-to-test Mode, as I read somewhere.

You can exit Press-to-test Mode anytime by sending a complete EMPTY file with the file name 'Exit Test Mode.tns' (just create a empty text file and rename it, but watch out, it's case-sensitive!) to the - regulary only and empty - folder in the CAS.
To start this Mode, just hold Esc+On when calc is off.
Then try your LED code again and try reading if the values in the memory are different from normal mode (they should be, even before writing new values), because the LED blinks in Press-to-test mode.

Also cool news with the power management :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 02:33:59 pm
Quote
Try starting linucx in Press-to-test Mode. If you put the linuxloader (or the script) in the ndless startup folder, it should be executed, even in Press-to-test Mode. I am not sure if it works with linuxloader, but other things in ndless startup folder are executed in Press-to-test Mode.
The reason why I write this, is that Norse (the cool app for morsing around with the LED, not compiled for 3.1) worked sometimes when started i Press-to-test Mode, as I read somewhere.
Yes, I knew already (guess why ;-) )

Quote
You can exit Press-to-test Mode anytime by sending a complete EMPTY file with the file name 'Exit Test Mode.tns' (just create a empty text file and rename it, but watch out, it's case-sensitive!) to the - regulary only and empty - folder in the CAS.
To start this Mode, just hold Esc+On when calc is off.
I had to do this once already, because I thought, "Press-to-test" is like a lcd- and keypad test mode.
I was like "F**k, how can I get out from here!?".

Quote
Then try your LED code again and try reading if the values in the memory are different from normal mode (they should be, even before writing new values), because the LED blinks in Press-to-test mode.
I'll try that.

Quote
Also cool news with the power management
I'd rather call that stupidity ;-)

Edit: Nope, linuxloader can't find the kernel image. At least not if I load it with "kernel linux/zImage.tns", maybe the path is different.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 01, 2012, 02:54:29 pm
The path is indeed slightly different, but I don't remember exactly what it is. The PTT-related code is quite early (low addresses) in the memory image of the OS; also, RootDoc and the PTTKiller programs may help :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 02:57:14 pm
Ok, I'll try that, too.
But for now, I did it and GPIOs are working :D
At least GPIO 8 is low the whole time and GPIO 1 high.
Touchpad, we are coming to you  :devil:

Edit: With rootDoc it only displays "Documents (empty folder)" in press-to-test mode..
Edit 2: HELP! I can't get out of Press-to-test anymore :-( Holding ESC at startup doesn't work at all and rootdoc seems to block "Exit Test Mode.tns"
Edit 3: I tried esc twice and after that it wouldn't boot at all :-( I had to take out the battery.. But now I can send the linux kernel to "/exammode/usr/zImage.tns".
Title: Re: Calling all Linux Kernel developers!
Post by: compu on December 01, 2012, 03:31:24 pm
AFAIK, USB file transfers aren't working anymore after using RootDoc (I think I read that somewhere) ;D

But you can reboot and hold ESC so that RootDoc isn't launched and then transfer the exit PTT file.

Edit: Nope, linuxloader can't find the kernel image. At least not if I load it with "kernel linux/zImage.tns", maybe the path is different.
Try /documents/linux/zImage.tns instead (I guess linuxloader2 searches in the current directory, which is /exammode/usr while in PTT mode instead of /documents)

btw, I'm pretty sure that you can't change the LED in PTT either, I've done some tests a while ago :P

EDIT: Oh well, you ninja'd me with your edit :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 01, 2012, 03:42:29 pm
FFFFFFFFFFFFUUUUUUU
I WANT TO GET OUT OF THIS HELL
BTW: No, the led's don't work, still 0x1643 (what seems absolutely right)

Edit: Maintenance Menu and cleared /documents.. I hope it boots again..
Edit2: Nope, reboot loop because of ndless_resources.tns missing..
Edit3: Reinstalling OS now..
Edit4: Didn't work, hangs at clock screen, doing complete reformat.
Edit5: Diagnostics menu -> ADC Test displays following:
ADC0: LBAT 4,07 V
ADC1: VBATT 0V <-WTF The wiki is wrong here
ADC2: VSYS 4.01V
ADC3: KBID 0.2V
ADC4: B12 0.3V
ADC5: VBUS 0.006V
ADC6: VSLED 0.09V

Edit6: YEAH Finally I'm out! Now I can test I²C!
Edit9001: Tangrs linuxloader from github doesn't work.. Only few colored pixels on top of the screen
Edit9002: Which frequency is correct for the touchpad?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 02, 2012, 03:55:30 am
@Vogtinator: Don't bother with the LED. There's some weird protection that TI put on that noone could work out.
Good work on the GPIO and power management interfaces though :)

In other news, Clickpad support is officially working! Lionel and I are also working to get nightly builds on wheels :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 07:17:04 am
Quote
Good work on the GPIO and power management interfaces though
I don't know whether it actually works..
Turning off by disabling access to all peripherals is likely to be a bug or it's not off at all, but we can't see it's actually on.
Also I don't know whether GPIOs do work, I can't test it, but some values make sense.
But what could be the cause for the adc always returning 0?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 02, 2012, 07:20:17 am
Quote
Good work on the GPIO and power management interfaces though
I don't know whether it actually works..
Turning off by disabling access to all peripherals is likely to be a bug or it's not off at all, but we can't see it's actually on.
Also I don't know whether GPIOs do work, I can't test it, but some values make sense.
But what could be the cause for the adc always returning 0?

Does it give you the same thing if you try to do the reads as an Ndless program? I haven't got access to my calculators at the moment.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 07:21:15 am
Is there already a program for ndless to test it or I do I have to do it wrong again? :D
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 02, 2012, 07:22:50 am
Is there already a program for ndless to test it or I do I have to do it wrong again? :D

Nope, but it shouldn't be too hard to whip one up quickly :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 07:25:28 am
What if I make the same mistakes again and it's returning the wrong values?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 02, 2012, 07:28:51 am
What if I make the same mistakes again and it's returning the wrong values?

I meant for the ADC. If you can get an ndless program to read the correct values, then you can get linux to read the same.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 07:30:27 am
Ok, I'll try that.
Edit: Nope, zero.
I'm reading directly from 0xC4000100 + 0x10 (measured voltage) + 0x20*channel, or am I too dumb to read the wiki page?
The OS should have started a measurement already, so something should be there..
Edit2: On nspire_emu it works (ADC0 = 930), but not on the actual hardware
Edit3: In the diagnostics menu, there are some GPIOs higher than 32 (GPIO39). Why are these not mentioned in the wiki?
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 02, 2012, 10:13:58 am
Really great !

X and directfb are working!
Now we're one step closer to minecraft :D
Note: I can't login on SSH because of an german umlaut in my password and I haven't changed the keyboard-layout yet.
Note2: I don't know where that segfault came from, maybe too much ctrl-c? ;-)
[/youtube]

I don't understand how you can launch this graphical program, can you help me to do so please ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 10:16:55 am
You only have to run "startx" on your calc.

BTW: 0x1ACCE551 is sent to the watchdog for unlocking, problably not related to the leds.

Edit: I can read the ADC via ndless, but the driver does still not work :-(
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 02, 2012, 10:41:16 am
There is one thing which I don't understand:
How can the OS lock the LED when it is overwritten by linucx in the RAM?
Or how can the OS restart the calc when reset button is pressed? (In earlier OS all user data was deleted when pressing reset button on the back.)
Or why can nClock run in background with linucx? I think it does because after the 'reboot' command in linucx nClock has the right time on startup, rebooting with reset button messes up nClock and it shows the wrong time.

Are there two different RAMs?

And if you write to these addresses in the RAM to do something special (watchdog, LED, power management), wouldn't the OS or linucx (or whatever runs) be overwritten partially?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 02, 2012, 10:58:28 am
Quote
How can the OS lock the LED when it is overwritten by linucx in the RAM?
TI's OS does not lock the LED when it's overwritten by Linux; it's just that Linux doesn't activate it.
EDIT after Vogtinator's post: by the sentence above, I meant that while Linux is being executing and overwritten, TI's OS is not in a running state; but indeed, the state of the PTT is stored somewhere, in the hardware ports and/or the Flash memory (see what occurred during the beta-testing of Nleash).

Quote
Or how can the OS restart the calc when reset button is pressed? (In earlier OS all user data was deleted when pressing reset button on the back.)
Pressing this button triggers an interrupt, which is handled by TI's OS.

Quote
Or why can nClock run in background with linucx?
It cannot ;)
Like the rest, it is completely replaced by Linux and its userspace.

Quote
Are there two different RAMs?
Yes, there are indeed two different RAMs, but the main parts of both TI's OS and Linux use the same RAM, in the same area.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 11:23:43 am
Quote
TI's OS does not lock the LED when it's overwritten by Linux; it's just that Linux doesn't activate it.
Partially wrong: We don't know how the OS can unlock the LED. Whether the LED registers are locked is saved somewhere in hardware.

In my adc test prog I had to do the following:
Code: [Select]
*((uint32_t*)0x900B0018) = 0;
*((uint32_t*)0x900B0020) = 0;
What is this register "0x900B0020"? In nspire_emu *(0x900B0020) & 0x10 is tested, if it returns false, the adc value is 0x3ff=1023.
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 02, 2012, 11:26:29 am
You only have to run "startx" on your calc.

BTW: 0x1ACCE551 is sent to the watchdog for unlocking, problably not related to the leds.

Edit: I can read the ADC via ndless, but the driver does still not work :-(
But when I enter "startx", the console answers "not found".
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 11:28:21 am
You are not using the right rootfs image.
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 02, 2012, 11:42:42 am
Well, I added root.ext2 but renamed with a .tns at the end.
The command startx doesn't work.
root.ext2.tns doesn't seem to be mounted.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 11:45:33 am
You have to write it on a usb-stick using "dd if=rootfs.ext2 of=/dev/sdb".
Also, you are using the wrong image, the only images with X are my builds and I use only tar.bz2.

The ADC works perfectly with ndless, but not my linux kernel driver..
What am I doing wrong?
My changes in nspire_mmio.h:
Code: [Select]
#define NSPIRE_ADC_PHYS_BASE 0xC4000000
#define NSPIRE_ADC_SIZE 0x000001DF
#define NSPIRE_ADC_VIRT_BASE 0xfed7ee21 //0x1df before BOOT1

common.c:
Code: [Select]
struct map_desc nspire_io_regs[] __initdata = {
IOTABLE_ENTRY(ADC),
IOTABLE_ENTRY(APB),
IOTABLE_ENTRY(BOOT1),
IOTABLE_ENTRY(INTERRUPT),
};

Then im accessing it with:
Code: [Select]
adc[0] = readl(IOMEM(NSPIRE_ADC_VIRT_BASE + 0x110));What am I doing wrong?
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 02, 2012, 11:57:47 am
Is it really needed to put it on a usb stick instead of putting it in the internal memory?
About the image, where can I find your builds ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 12:01:21 pm
X is a bit too large to use as initrd.
http://dl.dropbox.com/u/105478372/zImage.tns (http://dl.dropbox.com/u/105478372/zImage.tns)
http://dl.dropbox.com/u/105478372/rootfs.tar.bz2 (http://dl.dropbox.com/u/105478372/rootfs.tar.bz2)
I posted these URLs somewhere in this thread, but I'm too lazy to search.


Edit: With ioremap it works.. IDK why, but I'll make a patch.
Edit2: I can't use floats inside the kernel: "Undefined reference to '__aeabi_f2d'" -> Wrong toolchain?
Edit3: Ok, moved calculation of voltages to the userspace :-/
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 02, 2012, 02:52:06 pm
Quote
Or why can nClock run in background with linucx?
It cannot ;)
Like the rest, it is completely replaced by Linux and its userspace.
But how knows nClock the right time after any softreboot (linucx, chrash on calc etc.)?

Quote
Are there two different RAMs?
Yes, there are indeed two different RAMs, but the main parts of both TI's OS and Linux use the same RAM, in the same area.

And these parts which are not used by OS and linucx are these the areas where all these 'special commands' write their to?
And it this the area which is mapped to /dev/ram0 ?
And what is in the second RAM?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 02:54:53 pm
Quote
And what is in the second RAM?
There's the SRAM (flip-flops, fast) and the SDRAM (slow, has to be refreshed dynamically)

Quote
But how knows nClock the right time after any softreboot (linucx, chrash on calc etc.)?
I think it CAN be that linucx doesn't override that value in RAM, but that's random.
The ram doesn't get cleared by linux.

BTW: We should choose a new name, linucx is outdated and wrong. Maybe linspire?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 02, 2012, 03:36:47 pm
Quote
And what is in the second RAM?
There's the SRAM (flip-flops, fast) and the SDRAM (slow, has to be refreshed dynamically)

I know that already, but what is the content of these RAMs? SRAM is the normal operating RAM like in a PC, I think, but what's in the other one?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 02, 2012, 03:45:14 pm
Quote
BTW: We should choose a new name, linucx is outdated and wrong. Maybe linspire?
Nope, that's the name of a commercial Linux distro ;)

Quote
SRAM is the normal operating RAM like in a PC,
Basically all RAMs of "large" capacity (beyond several hundreds of KBs, several MBs) are SDRAMs, because they're denser (significantly fewer transistors per bit) :)

Quote
I think, but what's in the other one?
On the Clickpads and Touchpads, the screen buffer, for instance; but TI's OS stores some other stuff there, because the calculator usually flat out crashes, after exiting a Ndless program, if you draw past the end of the screen area.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 02, 2012, 03:54:52 pm
Quote
Nope, that's the name of a commercial Linux distro ;-)
Didn't know that.. What's your suggestion?

Quote
because the calculator usually flat out crashes, after exiting a Ndless program, if you draw past the end of the screen area.
Yeah, I noticed it unintentionally..
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 03, 2012, 12:42:28 am
You have to write it on a usb-stick using "dd if=rootfs.ext2 of=/dev/sdb".
Also, you are using the wrong image, the only images with X are my builds and I use only tar.bz2.

The ADC works perfectly with ndless, but not my linux kernel driver..
What am I doing wrong?
My changes in nspire_mmio.h:
Code: [Select]
#define NSPIRE_ADC_PHYS_BASE 0xC4000000
#define NSPIRE_ADC_SIZE 0x000001DF
#define NSPIRE_ADC_VIRT_BASE 0xfed7ee21 //0x1df before BOOT1

common.c:
Code: [Select]
struct map_desc nspire_io_regs[] __initdata = {
IOTABLE_ENTRY(ADC),
IOTABLE_ENTRY(APB),
IOTABLE_ENTRY(BOOT1),
IOTABLE_ENTRY(INTERRUPT),
};

Then im accessing it with:
Code: [Select]
adc[0] = readl(IOMEM(NSPIRE_ADC_VIRT_BASE + 0x110));What am I doing wrong?


Just make the size SZ_4K. You're also doing unaligned reads because addresses start at 0xfed7ee21 which isn't 4 byte aligned.

Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 03, 2012, 01:21:37 am
Is SZ_4K =1 because the size has to be in pages?
I'll change it, test it and send you a new patch.
Does X and directfb work on click and touchpads?
If not, you have to add cx_clcd_check to your classic clcd panel struct.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 03, 2012, 01:23:16 am
Is SZ_4K =1 because the size has to be in pages?
I'll change it, test it and send you a new patch.
Does X and directfb work on click and touchpads?
If not, you have to add cx_clcd_check to your classic clcd panel struct.

No, it means 4096 bytes. It's a lot easier than calculating everything exactly right.

Edit: X doesn't appear to work, I'll try including the clcd_check and try again
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 03, 2012, 01:28:25 am
it didn't work because the MMU can only map whole pages, not bytes,
like it is on x86 with PAGing?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 03, 2012, 01:29:35 am
it didn't work because the MMU can only map whole pages, not bytes,
like it is on x86 with PAGing?

That's possible.
Title: Re: Calling all Linux Kernel developers!
Post by: calc84maniac on December 03, 2012, 01:38:24 am
Pages have to be aligned to their size. What's with the random 0xfed7ee21 address?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 03, 2012, 01:59:30 am
Pages have to be aligned to their size. What's with the random 0xfed7ee21 address?

For static memory mappings, you can choose where things are mapped to in virtual memory.

Edit: Fixed the nspireio issue. Latest commit should run on CXs fine.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on December 03, 2012, 04:55:42 am
I would point out that each of the series of rootfs files people post essentially counts as its own separate distro. It has about the same amount of difference at this level. So, keep that in mind before you go jumping for renaming the project.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 03, 2012, 09:55:26 am
I'm currently testing GPIOs with ndless. The binary (input) value of all ports toggles randomly between 0x59d00bf and 0x5bdoobf.
(Could also be periodically, sample rate is highest possible)
What is GPIO 21(0x020000)?
Also, the output value (0x80132d) doesn't vary at all. Isn't the touchpad connected to GPIOs 1 + 3?

Edit: Can I use GPIOs both as input and output? Example:
GPIO1 configured as output=HIGH, connected to ground through resistor.
Can I read input=LOW?

Edit2: With linux the gpio input still toggles randomly.
Should I implement an irq_chip for this? Directly setting, getting and changing direction are working. (At least the right values in the registers change)

Edit3: Could someone please test GPIOs? I don't know how.
http://dl.dropbox.com/u/105478372/zImagetest.tns (http://dl.dropbox.com/u/105478372/zImagetest.tns)
With useless i2c-gpio:
http://dl.dropbox.com/u/105478372/zImagetesti2c.tns (http://dl.dropbox.com/u/105478372/zImagetesti2c.tns)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 03, 2012, 08:17:50 pm
I'm currently testing GPIOs with ndless. The binary (input) value of all ports toggles randomly between 0x59d00bf and 0x5bdoobf.

That's probably to be expected. The pins are probably not connected to anything so it's floating.

Quote
(Could also be periodically, sample rate is highest possible)
What is GPIO 21(0x020000)?
Also, the output value (0x80132d) doesn't vary at all. Isn't the touchpad connected to GPIOs 1 + 3?

The output shouldn't vary at all unless you change it.

Quote
Edit: Can I use GPIOs both as input and output? Example:
GPIO1 configured as output=HIGH, connected to ground through resistor.
Can I read input=LOW?

I know you can do this with AVRs (people did this to make a cheap touch sensor - i.e. bring pin high and measure how long it actually takes to go high). Not sure with Nspires though.
[/quote]

Quote
Edit2: With linux the gpio input still toggles randomly.

Again, as expected from floating voltages.

Quote
Should I implement an irq_chip for this? Directly setting, getting and changing direction are working. (At least the right values in the registers change)

Why not? :P

Quote
Edit3: Could someone please test GPIOs? I don't know how.
http://dl.dropbox.com/u/105478372/zImagetest.tns (http://dl.dropbox.com/u/105478372/zImagetest.tns)
With useless i2c-gpio:
http://dl.dropbox.com/u/105478372/zImagetesti2c.tns (http://dl.dropbox.com/u/105478372/zImagetesti2c.tns)

Best test for GPIO is the touchpad :P

Speaking of which, should the touchpad driver be a kernel driver or a userspace daemon (pulling strings with i2c and userspace uevents)?
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on December 03, 2012, 11:51:06 pm
I'm trying to make sense of all this, is there a build released for touchpad models yet or not?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 04, 2012, 12:55:57 am
I'm trying to make sense of all this, is there a build released for touchpad models yet or not?

The source code has Touchpad support but no public build just yet. Lionel is helping to get nightly kernel builds up and running which will support all three models.

Of course, in the meanwhile, you can certainly build your own kernel by downloading the source off github or ask around if someone has a build.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 04, 2012, 04:51:30 am
Quote
That's probably to be expected. The pins are probably not connected to anything so it's floating.
One floating pin? I'd expect more pins to float, although it's bad engineering.

Quote
The output shouldn't vary at all unless you change it.
It has to be changed by the touchpad I²C driver.
The input and direction pins should do something, too.

Quote
I know you can do this with AVRs (people did this to make a cheap touch sensor - i.e. bring pin high and measure how long it actually takes to go high). Not sure with Nspires though.
I tried it myself and it worked better than I expected.
For i2c-gpio there's an option "scl_is_output_only", so I need to know whether it works..

Quote
Again, as expected from floating voltages.
More important, that says GPIOs are working under linux :D

Quote
Best test for GPIO is the touchpad :-P
But the touchpad seems to be not connected to GPIOs at all.
Or it could be the OS is not doing any i²c in background and I have to poll the touchpad.
I can't use touchpad_scan(touchpad_report_t) as it's not running in background.. Has someone an idea?

Quote
Speaking of which, should the touchpad driver be a kernel driver or a userspace daemon (pulling strings with i2c and userspace uevents)?
I²C can't be use for anything else than the touchpad, so a userspace implementation would only be more confusing.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on December 04, 2012, 12:12:25 pm
Well, of course i2c isn't still running in the background OS: You completely replaced it. Nothing is running in the background except what Linux knows to do. Is there a driver for the i2c protocol implemented yet? AFAIK direct GPIO works great for an i2c connection. According to wikipedia, standard protocol uses two drivers: One for the i2c itself (assuming there is a dedicated i2c chip) and one for the device connected to it. (Here, the touchpad). I think it would be a good idea to stick to that, so that if anyone ever tries to use the i2c for something else, like in a h/w project, they already have the i2c bus to work with. Plus, that should give access to any i2c device drivers that are available.

I found this wiki that may help development (https://i2c.wiki.kernel.org/index.php/Driver_Architecture)

Maybe we'll get lucky and find out the touchpad itself is already supported, and just the adapter needed a driver.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 04, 2012, 12:26:57 pm
Quote
Well, of course i2c isn't still running in the background OS: You completely replaced it. Nothing is running in the background except what Linux knows to do
No, im reading the GPIO registers with a C program started with ndless.

Quote
Is there a driver for the i2c protocol implemented yet?
Yes, i2c-gpio.

Quote
Maybe we'll get lucky and find out the touchpad itself is already supported, and just the adapter needed a driver.
If not, I think the serial mouse driver in linux will be a good example and it will be easy to port it to i²c.
Could be a bit harder if it uses interrupts, tough.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 04, 2012, 05:42:09 pm
No, im reading the GPIO registers with a C program started with ndless.

Ndless programs are started with interrupts off so the OS won't be able to update it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 05, 2012, 12:57:10 am
Then how can I see how the OS is changing the GPIOs? Only in nspire_emu, if I compile it with custom debugging?
Simply re-enable interrupts?

Edit: As GPIOs generate only one interrupt (7) I have to use an irq_domain. But there are only 32 irq's available on the device.
Are there some kind of virtual interrupts?

Edit2: With "IRQ chained handlers" I now get almost infinite amount of interrupts.. The GPIO irqs don't want to stop, even after I did
Code: [Select]
for (irq = 0; irq < controller->chip.ngpio; irq += 8) {
/* Sticky interrupt status */
writew(0xFF, NSPIRE_GPIO(irq, INT_STICKY));
/* Reset interrupt status */
writew(0xFF, NSPIRE_GPIO(irq, INT_STATUS));
/* Disable interrupts */
writew(0xFF, NSPIRE_GPIO(irq, INT_DISABLE));
}
NSPIRE_GPIO returns the adress of the given register in the given GPIO section. (And works)
Edit3: Works now.. My error was elsewhere (as expected..).
But the touchpad doesn't, have to investigate that further, but it's hard without any hardware-debugging like scope..
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on December 05, 2012, 05:49:05 pm
But the touchpad doesn't, have to investigate that further, but it's hard without any hardware-debugging like scope..
This ?
http://ndlessly.wordpress.com/2012/04/09/introducing-ocd-the-ti-nspire-on-calc-debugger/
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 05, 2012, 05:55:17 pm
Then how can I see how the OS is changing the GPIOs? Only in nspire_emu, if I compile it with custom debugging?
Simply re-enable interrupts?

Edit: As GPIOs generate only one interrupt (7) I have to use an irq_domain. But there are only 32 irq's available on the device.
Are there some kind of virtual interrupts?

IRQ domains are probably the way to go then. AFAIK, IRQ domains manage mappings over hardware to 'virtual' IRQs.

If you're referring the the NR_IRQS macro, I don't exactly know the correct value for the Nspire but 32 seems to work (lol). Feel free to fiddle around with it.

Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 06, 2012, 01:28:27 am
IRQ domain add legacy failed on boottime with a huge stack backtrace because of a warning on line 23, which gets shown if the irqs couldn't get reserved.
It still fails with nr_irqs 128..
But with irq_set_chained_handler  it seems to work but still crashes if I enable interrupts on GPIO 21. I"ll try both, like mach-at91/gpio.c.
If I regiser the chained handler for the timer int, /proc/interrupts shows
18: GPIO timer
and the system is VERY slow (what makes sense, but it still works).

Levak: Sadly useless.. Does still run in foreground. If I poll the touchpad the function returns after it has the data..

Edit 2: If I enable int's for GPIO21 (the floating one), the kernel hangs. No soft-lockup, hard-lockup.
What could be the reasons? For the other GPIOs it works fine (they're not changing).
Code: [Select]
irq = request_irq(controller->irq, nspire_gpio_irq, 0, "gpio", controller);

static irqreturn_t nspire_gpio_irq(int irq, void *data)
{
    uint8_t pin, port;
    uint16_t status_val;
    uint16_t __iomem *status = NSPIRE_GPIO(0, INT_MASKED_STATUS);
    for (port = 0; port < controller->chip.ngpio; port += 8) {
        status_val = readw(status);
        /* Ack interrupt */
        writew(0xFF, status + (NSPIRE_GPIO_INT_STATUS_OFFSET
        - NSPIRE_GPIO_INT_MASKED_STATUS_OFFSET));
        status += NSPIRE_GPIO_SECTION_SIZE;
        //if(!status_val)
            continue;
        //Rest cut out
    }
    return IRQ_HANDLED;
}
Do I have to do some other calls for registering my IRQ? I think request_irq should do it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 07, 2012, 05:22:55 pm
I just measured the outputs and inputs of some GPIOs connected to the pins on the bottom port, and it's correct.
They're even sensitive for fingertips..
The input of the pins 1 and 3 are always high, so there are indeed pullups.
But why does the touchpad not get detected? (At least not through i2cdetect)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 07, 2012, 10:46:08 pm
I just measured the outputs and inputs of some GPIOs connected to the pins on the bottom port, and it's correct.
They're even sensitive for fingertips..
The input of the pins 1 and 3 are always high, so there are indeed pullups.
But why does the touchpad not get detected? (At least not through i2cdetect)

Not sure if it'll help or not, but when I was working with the keypad driver, I noticed that any activity on the Touchpad will also cause a keypad interrupt. Read keypad.c in nspire_emu.

Other than that, on the CX, the Touchpad seems to be accessed through address 0x90050000 according to a quick read of nspire_emu's source code.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 08, 2012, 06:53:13 am
Yeah, I read it but I can't make use of that now, as we don't have any driver for the touchpd.
In nspire emus source I grepped "touchpad" and could only find GPIO 1 +3.
I'll search for that address.
But if the touchpad is connected to the GPIOs on the non-CX, you could test my git fork:
http://github.com/Vogtinator/linux (branch testing) (http://github.com/Vogtinator/linux)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 08, 2012, 11:57:08 am
I just measured the outputs and inputs of some GPIOs connected to the pins on the bottom port, and it's correct.
They're even sensitive for fingertips..

Yeah cool.
We could make a lie detector...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 08, 2012, 01:19:37 pm
Quote
Yeah cool.
We could make a lie detector...
No, a built-in cheat detector during exams :-P
Works quite well with ADC6 ;-)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 08, 2012, 01:42:47 pm
Quote
Yeah cool.
We could make a lie detector...
No, a built-in cheat detector during exams :-P

Bad idea. ;)

edit: What, if we overwrite everything in memory what is not used by linux, will the OS (which should be not there then anymore) still protect the LED from flashing?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 08, 2012, 02:52:15 pm
The OS isn't running at all, so it cannot access the hardware.
Maybe there are some hardware registers which has to be written to (Find out which and what value if you want to access the LED :-P).
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 09, 2012, 12:41:31 am
(Find out which and what value if you want to access the LED :-P).

I'll look into this once I work out how I can enter press to test via the emulator :P
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 09, 2012, 09:22:50 am
X is a bit too large to use as initrd.
http://dl.dropbox.com/u/105478372/zImage.tns (http://dl.dropbox.com/u/105478372/zImage.tns)
http://dl.dropbox.com/u/105478372/rootfs.tar.bz2 (http://dl.dropbox.com/u/105478372/rootfs.tar.bz2)
I posted these URLs somewhere in this thread, but I'm too lazy to search.
So I have to put the tar.bz2 on an usb stick (unzipped by the way ?), and then to connect it on the TI-Nspire CX CAS, with this kind of adaptator (https://www.google.fr/search?q=c%C3%A2ble+mini+usb+m%C3%A2le+vers+usb+femelle), don't I ?
But do I need to have a special kind of usb stick ? And then, what have I to launch ?
I tried to lauch therootfs.ext2 this way :
Code: [Select]
kernel linux/zImage.tns
initrd linux/rootfs.ext2.tns
cmdline debug root=/dev/ram console=ttyAMA0,115200n8
But the calculator crashed.
On the console of linux, I don't understand a thing : why help command doesn't exist and why commands like "ls", "cd" don't have any effect ?
Sorry for those questions, I'm not an expert in this domain.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 09, 2012, 09:35:16 am
Quote
I tried to lauch therootfs.ext2 this way :
Which rootfs.ext2? If you downloaded the files from above, you only have zImage.tns and rootfs.tar.bz2.
Quote
But the calculator crashed.
You can't use a tar.bz2 as initrd.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 09, 2012, 09:39:10 am
These questions should probably be posted in the Nspire Linux questions topic ;)

Quote
So I have to put the tar.bz2 on an usb stick (unzipped by the way ?)
Yes, and yes, you need to unpack rootfs.tar.bz2.

Quote
and then to connect it on the TI-Nspire CX CAS, with this kind of adaptator, don't I ?
Your link is imprecise. What you need is a fairly uncommon male mini-A to female A cable.

Quote
But do I need to have a special kind of usb stick ?
No, Linux can work with any well-behaved USB Mass Storage Device.

Quote
And then, what have I to launch ?
linuxloader2, preferably invoked through a script, as described into the documentation ;)

Quote
why help command doesn't exist
It does on bash; maybe it does not on the size-constrained busybox.

Quote
and why commands like "ls", "cd" don't have any effect ?
* when run from a directory which does not contain any non-hidden files - which is, precisely, the case when logging in as root in Vogtinator's rootfs - it's perfectly natural that ls doesn't print anything, that's the expected behaviour ;)
* "cd", without arguments, will change to your home directory - from which you started when you logged, so it will appear not to do anything either.
Title: Re: Calling all Linux Kernel developers!
Post by: mdr1 on December 09, 2012, 10:08:01 am
These questions should probably be posted in the Nspire Linux questions topic ;)
Ok, I answered here (http://ourl.ca/17509/328401).
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 09, 2012, 12:44:18 pm
I got the touchpad to work partially (X and Y swapped, changing the page didn't work at all).
Now I chose to rewrote everything, and I can only get 0s (running in nspire_emu):
Code: [Select]
#define NSPIRE_TOUCHPAD_BASE 0x90050000
static void nspire_touchpad_write(uint32_t value, uint32_t addr, struct nspire_touchpad *touchpad)
{
*((uint32_t*)(addr + NSPIRE_TOUCHPAD_BASE)) = value;
}

static uint8_t nspire_touchpad_read(uint32_t addr, struct nspire_touchpad *touchpad)
{
return *((uint32_t*)(addr + NSPIRE_TOUCHPAD_BASE));
}

/* Reset */
nspire_touchpad_write(0, 0x38, touchpad);
/* Set port to 0xFF */
nspire_touchpad_write(0xFF, 0x10, touchpad);
/* Set page to 0x04 */
nspire_touchpad_write(0x04, 0x10, touchpad);
/* Reset */
nspire_touchpad_write(0, 0x38, touchpad);
/* Set port to 0xFF */
nspire_touchpad_write(0xFF, 0x10, touchpad);
/* Increase 'reading' */
nspire_touchpad_write(0x100, 0x10, touchpad);
/* Read current page */
read[0] = nspire_touchpad_read(0x10, touchpad);

nspire_emus code:
Spoiler For Spoiler:
Code: [Select]
/* 90050000 */
int touchpad_cx_state;
int touchpad_cx_reading;
u8 touchpad_cx_port;
u32 touchpad_cx_read(u32 addr) {
switch (addr & 0xFFFF) {
case 0x0010:
if (!touchpad_cx_reading)
break;
touchpad_cx_reading--;
return touchpad_read(touchpad_cx_port++);
case 0x0070:
return touchpad_cx_reading ? 12 : 4;
default:
return 0;
}
return bad_read_word(addr);
}
void touchpad_cx_write(u32 addr, u32 value) {
switch (addr & 0xFFFF) {
case 0x0010:
if (touchpad_cx_state == 0) {
touchpad_cx_port = value;
touchpad_cx_state = 1;
} else {
if (value & 0x100) {
touchpad_cx_reading++;
} else {
touchpad_write(touchpad_cx_port++, value);
}
}
return;
case 0x0038:
touchpad_cx_state = 0;
touchpad_cx_reading = 0;
return;
}
//bad_write_word(addr, value);
}

Edit: With my old code I can get only x OR y velocity. If X comes first, Y is 0 and vice versa.
But proximity, contact and the absolute positions work flawlessly.
Edit2: Now I tried to write a driver for linux, but it's only returning 0 :-(
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 10, 2012, 08:26:28 am
As the Touchpad is a resistive one, it should recognize more than one contact with finders...
Is that possible under linux where not the standart driver from the OS is used?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 10, 2012, 08:34:07 am
Quote
As the Touchpad is a resistive one, it should recognize more than one contact with finders...
Wrong :P Only capacitive and optical touchsensitive interfaces are capable of recognizing more than one position.

Quote
Is that possible under linux where not the standart driver from the OS is used?
Nope, only position, velocity and proximity can be read.
http://hackspire.unsads.com/wiki/index.php/Keypads#Touchpad_I.C2.B2C (http://hackspire.unsads.com/wiki/index.php/Keypads#Touchpad_I.C2.B2C)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 10, 2012, 10:53:28 am
Wrong :P Only capacitive and optical touchsensitive interfaces are capable of recognizing more than one position.
Ouch. But I thought of the right type... ;)

And somewhere in the web I saw a resitive touchpad witch could regocnize up to five fingers and different pressure...

Quote
Is that possible under linux where not the standart driver from the OS is used?
Nope, only position, velocity and proximity can be read.
http://hackspire.unsads.com/wiki/index.php/Keypads#Touchpad_I.C2.B2C (http://hackspire.unsads.com/wiki/index.php/Keypads#Touchpad_I.C2.B2C)
So this is limited by the firmware in the touchpad itself?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 10, 2012, 12:01:23 pm
Quote
And somewhere in the web I saw a resitive touchpad witch could regocnize up to five fingers and different pressure...
But not five independent positions? My old laptop with resistive touchpad could determine the count of fingers I was pressing with (Scrolling, rightclick). Gestures like zooming weren't possible.

Quote
So this is limited by the firmware in the touchpad itself?
Apparently, yes. But you can't get more information than position and proximity/pressure anyway.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 10, 2012, 03:12:36 pm
Quote
And somewhere in the web I saw a resitive touchpad witch could regocnize up to five fingers and different pressure...
But not five independent positions? My old laptop with resistive touchpad could determine the count of fingers I was pressing with (Scrolling, rightclick). Gestures like zooming weren't possible.
I am not sure, it could also have been another type of touchscreen...

I found a video where a touchpanel can recognize more fingers:


We should get back to our main topic....
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 10, 2012, 03:19:42 pm
Quote
I found a video where a touchpanel can recognize more fingers:
I think they're subdividing the screen into sections, each treated seperately.
With resistive Touchpads you can't measure proximity and position without contact,
so the nspire does indeed have not a resistive one.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on December 10, 2012, 06:45:49 pm
It doesn't really matter what the pad itself is capable of. It's communicating over I2C, so there's another chip managing it. We can only use what that chip gives us.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on December 10, 2012, 07:36:46 pm
Can someone make a tutorial about how to set up linux on a CX? Im a bit of a noob, and I can't load the kernel for some reason, don't know why
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 11, 2012, 09:12:47 am
Quote
Im a bit of a noob, and I can't load the kernel for some reason, don't know why
? We can't help you if you don't provide enough information.
What did you do and which step fails?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 11, 2012, 11:32:17 am
My idea behind the multi-touch question was that we could make a virtual screen in the X server that is bigger than the actual screen, and we could scroll in this virtual screen with a special gesture or when we click the pad and move or something like that. So we don't have to use mini scroll bars on the sides.
Title: Re: Calling all Linux Kernel developers!
Post by: shmibs on December 11, 2012, 11:53:27 am
the typical method for that is just to have the viewing window follow the cursor
Title: Re: Calling all Linux Kernel developers!
Post by: CompSystems on December 12, 2012, 11:18:10 am
News

http://kernelnewbies.org/Linux_3.7
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on December 13, 2012, 05:50:04 am
Multiplatform support. <3.

Not sure about anyone else, but I really like the look of the Arm64 instruction set. ARM never was one for backwards compatibility, and I love it for that. Never afraid to buck the trend in favor of something better.

Oh, and Divide by Zero. IT EQUALS ZERO!!!
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on December 15, 2012, 01:03:39 pm
Quote
Im a bit of a noob, and I can't load the kernel for some reason, don't know why
? We can't help you if you don't provide enough information.
What did you do and which step fails?
I go kernel /linux/zImage.tns and it tells me that the kernel does not exist or is empty
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 15, 2012, 01:59:06 pm
Did you download the right kernel image and did you put it in /linux on the calculator?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 15, 2012, 02:01:28 pm
kernel /linux/zImage.tns and it tells me that the kernel does not exist or is empty

kernel linux/zimage.tns

(no slash before linux)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 15, 2012, 02:03:07 pm
Quote
kernel linux/zimage.tns (no slash before linux)
Yes, I thought he was using one of the scripts here. (Which would be better)
Title: Re: Calling all Linux Kernel developers!
Post by: iPwn36 on December 16, 2012, 05:15:41 pm
4. Download my patch (for X, directfb...) "wget http://dl.dropbox.com/u/105478372/fbdev.patch" and apply it "git apply fbdev.patch"

Can someone fix this link pls? I'm trying to build my own kernel and it looks like it's down :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 17, 2012, 01:22:42 am
It's not needed anymore, so I deleted the patch.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on December 17, 2012, 01:23:54 am
I think this patch (or something close to it) was integrated to the nspire-linux tree.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 17, 2012, 05:07:40 am
And I thought, the patch would be in the new linuxloader...
Title: Re: Calling all Linux Kernel developers!
Post by: Alex on December 17, 2012, 01:51:03 pm
When would be released an official version with Tutorial?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 17, 2012, 02:16:24 pm
Every version you can find here is official ;-)
Here (http://tiplanet.org/nspire-linux-builds) should be everything you need, only for an initrd and/or rootfs you have to look around these 35 pages :-P
Title: Re: Calling all Linux Kernel developers!
Post by: iPwn36 on December 17, 2012, 05:08:43 pm
Thanks vogt, now to figure out how to use wpa_supplicant...
Title: Re: Calling all Linux Kernel developers!
Post by: Alex on December 18, 2012, 02:42:32 pm
Every version you can find here is official ;-)
Here (http://tiplanet.org/nspire-linux-builds) should be everything you need, only for an initrd and/or rootfs you have to look around these 35 pages :-P
Ok but i'm lost in all these versions :$ . I read a little bit english so I find it's to hard to read all the 35 pages :/ . What I must to do to have grafics gui? or usb and keyboard?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 18, 2012, 03:09:08 pm
For graphics you don't need anything special besides the usual usb setup.
You only need an USB hub which you can connect to the nspire and to external power.
Any USB stick, keyboard and mouse should work out of the box, to use X you have to find the right rootfs image.
I think it's this (http://dl.dropbox.com/u/105478372/rootfs.tar.bz2) one, but I'm not sure.
Title: Re: Calling all Linux Kernel developers!
Post by: Alex on December 19, 2012, 11:03:38 am
Ok thanks.
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on December 19, 2012, 01:09:38 pm
Is there a special extension you need for the usb drive? like ext*, MS-DOS or something else?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 20, 2012, 01:18:48 pm
Is there a special extension you need for the usb drive? like ext*, MS-DOS or something else?

with a unix system, just copy it with dd on the drive, tripple-check your spelling, otherwise all your data will get destroyed.
the dd command formats it in the right format, I think ext2 in this case.

edit: sorry, this is just possible if the file has a .ext2 ending. othwerwise just format your stick with ext4 (or any other ext*) and copy all the data in the folder . in ther archive on the stick.

What must I write to tell linux to use a partition of my stick as swap? (it is formatted as swap)

ps: my usb power supply is finished (the circuit part). It works quite good, I just have to buy more powerful batteries (~500mAh). I can even connect my little USB HDD, one without external power supply, all power is given by the USB, in my case my circuit. I will publish pictures soon. The HDD eats up to 0.6A.


OMG: If I get a kernel panic beacuse it can't find my root fs on my stick, after a couple of minutes some text output about EHCI controllers is running over the screen until i hard reset my calc... I thought, a kernel panic would total crash the kernel and nothing will happen anymore?

Just tried my first attempts with USB booting, fails with kernel paic about no root fs... Any ideas?
-Stick properly formatted and data on it
-right files used (vogtinator's)
-Stick is recognized (as sda)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 21, 2012, 04:14:59 am
Is there a special extension you need for the usb drive? like ext*, MS-DOS or something else?

with a unix system, just copy it with dd on the drive, tripple-check your spelling, otherwise all your data will get destroyed.
the dd command formats it in the right format, I think ext2 in this case.

edit: sorry, this is just possible if the file has a .ext2 ending. othwerwise just format your stick with ext4 (or any other ext*) and copy all the data in the folder . in ther archive on the stick.

What must I write to tell linux to use a partition of my stick as swap? (it is formatted as swap)

ps: my usb power supply is finished (the circuit part). It works quite good, I just have to buy more powerful batteries (~500mAh). I can even connect my little USB HDD, one without external power supply, all power is given by the USB, in my case my circuit. I will publish pictures soon. The HDD eats up to 0.6A.


OMG: If I get a kernel panic beacuse it can't find my root fs on my stick, after a couple of minutes some text output about EHCI controllers is running over the screen until i hard reset my calc... I thought, a kernel panic would total crash the kernel and nothing will happen anymore?

Just tried my first attempts with USB booting, fails with kernel paic about no root fs... Any ideas?
-Stick properly formatted and data on it
-right files used (vogtinator's)
-Stick is recognized (as sda)

You probably need to add a rootdelay=5 to your kernel command line since you need to give the USB device time to initialize.

Remember to read the Wiki section on USB host (http://hackspire.unsads.com/wiki/index.php/Linux#USB_Host)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 21, 2012, 06:53:49 am
I did all this already...

Cable is plugged in while still in OS mode, then booting the kernel via ll2 script (the rootdelay is set to 10). I plug my stick in when message appears and then it recognizes my hub and the stick as sda.
After serveral seconds I get the kernel panic.

I can't even mount the stick when I boot the kernel with an initrd and then plug my stick in and type 'mount /dev/sda' or something like this.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 21, 2012, 09:22:23 am
I did all this already...

Cable is plugged in while still in OS mode, then booting the kernel via ll2 script (the rootdelay is set to 10). I plug my stick in when message appears and then it recognizes my hub and the stick as sda.
After serveral seconds I get the kernel panic.

I can't even mount the stick when I boot the kernel with an initrd and then plug my stick in and type 'mount /dev/sda' or something like this.


What are the specific error messages are you getting? I suspect a badly setup rootfs or root= kernel command line option.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 21, 2012, 09:58:46 am
Ok, now it works... Just tried copying it with dd from an older root fs which had a .ext2 ending.

What was wrong withe way I created my oler root fs before?
-Ereased everything
-Created none/a GUID/a MBR partition table
-Created a ext4 partition
-Copied the data from Vogtinators archive on this partition


Edit: everything is fine. I tried it without partition table, now running.
I think I was too tired yesterday...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 21, 2012, 10:19:45 am
Quote
Edit: everything is fine. I tried it without partition table, now running.
I think I was too tired yesterday...
I think you forgot to change your bootloader script.
Without partition table you can't use /dev/sda (instead use /dev/sda1)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 21, 2012, 11:37:09 am
I changed nothing with my bootscript...

'No partition table' means when formatting the stick, yuo can chose GUID, MBR, Apple, and nothing. I used nothing.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 21, 2012, 12:30:59 pm
Quote
I changed nothing with my bootscript...
Exactly.
If you create a partition, you have to use /dev/sda1, without /dev/sda.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 21, 2012, 12:56:16 pm
Ahhh I understand. :D

And how can I tell linux to use a partition as swap, maybe adding 'swap=/dev/sda2' to cmdline options in the bootscript?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 21, 2012, 12:58:53 pm
No, modify /etc/fstab.
Add
Code: [Select]
/dev/sda2 swap swap defaults 0 0You have to format it before:
Code: [Select]
mkswap /dev/sda2
If you're not executing this on your calc, be careful with mkswap!

Edit: http://ourl.ca/17509

BTW: Tangrs, did you get my pull request on github?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on December 23, 2012, 05:33:57 pm
Someone should update teh FAQ. We can run X now...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 23, 2012, 05:39:14 pm
Quote
Someone should update teh FAQ. We can run X now...
At the moment the kernel doesn't even boot for me.
Could you try to boot http://tiplanet.org/nspire-linux-builds/zImage_defconfig_20121223_1540.tns (http://tiplanet.org/nspire-linux-builds/zImage_defconfig_20121223_1540.tns)?
Tangrs updated to linux 3.8 :(

Quote
Can this run like KDE, Gnome, Xfce, dwm, Fluxbox, [insert favourite window manager]?
Yes but it'll probably suck. Try not to forget that this is a 120MHz device with 64MB of RAM.
Xfce, dwm, Fluxbox and LXDE should work painless.
The only real restriction is the screen, it's way too small for pcmanfm.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 08, 2013, 12:41:03 am
Surprise!



;)

Edit: Source code for OTG is at https://github.com/tangrs/linux/tree/otg

It is in a separate tree because switching to a OTG driver breaks host USB on CX.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on January 09, 2013, 01:56:09 am
Great work tangrs :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 11, 2013, 07:12:00 am
Thanks to Fabian's work on the GPIO, I got i2c working pretty quickly today.



Basically this means that Touchpad support for classic Nspires will be coming very soon. The CX uses a different interface for accessing the Touchpad but support for that isn't far behind.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 11, 2013, 01:23:01 pm
Great!
I hope I have some time this weekend to continue working on a touchpad driver, was pretty busy last week.
Serial debugging is really good for that, the screen is way to small to read tons of lines of debugging messages..
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 12:27:04 am
Great!
I hope I have some time this weekend to continue working on a touchpad driver, was pretty busy last week.
Serial debugging is really good for that, the screen is way to small to read tons of lines of debugging messages..

I finally integrated OTG into the main branch so you can potentially use it for USB serial debugging. If you're interested in using it, compile the latest kernel and add cx_use_otg to your command line parameters.

Also, in other news, I2C is working on all touchpad platforms. Now we just need a driver for the touchpad. Just a heads up, since we're using the I2C bus now, we should define a I2C driver instead of a platform driver.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 03:55:24 am
Hey everyone.

Lionel and I are having a little discussion about how the kernel should be compressed. The two methods we're looking at are: XZ (slower decompression but smaller kernel) and gzip (faster decompression but larger kernel).

XZ compressed: 1.2MB kernel, about 2-3 seconds decompression
Gzip compressed: 1.7MB kernel, about 0.5 seconds decompression

I believe that we should favor boot up speed over savings in kernel size since the Nspires have a lot of flash storage so space isn't too much of a concern. Most people are also booting Linux via USB so they don't even need to worry about having free space for initrds.

Lionel believes that we should favor kernel size over boot up speed since the extra time in boot speed is insignificant. In addition, in a embedded environment like nspires, we should be trying to save as much space as we can.

Basically, the question is: will you wait an extra 2-3 seconds on boot up to have a ~30% smaller kernel?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 12, 2013, 04:25:03 am
It's not like it's hard to provide both. I can see value in both options, especially when looking at the non-CX nspires. 500k is a big chunk of their storage space.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 12, 2013, 04:30:37 am
It's indeed trivial to provide both, but we're attempting to determine which one, should be, in the opinion of a wider audience, in the defconfig :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 05:03:25 am
If you're using an initrd (which needs decompression as well), it doesn't make any difference.
I'd say XZ, but do we really have to discuss about 0.5 MB (the kernel won't be much larger in the future)?

Quote
lso, in other news, I2C is working on all touchpad platforms. Now we just need a driver for the touchpad. Just a heads up, since we're using the I2C bus now, we should define a I2C driver instead of a platform driver.
Can I do it? :)
I already have most of the code as you already know
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 05:18:13 am
If you're using an initrd (which needs decompression as well), it doesn't make any difference.
I'd say XZ, but do we really have to discuss about 0.5 MB (the kernel won't be much larger in the future)?

Quote
lso, in other news, I2C is working on all touchpad platforms. Now we just need a driver for the touchpad. Just a heads up, since we're using the I2C bus now, we should define a I2C driver instead of a platform driver.
Can I do it? :)

Sure XD.

I'll get cracking on the hardest device then - the NAND. :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 05:40:16 am
Quote
I'll get cracking on the hardest device then - the NAND.
Yay! But we don't have any filesystem driver for it..
But the driver shouldn't be TOO hard, the emulator source should be enough, maybe there's already a driver for our chip available?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 05:45:55 am
Quote
I'll get cracking on the hardest device then - the NAND.
Yay! But we don't have any filesystem driver for it..
But the driver shouldn't be TOO hard, the emulator source should be enough, maybe there's already a driver for our chip available?

I'm pretty sure there isn't one for the CX at least.

The CX one is hard because it uses some weird scheme of embedding NAND commands into the address then performing a write D: Not sure about the classic models though.

The filesystem, we'll leave til later to solve. Perhaps the recently released nLaunch could help us here?

Edit: I've seen some interesting code hidden in the OS that formats the flash.

Maybe there's some sort of data structure that we could modify to trick the OS into believing we have less NAND than we actually have and have it format the filesystem to only utilize that much. Under Linux, we could partition the NAND up and only use the portion that the Nspire OS doesn't use.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 12, 2013, 07:33:05 am
Quote
The filesystem, we'll leave til later to solve. Perhaps the recently released nLaunch could help us here?
Not nLaunch itself, but...

Quote
Edit: I've seen some interesting code hidden in the OS that formats the flash.

Maybe there's some sort of data structure that we could modify to trick the OS into believing we have less NAND than we actually have and have it format the filesystem to only utilize that much. Under Linux, we could partition the NAND up and only use the portion that the Nspire OS doesn't use.
... in the community, we've known for nearly three years the boot2 1.4.1571 for Clickpad/Touchpad contains tons of debugging and testing code for Nucleus and its elements, especially filesystem operations :)
The boot2 3.1.131 is smaller, and presumably doesn't contain as much.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 07:34:26 am
Quote
The filesystem, we'll leave til later to solve. Perhaps the recently released nLaunch could help us here?
Not nLaunch itself, but...

Quote
Edit: I've seen some interesting code hidden in the OS that formats the flash.

Maybe there's some sort of data structure that we could modify to trick the OS into believing we have less NAND than we actually have and have it format the filesystem to only utilize that much. Under Linux, we could partition the NAND up and only use the portion that the Nspire OS doesn't use.
... in the community, we've known for nearly three years the boot2 1.4.1571 for Clickpad/Touchpad contains tons of debugging and testing code for Nucleus and its elements, especially filesystem operations :)
The boot2 3.1.131 is smaller, and presumably doesn't contain as much.

Reckon it's possible to utilize a few to do some dirty, partitioning work for us? :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 01:32:41 pm
Partitioning would be great, but maybe the size of the flash is hardcoded?

BTW: Buildroot builds are working now.
I downloaded one, ran "tar -xvf xconfig.tar.bz2 -C ." and was surprised, MY PWD WAS "/"  :banghead:
Yeah, I've overridden my opensuse installation. Now an arm system was (not) running on my laptop.
After 5 hours playing with backups, I now have a booting system without audio   :(
Why does this *** tar overwrite my files?

The touchpad works, but it's lagging a bit and too slow, I'll continue with my work after my system is fine again  :(
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 12, 2013, 02:37:20 pm
Quote
BTW: Buildroot builds are working now.
Great, thanks ;)
(to readers: he's talking about http://tiplanet.org/nspire-linux-builds/ )

Quote
I downloaded one, ran "tar -xvf xconfig.tar.bz2 -C ." and was surprised, MY PWD WAS "/"
Ouch. In this case, you've unleashed a world of hurt onto yourself, indeed :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 04:34:42 pm
Look what I found out: http://www.linux-mtd.infradead.org/nand-data/nanddata.html (http://www.linux-mtd.infradead.org/nand-data/nanddata.html)
The NAND is already actually supported by linux!
I was a bit frustrated because of this silly synaptics_i2c polling too slow, so I did a bit of research.

Edit: After reboot in linux the touchpad doesn't work anymore with nucleus, you have to reboot. But it doesn't boot anymore and you have to run NAND-Tests everytime you reboot in linux. I'll try disabling access with 1<<7 to 0x900B0018

Edit2: The TOUCHPAD WORKS! I'll upload a video later/tomorrow
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 12, 2013, 06:02:34 pm
Vogtinator, you have royally screwed your desktop. You extracted an ARM linux install on top of your x86 linux root. You're lucky that it still boots, likely thanks to various configuration differences between the two.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:08:27 pm
Look what I found out: http://www.linux-mtd.infradead.org/nand-data/nanddata.html (http://www.linux-mtd.infradead.org/nand-data/nanddata.html)
The NAND is already actually supported by linux!
I was a bit frustrated because of this silly synaptics_i2c polling too slow, so I did a bit of research.

Edit: After reboot in linux the touchpad doesn't work anymore with nucleus, you have to reboot. But it doesn't boot anymore and you have to run NAND-Tests everytime you reboot in linux. I'll try disabling access with 1<<7 to 0x900B0018

Edit2: The TOUCHPAD WORKS! I'll upload a video later/tomorrow

The NAND chip itself is supported and always has been. But the NAND controller isn't :(

Nice, I look forward to seeing it XD
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:14:00 pm
Quote
Vogtinator, you have royally screwed your desktop. You extracted an ARM linux install on top of your x86 linux root. You're lucky that it still boots, likely thanks to various configuration differences between the two.
Nope, it didn't boot. Had to restore the files from another laptop:
"export list=`tar -tf xconfig.tar.bz2`; for i in $list; do echo $i; rm /mnt/$i; rsync -lptgoDvzP /media/$i /mnt/$i; done;"

Quote
The NAND chip itself is supported and always has been. But the NAND controller isn't :(
Is it the same on all nspires?

Quote
Nice, I look forward to seeing it
Here you go:

Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:19:47 pm
Quote
Vogtinator, you have royally screwed your desktop. You extracted an ARM linux install on top of your x86 linux root. You're lucky that it still boots, likely thanks to various configuration differences between the two.
Nope, it didn't boot. Had to restore the files from another laptop:
"export list=`tar -tf xconfig.tar.bz2`; for i in $list; do echo $i; rm /mnt/$i; rsync -lptgoDvzP /media/$i /mnt/$i; done;"

Quote
The NAND chip itself is supported and always has been. But the NAND controller isn't :(
Is it the same on all nspires?

I haven't looked at the classic nspires in depth yet but I'm pretty sure there isn't a existing driver for the CX.

Though, some one did ask about it in a mailing list in 2008 (http://lists.infradead.org/pipermail/linux-mtd/2008-August/022809.html) and probably succeeded in writing one. Think it's worth asking if he has any source code available?

Quote
Quote
Nice, I look forward to seeing it
Here you go:



That is really awesome!
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:23:54 pm
Quote
Though, some one did ask about it in a mailing list in 2008 and probably succeeded in writing one.
I read:
Code: [Select]
It sounds like it isn't 'NAND' at all, as far as you're concerned. It's
a disk drive of some form. Usually these things present themselves as
IDE, so you'd use the IDE driver. If it has its own 'special' interface
then you probably want a dedicated block driver for it; nothing to do
with the MTD subsystem at all.
WTF? Flash controller with IDE interface for ARM SoCs?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:24:34 pm
Quote
Though, some one did ask about it in a mailing list in 2008 and probably succeeded in writing one.
I read:
Code: [Select]
It sounds like it isn't 'NAND' at all, as far as you're concerned. It's
a disk drive of some form. Usually these things present themselves as
IDE, so you'd use the IDE driver. If it has its own 'special' interface
then you probably want a dedicated block driver for it; nothing to do
with the MTD subsystem at all.
WTF? Flash controller with IDE interface for ARM SoCs?

I think the person who replied didn't know what he was talking about.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:30:19 pm
But one problem does still exist:
Edit: After reboot in linux the touchpad doesn't work anymore with nucleus, you have to reboot.
But it doesn't boot anymore and you have to run NAND-Tests everytime you reboot in linux.
I'll try disabling access with 1<<7 to 0x900B0018
With 1<<7 it doesn't damage the flash anymore, but the touchpad does still work only after a reboot.
I don't think the touchpad problem is too easy to find, but the flash problem has to be solved asap!
I didn't lose my data yet, but why is linux doing something with the NAND at all?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:33:11 pm
But one problem does still exist:
Edit: After reboot in linux the touchpad doesn't work anymore with nucleus, you have to reboot.
But it doesn't boot anymore and you have to run NAND-Tests everytime you reboot in linux.
I'll try disabling access with 1<<7 to 0x900B0018
With 1<<7 it doesn't damage the flash anymore, but the touchpad does still work only after a reboot.
I don't think the touchpad problem is too easy to find, but the flash problem has to be solved asap!
I didn't lose my data yet, but why is linux doing something with the NAND at all?

The 1<<7 to protect the NAND only applies to the classics AFAIK. The CX uses some different ways to access the NAND so 1<<7 is probably undefined on the CX.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:34:03 pm
But it works! ???
At least there weren't any problems after 1<<7.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:38:34 pm
But it works! ???
At least there weren't any problems after 1<<7.

Hmmm. I see. In that case, move the disable from classic.c to common.c. I'm in the middle of a huge, unstaged mess at the moment XD
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:40:18 pm
Quote
Hmmm. I see. In that case, move the disable from classic.c to common.c.
You put "/* Renable bus access to everything in case the OS disabled them */" there already.
I just changed "0" to "1<<7".
Maybe it doesn't work and I was just lucky the last few times?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:42:59 pm
There's actually another write that I put into the start of nspire_classic_init.

Now I think about it, it should work because the bits should represent devices rather than addresses (which isn't what I initially thought).

Never mind :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:44:41 pm
My bad luck proves you right.. I just had to test the NAND again -.-
At least it took longer :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:46:07 pm
Oh really? Damn...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:48:04 pm
Yeah, you should fix that :(
I don't know how, maybe don't map it at all?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:49:00 pm
Yeah, you should fix that :(
I don't know how, maybe don't map it at all?

Now, I'm stumped. The NAND isn't actually mapped at all.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:50:46 pm
Did it happen to you, too?
If not, my device really hates me (even the reset-button doesn't work always)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 06:52:28 pm
Did it happen to you, too?
If not, my device really hates me (even the reset-button doesn't work always)

It happens but definitely no where as often as yours o_O (only happened 3 times so far in all of booting Linux)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 06:59:29 pm
Maybe I'm testing too much?
Now I'm worrying about my reset-button and flash..

Oh, now I remember what we have to support, too:
Charging the battery while running linux!
It doesn't work yet.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 12, 2013, 07:00:30 pm
Maybe I'm testing too much?
Now I'm worrying about my reset-button and flash..

Oh, now I remember what we have to support, too:
Charging the battery while running linux!
It doesn't work yet.

That's part of what I'm working on. I'm still trying to figure out the USB PHY.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 12, 2013, 07:10:55 pm
*popcorn*


BTW : just wondering : Vogtinator do you have a USB stick connected to a HUB then your Nspire on your video ?
If not, is there any chance to explain us how to find your build ?
Thanks =)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 12, 2013, 07:12:32 pm
My current build is deleted, I'm currently removing dirty lines.

But if you really want to get it now, compile it yourself:
https://github.com/Vogtinator/linux/tree/testing (https://github.com/Vogtinator/linux/tree/testing)

Edit: Kernel is attached.
But I still have to edit drivers/i2c/busses/i2c-designware-core.c.

Edit2: I compiled psplash and now we have a nice progress bar on boot:
(http://i.imgur.com/Fb7jOl.jpg) (http://imgur.com/Fb7jO)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 14, 2013, 05:08:29 am
Edit2: I compiled psplash and now we have a nice progress bar on boot:
(http://i.imgur.com/Fb7jOl.jpg) (http://imgur.com/Fb7jO)

Very nice!

Edit: Added a backlight driver for Nspire Linux so the backlight also turns off as the LCD powers off. That should save some power and not show the ugly white fading screen when the LCD turns off.

I am also planning to get a contrast driver working for the classics so we can remove the ugly /proc/contrast and /proc/backlight files.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 14, 2013, 08:20:12 am
Quote
I am also planning to get a contrast driver working for the classics so we can remove the ugly /proc/contrast and /proc/backlight files.
/sys/class/backlight interface?
That'd be great!

I wonder where the right place for /proc/adc is..
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 14, 2013, 09:32:17 am
Quote
I am also planning to get a contrast driver working for the classics so we can remove the ugly /proc/contrast and /proc/backlight files.
Sure, would be good :)

Quote
I wonder where the right place for /proc/adc is.
I think it's something more complicated involving the battery and/or power stuff. Not necessarily a must for the very first mainline RFC submission.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 14, 2013, 09:44:52 am
Quote
I think it's something more complicated involving the battery and/or power stuff.
I think http://www.mjmwired.net/kernel/Documentation/hwmon/sysfs-interface (http://www.mjmwired.net/kernel/Documentation/hwmon/sysfs-interface) is right, but no documentation :-(
Hopefully there's a simple driver already..

Quote
Not necessarily a must for the very first mainline RFC submission.
Not really necessary, but so we know whether the battery is charging.
Maybe there's a small x app which displays the charge level or at least the voltages.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 19, 2013, 05:12:56 am
Hmmm, I'm starting to implement a CPU frequency scaling driver. At the moment, it simply reports the CPU frequency.

Now, I need some help with frequency scaling. If we assume that the base speed won't change, what would be a good way to determine a table of "safe" speeds to scale to? Should we be touching the base speed? What happens if the user overclocks the calculator? How do we ensure that AHB/CPU speeds are always within safe limits?

Any ideas?

Edit: I'll try a list of "safe" divisors for now.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 19, 2013, 05:23:47 am
The experience with the CX shows that on the CX, IMO, the AHB frequency should never be touched. The default is 66 MHz, and NAND memory corruption occurs quickly if the AHB is set to 75 MHz. 72 MHz seems to be safer, but then it's less than 10% overclocking margin.
The Clickpad & Touchpad have higher tolerance to AHB overclocking, IIRC.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 19, 2013, 05:25:01 am
The experience with the CX shows that on the CX, IMO, the AHB frequency should never be touched. The default is 66 MHz, and NAND memory corruption occurs quickly if the AHB is set to 75 MHz. 72 MHz seems to be safer, but then it's less than 10% overclocking margin.
The Clickpad & Touchpad have higher tolerance to AHB overclocking, IIRC.

It's okay if the AHB speed is slower than 66MHz right? I'm working with the values that Nover gives me and avoiding everything that's "dangerous".
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on January 19, 2013, 05:44:04 am
A bit slower wouldn't hurt I think, though high values indeed corrupt your NAND quickly. IIRC, the warnings on the CPU could be ignored it was only the AHB warning that should be taken serious.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 19, 2013, 05:49:22 am
The CPU warning had better not be ignored, otherwise the calculator will just crash ;)
The problem is, a wide range of maximum tolerated CPU clock speeds have been reported. Few CX calculators can run in a stable manner above 252 MHz, but some have been reported to crash at 222 MHz - so you probably shouldn't let the driver go over 210 or 216 MHz. For the first mainline submission, and even later IMO, stability trumps squeezing the last bit of performance :)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 19, 2013, 05:53:33 am
Why build in such a limitation? just make sure there's a warning somewhere, and make the default lower. Ideally, the default would be normal, so new users can't blame their problems on it.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 19, 2013, 05:57:31 am
Why build in such a limitation? just make sure there's a warning somewhere, and make the default lower. Ideally, the default would be normal, so new users can't blame their problems on it.

Sounds good. I'll only include frequencies that Nover doesn't report as dangerous.

Edit: Implemented a simple cpufreq driver. It can only scale between two frequencies though: half of base freq and 1/4 of base freq. It's limited because we can't touch the AHB speed (or else, drivers relying on the AHB and APB clocks will be all messed up) unless we notify the drivers of the change. I'm still looking into it.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 22, 2013, 03:14:13 pm
I suppose that this can't be solved ? (my stuff is absolutly not up to date, if it is the problem)
Don't bother on the yyyyyyyyyyyyyyyy... stuff, I know it has been solved.
(http://i.imgur.com/QHw1Ps1l.jpg) (http://i.imgur.com/QHw1Ps1.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 22, 2013, 03:25:56 pm
It's your script, theres "#boot" instead of "boot" which gives an "Unknown command" error.

Edit: "Ramdisk too large" Oops, my mistake  :-[ Use the initrd from tangrs for now
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 22, 2013, 06:01:13 pm
Is it possible to get X working on a click pad/touchpad? Mine complains about the color depth being unsupported. Is there a way around that?
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on January 22, 2013, 10:28:24 pm
Hey, anyone willing to test a file system image? I am having issues with my storage medium not getting set up right (I switched to a linux VM instead of an actual machine to format my USB drive). Let me know if this boots at all. It's got python, vim, lua, and ruby installed on it, along with x windows (its based off of xconfig from tiplanet.org/nspire-linux-builds) To use the image, here is a copy of Vogtinator's instructions

Do the following: (/dev/sdX(X is the letter of usb drive, find it with mount command) = USB-Stick)
1. mkdir /tmp/mount
2. mkfs.ext4 /dev/sdX
3. mount /dev/sdX /tmp/mount (ignore warnings)
4. tar -xvf rootfs.tar.bz2 -C /tmp/mount
5. umount /tmp/mount

Download link: https://www.dropbox.com/s/9fundz78mzcox46/rootfs.tar.bz2
You also need to use this kernel: http://tiplanet.org/nspire-linux-builds/zImage_expanded_20130119_2110.tns

Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 23, 2013, 02:00:30 am
Nowadays, /dev/sda is usually the host disk of the host computer (or the VM), so you probably mean /dev/sdb :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 23, 2013, 07:48:05 am
Otherwise you'll get HUGE problems ;)
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on January 23, 2013, 07:57:09 am
Quote
Nowadays, /dev/sda is usually the host disk of the host computer (or the VM), so you probably mean /dev/sdb

Better change this before an idiot types this in an terminal on his pc....
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 23, 2013, 07:57:51 am
I wrote a script to do that about 10 minutes before you posted :)
The filesystem works, I know that the python and vim work, but I don't know how to use ruby and lua.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 23, 2013, 07:58:05 am
Quote
Better change this before an idiots types this in an terminal on his pc....
/dev/<usb> would be better, many use a second hdd.

Edit: Too late, I hate caching..
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 23, 2013, 08:10:43 am
Is it possible to get X working on a click pad/touchpad? Mine complains about the color depth being unsupported. Is there a way around that?

Yep, I get that too. It seems that the fbdev Xorg driver doesn't support 4bpp hence X can't run either.
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on January 23, 2013, 08:23:00 am
Good, so my filesystem works, I guess my errors/kernel panic are coming from the microSDHC card I was using (or my VM setup, or something else).
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 23, 2013, 08:33:51 am
The contoller http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller (http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller)
Supports 8 bpp. Maybe just use 8bpp instead of 4bpp?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 23, 2013, 08:43:12 am
When TI's OS is running, using 8 bpp requires putting the screen buffer in SDRAM, otherwise some variables used by the OS are corrupted. But without TI's OS, is the SRAM large enough to put the screen buffer there ?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 23, 2013, 08:44:45 am
The contoller http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller (http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller)
Supports 8 bpp. Maybe just use 8bpp instead of 4bpp?

The controller might support it but the panel doesn't. I've already tried :(

Edit: unless I'm missing something... Was it ever possible to use 8bpp in Nspire OS? Linux renders the screen weirdly when I try to use 8bpp mode.


Edit2: Just had an epiphany. It is most likely possible after all. I made a wrong conclusion XD I'll give it a whirl again tomorrow.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 23, 2013, 08:57:21 am
Ok. 'cause there's written:
Quote
101 = 24 bpp (not applicable to TI-Nspire's STN LCD)
.
So apparently even 16 bit are possible? That'd be even better!
But why doesn't TI use this? SRAM can't be the reason
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 23, 2013, 09:00:35 am
In 8 bpp mode, one has to define a palette ( http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#C0000000_-_LCD_controller ), otherwise the screen is indeed weird.
nDOOM, among others, uses 8 bpp mode - but in SDRAM, as I wrote. Since we don't have to worry about not erasing the variables for TI's OS, maybe the SRAM is large enough to contain a double-sized screen buffer ? :)
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 23, 2013, 09:11:28 am
Ok. 'cause there's written:
Quote
101 = 24 bpp (not applicable to TI-Nspire's STN LCD)
.
So apparently even 16 bit are possible? That'd be even better!
But why doesn't TI use this? SRAM can't be the reason
Speed issues ?
Also, yes, they have SRAM problems, even in 4bpp.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 23, 2013, 09:27:25 am
The CX doesn't use the SRAM and it's fast enough.
I have seen a Clickpad, but I think the (crappy) LCD is the issue, not the storage

Edit: I got a full busybox initrd working.. Just 720 KB!
Edit2: Initrd with links and direcfb (for images): 3.2 MB, had to increase ramdisk size in kernel config
Edit3: http://tiplanet.org/nspire-linux-builds/initrd.tns (http://tiplanet.org/nspire-linux-builds/initrd.tns)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 23, 2013, 09:56:56 pm
I've changed it so the classic nspires uses 8bpp. I'll push it when X is working on it.

@Vogtinator, I've been researching the meanings behind clcdfb_check's (5+1) magic numbers and this is what I got (http://lists.infradead.org/pipermail/linux-arm-kernel/2011-March/044661.html). Does this mean we can simply put hsync_len as 6 (and change left_margin and right_margin as appropriate as well)? It doesn't seem to be panel specific so maybe we don't have to set it to the same settings the nspire OS uses.

Also, regarding X being broken, did you enable the FBDEV driver in buildroot? The config option is BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV When I use the FBDEV driver, I found that clcdfb_check isn't even called at all so even hsync_len values less than 6 will be accepted (possibly because FBDEV doesn't try to change the video mode).

Basically, should we just simply chuck the minimum value of 6 into hsync_len, left_margin and right_margin?

Edit: Woo!
(http://i50.tinypic.com/11rd4hw.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on January 23, 2013, 11:10:37 pm
Oooh you got X working it's pretty awesome :D

Is the mouse the touchpad/clickpad or something?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 01:17:49 am
Yes, it is. (hopefully)

I didn't test x, I used links -g (directfb) which printed
"current mode not upported".
It works only if I return 0 in clcdfb_check.
That's exactly the same error mssage we had earlier.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 24, 2013, 05:40:51 am
Yes, it is. (hopefully)

I didn't test x, I used links -g (directfb) which printed
"current mode not upported".
It works only if I return 0 in clcdfb_check.
That's exactly the same error mssage we had earlier.


I changed hsync_len to be 6 so it should pass the clcdfb_check tests. Can you pull the latest changes and check that it actually worked?
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 24, 2013, 09:06:57 am
Hi
I have a question : what are the limitations (unless time) to have Nspire linux to work with the NAND filesystem ?
We know it uses Datalight Reliance v2.10 Build 1150 and Datalight FlashFX Pro v3.00 Build 1358 and after some research on them I found that it has "somewhere" a support for bootstrapping linux : http://embedded-computing.com/white-papers/white-flash-flashfx-tera-reliance-nitro/

I cannot find sources (even the "free 30-days source demo" doesn't work when logged in), but maybe already packaged libs exist for Linux running on ARM9 ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 09:16:51 am
Quote
I cannot find sources (even the "free 30-days source demo" doesn't work when logged in), but maybe already packaged libs exists for Linux running on ARM9 ?
Works for me.
But they use mount -t relfs, so they're probably using the modules purchased from datalight :-(
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 24, 2013, 09:24:18 am
There's two things we need to solve for NAND accesses to work. First is to actually get access to the NAND (i.e. get a driver working) and second is to get it to work with a filesystem of some sort.

At the moment, we don't even have a driver for the NAND controller yet (the PL350 is really weird to control). In fact, this is the main limitation that's holding us back - nobody really knows how to interface with the NAND controller.

I have also considered the filesystem issue where there's no public driver for the Datalight filesystem and FlashFX. Unfortunately, we'll probably have to give up being able to access those filesystems.

The plan I have in my head is to try and 'partition' the NAND to divide some space between the Nspire OS and Linux - each to their own filesystems. We could probably find entry points to certain functions in boot2 or the Nspire OS to format the flash and trick them into believing we have less flash than we actually have. That way we could probably have some flash unused at the end that Linux could utilise.

Failing that, we could probably modify nLaunch in a way to load the kernel directly from flash and have the whole NAND to ourselves (save the pages required by the booting process). Obviously, if we use this method, the Nspire OS will not be able to exist so it'd be a Linux-only calculator (whether that's for the better or worse hehe).

Anyhow, no point discussing all that when we don't even have a driver yet. And writing a NAND driver isn't to be taken lightly, it's a notch harder than writing a keypad driver for example (to say the least). I still don't get how the PL350 in the CX works :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 09:31:04 am
Quote
nobody really knows how to interface with the NAND controller.
Isn't the nspire_emu source enough to start from?

Edit: http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h)
Edit2: http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/doc/ (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/doc/) Someone forgot to make a .htaccess xD ;)
Title: Re: Calling all Linux Kernel developers!
Post by: merauder75 on January 24, 2013, 10:23:57 am
So, would a basic NAND driver potentially fix the issue with partially corrupting the NAND on reboot? (My CX CAS often freezes on reboot or it reboots with a non-functional touchpad, very weird). ??? I think I saw a whitepaper on Datalight's site for using their NAND in linux (im probably looking at the wrong thing). Honestly, the quality of this NAND seems pretty low overall (seems prone to corruption/bad blocks, etc.), so partitioning could cause more problems.

Even if dual boot was possible (maybe a new bootloader could be written to boot1, or those first 128kb where the logo is stored), it would be extremely difficult to write/set up.

Edit: Nice find, Vogtinator, someone should save that before they realize their mistake.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 10:29:37 am
Quote
So, would a basic NAND driver potentially fix the issue with partially corrupting the NAND on reboot? (My CX CAS often freezes on reboot or it reboots with a non-functional touchpad, very weird).
The latest version (actually, some days ago) resets the touchpad before rebooting. I haven't had an issue since, hard reset still doesn't work.

Isn't it possible to use boot2's functions for file management?
Title: Re: Calling all Linux Kernel developers!
Post by: excale on January 24, 2013, 10:32:41 am
You would have to load boot2 in memory, and to its specific address. I don't think Linux will like that^^.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 10:33:38 am
Quote
You would have to load boot2 in memory, and to its specific address. I don't think Linux will like that^^.
MMU? (Just map the right pages)
Title: Re: Calling all Linux Kernel developers!
Post by: excale on January 24, 2013, 10:36:18 am
Well, why not then. You also have to uncompress it.
And isn't that a problem is the boot2 starts writing in interrupt register/ sets the screen buffer, ect...?

Lots of things to patch...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 10:37:28 am
We "just" have to find the right function pointers so we only call what we really need.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 24, 2013, 10:39:45 am
Edit: http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h)
Edit2: http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/doc/ (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/doc/) Someone forgot to make a .htaccess xD ;)
I hate you so much :p
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 10:46:03 am
Quote
I hate you so much :p
And I love google so much :P
(Actually, I hate them, but this is great xD )

Edit: Nice find, Vogtinator, someone should save that before they realize their mistake.
Guess what I'm doing right now ;-)
Title: Re: Calling all Linux Kernel developers!
Post by: excale on January 24, 2013, 10:48:00 am
You have to set up a few things before being able to read from files. I haven't looked precisely into it though, so I don't know how hard it would be.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 24, 2013, 10:49:54 am
Quote
You have to set up a few things before being able to read from files. I haven't looked precisely into it though, so I don't know how hard it would be.
I don't know it, either.
I'm just making some suggestions hoping they're not too dumb ;)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 24, 2013, 07:09:32 pm
Quote
nobody really knows how to interface with the NAND controller.
Isn't the nspire_emu source enough to start from?

Yep, it's helpful for a starting point but all my attempts at a NAND driver still ended up freezing the calculator :( I might have to go disassemble the OS code to try and see exactly how they do it :S
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 25, 2013, 02:46:50 am
Being smaller (not cluttered with document handing, UI and CAS code) and containing filesystem debugging / testing code, the boot2 1.4.1571 would probably be a better target for reverse-engineering, IMO :)
The fact that it might be a slightly older version of FlashFX / Datalight Reliance doesn't matter much for the first approach: once the functions are identified in a small, clean code base (through e.g. the magic numbers used at several places), chances are that heuristics will make it possible to identify said functions in the larger OS code base.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 25, 2013, 03:50:42 am
Why should we need to reverse-engineer it?
We have the source code! (And it works, could confirm it with an hexeditor)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 25, 2013, 03:55:58 am
Why should we need to reverse-engineer it?
We have the source code! (And it works, could confirm it with an hexeditor)

Most of the code is obfuscated though and I'm still unsure about the copyright issues involved. It could be possible that the filesystem is patented.

Anyhow, I was talking about reversing the OS for the NAND driver.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 25, 2013, 04:07:31 am
FlashFX is patented, only the wear-leveling, so we can use it read-only?

FlashFX has drivers for NAND controllers itself, maybe you can find the correct one, if TI didn't have to implement it themselves.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 25, 2013, 04:08:57 am
FlashFX is patented, only the wear-leveling, so we can use it read-only?

Hmmm, I'm not sure. I'll look into it a lot deeper once I can actually get something working with the NAND.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 25, 2013, 04:29:39 am
Quote
Anyhow, I was talking about reversing the OS for the NAND driver.
NAND-related code underlying filesystem code will be easier to find in a 2- MB boot2 than in a 10+ MB OS containing lots of irrelevant clutter :)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 25, 2013, 04:52:39 am
Finding anything, even in a 2MB file, isn't even that easy. I have been searching through a 2 MB SNES rom and didn't find the SNES mouse BIOS for over a week. Wasn't what I was looking for. I still haven't found all of that.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 25, 2013, 04:59:08 am
Finding anything, even in a 2MB file, isn't even that easy. I have been searching through a 2 MB SNES rom and didn't find the SNES mouse BIOS for over a week. Wasn't what I was looking for. I still haven't found all of that.

There's a few tricks I use to narrow the search down. First is to do a string search and sniff around places that look right. Second is to hack nspire_emu to break into the debugger when certain IO ports are written to.

I'm pretty sure there're better ways but it works :P

Edit: Managed to get a manufacturer ID from the NAND without crashing but it doesn't work if I peek and poke manually :S
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 25, 2013, 07:08:31 am
maybe it has some kind of unlock sequence.....
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 25, 2013, 07:08:32 am
Is partitioning possible at all?
I think the size is hardcoded in boot2 and we can't change it?
Maybe boot2 just checks the filesystem and we format it manually :/

Quote
maybe it has some kind of unlock sequence
That'd be visible in nspire_emu's code

Found three patents: (wikipedia)
^ United States Patent 5860082: "Method and apparatus for allocating storage in a flash memory."
^ United States Patent 6260156: "Method and system for managing bad areas in flash memory."
^ United States Patent 7284101: "Reliable file system and method of providing the same."
Hmm.. Read only support would be possible..
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 25, 2013, 07:28:23 am
Yup, the size of several memory areas is hard-coded by the boot2 and OS. However, the boot2's code can format a filesystem, as it can straighten out a NAND Flash corruption triggered by e.g. overclocking the AHB.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 25, 2013, 07:29:40 am
Isn't the boot2 programmed into the nand?
How does it get loaded then? Would boot1 be easier to rev-eng if it needs to access the flash?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 25, 2013, 07:32:28 am
Quote
Isn't the boot2 programmed into the nand?
Yup, it is, but in an area that is not written to by FS operations, and cannot therefore be corrupted by FS operations performed at too high a AHB clock rate.
Quote
How does it get loaded then?
Loaded by the boot1, yup.
Quote
Would boot1 be easier to rev-eng if it needs to access the flash?
For mere NAND Flash memory access, indeed, it's easier than the boot2.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on January 25, 2013, 08:12:15 am
There is no trace of FlashFX nor Datalight in the boot1. Indeed, yesterday I picked up the wrong file (boot1) and searched for what Lionel was saying about the fact the boot2 loads the OS from the FS. I turned in round during 10 minutes until I noticed the title of my window...
In case the boot1 actually uses FlashFX, TI has removed all the constant strings, but why did they let all the asserts in the boot2 then ?

So as Lionel said, I don't think the boot2 is actually written in the FS part.

Also, boot2 is "simple" to rev-eng compared to the OS (as said someone previously). Futhermore, as I said, TI has let a bunch of assertions keeping the name of the files.
Since we have the source now, one can simply look at the source code and the disassembly and tell which function to call.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 25, 2013, 08:17:45 am
The boot1 does not contain FlashFX / Datalight Reliance code, FS handling is definitely left to the boot2.
The manufacturer data, boot2, diags are stored in well-defined areas, see PolyDumper / nsNandMgr.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 25, 2013, 07:16:57 pm
I'm not surprised. I'd expect the boot1 to just be hardcoded to read boot2 as-is from its place in flash. No need for filesystem access.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 01:54:55 am
NAND driver is coming along slowly. I got it to detect the chip properly at the very least. :D

(http://i50.tinypic.com/5n55cl.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on January 26, 2013, 02:49:23 am
Indeed, but then there's a problem :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 05:32:51 am
Woo!

(http://i48.tinypic.com/34zd3qh.jpg)

NAND driver can be found in a separate tree (https://github.com/tangrs/linux/tree/nand) on Github.

It detects the same two bad blocks on my NAND that diags detects but other than that, I haven't tested the driver at all. Anyone up to be a guinea pig and potentially screw up their NAND? :P

Also, no ECC support. Does anyone know the ECC settings?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 26, 2013, 05:52:49 am
I don't want to lose my loved boot2 ;)
Does is work in nspire emu?
You could easily compare the image with your bytes read.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 06:13:01 am
I don't want to lose my loved boot2 ;)
Does is work in nspire emu?
You could easily compare the image with your bytes read.

Weird. It's the same but the bytes are reversed. :S

Never mind. Wrong parameters to hexdump.

Now, how should I test write support without killing it?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 26, 2013, 07:01:53 am
Quote
Now, how should I test write support without killing it?
Use nspire_emu, even I wasn't able to brick it ;-)
If it works, test it on real hardware (Please do it, I don't want to brick mine :-) )
We really need to get linux running with nspire_emu, that would make thing
a lot easier
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 07:23:58 am
Quote
Now, how should I test write support without killing it?
Use nspire_emu, even I wasn't able to brick it ;-)
If it works, test it on real hardware (Please do it, I don't want to brick mine :-) )
We really need to get linux running with nspire_emu, that would make thing
a lot easier

Just emailed you something that may be of interest. Linux doesn't run on nspire_emu right now though :(

I also added MTD partitions into the mix so you can dump your boot2 and diags via Linux if you really wanted to (USB Mass Storage eh?). The partitions are all marked read-only so it *shouldn't* be possible to brick your device. Also, beware, you might get some non-errorcorrected data since ECC isn't available right now.

As to testing write support, maybe I'll mark the filesystem partition writable, read a few bytes and save them, then write some garbage and call sync. If I read the bytes and they are the same garbage values as I wrote, then it works (then restoring the bytes). The worst that can happen is that I have to reinstall the OS :P
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 26, 2013, 07:34:31 am
Quote
Just emailed you something that may be of interest. Linux doesn't run on nspire_emu right now though
I read it, but seems to be not very useful :-(

Quote
I also added MTD partitions into the mix so you can dump your boot2 and diags via Linux if you really wanted to
Could you implement one for the filesystem, too?
I'd experiment a bit with flashfx support. (Which seems to be harder than reliance)

Quote
The worst that can happen is that I have to reinstall the OS
Actually (but not very likely) you could damage boot2 if you write to the wrong bytes.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 07:46:35 am
Quote
Just emailed you something that may be of interest. Linux doesn't run on nspire_emu right now though
I read it, but seems to be not very useful :-(

Quote
I also added MTD partitions into the mix so you can dump your boot2 and diags via Linux if you really wanted to
Could you implement one for the filesystem, too?
I'd experiment a bit with flashfx support. (Which seems to be harder than reliance)

Quote
The worst that can happen is that I have to reinstall the OS
Actually (but not very likely) you could damage boot2 if you write to the wrong bytes.

You'll find that the filesystem partition already exists. I assumed the filesystem comes after diags (hence the question mark in the mtd partition list).

As to writing to boot2 accidentally, that should be mitigated because of partitioning. Linux won't let you write to something outside it's partition range.

Edit: Heh (http://ourl.ca/9438) :P

@Vogtinator, we could use this to write a read-only filesystem driver for FlashFX and Reliance? http://ourl.ca/99835
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 26, 2013, 12:28:41 pm
Quote
Edit: Heh
There were at least 3 discussions about linux before you began working on it :D

Quote
@Vogtinator, we could use this to write a read-only filesystem driver for FlashFX and Reliance? http://ourl.ca/99835
I already added this page to my favourites three days ago ;)
The part about reliance is useless, "INOD" is actually just a tiny part of the whole:
http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h)
Sadly they use FlashFX Tera instead of FlashFX Pro 3.0, but vfbdump.c seems to support both.

Daniel, you forgot to add include/linux/mtd/nspire_cx_nand.h :(
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 07:10:34 pm
Quote
Edit: Heh
There were at least 3 discussions about linux before you began working on it :D

Quote
@Vogtinator, we could use this to write a read-only filesystem driver for FlashFX and Reliance? http://ourl.ca/99835
I already added this page to my favourites three days ago ;)
The part about reliance is useless, "INOD" is actually just a tiny part of the whole:
http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h (http://ftp.icpdas.com/pub/beta_version/WinPac-8000/flashfx/dcl/common/loader/reliance/dlrelcore.h)
Sadly they use FlashFX Tera instead of FlashFX Pro 3.0, but vfbdump.c seems to support both.

Daniel, you forgot to add include/linux/mtd/nspire_cx_nand.h :(

Ooops, uploaded now.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on January 26, 2013, 10:27:10 pm
what is the command to exit linux?
Title: Re: Calling all Linux Kernel developers!
Post by: epic7 on January 26, 2013, 10:28:06 pm
Reboot? :P
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 10:29:10 pm
reboot :P
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on January 26, 2013, 10:34:11 pm
is this the only way?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 10:35:29 pm
is this the only way?

Well, yeah. Once Linux is booted, the nspire OS doesn't exist in memory anymore so there's nowhere to exit to.
Title: Re: Calling all Linux Kernel developers!
Post by: epic7 on January 26, 2013, 10:36:30 pm
If nspire os is gone, where does rebooting get it from?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 26, 2013, 10:37:40 pm
If nspire os is gone, where does rebooting get it from?

Basically, on reset, control is handed back to the bootloader which loads the nspire OS from flash again.

@Vogtinator, also, flash write support is tested to be broken - lots of 'I/O error' and my calculator didn't brick.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 27, 2013, 04:06:15 am
Ok, I'll try to get an image of the "filesystem?".
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on January 27, 2013, 08:37:48 am
@epic if that's not clear enough, think of it like this:

When the calculator boots, it loads the OS from the NAND, and copies it into the RAM. For all intents and purposes, that NAND no longer needs to exists for running the OS.

When you launch linuxloader, you start a program that causes the RAM to drop the OS entirely, and replace it with linux. Note that the NAND is unaffected. There is no OS to resume, only the Linux setup you have. Since we don't even have a working NAND driver for linux yet, having it reload the OS is pretty much impossible (and unnecessary, as rebooting is the same process)
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 29, 2013, 08:32:23 am
I haven't had very much time lately, but X still does not work for me. I am getting an error like fatal server error: no screens found. I probably just havent enabled the right setting in the kernel.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 29, 2013, 09:14:57 am
Quote
I haven't had very much time lately, but X still does not work for me. I am getting an error like fatal server error: no screens found. I probably just havent enabled the right setting in the kernel.
You don't need to change anything, if you can see the framebuffer-console everything is set up correctly.
Do you have the latest kernel and rootdisk? What calculator are you using?
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 29, 2013, 09:20:07 am
The kernel on tiplanet does not work. It mounts the rootfs as read-only, so I compiled my own. I am using the xconfig rootfs on tiplanet and a clickpad.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 29, 2013, 09:27:42 am
Quote
The kernel on tiplanet does not work. It mounts the rootfs as read-only
Corrupted download I think. Which image do you use? X and booting from flashdrive?
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 29, 2013, 09:29:20 am
xconfig_latest from a flash drive. And I don't think its corrupted. I downloaded it multiple times and got the same result.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 29, 2013, 11:14:25 am
Do you use defconfig as kernel?
tangrs didn't enable CONFIG_LBDAF, so you can't mount ext4 r/w.
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 29, 2013, 12:30:18 pm
That was the only thing I changed. Other than that, is there anything I need to do?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 29, 2013, 12:31:29 pm
Nope, It should work fine by now.
Could you post the full error messages in "nspire linux questions"?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 29, 2013, 07:33:27 pm
I've just enabled CONFIG_LBDAF in the defconfig.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 30, 2013, 01:22:54 am
CONFIG_LOCALVETSION, too?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 30, 2013, 05:46:31 am
CONFIG_LOCALVETSION, too?

Oh, almost forgot that one. Yep, committed!
Title: Re: Calling all Linux Kernel developers!
Post by: xinthose on February 06, 2013, 06:56:44 pm
So, after all of this hard work, what can you do on Linux?  You use 80% of the available RAM so you can do what with it?  Run small programs on it?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 06, 2013, 09:46:49 pm
You can run X. You can compile C code. You can even run graphical web browsers, but that's really slow. (Command line ones are faster)
Title: Re: Calling all Linux Kernel developers!
Post by: xinthose on February 06, 2013, 10:30:44 pm
oh OK, still not very appealing to me until you make a video showing all of the cool stuff you can do on it. 
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 07, 2013, 01:07:00 am
So, after all of this hard work, what can you do on Linux? 

Pretty much anything you can do normally on a desktop Linux distro.

Quote
You use 80% of the available RAM so you can do what with it? 

You'd be surprised to know that Linux only uses about 8MB of RAM on my development build (potentially much lower without a ramdisk) which works out to be about 13% of the total available RAM on CX models (about 25% on the classic models). Nothing close to your estimate of 80%.

Of course, by today's desktop/laptop/mobile/tablet standards, the remaining 56MB wouldn't be enough to run anything. But in this case, we're talking about an embedded device running low overhead applications. In the embedded world of computing, 56MB is actually a huge amount of free memory with lots of potential. For example, I have in the past, ran a X server with Xterm, Xclock, Xeyes, Mathomatic open and plot a graph with GNUplot all at the same time with still plenty of RAM to spare.

Quote
Run small programs on it?

Sure, if that's what you want :)

Don't forget that we're aren't a corporation or business trying to 'sell' Nspire Linux. I ported Linux to the Nspire simply because I could and it's something I can enjoy working on. I didn't and still don't think about how this could be useful at all when I develop for it. Plus, I learned a ton about kernel development on the way.

And come on, when was there ever a time when Linux being ported to a new platform wasn't cool? :P

oh OK, still not very appealing to me until you make a video showing all of the cool stuff you can do on it. 

It's totally cool if you don't find it appealing. I understand that not everyone sees things that same way as some of us do.

As developers, we generally engage more with the people who are more interested in our work but, for the heck of it, here's a few videos from the past that shows some interesting things with Linux















Title: Re: Calling all Linux Kernel developers!
Post by: xinthose on February 07, 2013, 10:02:40 pm
@tangrs I find all of your responses valid, thank you for your thorough reply.  Linux on a calculator is pretty cool.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on February 08, 2013, 11:07:23 pm
oh OK, still not very appealing to me until you make a video showing all of the cool stuff you can do on it. 

No, you can't run Crysis on a calculator. (Assuming running Crysis is what you mean by appealing)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 09, 2013, 06:22:45 am
I can run a video of crysis....:P

I wonder how hard it would be to get a VNC client running. That would enable a lot of really cool tricks.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 11, 2013, 05:41:33 pm
I am having an issue with the new kernels. I have a working version of Linux using an initrd, an older busybox kernel, and bootloader2. (there is only one version of bootloader2, right?) I recently downloaded the two kernels and tried to boot them both with and without a USB-OTG setup and script, every atempt failed to boot past the bootloader screen. I anyone wants to see the boot script I can post it. I would apreciate any help with this.

EDIT: Posted on next page.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 12, 2013, 12:45:20 am
Can you post your bootscript and make sure you have the latest kernel?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 12, 2013, 09:45:04 am
kernel linux/zImage.tns
cmdline root=/dev/sda earlyprintk debug console=tty0 console=ttyAMA0,115200n8 rootdelay=10
boot

The latest kernels are not working for me.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 12, 2013, 05:46:14 pm
Quote
The latest kernels are not working for me.
What exactly doesn't work? Kernel Panic, random pixels on the display or even crashing?

Have you tried it with an initrd?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 12, 2013, 06:11:51 pm
What happens when using the new kernels, with or without using an initrd:

Bootloader starts
Loads kernel
[Loads initrd if using initrd]
Boots (well, trys too...)
Halts and displays random pixels about 3-5 pixels wide on the right side
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 12, 2013, 06:21:31 pm
Hmm, I have never seen that before, when does it happen? After "loading ramdisk" or even after "Login:"?
Also, which model are you using? CAS or non-CAS?

I haven't tried the "20130211_0728" kernel before, maybe there's an issue with the current build :/
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 12, 2013, 06:24:35 pm
Non-CAS, and it never reaches any point past the bootloader.

Would the ndless version make a difference? I can't update it with the software I have.
Title: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on February 12, 2013, 06:35:44 pm
When did you install Ndless last? It probably would make a difference, but I don't know.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 12, 2013, 07:11:32 pm
I have ndless v3.1 beta r557 installed on my calculator.

Is there a way to install an OS without the Student Software?

EDIT: found TiLP, so upgrading ndless may be an option
Title: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on February 12, 2013, 08:31:20 pm
It's up to r685 now, so... you should update. (I installed TiLP today, be sure to follow the instructions)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 12, 2013, 11:56:46 pm
Which instructions are those? I installed it today, but something went wrong, so I probably didn't follow them.  :-\
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 13, 2013, 12:11:01 am
Rule #1: Don't have both TI's software and TilP at the same time.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 13, 2013, 01:31:42 am
Quote
Rule #1: Don't have both TI's software and TilP at the same time.
Wrong ;)
This used to be true, but it has now been working for more than a year and a half (provided the user follows the instructions), since one of the TILP II 1.16 beta builds :)
We're now at TILP II 1.17 beta, http://ourl.ca/4010 .
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 13, 2013, 01:56:10 am
Oh, that is good news! I'm always glad to be wrong about something like that. :P
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 13, 2013, 03:31:13 am
kernel linux/zImage.tns
cmdline root=/dev/sda earlyprintk debug console=tty0 console=ttyAMA0,115200n8 rootdelay=10
boot

The latest kernels are not working for me.

Do you have the old version of the bootloader by any chance? If you enter the bootloader (without the script), and use the mach command, what does it give you?
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on February 13, 2013, 04:36:41 am
Your Bootloader should have white background and black text.
Something like this:
(http://i48.tinypic.com/a2d839.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 11:33:53 am
Do you have the old version of the bootloader by any chance? If you enter the bootloader (without the script), and use the mach command, what does it give you?

It says "Machine ID is set to 3503"
Is there more than one version of Linux bootloader v2?

I have gotten Linux to work before with an older kernel, likely an older bootloader, and an initrd.
Also, I had an older version of TiLP, so that may have been my problem.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 13, 2013, 03:48:11 pm
I tried to test the latest zImage and it worked, so maybe your ndless version is too old.
If it doesn't work after an upgrade, could you try to boot with "cx_use_otg" and plug it into your pc?
Does it get recognized?

Edit: My CX CAS says "Machine Number: 4443"
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 04:18:36 pm
How would I boot with cx_use_otg, where would I put that command?

EDIT: I tried installing the USB driver for TiLP and my computer is complaining about it being unsigned... Now what?  ???
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 13, 2013, 04:19:29 pm
Edit your bootscript and append it to cmdline.

Edit: Try to boot with F8 and select the option you think might be useful ;)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 05:03:39 pm
Thanks. I think I found an article that might help. It uses bcdedit.exe to do that longer-term.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 13, 2013, 05:08:19 pm
Do you have the old version of the bootloader by any chance? If you enter the bootloader (without the script), and use the mach command, what does it give you?

It says "Machine ID is set to 3503"
Is there more than one version of Linux bootloader v2?

I have gotten Linux to work before with an older kernel, likely an older bootloader, and an initrd.
Also, I had an older version of TiLP, so that may have been my problem.

Yeah, that's an older version of the bootloader. The machine number changed in the recent version. You'll need to grab a more recent version.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 06:39:12 pm
Thanks, I will do that. I have almost given up on TiLP, it is still not recognizing the nspire, although I have enabled unsigned drivers and manually installed the TiLP driver. I will have to bring up that issue on a TiLP thread...

EDIT: Will have to try updating ndless, still not quite working... is there a ndless program to update the OS (and therefore ndless)?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on February 13, 2013, 08:21:39 pm
I wouldn't be surprised if TiLP is currently broken, because there are a bunch of people lately who had no success connecting their Nspire to it all of a sudden, or it might be cross compatibility issues. Better bring it up in the thread.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 09:44:19 pm
What is the latest version you know works?
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on February 13, 2013, 10:03:21 pm
is there a ndless program to update the OS (and therefore ndless)?
Why do you want to update your Nspire OS ?
Only 3.1.0 is compatible with Ndless 3.1 because other OSes don't have the same flaws.
Title: Re: Calling all Linux Kernel developers!
Post by: ruler501 on February 13, 2013, 10:04:44 pm
I think he's asking whether there would be a way to update the OS and get ndless to work on it during installation
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 13, 2013, 11:08:13 pm
Ndless is installed as an OS after moving the resource files. I was asking if there was a program to essentially update ndless inside ndless. I have a makeshift solution I will try, likely tomorrow, but I was wondering if there was such a program.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 14, 2013, 01:24:58 am
The warning about unsigned drivers is spurious. It's not needed to enabled unsigned drivers for TILP to work, even on Windows 7 x64 (which is one of my test platforms).
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 09:25:26 am
What is the difference between the defconfig and expanded kernels? Do I need to do anything to either for them to work?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 15, 2013, 09:34:46 am
The defconfig kernel contains little but the bare minimum required to boot; the expanded kernel contains significantly wider hardware support.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 10:42:58 am
Ok, I got the kernel to work, but now the USB isn't initializing correctly because of the older boot script I have. Could someone provide me with a working USB boot script that they use? (for the new bootloader2).
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 15, 2013, 12:59:06 pm
You can type
Quote
kernel linux/zImage.tns
cmdline root=/dev/sda rootdelay=10
in manually to test it, if it works, save it as bootscript.
If you don't have any partitions on you usb drive, it should work. If you're using the first partition, you have to use /dev/sda1.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 06:44:27 pm
I have updated ndless and all the Linux files on my calculator and the file system on the flash drive, but when it boots it comes up with a lot of errors (see attachment below, the errors have always said the same thing). The USB files are at sda (not sda1) because the read light came on with the sda command and not the sda1 version. Don't know what to do now... :-\ Correction, now the light isn't coming on at all... Under what conditions does that bug occur with the OTG cable where it isn't recognised?

Do you plug in the USB after the 10 seconds text, or does it matter?
Really hope I can get this to work, because Linux on a calculator is just plain cool!
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 06:47:13 pm
How are you preparing the USB drive?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 07:16:25 pm
Linux virtual machine:
Downloaded the largest filesystem image
Pluged in USB flash drive
Formatted to ext2 filesystem with the name nSpireDisk
Mounted to /media/nSpireDisk
In a terminal ran: tar -xvf [image filename] -C /media/nSpireDisk
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 07:32:08 pm
What does fdisk -l show?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 07:56:03 pm
On which device?

Oh, the read light is working again.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 07:57:53 pm
On which device?

On your virtual machine.

To make sure USB host always works, try reading up http://hackspire.unsads.com/wiki/index.php/Linux#USB
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:01:32 pm
 So I open my linux loader and run this.
kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline root=/dev/ram
boot
it runs a bunch of code and freezes at r4:00000000 r3:00000000
what do I do? thx in advance to anyone that helps
Sorry... I'm totally a n00b at this...
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 08:07:31 pm
So I open my linux loader and run this.
kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline root=/dev/ram
boot
it runs a bunch of code and freezes at r4:00000000 r3:00000000
what do I do? thx in advance to anyone that helps
Sorry... I'm totally a n00b at this...

What if you add a rdsize 0x4000 before the boot?
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:10:15 pm
So I open my linux loader and run this.
kernel linux/zImage.tns
initrd linux/initrd.tns
cmdline root=/dev/ram
boot
it runs a bunch of code and freezes at r4:00000000 r3:00000000
what do I do? thx in advance to anyone that helps
Sorry... I'm totally a n00b at this...

What if you add a rdsize 0x4000 before the boot?
let me try.... do I run them as 2 seperate commands or all in one? for example rdsize 0x4000 (enter) boot or rdsize 0x4000 boot (enter)?
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:15:28 pm
never mind, now it says hi, wtf are you doing with me? nanocx login: what do i do lol
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 08:18:13 pm
never mind, now it says hi, wtf are you doing with me? nanocx login: what do i do lol

Huh?
Title: Re: Calling all Linux Kernel developers!
Post by: Levak on February 15, 2013, 08:21:26 pm
never mind, now it says hi, wtf are you doing with me? nanocx login: what do i do lol
Login with "root" password.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:22:07 pm
never mind, now it says hi, wtf are you doing with me? nanocx login: what do i do lol

Huh?
umm lol thats what the calc says ill try to get a screen
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:29:26 pm
Here we go: (https://sphotos-b.xx.fbcdn.net/hphotos-prn1/11000_516000805116671_1024215806_n.jpg) sry bout quality bad webcam
Never mind, thanks Levak didnt see your post earlier
now I would like to know how to set up a USB host lol
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 08:30:37 pm
Ohh, I've never used the initrds on the nightly builds XD I'd imagine you can just login as 'root' with no password.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 08:39:23 pm
On which device?

On your virtual machine.

To make sure USB host always works, try reading up http://hackspire.unsads.com/wiki/index.php/Linux#USB

fdisk -l shows nothing, is that normal?  :-\
EDIT: Can't get it to work setting the disk value as /dev/sdb (or sdb1)

I read that article, that is actually why the read light is working again.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on February 15, 2013, 08:42:15 pm
Can someone link me to a cheap confirmed to work powered USB hub? thanks :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 15, 2013, 08:47:05 pm
On which device?

On your virtual machine.

To make sure USB host always works, try reading up http://hackspire.unsads.com/wiki/index.php/Linux#USB

fdisk -l shows nothing, is that normal?  :-\
EDIT: Can't get it to work setting the disk value as /dev/sdb (or sdb1)

I read that article, that is actually why the read light is working again.

Are you running it as root?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 15, 2013, 08:56:58 pm
Disk /dev/sdb1: 1047 MB, 1047511040 bytes
33 heads, 61 sectors/track, 1016 cylinders, total 2045920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb1 doesn't contain a valid partition table

(This was manually typed)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 16, 2013, 12:53:47 pm
Thats correct, as /dev/sdb1 is the first partition. fdisk -l /dev/sda should show the one you're searching for.
You have to use sda on your calc, it doesn't have another HDD :)
If it still doesn't work, run fsck /dev/sda (while not mounted).
You can also try booting into the initrd and mounting the usb drive then.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 16, 2013, 09:36:40 pm
[Did this last night, was gone all day]
The drive is accessible from Linux when booted with an initrd, and a USB keyboard works. Was able to navigate to the files on the disk and edit them with nano, but running X and xcalc gave an error (something like "file doesn't exist"). Tried a flash drive with a FAT system (inside Linux), that didn't work...

Will try using fsck (I assume you mean in the VM...)

EDIT: After using fsck on the VM the drive still doesn't work. After typing "fsck /dev/sda" before mounting: "fsck: fsck.auto: No such file or directory"
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 17, 2013, 07:32:08 am
Quote
After typing "fsck /dev/sda" before mounting: "fsck: fsck.auto: No such file or directory"
What distro do you use? They f**ked it up.

Quote
The drive is accessible from Linux when booted with an initrd, and a USB keyboard works.
Then you should be able to use it as root=<drive>. You have to substitue <drive> with exactly the name of your drive you were able to mount.

Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 17, 2013, 11:31:25 am
Quote
After typing "fsck /dev/sda" before mounting: "fsck: fsck.auto: No such file or directory"
What distro do you use? They f**ked it up.

Sorry about not being clear enough, on the VM fsck worked, but the drive when used as the boot device on the calc still doesn't work.
The fsck: fsck.auto error is from when I tried the same thing on the calc...  :-\

Quote
The drive is accessible from Linux when booted with an initrd, and a USB keyboard works.
Then you should be able to use it as root=<drive>. You have to substitue <drive> with exactly the name of your drive you were able to mount.

Hmm... I'll try to mount it again to make sure that I'm mounting it right.
Does it make any difference that I have to use "mkdir disk" in media before doing "mount /dev/sda /media/disk" or it gives an error?

EDIT: The device mounts with sda1! I must have had that OTG bug that one time I tried to mount with sda1! Will try to mount it again.

EDIT: IT'S WORKING!!! It's loading now!  :w00t: Thank you!

EDIT: Oops... Typed "X", now there's a blank screen, what do I do now... (other than reboot)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 17, 2013, 01:07:15 pm
Quote
The fsck: fsck.auto error is from when I tried the same thing on the calc... 
Probably some weird issue with busybox and buildroot.. It ran fine some time ago.

Quote
EDIT: IT'S WORKING!!! It's loading now!   Thank you!
Great!

Quote
EDIT: Oops... Typed "X", now there's a blank screen, what do I do now... (other than reboot)
Try "startx". You can type "Ctrl + Alt + F1" on an USB keyboard and press "Ctrl + C" then.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 17, 2013, 03:31:23 pm
What does Ctrl+Alt+F1 do? I don't have a powered hub yet, but I can try using my dad's unpowered one for now
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 17, 2013, 06:32:42 pm
It takes you to another terminal workspace. Ctrl+Alt+ a number 1-6 take you to terminals, and X sessions generally get hosted on 7 and above (although they occasionally take one of the lower ones)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 18, 2013, 12:09:32 am
Do the terminal sessions only operate in X?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 18, 2013, 12:25:10 am
It's actually exactly the opposite: An X session can only exist inside of a terminal session.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 18, 2013, 03:12:11 pm
From what I've read, GCC is not a good compiler to use on the nspire.
What compiler would you use instead?

EDIT: Also, a couple other things:
        1. Is there a way to disable the USB debug messages
        2. Is there a way to change the welcome message right before the "linucx login:"
        3. Is there a way to make the X terminal not extend off the screen
        4. Are the X programs supposed to have windows borders (to move them around and close them)
        5. Is there a way to draw pixels in C or C++ code as of yet
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 18, 2013, 07:27:58 pm
Clang via llvm would be a good choice, but it's not exactly a ready-to-go solution.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 18, 2013, 07:47:22 pm
I assume you would have to compile it from source code to ARM?
Or is it just complicated to set up?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 18, 2013, 11:55:05 pm
From what I've read, GCC is not a good compiler to use on the nspire.
What compiler would you use instead?

EDIT: Also, a couple other things:
        1. Is there a way to disable the USB debug messages
        2. Is there a way to change the welcome message right before the "linucx login:"
        3. Is there a way to make the X terminal not extend off the screen
        4. Are the X programs supposed to have windows borders (to move them around and close them)
        5. Is there a way to draw pixels in C or C++ code as of yet

1. Yes. Recompile the kernel with no USB debugging messages.
2. Yes. You should be able to just mount the rootfs on your virtual machine and modify the welcome message from there.
3. Not as far as I know. X was probably designed for larger screen sizes so the default window size is probably a reflection of that.
4. The borders and being able to drag stuff around is controlled by a window manager (which runs on X). twm is the one that looks most X-y but you can use others right up to Gnome/KDE (though, it'd probably be pretty slow).
5. I believe the directfb library will let you do that.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 19, 2013, 12:04:14 am
One easy way to reduce the x terminal screen size is to reduce its font size. It sets its dimensions to whatever is 80x24.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 19, 2013, 05:28:46 am
Update

I've started working on nLaunch integration. Basically, I'm writing up some software that will package up the kernel into a format that boot2 likes and will be launchable with nLaunch directly.

Pretty much everything is done but unfortunately, boot2 doesn't like the file I built and won't boot just yet. Once I solve this, we'll be able to boot Linux directly from boot2 without the Nspire software even existing (i.e. a 'permanent' installation).

This can save some a lot of loading time since we don't have to wait for boot2 to load a ~9MB OS into memory then load the ~2MB kernel + initrd afterwards - we can simply have boot2 load our 2MB kernel directly! This will reduce the time from cold boot to a Linux shell down to about 12-15 seconds. For reference, it normally takes ~50 seconds to get to a Linux shell from a cold boot.

I hope that post made sense. The hours of coding has messed with my brain a little XD
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 19, 2013, 05:53:18 am
That time comparison seems a little off, depending on where nLaunch's exploit is. (I haven't used it since I currently don't have an nspire)

If nlaunch starts loading before the RSA validation on the OS file would begin, then you should see a much faster boot time than the standard OS per MB.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 19, 2013, 05:56:03 am
That time comparison seems a little off, depending on where nLaunch's exploit is. (I haven't used it since I currently don't have an nspire)

If nlaunch starts loading before the RSA validation on the OS file would begin, then you should see a much faster boot time than the standard OS per MB.

I'm pretty sure nLaunch exploits a hole in boot2 before it starts loading the OS so it does it early enough to be useful.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 19, 2013, 07:11:28 am
Indeed, nLaunch and DowngradeFix both exploit the same stack-based buffer overflow vulnerability in the OS validation & loading code through a specially crafted OS image.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 19, 2013, 09:33:32 am
1. Yes. Recompile the kernel with no USB debugging messages.
2. Yes. You should be able to just mount the rootfs on your virtual machine and modify the welcome message from there.
3. Not as far as I know. X was probably designed for larger screen sizes so the default window size is probably a reflection of that.
4. The borders and being able to drag stuff around is controlled by a window manager (which runs on X). twm is the one that looks most X-y but you can use others right up to Gnome/KDE (though, it'd probably be pretty slow).
5. I believe the directfb library will let you do that.

I guessed the welcome message was in a file (I think I found it once in the initrd) but I couldn't remember which one. Do you know which file it is stored in?

One easy way to reduce the x terminal screen size is to reduce its font size. It sets its dimensions to whatever is 80x24.

How would you do that? I tried running "xterm -fs 5 [or 3]" but nothing changed.

Update

I've started working on nLaunch integration. Basically, I'm writing up some software that will package up the kernel into a format that boot2 likes and will be launchable with nLaunch directly.

Pretty much everything is done but unfortunately, boot2 doesn't like the file I built and won't boot just yet. Once I solve this, we'll be able to boot Linux directly from boot2 without the Nspire software even existing (i.e. a 'permanent' installation).

This can save some a lot of loading time since we don't have to wait for boot2 to load a ~9MB OS into memory then load the ~2MB kernel + initrd afterwards - we can simply have boot2 load our 2MB kernel directly! This will reduce the time from cold boot to a Linux shell down to about 12-15 seconds. For reference, it normally takes ~50 seconds to get to a Linux shell from a cold boot.

I hope that post made sense. The hours of coding has messed with my brain a little XD

If you got this working would there be a way to get back to the normal OS?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 19, 2013, 09:56:40 am
Quote
If you got this working would there be a way to get back to the normal OS?
Sure, by getting rid of nLaunch (as described in the README, by removing the OS through the maintenance menu) :)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 19, 2013, 10:17:40 am
No, I mean could you switch back and forth between Linux and the TI OS
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 19, 2013, 10:28:50 am
Oh, then someone could make an interposed program for multi-boot, which either launches linuxloader2 or some official OS. That saves the time of booting TI's OS in order to use the Ndless version of linuxloader2 in order to get back to Linux.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 19, 2013, 06:17:19 pm
Xterm's default font isn't freetype, so you'll have to load a different font if you want it to be resizeable.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 19, 2013, 07:43:17 pm
Where would you get those fonts?
Are they just normal ones from a computer?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 19, 2013, 08:34:09 pm
If you want a really small font, I'd recommend going for one of these I'm uploading. There's a 4x6 one, and a 6x13 one, but that one is probably the same size as what you're using.

This page goes over installing and using xterm bitmap fonts. (http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x606.html)

The 4x6 is ugly, but it's the smallest readable font you're going to find.


You can use truetype fonts if you want, but they're designed for much larger sizes than what you want.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 20, 2013, 12:00:25 am
Thanks for the fonts, but it appears the fonts are already there, so how would I use them (e.g. how do I type the fontname, is it just the filename minus the .pcf.gz extention?)
I also saw a folder called "directfb examples" with some images. Is there a way to use the examples and/or view the images?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 20, 2013, 12:03:07 am
No. You're just installing fonts into your X. The images are unrelated to xterm.

To use the font you want, use xterm -fn name without .pcf.gz
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 20, 2013, 12:39:23 pm
Sorry, by "use" I meant open with some other program.

Is there a way to set which folder to use for fonts, whenever I use -fn [font name] it says "xterm cannot load font '[name]'". I used several different font names including: "4x6" and "4x6-ISO8859-1". The only exception is "6x13", which for some reason loaded fine.

Found blackbox, so now with it running in the background, all the X programs can fit in the window. Still would be nice to be able to us the smaller font. Would you happen to know where to find a 5x7 font?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 20, 2013, 04:31:11 pm
If you open up this RPM (http://ftp://ftp.scientificlinux.org/disk/disk4/linux/fermi/obsolete/521/i386/Fermi/doc/html/521/rpm2html/521/XFree86-ISO8859-2-1.0-1.noarch.html) in an archive manager you'll find a selection including 5x7
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 20, 2013, 04:39:59 pm
Where do I put the fonts and are there commands I need to run to set a font up, there is no mkfontdir and the fonts that exist (other that 6x13.pcf.gz) won't open.
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 20, 2013, 04:46:40 pm
How do I use the recent builds? I manage to run the first one with USB host function (http://ourl.ca/17131;msg=267453). But when I replace the zImage with one of the recent ones (tried expanded and defconfig), it gets suck after the "boot" line in the linuxloader. So I don't even get to connecting the rootfs. Is the bootscript still
Code: [Select]
kernel linux/zImage.tns
cmdline root=/dev/sda earlyprintk debug console=tty0 console=ttyAMA0,115200n8 rootdelay=10
boot
?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 20, 2013, 04:48:31 pm
If you don't have mkfontdir, then you don't have the binaries necessary to do the more automatic font configuration. You'll have to build the font-utils tools from Xorg source, which I'm not going to help you with. Other people should be able to help, though.

I'm surprised it's not already in there. It's a standard part of xorg.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on February 20, 2013, 04:52:11 pm
So have people managed to get a few Linux softwares to run and is there a compatibility list somewhere? For example, would TilEm, ZSnes and the like run (even if slower)?

Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 20, 2013, 05:25:21 pm
@Naruto: Try doing the following:

1. Rename your "linux" folder to "linux old"
2. Create a new "linux" folder
3. Download all the files needed to run Linux (Do not use any of the ones you already have)
4. Place them in the new "linux" folder and try booting linux (use a initrd first to make sure it works)

This worked in my case.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 20, 2013, 05:27:53 pm
@DJ zsnes will never run. It's half x86 assembly, and takes heavy advantage of x86 features that ARM doesn't have. You'd have much better luck by porting an ARM snes emulator.
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 21, 2013, 06:06:23 am
@Naruto: Try doing the following:

1. Rename your "linux" folder to "linux old"
2. Create a new "linux" folder
3. Download all the files needed to run Linux (Do not use any of the ones you already have)
4. Place them in the new "linux" folder and try booting linux (use a initrd first to make sure it works)

This worked in my case.
The initrd works.
As I tried lauchning it using it using the latest rootfs, it displayed a lot more stuff than before. At the end it just repeated the line "can't run '/sbin/getty' no such file or directory", so I pressed the reset button. When the calculator reboots now, it just shows the loading screen background and the clock icon in the middle. I already tried accessing the service menu and doing a complete format. But after installing a new OS it still won't boot. What to do now?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 21, 2013, 06:08:28 am
@Naruto: Try doing the following:

1. Rename your "linux" folder to "linux old"
2. Create a new "linux" folder
3. Download all the files needed to run Linux (Do not use any of the ones you already have)
4. Place them in the new "linux" folder and try booting linux (use a initrd first to make sure it works)

This worked in my case.
The initrd works.
As I tried lauchning it using it using the latest rootfs, it displayed a lot more stuff than before. At the end it just repeated the line "can't run '/sbin/getty' no such file or directory", so I pressed the reset button. When the calculator reboots now, it just shows the loading screen background and the clock icon in the middle. I already tried accessing the service menu and doing a complete format. But after installing a new OS it still won't boot. What to do now?

There's a maintenance menu and a diagnostics menu. Which one did you boot to? Booting into diags and running the NAND tests has always worked for me.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 21, 2013, 09:20:51 am
Take out the battery, I've had to do that many times.

By rootfs do you mean the USB drive?
You may want to use the initrd and try to mount the USB flash drive in there, then use the device that works to boot (sda, sda1, ...) in your boot script.
Make sure to connect the OTG cable to the calculator before starting the bootloader.
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 21, 2013, 11:26:55 am
There's a maintenance menu and a diagnostics menu. Which one did you boot to? Booting into diags and running the NAND tests has always worked for me.
Thanks, the calculator is booting again.

By rootfs do you mean the USB drive?
You may want to use the initrd and try to mount the USB flash drive in there, then use the device that works to boot (sda, sda1, ...) in your boot script.
Make sure to connect the OTG cable to the calculator before starting the bootloader.
Yes, I mean the USB drive.
When booting the initrd, how do I mount the USB drive as rootfs? If I mount it normally, it doesn't work right.
I am using the same setup that I used for running the first version that supported USB host. That version still works. Only the new builds are causing problems.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 21, 2013, 06:06:39 pm
When you plug in the USB does it come up with several debug messages.
To mount the flash drive type "mount /dev/[either sda or sda1] /mnt".
You can replace "/mnt" with an existing folder as the destination.
You should then be able to cd to the directory and view files.
What method are you currently using?
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 22, 2013, 03:32:38 am
Yes, I am mounting it that way. I can see the files on the drive, but the programs don't work.

Code: [Select]
# /mnt/usb/usr/bin/nano
/mnt/usb/usr/bin/nano: can't resolve symbol 'stat64'
# /mnt/usb/usr/bin/startx
/mnt/usb/usr/bin/startx: line 202: /usr/bin/mcookie: not found
Couldn't create cookie
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 22, 2013, 09:31:04 am
Yes that happened to me when I mounted it. What device file did you use?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 22, 2013, 12:34:33 pm
You can try to
Code: [Select]
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
mount -t devpts none /mnt/dev/pts
chroot /mnt
startx
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 22, 2013, 02:56:36 pm
Yes that happened to me when I mounted it. What device file did you use?
I'm using /dev/sda. (I hope you don't notice that I have no idea what a device file is :))

You can try to
Code: [Select]
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
mount -t devpts none /mnt/dev/pts
chroot /mnt
startx
That seems to mount the drive as read-only filesystem. X does not work, but nano and mplayer do.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 22, 2013, 03:11:09 pm
Quote
I'm using /dev/sda (I hope you don't notice that I have no idea what a device file is :))
(Yes, I'm too lazy to copy your formatting :P)
/dev/sda is correct. (If it's on your calculator. On your PC it should be /dev/sdb or /dev/sdc)

Quote
That seems to mount the drive as read-only filesystem.
My commands don't mount the drive at all, they require it mounted at /mnt.
But why read-only? Could you show us the messages showing up?
What's the output of fsck.ext4 <drive>(if fsck is not on your calc, try it on your pc)?
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 22, 2013, 03:32:23 pm
On PC it seems to be read-only too.
Code: [Select]
[email protected]:~/Downloads$ fsck.ext4 /dev/sdh
e2fsck 1.42 (29-Nov-2011)
fsck.ext4: Permission denied while trying to open /dev/sdh
You must have r/w access to the filesystem or be root
[email protected]:~/Downloads$ sudo fsck.ext4 /dev/sdh
e2fsck 1.42 (29-Nov-2011)
Filesystem did not have a UUID; generating one.

/dev/sdh contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdh: 3320/3784 files (0.5% non-contiguous), 70671/83896 blocks
I reformatted it to make sure everything is right, but still the same result.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 22, 2013, 03:43:06 pm
Quote
/dev/sdh contains a file system with errors, check forced.
It should be r/w mountable by now.
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 22, 2013, 04:26:59 pm
Thanks, X is running now too.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 22, 2013, 07:13:06 pm
Are you able to boot directly to the flash drive?
Title: Re: Calling all Linux Kernel developers!
Post by: Naruto1310 on February 23, 2013, 10:19:55 am
Yes! This works now too. Thanks again.

Now to figure out how Bluetooth and tethering works...
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on February 23, 2013, 11:25:00 pm
I got debian working!
I used multistrap to get the rootfs, then my Raspberry pi to set it up the rest of the way (like running dpkg)
(http://tiplanet.org/forum/gallery/image.php?mode=medium&album_id=158&image_id=2131)
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 24, 2013, 03:04:19 am
Good :)

Quote
I used multistrap to get the rootfs, then my Raspberry pi to set it up the rest of the way (like running dpkg)
In fact, it can be even simpler than that: the qemu-user-static Debian package contains everything needed to finish the creation of the rootfs, without delegating the second stage of debootstrap / multistrap to a physical ARM board :)

Code: [Select]
# Make sure we have the appropriate packages.
apt-get install debootstrap multistrap binfmt-support
# This package ought to register the appropriate definitions for binfmt-support
apt-get install qemu-user-static
# Load binfmt support
modprobe binfmt_misc
# Start a debootstrap that will fail when trying to install the packages
mkdir $DEST_DIR
cd $DEST_DIR
debootstrap --verbose --arch=armel sid . http://ftp.fr.debian.org/debian/
# Fix it. ln assumes the programs are on the same partition, use cp instead if they aren't.
ln /usr/bin/qemu-arm-static ./usr/bin/qemu-arm-static
# Start debootstrap again, and while at it, we can add some packages into the mix :)
debootstrap --verbose --arch=armel --include=locales,build-essential sid . http://ftp.fr.debian.org/debian/
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on February 24, 2013, 04:19:49 am
Glad to see more distros working on the Nspire :)

Does this one work on the CX too?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on February 24, 2013, 04:21:18 am
Yup, it definitely should work on the CX :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 24, 2013, 04:52:55 am
Very nice!
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 24, 2013, 04:20:44 pm
So what does this mean in the availability of compiled (or ready to be compiled) programs? I assume not all the packages are available for the CX.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 24, 2013, 04:25:24 pm
Pretty much all packages available for ARM debian are available for the calculators.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 24, 2013, 09:48:54 pm
I have an old Qwest modem and a new Quest modem. The old one has a USB port while the new one does not.
I received the new one when I moved and was told to use it instead.

Is this possible:

Nspire USB ---> Old Qwest USB, Old Qwest Ethernet out to New Qwest Ethernet out, New Qwest to internet.
Basically, can the Old Qwest Ethernet be forced to act as an in port, connecting the Nspire to the New Qwest?

Or, can the Old Qwest device still connect to the internet, even though I'm supposed to use the new one?

EDIT: How exactly are people connecting to the internet. E.g. what device, what company, etc...
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 24, 2013, 11:04:06 pm
They are using USB to Ethernet adapters. These can be found for less than $5 on places like amazon.

Your solution is overly complex and unlikely to work. (Those systems often have very specialized windows-only drivers)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 24, 2013, 11:20:26 pm
I bought a USB to Ethernet adapter, but Linux crashed each time, what manufacturer should I use?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 25, 2013, 01:22:11 am
It crashed? How? (kernel panic?) Which model do you use, maybe you need fw.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 25, 2013, 09:17:20 am
Kernel Panic if I boot with the adapter plugged in, sda1 has a I/O error if I plug it in later. (Could the fact that I don't yet have a powered hub cause the issue?)
The manufacturer is one I've never heard of: SMC Networking. Model #: SMC2208USB/ETH. It came with a driver disk, but it only has Windows XP drivers (and I would guess I can't use those...)

EDIT: The device uses 3.3v, how much can the Calculator support on its own?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 25, 2013, 03:30:02 pm
I suspect the calculator isn't able to supply enough power to both devices.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 25, 2013, 11:44:39 pm
Do you know of a USB port which has a power input through a USB type cable? (so you could attach it to either a USB wall charger or a computer to power it)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 26, 2013, 06:27:00 am
This is a standard feature with many USB hubs. Just make sure it's a powered hub.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 26, 2013, 09:21:13 am
??? Most of the hubs I'm seeing have a round plug as the end of the AC adapter, not a USB plug...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 26, 2013, 10:14:56 am
Maybe you can get a Y-cable (used for external HDDs which need more than 0.5 A current) and use it with your calc and pc,
but I think I'll be easier to just use such a powered hub with power supply.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 26, 2013, 11:56:37 am
Why would you want one that accepts USB power? That just recreates the problem! Your nspire can only put out so much power at a time!
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 26, 2013, 04:34:58 pm
No:
Code: [Select]
COMP--._
       _'|>---DEVICE
CALC--'
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 26, 2013, 08:05:25 pm
Exactly, plus COMP could be replaced by a USB charger.

One more question before I make a hub purchase: What is the largest number of ports supported (or recommended) for Linux?
I'd like to get one with more than four and have seen some with ten, but I wanted to make sure something like that would work.
Title: Re: Calling all Linux Kernel developers!
Post by: InspiredByCas on February 27, 2013, 08:34:58 am
One more question before I make a hub purchase: What is the largest number of ports supported (or recommended) for Linux?
I'd like to get one with more than four and have seen some with ten, but I wanted to make sure something like that would work.

The maximum number of USB ports would be 127. Then the USB address range is exceeded.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on February 27, 2013, 05:41:24 pm
That's definitely the right answer. :P Linux fully supports the USB specification, so it's only limited by what USB is limited to.

That said, I don't think that will work, since the hubs take up addresses of their own. So, if you've got a setup with branching hubs, each providing 4, then you would need 42 of those addresses for hubs.

Computers get around this by having multiple root hubs.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on February 27, 2013, 10:22:43 pm
Thanks, I have purchased a hub and it should be here sometime after the 1st.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on March 05, 2013, 05:44:30 pm
So... Got the hub, but the Ethernet adapter is still not working, not even on my Windows 7 computer...
Does anyone know of a reliable Ethernet adapter for sale somewhere?

I don't want to purchase something that is going to be just another dead end.

EDIT: Purchased a Ethernet adapter on E-bay, should be here in a few days... (Think it was D-Link)

EDIT 2: This will likely (and hopefully) be the last technical assistance I request on this issue... I got the Ethernet adapter today, and it runs fine, as in it connects, is recognized, and transfers data.
However, when I run links I cannot navigate to www.google.com, I can only reach 192.168.0.1 (my router) and even then all it shows is something like "quest modem configuration".

To get this to work as it currently is I added the following to /etc/network/interfaces:

Code: [Select]
auto eth0
iface eth0 inet static
address 192.168.0.45
netmask 255.255.255.0
gateway 192.168.0.1

Any ideas. I know 192.168.0.1 is the router address for wireless access, is there a different method to connect with Ethernet?
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on March 15, 2013, 09:21:31 am
I don't know the mechanics of Omnimaga and if editing a message bumps a topic. So just in case...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on March 15, 2013, 09:25:10 am
Quote
I don't know the mechanics of Omnimaga and if editing a message bumps a topic. So just in case...
You don't get notified per mail but you will be notified if your in #omnimaga. (I think)
Quote
Any ideas. I know 192.168.0.1 is the router address for wireless access, is there a different method to connect with Ethernet?
You need to specify a dns-server but it's easier with DHCP:
Code: [Select]
auto eth0
iface eth0 inet dhcp
Title: Re: Calling all Linux Kernel developers!
Post by: JosJuice on March 15, 2013, 11:29:49 am
Quote
I don't know the mechanics of Omnimaga and if editing a message bumps a topic. So just in case...
You don't get notified per mail but you will be notified if your in #omnimaga. (I think)
#omnimaga doesn't provide notices for edited messages as far as I know. The "new" marker next to the topic will re-appear, but the topic won't get moved to the top of the topic list.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on March 15, 2013, 05:52:38 pm
Hi, if this ends up posting, that will be pretty exciting. Has anyone ever posted on this topic from the nspire? Thanks for your help, Vogtinator, that worked.

P.S. This post is from the nspire!! :)
(reading the forum is kind of difficult, though...)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on March 16, 2013, 02:27:44 am
Quote
Hi, if this ends up posting, that will be pretty exciting. Has anyone ever posted on this topic from the nspire?
I couldn't login.. My password contains umlauts.

Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on March 16, 2013, 03:24:45 am
I have once posted several messages from my 89T running Linky under AMS, but that's no Linux.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on March 16, 2013, 11:39:58 am
I couldn't login.. My password contains umlauts.

I assume there is no character map available in the default distribution...
That might be something Debian could be useful for. (don't know much about the available packages, though...)
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on March 21, 2013, 07:31:28 pm
Can anyone link me with a cheap powered USB hub that is known to work well?
Thankz :)
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on March 21, 2013, 09:13:35 pm
Any hub that is powered should work. USB is a very definiative protocol, so one hub is the same, protocol-wise, as any other.
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 02:22:13 pm
i'm trying to use the keyboard on my Linux kernel but i can't -.- i type on the keyboard and nothing happens -.-
i will tell all that i've done:
1- i've downloaded the kernel (http://tiplanet.org/nspire-linux-builds/zImage_expanded_latest.tns (http://tiplanet.org/nspire-linux-builds/zImage_expanded_latest.tns)) and rennamed it to "zImage.tns", i've downloaded the initrd (http://tiplanet.org/nspire-linux-builds/start_initrd.ll2.tns (http://tiplanet.org/nspire-linux-builds/start_initrd.ll2.tns)), the binary (http://tiplanet.org/nspire-linux-builds/linuxloader2.tns (http://tiplanet.org/nspire-linux-builds/linuxloader2.tns)), the script (http://tiplanet.org/nspire-linux-builds/start_initrd.ll2.tns (http://tiplanet.org/nspire-linux-builds/start_initrd.ll2.tns)) and the ndless.cfg.tns edited with that line "ext.ll2=linuxloader2" (http://tiplanet.org/nspire-linux-builds/ndless.cfg.tns (http://tiplanet.org/nspire-linux-builds/ndless.cfg.tns))
2-i've replaced the ndless.cfg.tns on my nspire touchpad non-cas.
3-i've created a folder named "Linux" on my nspire and i've send the zimage, initrd, script and Linuxloader
4- i've used Linux, all working good, just exploring, and today i tried to use the keyboard.
5- for use the keyboard i rebooted, connected the Nspire to a powered usb hub while in Nspire OS before running the bootloader, runned the initdr script, the Linux opened, i've connected the keyboarb to the powered usb hub but when i type nothing happens :s

what am i doing wrong?? :?

(sorry about bad english :/)

i don't understand this because i've done almost the same of this guy on the beggining of the video: http://www.youtube.com/watch?v=B2MiVkXhAYs (http://www.youtube.com/watch?v=B2MiVkXhAYs), the only diferences are that i use the script wich adds that cmdline and my Linux have "nanocx login" instead of "buildroot login"
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2013, 03:13:31 pm
Quote
i've downloaded the initrd (http://tiplanet.org/nspire-linux-builds/start_initrd.ll2.tns),
That's the bootscript again :P
But I think you downloaded it right, else it wouldn't boot at all.

Quote
i've connected the keyboarb to the powered usb hub
Could you see some messages? Could you post the output of "lsusb"(all lines) and "dmesg"(the lines that seem relevant)?
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 05:19:57 pm
Could you see some messages?

no -.- i open the Linux and when appears "nanocx login:" i connect the keyboard but nothing happens -.- i try to type and nothing happens before or after I write "root" on the login

Could you post the output of "lsusb"(all lines) and "dmesg"(the lines that seem relevant)?

the lsusb command i use it but nothing happens
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on April 05, 2013, 05:26:43 pm
If the login appears, that means that it worked. The keyboard may not work, I found that kernels that worked with initrds did not work with usb, and kernels with usb did not work with initrds. When it says "nanocx login", try typing root for the username on the calculator keypad, and that should work.
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 05:30:52 pm
If the login appears, that means that it worked. The keyboard may not work, I found that kernels that worked with initrds did not work with usb, and kernels with usb did not work with initrds. When it says "nanocx login", try typing root for the username on the calculator keypad, and that should work.
yes i've done it and the keyboard still don't work -.- and i tried with 2 keyboards -.- a wireless keyboard and a normal keyboard

Could you post the output of "lsusb"(all lines) and "dmesg"(the lines that seem relevant)?

related to "dmseg" command, i can put some lines (the "(...)" repesents that numbers):
(...)RAMDISK: bzip2 image found at block 0
(...)EXT4-fs (ram0):couldn't mount as ext3 due to feature incompatible
(...)EXT4-fs (ram0): mounting ext2 file system using the ext4 filesystem
(...)EXT4-fs (ram0): mounted filesystem without jornal. Opts:(null)
(...) VFS: Mounted root (ext2 filesystem) readonly on device 1:0
(...)devtmpfs: mounted
(...)freeing init memory: 136k
(...) EXT4-fs warning (device ram0): ext4_update_dynamic_rev:764: updating to ver 1 because of nex feature flag, running e2fsck is recommended
(...)EXT4-fs (ram0):re-mounted. Opts: errors=remounted-ro
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2013, 05:50:41 pm
Quote
I found that kernels that worked with initrds did not work with usb, and kernels with usb did not work with initrds.
Really? Mine works fine with both.

The dmesg output seems right, but lsusb should definitely output something relevant.
Could you try to unplug the hub before booting and plugging it in after it's booted?
Do you have a powered usb hub (which you need)?
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 05:59:05 pm
Quote
I found that kernels that worked with initrds did not work with usb, and kernels with usb did not work with initrds.
Really? Mine works fine with both.

The dmesg output seems right, but lsusb should definitely output something relevant.
Could you try to unplug the hub before booting and plugging it in after it's booted?
Do you have a powered usb hub (which you need)?

when i type the lsusb command nothing happens, no messages, just go to the next line
i will try that you said now, just wat 5 minutes
and of course that i've the powered usb hub -.-
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 06:06:11 pm

Could you try to unplug the hub before booting and plugging it in after it's booted?
well, i tried it now. i've booted the Linux without the hub connected to the nspire and i've pluged it when the Linux booted and i tried to use my 2 keyboards (microsoft wireless keyboard 700 v2.0 and e-3lue scort pro gaming) and nothing happened when I typed
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2013, 06:23:29 pm
No messages at all?
Could you try some older kernels?
Does ti's os notify you about the hub been plugged in?
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 06:29:07 pm
No messages at all?
Could you try some older kernels?
Does ti's os notify you about the hub been plugged in?
no messages at all -.-
wich kernels? give me a link of one
no, but ti'os never notified me when i connect the nspire to the computer or other nspires :S
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2013, 06:30:44 pm
If TI's OS doesn't recognize the hub it's not supported.
Maybe you can try another one?

Link is here (http://tiplanet.org/nspire-linux-builds/kernel.html)
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 06:34:26 pm
If TI's OS doesn't recognize the hub it's not supported.
Maybe you can try another one?

Link is here (http://tiplanet.org/nspire-linux-builds/kernel.html)

wait, how it is supposed to be the notification?
i don't have another hub, this one isn't mine, asked to borrow it for this purpose and it works perfectly on pc.
the kernel that i'm using is the last one, the expanded, "Success at 20130211_0728 for version v3.6-26201-g341712f, config expanded: zImage_expanded_20130211_0728.tns", wich one should i try?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2013, 06:35:27 pm
You can try the next expanded version.
The defconfig kernels may work, too, but I don't know
whether USB keyboard support is enabled.
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 05, 2013, 06:38:56 pm
I recommend naming this flavor of Linux "TangriNe" :)
I am trying this today on my new CX CAS

On a scale of Ubuntu to "barebones core with no hardware drivers or configurations", how user friendly is this Linux port?
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 06:42:10 pm
You can try the next expanded version.
The defconfig kernels may work, too, but I don't know
whether USB keyboard support is enabled.
with the next expanded version it's the same thing: nothing happens -.-
i'll try now the defconfig
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 05, 2013, 06:55:41 pm
the latest defconfig simply crashes on my ti-snpire touchpad (with the CAS system using nlaunch), i tried twice open Linux using the initrd script but it crashes on a line that says:
r4:000000000000 r3:000000000
(the number of characters "0" is not right)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on April 05, 2013, 08:29:43 pm
As to the USB issue, did you try the workaround on the Wiki? There's a bit of weirdness with USB host.

http://hackspire.unsads.com/wiki/index.php/Linux#USB
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 06, 2013, 06:58:51 am
As to the USB issue, did you try the workaround on the Wiki? There's a bit of weirdness with USB host.

http://hackspire.unsads.com/wiki/index.php/Linux#USB

Well, yesterday before i tried to use the keyboard or the pendrive I've read all the information of that page of your link. The only thing that I don't understand is: when i try to use the pendrive i really should connect the nspire to a computer before use the bootloader? Because I never tried that...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 06, 2013, 01:37:01 pm
No. You should connect the pendrive before using the bootloader.
Connecting to the computer would be the exact opposite.
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 07, 2013, 05:29:08 pm
Okay so I have my bootloader, zImage, and my USB stick. Here are the functions I use:

kernel linux/zImage.tns
root=/dev/sdaX !!!
rootdelay=10 !!!
cmdline root=/dev/ram
boot

The exclamation marks aren't what I type, but it says those instructions are unknown. Also, idk what initrd is, and do I need it? Halp!
I untarred xconfig_20130215_1915.tar.bz2 into the stick I am using, and it is low power.
When I boot, it just hangs after long blocks of text fly up the screen.
I'm Linux savvy, not manual bootloader savvy, or Nspire savvy for that matter.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 07, 2013, 05:47:36 pm
"rootdelay=10" should go after "root=/dev/ram" on the same line, it's part of the command line property, which is why it isn't recognized by the bootloader.
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 07, 2013, 05:51:22 pm
So like root=/dev/ram rootdelay=10?
Oh and, uh, what exactly are my functions dong, in a newb language?

Yeah it just keeps hanging...
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 08, 2013, 06:38:12 pm
So like root=/dev/ram rootdelay=10?

Yes that is correct

Oh and, uh, what exactly are my functions dong, in a newb language?

What do you mean by functions, is this in the bootloader or the OS?

Yeah it just keeps hanging...

Try plugging in the USB before starting the bootloader, unplug it after you see the word "boot" in the bootloader (or the bootloader disappears...) and then plug it back in after Linux says something like "waiting 10 seconds..." See if it says anything about "[sda]"
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 09, 2013, 06:13:39 pm
I did that, and my father has been helping me add some functionality. The rootfs images provided by voginator are broken links. So I'm getting that stuff myself.
I meant the bootloader. It detects usb devices fine, I just hadn't formatted it to ext4...
Title: Re: Re: Calling all Linux Kernel developers!
Post by: TheNlightenedOne on April 09, 2013, 06:16:01 pm
Try the builds at tiplanet.org/nspire-linux-builds
Also, should this be moved to the questions thread?
Title: Re: Calling all Linux Kernel developers!
Post by: cybertronicify on April 10, 2013, 04:30:49 am
Hi, guys

im new to the forums and im rly interested in putting linux on my calc... and im also a noob at it but i learn real fast. so far i have os 3.1 with ndless installed and the gameboy advance emulator too with a couple of games. i rly want to use wifi or just use a usb keyboard to type out stuff with qwerty.

Thanks to anyone who can helpp!!!!!!!!!!
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 10, 2013, 05:39:48 am
-> nspire linux questions (http://ourl.ca/17509)

My links shouldn't be broken, I linked them to a site which tells to use http://tiplanet.org/nspire-linux-builds (http://tiplanet.org/nspire-linux-builds)
Title: Re: Calling all Linux Kernel developers!
Post by: cybertronicify on April 10, 2013, 10:43:11 am
Hi,

thanks for the reply do i download the small kernal or the large. do i just rename the zip file and add .tns after it and move it to a folder on the root of my calc. same goes with root filesystem and linux loader 2

Thanks in advance.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 10, 2013, 10:50:09 am
-> nspire linux questions (http://ourl.ca/17509)
Post it there, we're trying to keep it seperated
Title: Re: Calling all Linux Kernel developers!
Post by: cybertronicify on April 10, 2013, 11:11:56 am
ok thanks
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 10, 2013, 01:24:59 pm
Sorry for not helping out. What about questions that aren't noobish, like requests?
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on April 13, 2013, 08:02:18 pm
Quick question--
is there a GUI built in to any of this? and if not is it possible?
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on April 13, 2013, 08:07:01 pm
post here http://ourl.ca/17509 (http://ourl.ca/17509)

but yes, there is a rootfs called xconfig for a flashdrive which has X built in.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on April 14, 2013, 02:14:35 am
The UI contained in xconfig rootfs is quite dissimilar to the desktop-class or smartphone-class UIs that you're used to, but that's because the Nspire is such an underpowered platform, with low CPU, RAM and Flash amounts and a low-resolution screen. And yet, to date, the Nspire remains the most powerful calculator series on the marketplace.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 14, 2013, 05:22:31 am
No, it's just a regular Xserver which waits for some great programs ;)
But forget browsers like midori, they need to much ram :(
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 14, 2013, 02:27:50 pm
No. You should connect the pendrive before using the bootloader.
Connecting to the computer would be the exact opposite.
well, i've allready tried this lots of times but the nspire answer is ever the same -.-
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 14, 2013, 04:29:33 pm
AlexisVieira, the best I can tell you is to read everything you can and learn enough to figure it out as you go along.
Ultimately, that's how great computer programmers are born in today's society.

LinksII/LynksII is a graphical version of Links that is my favorite lightweight browser.
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on April 15, 2013, 12:43:50 pm
AlexisVieira, the best I can tell you is to read everything you can and learn enough to figure it out as you go along.
Ultimately, that's how great computer programmers are born in today's society.

LinksII/LynksII is a graphical version of Links that is my favorite lightweight browser.
ty. I'll try
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 10:05:14 am
I tried using multistrap to install Debian on the calculation, but it's not working properly.
I first installed it onto a blank flash drive, but when I booted it said something about runlevel, I entered "1", and it said something about no more processes to run.
I then reformatted the disk and put the original filesystem back in, and then ran multistrap with the disk as the destination. When I booted again it ran fine, but there was no Debian (as in I tried apt-get and it gave an error about the command not existing).
Is there something I'm missing?

My multistrap config, there is one change from the original, it was giving me a 404 error:
Code: [Select]
# Example multistrap configuration file for the lenny shortcut.

[General]
arch=
directory=
# same as --tidy-up option if set to true
cleanup=true
# same as --no-auth option if set to true
# keyring packages listed in each debootstrap will
# still be installed.
noauth=false
# whether to add the /suite to be explicit about where apt
# needs to look for packages. Default is false.
explicitsuite=false
# extract all downloaded archives (default is true)
unpack=true
# the order of sections is not important.
# the debootstrap option determines which repository
# is used to calculate the list of Priority: required packages.
debootstrap=Emdebian Updates
aptsources=Emdebian Updates

[Emdebian]
packages=apt
source=http://www.emdebian.org/grip
keyring=emdebian-archive-keyring
suite=stable

[Updates]
packages=
source=http://www.emdebian.org/grip
keyring=emdebian-archive-keyring
suite=stable-proposed-updates
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 10:11:49 am
Does it work with debootstrap?

Quote
but when I booted it said something about runlevel,
I think there's no default runlevel set, but without the whole message it's not possible to discover the real cause.

Quote
When I booted again it ran fine, but there was no Debian (as in I tried apt-get and it gave an error about the command not existing).
Maybe it's just not installed?
If it boots, Debian is installed correctly. Even without apt-get it is debian, only dpkg should be there.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 10:57:21 am
It might not have installed. Although I used the sudo command, and I remember it saying it installed.

Booted again:
typed in "dpkg" and it said "-sh: dpkg: command not found"
but when I typed "apt-get" it said "-sh: /usr/bin/apt-get: no such file or directory" same thing happened with "apt-get --help"

Does it work with debootstrap?

What do you mean by that?

Maybe it's just not installed?
If it boots, Debian is installed correctly. Even without apt-get it is debian, only dpkg should be there.

Could there be a problem when installing over an existing file system?
Also, the first time I tried installing, Debian booted, but I had not command prompt. I got stuck at the runlevel prompt.
I did try adding a few files from the old fs, but I ran into other problems, so I didn't try to go further with that...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 11:04:11 am
Quote
Could there be a problem when installing over an existing file system?
I wouldn't do that. Maybe it checks if a file exists before overwriting.

Quote
What do you mean by that?
debootstrap squeeze --foreign --arch=armel <root>
Then you can use qemu-arm with qemu-binfmt-misc to run (or direcly on the calculator):
debootstrap --second-stage

Disclaimer: I didn't try it.
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 27, 2013, 11:17:41 am
Could you guys go back to Nspire Linux Questions? Cuz I need some helps there... lol

So wait, Debian ARM works?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 11:18:31 am
Quote
So wait, Debian ARM works?
EVERY Linux distro for arm(v5) works!
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on April 27, 2013, 11:19:27 am
Okay, well when I get my USB working properly (which I hope you can help with) I'll use Debian OMG or SUSE or LENNY GAH THIS IS AWESOME lol
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 11:20:48 am
Yes, someone got it to work...

Voginator, are you saying run "debootstrap squeeze --foreign --arch=armel" on a Linux desktop or the calculator? (and I assume <root> means use "sudo")
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 11:21:44 am
Nope, run debootstrap on your computer.
<root> means the path, where your usb drive is mounted.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 11:34:38 am
Created a folder called "--foreign" containing a log file:
Code: [Select]
/usr/sbin/debootstrap: 175: [: =: unexpected operator
/usr/sbin/debootstrap: 415: /usr/sbin/debootstrap: : Permission denied

I even ran it with sudo
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 11:37:15 am
Actually, I think you found a bug.
I tried it just now, the following works fine:
Code: [Select]
mkdir root
debootstrap --arch armel --foreign --no-check-gpg squeeze root
qemu-binfmt-conf.sh
cp `which qemu-arm` `which qemu-arm-binfmt` root/usr/bin
chroot root
debootstrap/debootstrap --second-stage
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 11:50:52 am
I don't have "qemu-binfmt-conf.sh"
Can you upload a copy?

Edit: or is it this http://svn.kju-app.org/trunk/qemu/qemu/qemu-binfmt-conf.sh
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 11:52:20 am
No, that is distro specific. You have to install qemu binfmt support (opensuse: qemu qemu-tools qemu-linux-user debian: qemu binfmt-support qemu-user-static)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 12:03:12 pm
So I installed the packages, but I have no idea what to do with them...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 12:03:47 pm
Run the commands?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on April 27, 2013, 12:05:01 pm
Nothing directly. The fact that the qemu-user binaries are registered into binfmt-support will make it possible to finish debootstrap, according to the procedure sketched by Vogtinator, which I had detailed more at some point somewhere :)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 12:07:26 pm
Sorry, I tried running "qemu-binfmt-conf.sh", "qemu-binfmt-conf", and just plain "qemu"
Which commands do you mean?
(Sorry if this seems like a lot of questions, but I'm new to this)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 12:08:11 pm
http://ourl.ca/17131/346389 (http://ourl.ca/17131/346389)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 12:14:00 pm
I'm up to the .sh file on that, everything else before it has worked.
(Is the .sh file required, I started looking at an article on qemu on the debian wiki. The commands there look similar, but I'm not sure where the .sh file fits in...)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 12:15:06 pm
You should be able to run it directly
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 12:18:28 pm
Sorry, I tried running "qemu-binfmt-conf.sh", "qemu-binfmt-conf", and just plain "qemu"

I can't...
I tried running "update-binfmts --display" and it showed something similar to the .sh file I posted a link to.. should I use that?
Or do you mean just move on to the next set of commands?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2013, 12:21:05 pm
http://wiki.debian.org/QemuUserEmulation (http://wiki.debian.org/QemuUserEmulation) should help.
It seems you don't have to run it on debian, it will get executed automatically.
You also don't have to copy the files, you have to copy qemu-arm-static only.
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms on April 27, 2013, 07:08:15 pm
I think I understand the general idea of what I'm supposed to do, I just have to figure out how to do it...
As of the last time I tried it "chroot root" gave me the error: "chroot: cannot change root directory to root: Operation not permitted" but I will keep working on it, thanks for your help!

Edit:   :-\ Oops... forgot the sudo... how silly of me. Well, chroot worked.

Edit 2: Debian works, I think... I can't log in... what is the user and password I need to use?

Edit 3: Debian works all the way, now.  :w00t: Forgot you could change the password while using qemu...
Title: Re: Calling all Linux Kernel developers!
Post by: Zeklandia on May 17, 2013, 07:50:33 am
I have both the large and small kernels, large and small initrd's, and 2 separate .ll2's for launching them, but both kernels give me the same rootfs error you got in the screenshot in the OP.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 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)
Title: Re: Calling all Linux Kernel developers!
Post by: qubicprograms 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.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 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
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs 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.


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:


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!
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on May 25, 2013, 10:12:43 am
great news :) i hope that i can test that soon :)
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid 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?
Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder 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:
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on May 31, 2013, 04:09:24 pm
Hi,
can someone make an installationguide for Linux on TI Nspire in German and French?
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 08, 2013, 06:43:20 am
That's pretty epic. Now that I have my Nspire I should check it out. :D
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Levak 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus 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).
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator 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?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux 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.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 09, 2013, 02:09:57 pm
Yeah I use this except I set rootdelay to 10.
Note that it works perfectly if I use the BusyBox initrd as a RootFS (but it's pretty much useless).
Hopping on IRC for the panic.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 11, 2013, 02:28:42 pm
The config you gave me in IRC still won't boot. Here's a build log just in case :http://pastebin.com/DkVV7Zt9

Edit : I attached the zImage.tns I built. I did this with arm-none-eabi. And my home-built bootloader works fine BTW.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 11, 2013, 03:37:24 pm
The log looks fine to me, so it's time for a new toolchain :D
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 11, 2013, 05:19:06 pm
I'm building one (Linaro 4.7 optimized for the Nspire's architecture). :D
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 12, 2013, 04:40:11 am
Well, I remade my RootFS properly and with the expanded kernel I downloaded it no longer panics (guess what, there was a partition numbering error and I was actually mounting a swap partition). But it keeps spamming it can't find /sbin/getty. D:
Also crosstool-ng is being a bitch and won't let me use the system's GMP, it keeps failing to compile an older version so I can't build my toolchain. NVM I fixed that.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 10:19:28 am
Quote
(guess what, there was a partition numbering error and I was actually mounting a swap partition)
The exact same problem (IIRC) two guys already had. It's No.1 of booting issues :P

Quote
But it keeps spamming it can't find /sbin/getty. D:
That's not good at all. /sbin/getty should exist. You should be able to mount the initrd and check it.
Maybe your download is corrupted or I screwed the auto builds up.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 12, 2013, 10:45:02 am

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.

#But linux is still "loading" after 2 hours. Thats very strange#
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 12, 2013, 10:49:04 am
I checked on my computer and a bunch of stuff (including /sbin/getty) are actually symlinks to /bin/busybox which has proper permissions it looks lke. Weird. ???
And for the numbering error, it was gparted's fault because my partition was physically the second one but it was still called sdc3 on my computer. Why does it number partitions in the order you add them to queue ? <_<
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on June 12, 2013, 10:50:05 am
crazyracer98: looks like it hung.
Streetwalker: on the _host_ computer, or in the target filesystem ? It's natural for the latter to have many symlinks to busybox, but your host computer would be in dire straits with such a configuration.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 12:24:49 pm
Quote
#But linux is still "loading" after 2 hours. Thats very strange#
That is indeed very strange.
Could you post your exact configuration after you tried to download the newest files (bootloader, kernel and ramdisk)?

Quote
And for the numbering error, it was gparted's fault because my partition was physically the second one but it was still called sdc3 on my computer. Why does it number partitions in the order you add them to queue ?
I know, thats the only reason I use YaST also for partitioning.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 12, 2013, 01:42:06 pm
Lionel, I checked the contents of the USB disk from my computer.
And I use ArchLinux so no YaST. Just documentation and terminal for configuration = plenty of fun. :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 01:43:54 pm
Is the getty error reproducable?
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 12, 2013, 02:46:38 pm
@Vogtinator
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 run linuxloader and type in:
Code: [Select]
kernel Linux/zImage.tns
initrd Linux/initrd.tns
(rdsize 0x4000)(<-- but it still freeze)
Is that enough Vogtinator?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 02:49:45 pm
Do you have the most recent versions of kernel, ramdisk and bootloader?
Your bootscript should be like
Code: [Select]
kernel Linux/zImage.tns
initrd Linux/initrd.tns
cmdline root=/dev/ram
boot
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 12, 2013, 03:20:33 pm
Yes it is reproducible.
It says (approximately) :
devtmpfs successfully mounted
freeing 136k of memory

And then comes the spam : https://dl.dropboxusercontent.com/s/1ldx57vta97jtkn/IMG_20130612_211555.jpg?token_hash=AAH2LmjsqZDCZQojxvsWyeN2UHDH0cxRLmtdFl6V-KiugQ&dl=1

Yeah I know it's a mini b connector but I hacked it so that the calc sees it as a mini a.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 03:34:12 pm
It prints IO errors, try to reformat the usb drive.

Edit: Got confused about storages
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 12, 2013, 04:10:52 pm
Nope, it now prints errors about USB not accepting address x (keeps incrementing) and spams "can't run /sbin/getty: no such file or directory". I think this problem will kill me. :banghead:
The problem probably comes from my USB stick after all, I didn't try another one.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 12, 2013, 04:23:51 pm
 You can try USB OTG, in the wiki you'll find a kernel boot param which will enable it. Good luck!
Title: Re: Calling all Linux Kernel developers!
Post by: Dapianokid on June 12, 2013, 05:16:38 pm
Streetwalker, don't worry I had this problem a lot. I ended up giving up until I understand Linux, C, and USB concepts more in-depth.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on June 13, 2013, 01:10:19 am
I hope that all of the initial patches which tangrs submitted to the mainline Linux kernel wll be picked up for Linux 3.11 :)
At least two of them have already been picked up by tree maintainers.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on June 13, 2013, 02:50:25 am
I hope that all of the initial patches which tangrs submitted to the mainline Linux kernel wll be picked up for Linux 3.11 :)
At least two of them have already been picked up by tree maintainers.

We're just waiting on three more patches:


Everything else has been pulled into their respective maintainer trees.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 16, 2013, 09:50:36 am
So, I use the files from here:
http://tiplanet.org/nspire-linux-builds/

                       |
                       V

Kernel: expanded (Large Kernel)                     = zImage.tns
Root Filesystem: xconfig (Full buildroot image)  = initrd.tns
Linuxloader2                                               = linuxloader2.ll2.tns

                       |
                       V

Plug in usb adapter and keyboard
run linuxloader2
type in:

Code: [Select]
kernel Linux/zImage.tns
initrd Linux/initrd.tns
cmdline root=/dev/ram
boot

                        |
                        V

still freezing after two hours of waiting
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 16, 2013, 10:10:45 am
You can't use the xconfig as initrd.
It won't fit in RAM, so decompressing fails.
The only buildroot image that you can use as initrd is busyboxconfig.
The other ones are intended to be untar'd onto an USB drive or similiar (NFS root :D )
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 16, 2013, 10:30:03 am
So I finally fixed my problem. It was due to /etc/fstab claiming the RootFS was ext2 while it was actually ext4. After correcting this, I was able to boot properly. :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 16, 2013, 10:31:43 am
Strange, I didn't have to change my /etc/fstab, although I'm using ext4 as well.
There were only two lines saying "can't mount as ext2, trying ext3" and "can't mount as ext3, trying ext4"..
Title: Re: Calling all Linux Kernel developers!
Post by: markgrimes98 on June 16, 2013, 03:50:12 pm
can this run on teh 83 plus?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 16, 2013, 04:06:07 pm
Short answer: No
Long answer: No MMU, too little RAM, too little ROM
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 16, 2013, 04:13:08 pm
So I have just to type in ...

Code: [Select]
kernel Linux/zImage.tns
cmdline root=/dev/ram
boot

... or what?

And the buildroot is just a usb stick format for the TI's like NTFS for computers or what?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 16, 2013, 04:14:48 pm
Quote
... or what?
Quote
The only buildroot image that you can use as initrd is busyboxconfig.

Quote
And the buildroot is just a usb stick format for the TI's like NTFS for computers or what?
Nope, buildroot is the content. The filesystem the initrd has is ext4, the other ones (tar.bz2) are tar-archives.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 16, 2013, 05:51:08 pm
Sorry, but at the moment I am too stupid to understand what to download, run and type in because of my school :( (4 school work's in next week)

Can you describe the way what I have to do in the way, I described what I had done please.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 02:47:29 am
You can download the buildroot busyboxconfig image, which is called "initrd.tns" on download.
Then you can insert "initrd Linux/initrd.tns" in your bootscript to boot from the initrd.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 17, 2013, 03:03:37 pm
Now that I can boot, it's time for the dumb question : how do I run X (startx doesn't exist) ? :P
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on June 17, 2013, 03:06:58 pm
Try `X` or `Xorg`.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 17, 2013, 03:18:49 pm
It does take quite a bit of time to load. Which key is ALT bound to ?
Edit : My bad, it's VAR.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 03:19:19 pm
And how do I use the other buildroot images?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 03:26:52 pm
You format your usb drive (or a partition on it) and copy the contents of the buildroot image onto it.
Then you can boot from it using "root=/dev/sda<partition>" as param.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 03:29:07 pm
I what for format I have to format my usb-drive?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 03:30:20 pm
ext3, ext4 and probably btrfs, although you want to use ext4. It's still the most common format.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 17, 2013, 03:30:42 pm
Most likely ext4, I don't know if btrfs is supported yet./me runs
Edit : :ninja: Though btrfs is awesome. I use it daily. ;) (not exploiting it's features yet though).
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 03:38:30 pm
So, In Windows, I have the option the format the usb-drive in "exFAT"
In German: "Größe der Zuordnungseinheit: Standard"
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on June 17, 2013, 03:39:06 pm
Don't use exFAT. That's a strange format with low interoperability.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 03:39:10 pm
You have to use Linux for that. Windows doesn't support it.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 17, 2013, 03:40:37 pm
Also what about f2fs ?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on June 17, 2013, 03:41:34 pm
That's a modern format tailored for Flash devices, but it still has low adoption.
btrfs is still mildly experimental.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 03:41:58 pm
Well, I found a programm that support fórmating ext4 under windows:

http://code-bude.net/2013/02/12/ext4-partition-unter-windows-erstellen/

EDIT: Sorry, but this is in german
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on June 17, 2013, 03:42:24 pm
I think btrfs would be supported if you compile your kernel with support for it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 03:42:30 pm
For both of these I doubt the kernels will support it.
But if you want to use them, go for it and compile your own kernel :)
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 03:53:39 pm
So, if I had formatted the usb-drive, how I copy the files?
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on June 17, 2013, 03:59:05 pm
You have to extract the tarball on the USB drive (with 7-Zip for example) though I don't know if you can mount it on Windows.
And the 'X' command shows some stuff in the terminal, flshes screen off and back on, then just blackout. How can I switch tty's without F1-F7 keys ?
Also ctrl+var+del doesn't kill it. :/ I take it for frozen now.
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on June 17, 2013, 04:03:12 pm
I'm pretty sure the easiest way to do this with windows is to make a linux virtual machine (you probably want to start with something easy to use, such as Ubuntu) and extract it onto the flash drive from there. I'm pretty sure there is no way to mount ext4 on a windows machine, but I could be wrong.

Streetwalker: attach a USB keyboard. They have Function keys.
Title: Re: Calling all Linux Kernel developers!
Post by: crazyracer98 on June 17, 2013, 04:26:00 pm
OK, I found a way to mount ext4 under Windows with Ext2Fsd
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 17, 2013, 04:51:17 pm
I don't think hard- and softlinks are supported under windows.
Also the file permissions might be a problem

Edit: You can switch ttys with Alt-Right and Alt-Left as well, but there has to be a shell running.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on July 05, 2013, 11:22:03 pm
Just a heads up that minimal kernel support for Nspire CX has been merged into mainline today. For devs, this means you can clone Linus's repo and build a Nspire CX kernel :) We'll also be seeing more patches for the Nspire come up over the next week or so.

Unfortunately, the last patch required for the classic models missed the merge window so we probably won't see mainline support for the classic models until next round :(
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on July 05, 2013, 11:25:24 pm
Whoa, cool! Great job as always, tangrs! Can I git the kernel source tree and just compile the kernel for Nspire, or is it more difficult than that?
Too bad about the classic models :(
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on July 05, 2013, 11:26:45 pm
Can I git the kernel source tree and just compile the kernel for Nspire, or is it more difficult than that?

Yep, just equip yourself with an cross compiler and a copy of the latest kernel sources and you're good to go :P
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on July 07, 2013, 02:51:53 am
Good to see this still updated tangrs :)
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 07, 2013, 03:07:45 am
Just a heads up that minimal kernel support for Nspire CX has been merged into mainline today. For devs, this means you can clone Linus's repo and build a Nspire CX kernel :) We'll also be seeing more patches for the Nspire come up over the next week or so.
Pretty awesome to hear ! :D I hope this is another step on the way to Linux dev on the Nspire.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on July 07, 2013, 03:19:42 am
This is indeed a milestone in terms of maintenance and maintainability.
In terms of capabilities, what was integrated to mainline Linux is a fair bit behind the work originally performed by tangrs and Vogtinator outside of mainline. But the major upside to mainlining stuff is that from the moment the code is mainlined, the ones who will adjust the code to match the internal API changes are them, not "us".

Mainlining will have fairly little impact on users. Far less impact than the significant roadblock recently thrown on our path by TI, I'm talking about OS 3.2.4.1237 (the accompanying boot2 3.2.4.7) and its announced successors...
Title: Re: Calling all Linux Kernel developers!
Post by: Zeklandia on July 17, 2013, 07:46:04 pm
I finally got it to boot all the way to login, and then I decided to get a larger rootfs. I just tried the latest zImage and xconfig rootfs and it just displayed colored fuzz until I pressed the reset button to reboot. So I decided to switch to a defconfig kernel, and then it couldn't load the rootfs, so I hit reset again. Does it just sit on the fuzz for a long time (due to the 28mb rootfs?) or is the rootfs too big?

EDIT: I am currently testing all the different combinations of .tar.bz2 and .ext2.bz2 rootfs (I was using .ext2.bz2 before) and the last 2 days of rootfs and kernel builds.

EDIT 2: All of the kernels work, but only with the minimal (busybox only) rootfs. Otherwise it panics about mount_block_root and prepare_namespace and kernel_init_freeable.

Is it not going to be possible to use a larger rootfs due to RAM limitations? If so, since 16mb is too large, then what is the maximum size (using either the defconfig kernel or the expanded kernel)?

EDIT 3: Also, could someone direct me towards a compatible USB hub?
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 18, 2013, 01:29:00 am
EDIT 3: Also, could someone direct me towards a compatible USB hub?
I'd say powered hubs are best.
Title: Re: Calling all Linux Kernel developers!
Post by: Zeklandia on July 18, 2013, 11:25:45 am
I still need to get one of the larger rootfs to work, and does anyone know how I can share internet to my nspire over USB? I have tried everything that normally works, but with the busybox rootfs, there is only one iface, lo.
Title: Re: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on July 18, 2013, 05:41:31 pm
Question: If the HP Prime is eventually hackable ("HelPless" or "HPless" instead of "Ndless"?), do you have any plan to port this to that calc since it has a similar processor?
Title: Re: Calling all Linux Kernel developers!
Post by: Zeklandia on July 18, 2013, 08:28:33 pm
Could somebody please help me figure out why I cannot use the larger rootfs files. I don't want to have to make an entire thread for it.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on July 18, 2013, 11:10:42 pm
I don't know about the rootfs issue, but I use this usb hub (http://www.amazon.com/7-Port-Powered-Adapter-Cable-High-Speed/dp/B002WPO3M2/ref=sr_1_11?s=electronics&ie=UTF8&qid=1374203163&sr=1-11&keywords=7+port+powered+usb+hub) along with this cable (http://dx.com/p/mini-5pin-to-usb-female-otg-data-cable-black-129670).
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 19, 2013, 02:02:21 am
Personnally I use my Dell screen's built-in hub and a cable I hacked together (female end of a USB prolongator + mini B cable with tihs mod (http://ourl.ca/7646/142328)). :P
Also lol Legimet that link you posted it's 1 cent + $4.99 shipping. XD

Also DJ I hope a HelPless won't be needed. D:
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on July 19, 2013, 04:58:34 am
Until proven otherwise (assuming it ever is), the HP Prime is a closed platform, like its closest ancestor the HP-39gII is. Arbitrary code execution exploits, and a framework for user native code programs, are necessary in that situation.

Once arbitrary code execution is achieved, if user interest is sufficient, an initial port of Linux is usually performed in several weeks. One of the clearest indications that the Nspire is not a cool platform to program on (no wonder, given the hardware limitations and the severe overpricing...) is the fact that it took more than two years from initial arbitrary code execution to an initial port of Linux, three years and a half between initial arbitrary code execution and initial mainline Linux integration.
With slightly less outdated hardware and a touch screen, the timeframe for Linux running on the HP Prime might be lower, we'll see.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 19, 2013, 05:15:28 am
How much RAM does the Prime have already ?
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on July 19, 2013, 05:31:28 am
It's supposed to have 32 MB, i.e. the same as '2007 Nspires, and half of '2011 CX Nspires. But it's supposed to have a CPU 3x faster than the CX's CPU, and twice the amount of NAND Flash memory the CX has.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on July 20, 2013, 04:34:23 am
Could somebody please help me figure out why I cannot use the larger rootfs files. I don't want to have to make an entire thread for it.

The larger rootfs is meant to be loaded onto a USB drive and booted from there. There's not enough RAM for it to work as an initrd.

Question: If the HP Prime is eventually hackable ("HelPless" or "HPless" instead of "Ndless"?), do you have any plan to port this to that calc since it has a similar processor?

I don't have plans to get a HP Prime but it does sound interesting. If there's documentation, I'm happy to give it a shot.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on July 20, 2013, 05:00:08 am
The calculator isn't released yet :)
And before anybody can port Linux to it, we'll have to look for arbitrary code execution vulnerabilities...
Title: Re: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on July 20, 2013, 07:16:29 am
I hope it doesn't take 3 years to hack the Prime like it did for the Nspire lol x.x (remember that 800+ posts United-TI topic?)
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on July 20, 2013, 08:31:42 am
As long as HP is civil about programming support, hacking may not be required.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 20, 2013, 08:49:09 am
Yeah, up until the 39gII all HP calcs officially supported native programming. Maybe it will be like the Casio PRIZM, who knows ? ;)
Title: Re: Re: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on July 20, 2013, 12:27:06 pm
As long as HP is civil about programming support, hacking may not be required.
Yeah I wouldn't be surprised if they let us hack their calcs if we play nice. As Streetwalker refers to, Casio didn't add native code support to the Prizm, but they didn't spend much effort locking it down yet, due to the lack of cheating tools. If HP added teacher modes to their calcs and hacking the calc compromised the restricted mode, then they'll most likely have a problem with it.

That said, unlike TI and Casio, it seems that the Prime has a very good BASIC language that can act as alternative to ASM for some games and softwares, much like the 39gII.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on July 20, 2013, 10:42:52 pm
Hi,

I'm adding hot swap support to the keypad driver. Could a couple of people test this with various keypads and report back whether it detected it correctly? If you could also include your keypad type/s and raw ADC value in your replies, it would be appreciated.

Cheers,
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on July 22, 2013, 02:19:48 pm
Hi,

I'm adding hot swap support to the keypad driver. Could a couple of people test this with various keypads and report back whether it detected it correctly? If you could also include your keypad type/s and raw ADC value in your replies, it would be appreciated.

Cheers,

how it works?it's an external .tns file...
Title: Re: Calling all Linux Kernel developers!
Post by: shmibs on July 22, 2013, 02:22:47 pm
hello there. please don't post multiple times in a row, particularly when each post is a duplicate of the first :P
thank you

(i realise this may have been a technical issue rather than intentional)
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on July 22, 2013, 02:24:12 pm
hello there. please don't post multiple times in a row, particularly when each post is a duplicate of the first :P
thank you
It was a mistake xD. my browser crashed when I posted and it posted that. but I already deleted them
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 22, 2013, 02:24:48 pm
Wow 6 posts in a row. *.*
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on July 22, 2013, 02:26:08 pm
Well, they disappeared. I only saw 5. :P
(http://img.ourl.ca/screenshot.png)
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on July 22, 2013, 02:30:04 pm
Yeah, you shouldn't click the Post button more than once while it loads or else it posts multiple times. We won't ban you for that though, even I do this mistake ;)
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on July 22, 2013, 02:33:54 pm
This is not my computer, that's a old slow computer with slow internet so it was an accident... It already happened some times before but not 6 posts xD
btw, I'm sorry
Title: Re: Calling all Linux Kernel developers!
Post by: Juju on July 22, 2013, 02:35:22 pm
We forgive you ;)
Title: Re: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on July 22, 2013, 07:00:00 pm
No problem. That happens to me a lot when I use public wifi on my phone, which is absolutely terrible (especially in the two articulated city buses or at the local shopping mall where wifi stops working every 30 second x.x)
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on July 31, 2013, 10:36:12 am
yes, it happens with me too xD
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on August 17, 2013, 06:38:04 pm
here it is
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on August 17, 2013, 07:26:18 pm
Here's what I got with my (many :P) nspires:

format:
calc: ADC, correct/incorrect (reason for incorrect)

TI-84 Plus keypads:32-35, correct (once it got 45 and touchpad, but I think it was a fluke)
Clickpads non-cas, non-prototype:7-11, correct
Clickpad CAS, non-prototype: 560-568, incorrect (says unknown keypad)
Clickpad XXXXXXXXXXX(prototype):568-573,incorrect (says unknown keypad)
CX non-CAS : 76,correct

It seems as if the clickpad keyboards with a removable keyboard are different hardware-wise than non-removable ones.
Title: Re: Calling all Linux Kernel developers!
Post by: critor on August 17, 2013, 08:44:13 pm
84+ keypad: 31-34, correct
CX non-CAS: 76, correct
CX CAS: 75-76, correct
TI-Nspire CM Chinese Edition EVT1 prototype: 76-77, correct
TI-Nspire CM-C CAS: 76, correct
TI-Nspire ClickPad non-CAS: 8-11, correct
TI-Nspire ClickPad non-CAS DVT2.0 prototype: 8-11, correct
TI-XXXXXXXXXXX non-CAS DVT1.2 prototype: 8-11, correct

Hope it helps.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on August 20, 2013, 05:53:19 am
Thanks everyone for your help!

It seems the only model I have to worry about are the non-removable Clickpad CAS keyboards.
Title: Re: Calling all Linux Kernel developers!
Post by: AlexisVieira on August 20, 2013, 07:34:40 am
Thanks everyone for your help!

It seems the only model I have to worry about are the non-removable Clickpad CAS keyboards.

yw :)
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on August 20, 2013, 05:34:16 pm
critor, I would be interested to know what the nspire+ keypad returns when it is put through this test attached to a regular clickpad.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 01, 2013, 07:09:46 pm
How do you compile it from source? There's no nspire_defconfig like there used to be.
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on September 02, 2013, 08:15:50 pm
I found that there is. did you follow the directions in http://ourl.ca/17131;msg=271031 (http://ourl.ca/17131;msg=271031)? It is necessary to change the makefile to ARCH:=arm and CROSS_COMPILE:=your-tool-chain Step 4 can be discounted because the patch was added in after the post was made.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 02, 2013, 09:41:05 pm
I've done that before (I was actually compiling my own kernel since November) with export ARCH=arm (no CROSS_COMPILE was needed), but now I'm using the new version from linux git, and theres no defconfig (which should be in arch/arm/configs). I could compile it, but I don't know exactly what CONFIGs I should enable.
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on September 02, 2013, 09:47:51 pm
You need to change that in the Makefile of the kernel.
It is around line 195.
before it read

ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=<something or other>

and you need to change it to

ARCH := arm
CROSS_COMPILE :=your-arm-prefix-     #mine is arm-none-eabi-



Are you using the kernel directly from Linus, or do you have tangrs's version? I am using Tangrs's version.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 03, 2013, 06:08:33 pm
I'm using the one from linux git at kernel.org. No defconfig there.

In tangrs's version, you can just run "export ARCH=arm" before, and the nspire_defconfig automatically uses arm-none-eabi. ;)
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on September 11, 2013, 07:42:34 pm
For the keypad test, if there is no keypad inserted, the program returns the same values as an Nspire CAS clickpad, around 570-580.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on October 12, 2013, 12:44:04 pm
If you're trying to compile the version with DTB support, you have to configure it yourself.
Basically, enable everything with "NSPIRE" or "ZEVIO" in its name and also "SP804" watchdog and "CLCD" LCD driver.
Execute make dtbs and copy the dtb appropriate for your nspire onto the device.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on October 12, 2013, 06:31:54 pm
I don't see any zevio configs. And what are the names of the sp804 and clcd configs?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on October 12, 2013, 07:00:08 pm
You have to enable support for them in the kernel config.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on November 11, 2013, 04:15:54 pm
I hope this isn't already answered in the 66 pages, but would it be possible to boot an old version of redhat with this?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 11, 2013, 04:17:49 pm
Anything which supports the ARM (v5) 3.x-Kernel should run fine.
openSUSE runs, so if redhat also has a special ARM release, it will very likely work.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on November 11, 2013, 04:23:29 pm
Can you give a tutorial on how to do this?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 11, 2013, 04:28:49 pm
You have to be able to boot from USB and put your redhat arm image onto it. Couldn't be any easier.
Title: Re: Calling all Linux Kernel developers!
Post by: annoyingcalc on November 11, 2013, 04:34:11 pm
Not that, there are a bunch of red hat disk images, also what script would I use to boot?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 11, 2013, 04:35:24 pm
The newest for armv5. Probably without any X.org stuff.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on November 11, 2013, 06:39:07 pm
I still don't see zevio. I'm running menuconfig and searching "zevio" but nothing comes up.
Title: Re: Calling all Linux Kernel developers!
Post by: Lionel Debroux on November 12, 2013, 01:36:47 am
Most Linux distros have some form of program for creating root file systems. On Debian, for instance, it's debootstrap. IIRC, I posted a howto for debootstrap somewhere in the TI community.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 23, 2013, 12:25:07 am
Hey guys, exams are finished and I can resume work on the kernel (Y)

Not much going on right now, here's a list of things I've gotten done so far:


Also, attached is a nice treat for developers that I spent the last 48 hours hacking up. It's a nLaunch compatible OS file containing the most minimal and fast booting Linux Kernel/Initrd combination I could manage (~1.5MB) for booting Linux kernels.

That's right, a Linux OS for bootloading Linux :)

It's intended to speed up development by loading quicker than the TI-Nspire OS and automated deployment of code. It boots in seconds, also letting you download code over USB using the ZModem protocol which is a lot faster than transferring via TI's software. The new kernel and initrd is booting using Kexec. Basically, instead of going Boot1->Boot2->TI-Nspire OS->Xfer over USB->linuxloader2->Linux, you're going Boot1->Boot2/nLaunch->Minimal Linux->Xfer over USB->Linux

All the DTB and initrd is embedded in the file so nothing else is necessary. The attached OS is for Touchpad models only right now but if you're desperate to get it working on the CX, add
Code: [Select]
compatible="zevio,nspire-usb" to the device tree for the CX, compile it and hexedit it into offset 0x100 of the extracted OS file, replacing the touchpad dtb.

I'll release the configs and source code for it soon but here's the script used to upload code to the bootloader.

Code: [Select]
#!/bin/bash

set -e

if [ "$#" -ne 4 ]; then
echo "Usage: $0 kernel.img devicetree.img initrd.img /dev/serial"
exit 0
fi

mkdir -p tmp
cp -v $1 tmp/kernel.bin
cp -v $2 tmp/devicetree.bin
cp -v $3 tmp/initrd.bin
touch tmp/bootcmd

cd tmp
sz * -y -8 > $4 < $4
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on November 23, 2013, 05:05:15 pm
Is there a guide for compiling a dtbs kernel? It was easy with the defconfigs and the "make zImage," but I can't figure out how to do it now.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on November 23, 2013, 06:31:05 pm
make dtb and make zImage, the usual way. You just have to copy the suitable dtb for your model as well.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on November 24, 2013, 11:08:18 pm
There's no defconfig right now for the newer kernels. I usually just do a make allnoconfig and manually select the drivers I need.

Here's a quick list of options you should have

Code: [Select]
CONFIG_BLK_DEV_INITRD=y
CONFIG_ARCH_NSPIRE=y
CONFIG_AEABI=y
CONFIG_BLK_DEV_RAM=y
CONFIG_KEYBOARD_NSPIRE=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_FB=y
CONFIG_FB_ARMCLCD=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_TMPFS=y

Title: Re: Calling all Linux Kernel developers!
Post by: ElementCoder on November 25, 2013, 04:11:27 am
Whoa bootloading Linux sounds great :D All these developments make me wonder why I ever dropped out :( I'm glad to hear you're back to work on this again, good job. Does this mean we pretty much have a 3rd party OS now for the nspire?
Title: Re: Calling all Linux Kernel developers!
Post by: Eiyeron on November 25, 2013, 04:38:04 am
Oh god, dual-boot windowa TI/Linux...
Amazing!
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on November 25, 2013, 09:38:48 am
Actually, support for booting directly from nLaunchy has been there for a long time. Look in the nLaunchy source code for a directory named Build_LinuxOS. I have already used this before, with the old kernel. And if you put the resulting file in linux/linuxloader.tns. You can boot from nLaunchy by pressing tab.
Title: Re: Calling all Linux Kernel developers!
Post by: critor on November 25, 2013, 01:01:23 pm
Actually, support for booting directly from nLaunchy has been there for a long time. Look in the nLaunchy source code for a directory named Build_LinuxOS. I have already used this before, with the old kernel. And if you put the resulting file in linux/linuxloader.tns. You can boot from nLaunchy by pressing tab.

@Eiyeron & ElementCoder: So the change is intended at developpers. It doesn't change anything for the end user.
The end users are not going to use Zmodem instead of TI-Nspire Computer Link to upgrade their kernel.
Title: Re: Calling all Linux Kernel developers!
Post by: 3_bit on December 04, 2013, 12:01:12 am
Hey, I hate to be a nuisance...

I'm trying to get this all running. I've been looking around a bit and have zImage and linuxloader ready... Not sure where to go from here to get a working build. I have the ndless SDK, I'm really not familiar with linux much, but I am something of a Windows power user. I am able to use any OS I need to to get it all working. Links to a finalized download of a filesystem would be fine. I went to the link OP provided, http://tiplanet.org/nspire-linux-builds/ , and got all the files there, but the root filesystem is in a .tar. Should I just change the extension to .tns? It would be nice if we could just get a big .zip with all the stuff we need in it.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on December 04, 2013, 09:51:30 pm
A tar.bz2 file is a compressed archive (like zip, but with better compression) So assuming you're using the tar.bz2 files, just extract them to a usb flash drive (but first format it as ext4). If you're using the ext2.bz2 and it is not too big, you can uncompress it and rename it to initrd.tns, and just transfer to your calc.

I think 7-zip supports tar and bz2, so you could probably use that.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on December 25, 2013, 02:40:45 am
Here's the CX release of the Linux-based bootloader for rapid Linux development on TI-Nspires.

To use, install the attached image via nLaunchy and reboot. It'll boot to a screen that reads "Waiting for boot command" and your computer will register a USB serial device.

Use the following script to upload a kernel, initrd and dtb:

Code: [Select]
#!/bin/bash

set -e

if [ "$#" -ne 4 ]; then
echo "Usage: $0 kernel.img devicetree.img initrd.img /dev/serial"
exit 0
fi

mkdir -p tmp
cp -v $1 tmp/kernel.bin
cp -v $2 tmp/devicetree.bin
cp -v $3 tmp/initrd.bin
touch tmp/bootcmd

cd tmp
sz * -y -8 > $4 < $4

You'll need the lrzsz package of what ever OS you're using for this.

For now, initrds aren't supported (kexec 2.0.4 is broken for initrd loading with DTBs - nothing I can really do about this unfortunately) so you'll have to embed a rootfs into your kernel image and pass an empty file for the initrd.

Enjoy.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on December 25, 2013, 01:16:53 pm
tangrs, could you post your kernel .config? My kernel does some weird stuff:
- "XZ decompressor ran out of memory" with a tiny 400kB initrd and more than 40 MB free RAM
- After initrd (now gzip) loading the LCD controller gets turned of and the screen fades white (initrd from tiplanet builds, works fine on older versions)
I don't know what could have caused this..
Title: Re: Calling all Linux Kernel developers!
Post by: Official.Xian on January 05, 2014, 10:35:40 am
One issue I've run into, is that after a short amount of time, the keypad starts to glitch. Meaning that I have to press a key a few times to get it to be typed, or sometimes it will be entered several times. Any solutions? thanks.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on January 05, 2014, 10:37:22 am
Do USB keyboards work?
Title: Re: Calling all Linux Kernel developers!
Post by: Hooloovoo on January 05, 2014, 05:21:40 pm
I can confirm that this happens on clickpad calculators. It is often triggered by the clear key for me as far as I can tell. USB keyboards work just fine.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on February 11, 2014, 10:29:47 pm
A quick update: the IRQ controller driver for classic models has just been mainlined.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=397e7b515785cad6e10b29f3001fd80c3f519bb8
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 11, 2014, 10:46:17 pm
I updated the Hackspire Wiki page at http://hackspire.unsads.com/wiki/index.php/Linux#Newer_device_tree_kernel_status. Is the rest of the page up to date?

Also, can you tell what should be added to the dts files for the entries that say "Should be a matter of adding a few lines to the device tree"?
I am using an Nspire CX, and I finally got the device tree kernel to build and run a few days ago.
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 13, 2014, 03:06:55 pm
Hello
sorry for my bad english im from germany
yesterday i saw this video

can you help me to get this on my ti nspire cx
i got linux without grapics with linuxloader2 working but i dont know so much about that theme  >:(
if i use linuxloader 2 i can restart the calculator and i have the normal os is it similar with this linux version
thank you for your help ;D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 13, 2014, 04:27:39 pm
Hello
sorry for my bad english im from germany
Me too :D
Quote
yesterday i saw this video

can you help me to get this on my ti nspire cx
i got linux without grapics with linuxloader2 working but i dont know so much about that theme  >:(
The kernel in this video is still the old version (without DTB support, not mainlined),
so you'll have to use one of these builds (expanded) (http://tiplanet.org/nspire-linux-builds/kernel.html) and extract one of the xconfig (http://tiplanet.org/nspire-linux-builds/buildroot.html) filesystems onto a usb drive. Run "startx" and it should work.
Quote
if i use linuxloader 2 i can restart the calculator and i have the normal os is it similar with this linux version
thank you for your help ;D
You can use nlaunch to skip the OS, but as it's a bit more complicated I'd try to get it booting manually first.
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 13, 2014, 04:32:33 pm
Thank you for your fast answer
mayby you can make a Video or explain in a more detaild what i habe to so
im 16 and i dont know so mich aboit that
nur im very interested in that theme and at my school im,in The informatic class
thanks  ;D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 13, 2014, 04:37:23 pm
Thank you for your fast answer
mayby you can make a Video or explain in a more detaild what i habe to so
You said you have a working kernel, right?
You'll just have to get USB drives working and boot from it: Append "root=/dev/sda" to the  the "kernel" line in your .ll2 file.
Quote
im 16 and i dont know so mich aboit that
nur im very interested in that theme and at my school im,in The informatic class
thanks  ;D
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 13, 2014, 04:44:41 pm
Ok thanks ill try it
nur i got another question how must i Format the usb drive ans in which Format must i put the files on it should they be a zip file ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 13, 2014, 04:46:47 pm
You'll need a linux system for this. The partition should be ext4 or ext3 formatted and the .tar.bz should be extracted like this:
Code: [Select]
tar -xvzf xconfig.tar.bz2 -C /media/Replace /media/ with wherever your drive is mounted.
Title: Re:
Post by: jannick_s on February 13, 2014, 04:48:23 pm
Ok ill try this but today I can't get at my computer anymore
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 14, 2014, 08:33:31 am
do i need the initrd file in my linux folder on the calculator?
If not, the only files in my foulder should be the linuxloader2.tns, the zImage and the startscript
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 14, 2014, 08:37:54 am
thats how my bootscript looks like:
(its one from an earlier post)

Code: [Select]
kernel linux/zImage.tns
cmdline root=/dev/sda earlyprintk debug console=tty0 console=ttyAMA0,115200n8 rootdelay=10
boot

is that right or must i change something?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 14, 2014, 04:28:21 pm
If it works, it's correct ;)
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 14, 2014, 06:34:50 pm
how should i connect the usb drive to the calculator?
i have an usb hub with power cable can i use this
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 14, 2014, 06:40:43 pm
Yup, as long as it has a mini usb-b connector so you can use the included usb-a -> usb-b cable.
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 15, 2014, 03:02:05 pm
can somebody help me i cant use ubuntu to copy the data to the usb and i cant us e kali linux cause at ubuntu you dont have the permissions to copy at the usb cause you dont have an root account and in kali linuxyou dont have an untar programm and the command you gave me causes an error  >:( >:( >:(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 15, 2014, 03:04:47 pm
Quote
cause at ubuntu you dont have the permissions to copy at the usb cause you dont have an root account
"sudo"?

Quote
in kali linuxyou dont have an untar programm and the command you gave me causes an error
It shouldn't. What's the error message?
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 15, 2014, 05:36:26 pm
Code: [Select]
[email protected]:~# tar -xvzf xconfig.tar.bz2 -C /dev/sdd
tar (child): xconfig.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
the usb drive is ext4 formatted
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 15, 2014, 06:26:13 pm
if i connect the usb to my calculator and type df the usb isnt listed there  >:( :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 15, 2014, 06:48:57 pm
To your first part of your double post:
Quote
xconfig.tar.bz2: Cannot open: No such file or directory
To extract a file, you need to have to file to extract first.

to the second part:
Quote
if i connect the usb to my calculator and type df the usb isnt listed there
"lssci" maybe. Or "lsusb". For "df" the usb drive has to be mounted first.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 15, 2014, 07:09:23 pm
Also, use xjvf instead of xzvf since its compressed with bzip2.
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 16, 2014, 02:34:50 am
ok with xjvf i got it extracted at the desktop but if i copy all the files to the usb there is an other error but i think all the files are copied
Title: Re:
Post by: jannick_s on February 16, 2014, 02:49:08 am
How can i show the /dev/log/messages i know how to get into the log folder nur i dont manage to get the messages viewed
Title: Re: Calling all Linux Kernel developers!
Post by: jannick_s on February 16, 2014, 04:00:29 am
ok i think my calculator sees the usb device this is what he gave me after typing dmesg
the picture is in the attachements
ill ty to format it ext3 and try it again

Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 16, 2014, 08:42:03 am
You just triple-posted...
But no, your calculator didn't notice anything usb-related at all.
Did you do the usual USB workaround stuff? Plug the usb drive in before booting linux and ignore the error message the nspire os gives you.
And try "lsusb" when linux is booted.
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 17, 2014, 03:09:17 pm
can someone help me getting Debian on my Nspire cx?
what kernel/file-system do i need?

and i cant boot xconfig from my usb drive :s what format does the usb needs to be ext2/3/4?
i get a kernel panic..
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 17, 2014, 03:14:16 pm
Quote
can someone help me getting Debian on my Nspire cx?
what kernel/file-system do i need?
google: debootstrap armv5

Quote
and i cant boot xconfig from my usb drive :s what format does the usb needs to be ext2/3/4?
i get a kernel panic..
Does your drive get recognized?
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 17, 2014, 03:18:49 pm
Quote
can someone help me getting Debian on my Nspire cx?
what kernel/file-system do i need?
google: debootstrap armv5

was thinking it was arm9

Quote
Quote
and i cant boot xconfig from my usb drive :s what format does the usb needs to be ext2/3/4?
i get a kernel panic..
Does your drive get recognized?
yes i can mount it if i boot from the ram disk.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 17, 2014, 03:20:30 pm
Quote
]was thinking it was arm9
It is an ARM926EJ-S core which is an implementation of the armv5 instruction set.

Quote
yes i can mount it if i boot from the ram disk.
What's the kernel panic?
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 17, 2014, 03:49:49 pm
can't read that fast..
have an image of the last screen i can see:

using this to boot:
Code: [Select]
kernel linux/zImage.tns
cmdline root=/dev/sda earlyprintk debug console=tty0 console=ttyAMA0,115200n8 rootdelay=10
boot

think i need to use sda1 :s ill test that..

nope.. still the same panic, using an ext4 usb flash drive.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 19, 2014, 03:35:02 am
Hi
I've a problem when booting Linux / it works with only an initrd image and the root fs on /dev/ram. But not when I'm booting on USB.
Here my start script :

kernel linux/linux.tns
initrd linux/initrd.tns
cmdline rootdelay=10 root=/dev/sda1
boot

It seems to boot fine, but then, after "Start logging...", I get two errors : Can't open /dev/null No such file or directory, about 5-6 times. Then, every second, I get Can't open /dev/tty0 No such file or directory.
And I must reset the calculator.

Without initrd, I get the same kernel panic as floris497 (USB stick has an unique ext4 partition, and yes it's /dev/sda1, I verified when Linux was running OK on /dev/ram).

Please help me :)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 19, 2014, 07:50:58 am
Probably you got the wrong kernel, without devtmpfs.
You need the "expandedconfig" for it.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 19, 2014, 10:37:42 am
No, I was using the expanded kernel :)
I don't know why, but now it's working - I've just a bit changed my boot script.

So.
Now Linux boots fine and the root fs is mounted.
But I get this when different services are starting (logging, rsyslog, network, nfs...) :

Starting NFS statd: done
Starting NFS services: done
Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
done
Starting NFS mountd: Cannot register service: RPC: Unable to receive; errno = Connection refused
done

At this point, nothing more happens and I can't log in or type commands.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 19, 2014, 10:49:04 am
You can disable NFS by rm-ing /etc/init.d/rpc.nfsd
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 19, 2014, 10:58:59 am
Yep, I had the same idea.
I removed 'S60nfs' (not rpc.nfsd) in /etc/init.d.
No error messages, but the console becomes inactive juste after "Starting sshd: OK". Just the blinking cursor, but no prompt and login...
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 19, 2014, 12:49:56 pm
Maybe it's started somewhere else? Can you try init=/bin/bash as cmdline? If that doesn't work append "console=tty0" as well.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 20, 2014, 11:32:55 am
Thanks, it seems to work !
Juste some strange things : when starting bash (via init or by command), he says : "bash: no job control in this shell".
Or when I try to launch top : "top: no process info in /proc".

But it works.
Thanks for your help :)

Hm, how do you do to start X ? I can see xeyes, xclock and others but no startx or xinit.

EDIT : hm, endly there's a problem ! The file system is read-only... :/
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 20, 2014, 12:36:07 pm
startx should be there...
You can mount it read-write by doing "mount -o remount,rw /".
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 20, 2014, 01:35:16 pm
startx should be there...
Nope ! :)

You can mount it read-write by doing "mount -o remount,rw /".
mount: can't read '/proc/mounts': No such file or directory
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 20, 2014, 04:14:45 pm
I'd suggest "mount -t procfs procfs /proc" but that would fail as well, so "init 1" or "init S" may be the best option to skip misbehaving init scripts.
Which root are you using? I'll have to fix it...
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on February 21, 2014, 10:54:17 am
I'm using the rootfs from http://tiplanet.org/nspire-linux-builds/ (where your website is redirecting).
If you have the courage to fix this fs, tell me when it's ready :D
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 22, 2014, 02:50:46 pm
Hello  :)

I'm new here and a big fan of Linux. I got it to boot with initrd as well as from usb flawlessly. Now I want to boot into ArchLinux:
(https://dl.dropboxusercontent.com/u/19005544/omnimaga/nspire_archlinuxarm_fail.jpg)

This is why I need to build the kernel myself, but it won't work for some reason... What I did:
Downloaded this https://github.com/tangrs/linux (branch: nspire)
export ARCH=arm
make nspire_defconfig
make -j8
no errors -> copied it to the calculator and tried to boot with initrd -> stuck at the linuxloader2-screen without a single kernel-message

Second attempt:
rm .config
make distclean
export ARCH=arm
wget https://raw.github.com/Vogtinator/nspire-linux-configs/master/kernel/.config
make -j8
no errors -> stuck again at the same point

Can someone help me please?

thanks in advance
schuhumi

PS: stole the distclean from here: http://tiplanet.org/nspire-linux-builds/log_expanded_20130211_0728.txt  Sadly I can't find the build-script producing it...
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 22, 2014, 06:07:10 pm
Don't use that kernel, it's outdated. Use the device tree kernel, from kernel.org. And remember to set CONFIG_CGROUPS, as the message says.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 10:15:48 am
Thank you for your response Legimet  :)

But sadly I still can't figure it out... Here's what I did:
Downloaded linux-3.8-rc4.tar.xz from https://www.kernel.org/pub/linux/kernel/v3.x/testing/ since this is the version used here https://raw.github.com/Vogtinator/nspire-linux-configs/master/kernel/.config
But it seems like there is nothing related to nspire in this source ("/" to search in menuconfig returns no results for "nspire")

So I downloaded last stable one from here https://www.kernel.org/ (3.13.5) and I've come so far:
Code: [Select]
[[email protected] Nspire]$ unp linux-3.13.5.tar.xz
  ... extracting files from archive ...
[[email protected] Nspire]$ cd linux-3.13.5/
[[email protected] linux-3.13.5]$ make distclean; make mrproper
[[email protected] linux-3.13.5]$ export ARCH=arm
[[email protected] linux-3.13.5]$ export CROSS_COMPILE=arm-none-eabi-
[[email protected] linux-3.13.5]$ make menuconfig
  -> System Type -> Multiple platform selection -> disable ARMv7 and ARMv5 gets selected automatically
  -> System Type -> enable [*] TI-NSPIRE based
  -> Device Drivers -> Input device support -> Keyboards -> enable TI-NSPIRE built-in keyboard (NEW)
  -> < Save > as .config
[[email protected]:linux-3.13.5]$ make -j8
..... Kernel: arch/arm/boot/zImage is ready
Booting this kernel I still get no messages on the screen. I need graphics-support somehow I guess..

So I tried to use the .config here https://raw.github.com/Vogtinator/nspire-linux-configs/master/kernel/.config
Code: [Select]
[[email protected]:linux-3.13.5]$ make distclean; make mrproper
...
[[email protected]:linux-3.13.5]$ export CROSS_COMPILE=arm-none-eabi-
[[email protected]:linux-3.13.5]$ export ARCH=arm
[[email protected]:linux-3.13.5]$ wget https://raw.github.com/Vogtinator/nspire-linux-configs/master/kernel/.config
...
[[email protected]:linux-3.13.5]$ make silentoldconfig
scripts/kconfig/conf --silentoldconfig Kconfig
*
* Restart config...
*
*
* General setup
*
Cross-compiler tool prefix (CROSS_COMPILE) [arm-none-eabi-] arm-none-eabi-
Compile also drivers which will not load
.... BLABLABLA ...
ARMv6 based platforms (ARM11) (ARCH_MULTI_V6) [N/y] (NEW)
ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait) (ARCH_MULTI_V7) [Y/n] (NEW)
As you can see the default for ARMv6 is No, but ARMv7 is Yes, which is wrong. You need to select No yourself to bring up ARMv5: "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...) (ARCH_MULTI_V5) [Y] (NEW) y". So converting the .conf from github doesn't work as intended..

I'm not that keen on compiling kernels, OpenWRTs Buildroot is the only thing I really dived into, but my devices were properly preconfigured there...

clueless
schuhumi
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 10:19:20 am
My .config from github doesn't work for the DT kernels, but you can have my current .config which boots graphical.
I'm having some issues with initrds, though.
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 23, 2014, 01:13:04 pm
i like to see a graphical linux os :) can i have a precompiled version :D
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 01:14:44 pm
Quote
i like to see a graphical linux os  can i have a precompiled version
What exactly do you mean by "graphical linux os"?
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 23, 2014, 01:17:24 pm
because you said "boots graphical." i was thinking you had a version that didn't boot in command line mode.
whit some kind of GUI?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 01:19:02 pm
No, with graphical I mean it utilizes the LCD :P
You can compile a rootfs with a nice splash screen if you want to.
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 23, 2014, 01:22:17 pm
i want one with an interface :p, some thing i can always boot, and one that doesn't drain battery when i leave it on.
but i cant make my own version, if i have time for it i'm going to do some research on it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 01:29:41 pm
That'd require external storage and woudn't be very useful.. LXDE works, that's about it.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 02:08:31 pm
I'm sorry to bother you guys again, but it just won't work for gods sake  :banghead:

Here's exactly what I did:
Code: [Select]
$ PATH=$PATH+":/opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/"
$ wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.14-rc2.tar.xz
$ unp linux-3.14-rc2.tar.xz
 <extracting without errors>
$ cd linux-3.14-rc2/
$ cp ~/Downloads/config ./.config   #This is your uploaded .config, verified it multiple times
$ export ARCH=arm
$ export CROSS_COMPILE=arm-none-eabi-
$ make silentoldconfig
 < ran through without a single error or question >
$ make -j2
......
 Kernel: arch/arm/boot/zImage is ready
$ ls -l arch/arm/boot/zImage
-rwxrwxr-x 1 simon simon 1504096 Feb 23 19:28 arch/arm/boot/zImage  #size comparison with prebuilt ones: small: 1753152 large: 1936000
And no kernel messages again...

Both prebuilt zImages from here http://tiplanet.org/nspire-linux-builds/ boot as expected. (ok, the small one crashes midways with initrd, but hey - kernel messages :) )
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 02:11:56 pm
I updated http://tiplanet.org/nspire-linux-builds and included a DTB version. Could you try that with a dtb-enabled linuxloader2?
The linuxloader2 from nsprie-linux-builds should work. You just have to add "dtb nspire-cx.dtb.tns" to the bootscript.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 23, 2014, 02:38:48 pm
Use this script (http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux#Setting_up_a_development_environment) to set up a toolchain.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 02:54:45 pm
YESSS!!

Your builds as well as my self compiled kernel+DTB work!
(I have to admit that this entire devicetree-thing wasn't clear to me and I asumed I can use the kernel in the same way as the old ones on your download-page...)

Now I can go on and customize the kernel to my needs  ;D
Thank you very much!

Use this script (http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux#Setting_up_a_development_environment) to set up a toolchain.
I guess you refer to my path-hack above: Thats on my Ubuntu-Laptop and I had CodeSourcery installed on that some time ago. Normally I have an Arch-Server with two quadcore Xeon processors and 16GB Ram for compiling things ;-) With a well integrated toolchain of course
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 03:53:06 pm
Quote
YESSS!!

Your builds as well as my self compiled kernel+DTB work!
Could you try the new xconfig image? I switched from Xorg to KDrive/TinyX (or whatever it's called in buildroot) and everything should work fine.

Quote
I guess you refer to my path-hack above: Thats on my Ubuntu-Laptop and I had CodeSourcery installed on that some time ago. Normally I have an Arch-Server with two quadcore Xeon processors and 16GB Ram for compiling things ;-) With a well integrated toolchain of course
You won't need that for this small 2 MB kernel ;)
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 04:49:12 pm
Could you try the new xconfig image? I switched from Xorg to KDrive/TinyX (or whatever it's called in buildroot) and everything should work fine.
Actually I can't... I have trouble getting USB to work :/

This means the OS doesn't recognize keyboard and usb-flashdrive. (But its not a hardware fault, tested it again with the old kernel). Went through menuconfig, the only suspicious things I found are:
#1 > Device Drivers > USB support > [* ]     Rely on OTG Targeted Peripherals List
If you say Y here, the "otg_whitelist.h" file will be used as a
  │ product whitelist, so USB peripherals not listed there will be 
  │ rejected during enumeration.

#2 [ ]   > Device Drivers > USB support >  [ ]  Generic EHCI driver for a platform device
is not activated, but it is in here https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/.config
(used this to find a needed driver or something...)

But even with diabling #1 and enabling #2 it won't work  ???
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 04:50:42 pm
Does lsusb show something?
Did you switch to host mode before booting into linux?
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 23, 2014, 04:55:07 pm
Hmm, I can't get USB either, using the new device tree kernel Vogtinator built today. And I cant get it with my own kernel either.

lsusb shows nothing.

How do you switch into host mode?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 04:57:07 pm
Connect any usb device and wait for the error message ("Can't communicate with ...")
What does "dmesg" show?
I'll look into that when I can boot linux on my calc as well and tested the new GPIO driver...
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 23, 2014, 04:58:47 pm
There's no error message and nothing interesting in dmesg. It just doesn't work.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 05:00:00 pm
It SHOULD at least mention something like "ehci.0: registered" or whatever the usb controller is called in the DT.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 05:04:26 pm
My typical procedere:
 - Switch on Calc
 - Install ndless
 - plug in USB-Cable
 - Press OK on the popup-window
 - start linuxloader

I did:
 - start my kernel+dtb -> no usb
 - start your kernel+dtb -> no usb
 - dig around in menuconfig -> make changes #1 #2 mentioned above
 - start my kernel+dtb -> still no usb -> lsusb shows nothing (no error etc.)

I'll redownload your kernel+dtb again and try again..

BTW: your xconfig-download gives me:
Forbidden
You don't have permission to access /nspire-linux-builds/xconfig-latest.tar.bz2 on this server.

--- preview spits out new posts:
dmesg | grep ehci
ehci_hcd: USB 2.0 'Enhanced' Host Contgroller (EHCI) Driver
ehci-platform: EHCI generic platform deriver

But on my kernel (!), will try yours now..
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 23, 2014, 05:05:53 pm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver

That's the only stuff having to do with usb.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 23, 2014, 05:06:41 pm
Quote
BTW: your xconfig-download gives me:
Forbidden
You don't have permission to access /nspire-linux-builds/xconfig-latest.tar.bz2 on this server.
Oops, should be fixed now, sorry.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on February 23, 2014, 05:24:22 pm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
I get the same + three additional ones (with the fresh downloaded kernel,initramfs,dtb):
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on February 24, 2014, 09:21:16 am
Seems that ehci (specifically "ehci-platform") is not supported as devicetree node.
It should be possible to apply this patch (http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/126669.html) though and change
Code: [Select]
                usb1: [email protected] {
                        reg = <0xB4000000 0x1000>;
                        interrupts = <9>;
                        status = "disabled";
                };
to
Code: [Select]
                usb1: [email protected] {
                        reg = <0xB4000000 0x1000>;
                        interrupts = <9>;
                        compatible = "ehci-platform";
                };
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on February 24, 2014, 01:55:29 pm
Thanks Vogtinator, I will try that.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on March 01, 2014, 07:33:47 am
Sorry guys, still pushing the USB driver through to mainline for the device tree kernel.

Users who don't need cutting edge should probably stick to the old kernel for now.

The freezing at boot problem could be the result of turning on earlyprintk but selecting the wrong serial driver. Turning it off should solve the boot freezes.
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Ryan Knutson on April 03, 2014, 06:22:45 pm
I have Linux on my TI-Nspire CX (Non CAS), and it freezes at boot. Any way to get it to boot?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Omnimaga on April 04, 2014, 12:18:01 am
Wait, how did you get Linux to install on a J or K hardware Nspire? O.O (since nLaunchy doesn't work on those) Or could the freeze be due to the calc hardware?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Ryan Knutson on April 04, 2014, 12:44:44 pm
With tangrs Linux Loader 2 - https://github.com/tangrs/nspire-linux-loader2.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on April 04, 2014, 08:23:29 pm
The original method of loading Linux on the Nspire was using a loader, and the loader works fine with Ndless 3.6 (not sure if it works with the newer hardware revisions as I don't have those).
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 05, 2014, 05:57:41 am
Quote
I have Linux on my TI-Nspire CX (Non CAS), and it freezes at boot. Any way to get it to boot?
Which files did you use (kernel, initrd, bootscript, linuxloader) and when does it freeze?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Ryan Knutson on April 06, 2014, 11:20:23 am
I use the linux loader, kernel, initrd, and script (minus the 'boot' command; i type it in). It freezes when I type 'boot' and press enter. I then have to hard reset it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 06, 2014, 02:15:13 pm
Did you download the DTB?
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Ryan Knutson on April 06, 2014, 03:39:45 pm
Whats that?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 06, 2014, 04:21:05 pm
You got the files from here (http://tiplanet.org/nspire-linux-builds/), did you?
Just download the appropriate dtb for your calc and load it with "dtb <filename>" in your bootscript before "boot"
Title: Re: Calling all Linux Kernel developers!
Post by: DJ Ryan Knutson on April 06, 2014, 04:41:57 pm
Ah. I will try this.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 06, 2014, 07:24:28 pm
I installed linux on my TI-Nspire CX CAS and it all works fine, except for the USB, I used the files here: http://tiplanet.org/nspire-linux-builds/ and I have a powered usb hub connected to my calc, and TI OS gives me the error message about an error with the connected device. lsusb shows nothing, and dmesg doesn't show anything useful. Any help?
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on July 06, 2014, 08:52:32 pm
I just noticed on the wiki: It says "unknown" for the 84+ Link Port. I'm not saying I disagree with the following "do we need this" but I do want to point out that it just hooks into a few I/O pins on the CPU. It should be relatively easy to add support for it.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 07, 2014, 06:46:58 am
Quote
I installed linux on my TI-Nspire CX CAS and it all works fine, except for the USB, I used the files here: http://tiplanet.org/nspire-linux-builds/ and I have a powered usb hub connected to my calc, and TI OS gives me the error message about an error with the connected device. lsusb shows nothing, and dmesg doesn't show anything useful. Any help?
USB isn't really working in the DTB builds. It should work if you use the "Older kernel" without DTB.

Quote
I just noticed on the wiki: It says "unknown" for the 84+ Link Port. I'm not saying I disagree with the following "do we need this" but I do want to point out that it just hooks into a few I/O pins on the CPU. It should be relatively easy to add support for it.
The GPIO driver is also just setting and clearing some bits, but still >200 lines. Also, which subsystem should it use?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 07, 2014, 08:21:55 am
Sweet, thanks! Any idea when USB will be supported in the newer builds? Also, what is the difference between the defconfig and expanded builds for the old kernel?
Title: Re: Calling all Linux Kernel developers!
Post by: aeTIos on July 07, 2014, 08:47:36 am
I wonder if it's possible to have a small, light-weight GUI application with this, like a small menu based file browser. That'd up the functtionality by a lot.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 07, 2014, 11:15:43 am
Well yes it is possible. Framebuffer apps exist for linux after all. Also there's midnight commander which is iirc in ncurses or similar.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 07, 2014, 12:27:25 pm
Quote
Sweet, thanks! Any idea when USB will be supported in the newer builds?
Probably never, I don't know why it doesn't work if I simply tell the DTB the EHCI address and IRQ. Maybe some initialization differences.

Quote
Also, what is the difference between the defconfig and expanded builds for the old kernel?
It's simple: The defconfig has only those options activated which are required for booting. Just use the expanded kernel if you want to use it, it has most required drivers included.

Quote
I wonder if it's possible to have a small, light-weight GUI application with this, like a small menu based file browser. That'd up the functionality by a lot.
Depends which files you want to browse. I reverse-engineerd the highest level of the filesystem (reliance) and have a basic fuse driver ready, but the lower level (flashfx) isn't implemented yet.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 07, 2014, 10:05:48 pm
When I boot linucx, the initial boot messages fly past, the USB drive blinks, and then it stops at this screen (attached). Any idea as to what's causing the kernel panic? Also, is the newer DTB build any better than the older one that works with USB?
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on July 08, 2014, 03:26:43 am
Plug your OTG cable in the calculator while on TIOS without the USB drive, plug that in once the kernel says it's waiting for the rootfs.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 08, 2014, 08:09:43 am
Try to boot an initrd and mount the usb manually, does it work?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 09:20:08 am
It works when I use the initrd but not when I try to boot from USB  :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 08, 2014, 09:28:45 am
Did you add the correct dev file as "root=/dev/sdX" in the loader script?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 10:51:44 am
My boot script thing is:


kernel linux/zImage_usb.tns
cmdline "root=/dev/sda1 rootdelay=5"
boot
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 08, 2014, 10:53:15 am
I'm not 100% sure but you should omit the '"'s.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 11:38:59 am
I'll try as soon as I get home, thanks for helping me!  :)
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 04:29:36 pm
I tried it without the '"'s but it still isn't working. The panic screen is a bit different though, I also tried upping the rootdelay to 10, but it doesn't work. p.s. How should I put the rootfs on the flash drive, I tried 'tar -xvf ../xconfig_latest.tar.xz' but it gave a bunch of errors about not being able to make links.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 08, 2014, 04:33:45 pm
Howto: Extract tar files onto a ext4 partition:
Code: [Select]
sudo -i
mkfs.ext4 /dev/sdbX
mount /dev/sdbX /mnt
tar -xvf xconfig_latest.tar.xz -C /mnt
umount /mnt
exit
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 08:50:47 pm
I did all of that except for the mkfs.ext4 /dev/sdbX What does that line do?
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on July 08, 2014, 09:07:21 pm
That creates an ext4 filesystem.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 09:20:19 pm
My computer (Debian) doesn't have the mkfs.ext4 command, was the period supposed to be a space? It doesn't have mkfs either. Also, what is the difference between the dtb and non dtb kernel?


EDIT: never mind, forgot to run it as root
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 08, 2014, 10:07:18 pm
Still giving me a kernel panic, but I can boot using the initrd and chroot into the flash drive, however when I try to startx, it complains about /dev/tty0 not existing
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 10, 2014, 11:03:46 am
I finally got it working :w00t: I had to add init=/sbin/init to the kernel cmdline.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 10, 2014, 11:07:24 am
Great to hear you got it to boot! But init=/sbin/init shouldn't be needed as that's the default, weird.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 10, 2014, 11:19:19 am
Is there any way to gcc/g++ onto the flash drive/calculator so I can write/compile programs on the calc?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 10, 2014, 11:21:15 am
You can build your own buildroot. But it will take some hours, depending on your machine.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 10, 2014, 12:14:07 pm
I have tried using buildroot, but I didn't see an option to compile gcc/g++. Also, whenever I try to make it, it fails with: "/bin/sed: no input files" I am building it on Debian in a virtualbox on Mac OS X Mavericks. I also tried it on an iMac G3 running Debian powerpc, but that failed too, with this error message: "*** glibc detected *** genext2fs: free(): invalid next size (fast): 0x105d4998 ***
======= Backtrace: =========
/lib/powerpc-linux-gnu/libc.so.6(+0x86ef4)[0xfec4ef4]
/lib/powerpc-linux-gnu/libc.so.6(cfree+0x8c)[0xfeca5ac]
genext2fs[0x10003c6c]
genext2fs[0x10007dc4]
genext2fs[0x1000d954]
genext2fs[0x1000dd74]
genext2fs[0x1000ec8c]
genext2fs[0x100011a8]
/lib/powerpc-linux-gnu/libc.so.6(+0x1fd4c)[0xfe5dd4c]
/lib/powerpc-linux-gnu/libc.so.6(+0x1ff10)[0xfe5df10]
======= Memory map: ========
00100000-00103000 r-xp 00000000 00:00 0          [vdso]
0fe1a000-0fe1d000 r-xp 00000000 08:03 129827     /lib/powerpc-linux-gnu/libdl-2.13.so
0fe1d000-0fe2c000 ---p 00003000 08:03 129827     /lib/powerpc-linux-gnu/libdl-2.13.so
0fe2c000-0fe2d000 r--p 00002000 08:03 129827     /lib/powerpc-linux-gnu/libdl-2.13.so
0fe2d000-0fe2e000 rw-p 00003000 08:03 129827     /lib/powerpc-linux-gnu/libdl-2.13.so
0fe3e000-0ffaf000 r-xp 00000000 08:03 129835     /lib/powerpc-linux-gnu/libc-2.13.so
0ffaf000-0ffbf000 ---p 00171000 08:03 129835     /lib/powerpc-linux-gnu/libc-2.13.so
0ffbf000-0ffc3000 r--p 00171000 08:03 129835     /lib/powerpc-linux-gnu/libc-2.13.so
0ffc3000-0ffc4000 rw-p 00175000 08:03 129835     /lib/powerpc-linux-gnu/libc-2.13.so
0ffc4000-0ffc7000 rw-p 00000000 00:00 0
0ffd7000-0ffdf000 r-xp 00000000 08:03 51766      /home/ivo/buildroot/output/host/usr/lib/libfakeroot-0.so
0ffdf000-0ffef000 ---p 00008000 08:03 51766      /home/ivo/buildroot/output/host/usr/lib/libfakeroot-0.so
0ffef000-0fff0000 rw-p 00008000 08:03 51766      /home/ivo/buildroot/output/host/usr/lib/libfakeroot-0.so
10000000-10012000 r-xp 00000000 08:03 371365     /home/ivo/buildroot/output/host/usr/bin/genext2fs
10021000-10022000 rw-p 00011000 08:03 371365     /home/ivo/buildroot/output/host/usr/bin/genext2fs
105bd000-105fc000 rwxp 00000000 00:00 0          [heap]
48000000-48020000 r-xp 00000000 08:03 129824     /lib/powerpc-linux-gnu/ld-2.13.so
48020000-48021000 rw-p 00000000 00:00 0
48021000-48022000 r--p 00021000 08:03 129824     /lib/powerpc-linux-gnu/ld-2.13.so
48022000-48023000 rw-p 00022000 08:03 129824     /lib/powerpc-linux-gnu/ld-2.13.so
48023000-48025000 rw-p 00000000 00:00 0
4802b000-4802d000 rw-p 00000000 00:00 0
48100000-48121000 rw-p 00000000 00:00 0
48121000-48200000 ---p 00000000 00:00 0
bfc22000-bfc43000 rw-p 00000000 00:00 0          [stack]
Aborted
make: *** [/home/ivo/buildroot/output/images/rootfs.ext2] Error 134
" It looks like it compiled the rootfs properly, but it couldn't make the image, it also fails if I tell it to make an ext4 image instead of ext2.

EDIT: I just tried rebuilding it without the ext2 filesystem, and it worked! but I still don't see gcc/g++ in the target packages... should I select binutils?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 11, 2014, 03:49:00 pm
Quote
but I still don't see gcc/g++ in the target packages... should I select binutils?
I don't know how the option is called, but you can always show all options in the config tool if you press 'z' and then '?' on the appropriate item to find out why it is disabled.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 08:48:22 am
gcc/g++ still aren't there after I press 'z'. Also, whenever I startx the calc freezes
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 12, 2014, 09:10:26 am
Quote
Also, whenever I startx the calc freezes
You should still be able to switch to another vtty using Ctrl-Alt-F1 and read the error there.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on July 12, 2014, 02:59:00 pm
Quote
but I still don't see gcc/g++ in the target packages... should I select binutils?
I don't know how the option is called, but you can always show all options in the config tool if you press 'z' and then '?' on the appropriate item to find out why it is disabled.

You have to enable "deprecated packages" or something like that. Anyway, gcc/g++ are really slow on the nspire, so there's not much of a point in using them.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 03:54:30 pm
When I startx and switch back to ctrl-alt-F1 it says "xterm: Failed to open input method"
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 12, 2014, 03:57:50 pm
Either something is broken in your buildroot or with the kernel.. What does /var/log/Xorg.0.log say?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 04:02:01 pm
There is none  :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 12, 2014, 04:11:59 pm
Somewhere there is one - maybe stdout of the Xserver?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 04:16:12 pm
When I startx it complains about some xauth file not existing. It also complains about font files missing.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 12, 2014, 04:19:01 pm
Which buildroot config do you use? This (https://github.com/Vogtinator/nspire-linux-configs/blob/master/buildroot/xconfig) is the one use for the xconfig image.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 04:30:40 pm
I downloaded the tar.xz file from the TI-planet Linux build system
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 12, 2014, 05:44:53 pm
Weird, I know that the latest "extended" kernel works fine together with the latest xconfig.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 12, 2014, 06:25:26 pm
I used these files:
Title: Re: Calling all Linux Kernel developers!
Post by: bb010g on July 13, 2014, 01:19:46 am
I used these files:
<screenshot>
Off topic, but: UHC! :D
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on July 13, 2014, 02:16:39 am
So, I had this crazy idea to save space in linux on the nspire: replace glibc with uclibc. (I'm assuming that's what's in use right now)

glibc is quite slow and large. On my system (64-bit x86) it comes to 2 MB just in the /lib/libc-version.so, which is a significant portion of the available space on gs nspires. (Yes, I know the size will vary a lot between architectures but it's still big.)

uclibc size varies widely, based on the configuration you choose. (you can disable float support ENTIRELY if you want)

Here's a chart comparing several different libc implementations. I think the difference is fairly obvious. http://www.etalabs.net/compare_libcs.html

Here's a handy list of differences to note between glibc and uclibc: https://www.kernel.org/pub/linux/libs/uclibc/Glibc_vs_uClibc_Differences.txt

Let me know what you think!
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 13, 2014, 06:31:00 am
Um, buildroot uses uclibc by default and I didn't change that :P

@Ivoah: Could you try some older versions of xconfig then and tell me which one works?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on July 13, 2014, 07:43:55 am
@Vogtinator I won't be home for the next week, but I will try as soon as I can.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on July 13, 2014, 02:22:07 pm
Well never mind then. :P Carry on. You're doing good work.
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on August 19, 2014, 12:00:45 am
How does one get usb peripherals to work? If I plug in my usb hub while on the Nspire home screen it tells me the peripheral is malfunctioning. If I attempt to do so inside the bootloader or inside linux nothing happens. I am very confused! D:
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on August 19, 2014, 09:30:01 am
For questions, we have a seperate thread:
Quote
http://www.omnimaga.org/ti-nspire-projects/nspire-linux-questions/
Which kernel are you using?
Title: Re: Calling all Linux Kernel developers!
Post by: Vsod99 on August 19, 2014, 06:18:17 pm
For questions, we have a seperate thread:
Quote
http://www.omnimaga.org/ti-nspire-projects/nspire-linux-questions/
Which kernel are you using?
Thanks for the thread link, I'll be sure to use that when/if I have further questions.
The kernel I am using is the newest one from the nightly builds on TI-Planet (http://tiplanet.org/nspire-linux-builds/kernel.html)(v3.6-26201-g341712f)
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on September 08, 2014, 10:27:52 pm
I wrote a tutorial on how to install Debian on the calculator: http://wp.me/p4zkUM-1j
Please leave comments with any suggestions or things I might have missed.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on September 11, 2014, 01:01:43 pm
Hello all,

I have problems with Linux on CX CAS, USB is not working. It was working in the past but I encountered some issues with the kernel (not related to USB).
A few days ago, I tried to reinstall Linux on my calculator, but it seems USB isn't working at all. Firstly, I suspected my cable (actually it was two cables connected by a homemade weld). I bought a new cable.
But it still not works. My USB Hub is powered by the sector and it works with the computer.

Nothing in dmesg, lsusb outputs nothing.
Any idea ? :/


PS : @Ivoah : broken link.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 11, 2014, 01:14:10 pm
Has anything changed, boot cmdline, kernel version, initrd, linuxloader2?
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on September 11, 2014, 02:26:21 pm
In theory, nothing has changed but my two Linux "packages" aren't working. I could try to re-download all the stuff and make another test.
The USB port of my calculator works when I'm using TILP or the TI proprietary software so I don't think that's a hardware problem.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on September 11, 2014, 03:44:46 pm
Are you sure you are using the old kernel? The new one doesn't support USB.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 11, 2014, 07:38:05 pm
Why doesn't USB work in the new kernel? Are you working on it?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 11, 2014, 07:41:13 pm
I don't know actually. I tried various devicetree options, but none of it seem to work as expected. I only tried OTG, though, as the host controller doesn't work reliable with "high speed" and the OTG one can switch to high speed without disconnecting.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on September 12, 2014, 04:57:12 am
Ok, I'm sorry, I wasn't using the old kernel, I probably replaced the old unintentionally. Now USB works perfectly, thanks !


Edit : how to make my rootfs (xconfig) writable ? It is on a USB key, it works, but the partition is readonly.


Edit 2 : If it can help you, output of 'mount' :
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (ro,relatime,size=29488k,nr_inodes=7372,mode=755)

Is it normal to have two things mounted on / ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 12, 2014, 06:43:08 am
Probably your FS got corrupted somehow, run fsck on your desktop to fix it.

Quote
Is it normal to have two things mounted on / ?
I have no idea why it is shown that way, but a directory can only be mountpoint of one device at a time, the newest mount is what you can see in the directory.
Title: Re: Calling all Linux Kernel developers!
Post by: Mogolecho on September 12, 2014, 06:47:44 am
How do you install the filesystem into the USB device ? I formatted the partition in ext4, and uncompressed the .tar.xz with root privileges.Is this the right way ?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 12, 2014, 08:06:35 am
Yes.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 12, 2014, 10:44:13 pm
I don't know actually. I tried various devicetree options, but none of it seem to work as expected. I only tried OTG, though, as the host controller doesn't work reliable with "high speed" and the OTG one can switch to high speed without disconnecting.

Why not ask on one of the kernel mailing lists?
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on September 14, 2014, 08:27:17 am
Would it be possible to run Raspbian on the nspire?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 14, 2014, 09:38:34 am
Quote
Would it be possible to run Raspbian on the nspire?
If Raspbian is armv5 compatible, yes. But it's probably armv6.

Quote
Why not ask on one of the kernel mailing lists?
You can, if you want to :P
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on September 14, 2014, 06:15:30 pm
Yep, it's ARMv6, I thought it was ARMv5. bummer.
Title: Re: Calling all Linux Kernel developers!
Post by: willrandship on September 14, 2014, 07:13:20 pm
Using raspbian makes very little sense. All of its packages are optimized for FPU support, which I don't believe the nspire has. There are ports of debian to armv5 platforms that you could potentially use, though.

Take a look at this page: https://www.debian.org/ports/arm/#about

The Marvell port in particular is ARMv5, and potentially others are as well.

The only real benefit obtained by using debian is the package manager, though, which takes up an impractical amount of space with package caches and such.
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on September 14, 2014, 09:21:34 pm
Quote
Why not ask on one of the kernel mailing lists?
You can, if you want to :P

I know nothing about kernel dev, either you or tangrs (where is he?) should ask.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on January 03, 2015, 07:07:24 am
Happy new year to everyone :)

I've gotten back into the TI-Nspire scene after a long year of uni and dealing with personal stuff. Currently working on the USB driver and almost getting seamless switching between USB host and gadget working :3

Quote
Why not ask on one of the kernel mailing lists?
You can, if you want to :P

I know nothing about kernel dev, either you or tangrs (where is he?) should ask.

Here :)

You could get Debian or any Linux distro that supports ARM to work on it. Personally, I've succeeded with Debian but I believe Arch Linux should be possible too. Rasbian wouldn't make sense since the TI-Nspire doesn't have hard float support.

Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on January 05, 2015, 09:06:07 pm
Great to see you back :)

Hopefully the USB gets working soon.
Title: Re: Calling all Linux Kernel developers!
Post by: floris497 on February 22, 2015, 08:55:56 am
I can't get my nspire to boot from the usb.. i will not recognise it :( not in a hub nor a mini usb otg cable..
on os 3.6

edit:
should add that I used the new kernel, the old one seems to work :)

edit2:
got python and clang working, takes around 12sec to compile hello world with clang :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on March 20, 2015, 01:18:03 am
Today is a good day :D

The USB OTG and seamless switching support patch has been accepted and will be merged into the next Linux version.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on March 20, 2015, 08:26:23 am
Today is a good day :D

The USB OTG and seamless switching support patch has been accepted and will be merged into the next Linux version.

Does this mean USB will work with the latest kernel?
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on March 22, 2015, 05:32:38 am
Today is a good day :D

The USB OTG and seamless switching support patch has been accepted and will be merged into the next Linux version.

Does this mean USB will work with the latest kernel?

Yep, it should work out of the box in the next major release 4.1-rc1 onwards.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on March 22, 2015, 08:31:24 am
Today is a good day :D

The USB OTG and seamless switching support patch has been accepted and will be merged into the next Linux version.

Does this mean USB will work with the latest kernel?

Yep, it should work out of the box in the next major release.

Woo!
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on March 27, 2015, 03:19:19 pm
Great to know, tangrs :)
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 04, 2015, 07:32:00 am
Yep, it should work out of the box in the next major release 4.1-rc1 onwards.

Wondered how linux on nspire is doing after a year of not looking into it, and just found this.... Awesome!!  :hyper:  :thumbsup:
Hopefully nothing more will prevent Arch Linux from booting then
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on April 05, 2015, 08:28:31 pm
If anyone wants a kernel build, I can make one when I have time.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on April 05, 2015, 08:41:52 pm
Is https://tiplanet.org/nspire-linux-builds/ updated?
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 06, 2015, 04:20:14 am
If anyone wants a kernel build, I can make one when I have time.

If you happen to do so, could you enable cgroups please  :)
(Arch won't boot without it, but I reckon it would be nice on the nspire: Small, clean base to start from, fast package manager, prebuilt rootfs on archlinuxarm.org)

Also thought about doing it, but tangrs github repo is only legacy code. (and frankly I'm short on spare time right now :/ ) Where would you take the code from, linux-next?

Is https://tiplanet.org/nspire-linux-builds/ updated?
I don't think so, at least with dtb version downloaded two days ago usb was still broken.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 06, 2015, 03:28:50 pm
Yay, progress!
I built a kernel using the fairly old config and modified it a bit so it should work with systemd. Highly untested, might work just fine or ignite your calc.
Download (http://ritter-vogt.de/zImage.tns)

nspire-linux-builds haven't been updated in a long time, but it's being worked on, there are some minor issues.
Automated builds are planned.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 06, 2015, 08:07:41 pm
I built a kernel using the fairly old config and modified it a bit so it should work with systemd. Highly untested, might work just fine or ignite your calc.
Download (http://ritter-vogt.de/zImage.tns)
Well, it bootet without any smoke or flames :D Actually without any issues at all

uname -a says 4.0.0-rc6, but tangrs states that his code will land in 4.1-rc1 (accordingly I couldn't get any usb action either). But it's nice to see the calculator running the newest kernel of all my linux devices (plenty)   :3

I'm not sure where tangrs' code is right now, but I guess in linux-next. Not certain how adventureous it is to build from that though
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 07, 2015, 07:26:50 am
Quote
Well, it bootet without any smoke or flames :D Actually without any issues at all
Great, so the config is working for systemd.

Quote
uname -a says 4.0.0-rc6, but tangrs states that his code will land in 4.1-rc1 (accordingly I couldn't get any usb action either). But it's nice to see the calculator running the newest kernel of all my linux devices (plenty)   :3
Whoops, I cloned the wrong repo. Well, the minor nspire-linux-builds issue is now solved, there will be new builds soon.

Quote
I'm not sure where tangrs' code is right now, but I guess in linux-next. Not certain how adventureous it is to build from that though.
It should compile just fine, there are automated tests running. (I know this because my first submission wasn't compatible with a specific arch not defining a macro...)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on April 08, 2015, 10:33:32 am
I built a kernel using the fairly old config and modified it a bit so it should work with systemd. Highly untested, might work just fine or ignite your calc.
Download (http://ritter-vogt.de/zImage.tns)
Well, it bootet without any smoke or flames :D Actually without any issues at all

uname -a says 4.0.0-rc6, but tangrs states that his code will land in 4.1-rc1 (accordingly I couldn't get any usb action either). But it's nice to see the calculator running the newest kernel of all my linux devices (plenty)   :3

I'm not sure where tangrs' code is right now, but I guess in linux-next. Not certain how adventureous it is to build from that though

Yeah, it's sitting around in linux-next at the moment. It will (hopefully) get merged when the next merge window opens.

You can download the patches and apply them manually to your tree. It should apply cleanly to the 3.9 or 4.0rc kernel tree.

Patch #1 (https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/patch/?id=905276c4319174d52de0e45fc9b22f599497be47)
Patch #2 (https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/patch/?id=89200448a01d9d07a1ee5cc42e8b847f86cdaf7c)
Patch #3 (https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/patch/?id=66c9270b6898de629ab2a7428e56993800ea9a6c)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 11, 2015, 10:17:27 am
http://tiplanet.org/nspire-linux-builds is running again, with linux-next builds and up-to-date buildroot images.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on April 11, 2015, 10:25:43 am
http://tiplanet.org/nspire-linux-builds is running again, with linux-next builds and up-to-date buildroot images.

http://tiplanet.org/nspire-linux-builds/devicetree/zImage_latest.tns gives a 404 error :(
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 11, 2015, 07:27:46 pm
Fixed, the url should be http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_latest.tns
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 17, 2015, 05:46:38 pm
Mhmm.. Has anyone got usb working with the builds from http://tiplanet.org/nspire-linux-builds ?

Uname says 4.0.0-rc7-next-20150410, but my usb thumbkeys won't work for some reason. lsusb ends without any output, no reaction on dmesg and no new device in /dev either.. (doesn't matter whether I connect otg before or after linux  boot)

I can't guarantee that my otg adapter works (a little wonky construction), but it did with the old kernel and when pluggin it in while in Nspire OS it complains properly about a device connected it can't handle

lsmod end with "/proc/modules: No such file or directory"
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 18, 2015, 10:54:20 am
Quote
Uname says 4.0.0-rc7-next-20150410, but my usb thumbkeys won't work for some reason. lsusb ends without any output, no reaction on dmesg and no new device in /dev either.. (doesn't matter whether I connect otg before or after linux  boot)
I started a new kernel build with some more options activated, but there was no obvious USB-related option missing.
Are you using a CX or classic?

Edit: http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_20150418_1650.tns

Quote
I can't guarantee that my otg adapter works (a little wonky construction), but it did with the old kernel and when pluggin it in while in Nspire OS it complains properly about a device connected it can't handle
That's a good sign that it's at least enumerating properly, so it should leave a linux syslog message.

Quote
lsmod end with "/proc/modules: No such file or directory"
Modules aren't enabled.
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 18, 2015, 03:07:56 pm
Quote
Uname says 4.0.0-rc7-next-20150410, but my usb thumbkeys won't work for some reason. lsusb ends without any output, no reaction on dmesg and no new device in /dev either.. (doesn't matter whether I connect otg before or after linux  boot)
I started a new kernel build with some more options activated, but there was no obvious USB-related option missing.
Are you using a CX or classic?
CX
Quote
Edit: http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_20150418_1650.tns

Quote
I can't guarantee that my otg adapter works (a little wonky construction), but it did with the old kernel and when pluggin it in while in Nspire OS it complains properly about a device connected it can't handle
That's a good sign that it's at least enumerating properly,
Yeah. Additionally to make absolutely sure the otg adapter works, I put the old kernel on it again -> otg works flawlessly
Quote
so it should leave a linux syslog message.
(http://i.imgur.com/uzS6Yo0.jpg)
Both for otg connected before and after Linux boot. (only difference in that regard is, that the usb key's led is off when connected before boot, and on when connected after boot).

What commands could give more useful information about the issue?

One thing your new build solved though: Before the display got spammed with these (~1/sec):
Code: [Select]
cfg80211: Calling CRDA to update world regulatory domainNow it gives up with this by the time it finishes booting:
Code: [Select]
cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Title: Re: Calling all Linux Kernel developers!
Post by: schuhumi on April 27, 2015, 05:58:12 am
Built 4.1-rc1 with config from https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/devicetree.config

It boots but the problem remains: No device in sight on either dmesg nor lsusb  ???

tangrs, would you be so kind and post the .config you used? :) Just would like to rule out that there's something misconfigured in Vogtinators one
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on April 27, 2015, 10:47:45 am
I'd also guess that configuration is the issue, but in the last build "CC      drivers/usb/chipidea/ci_hdrc_zevio.o" is in the build log, so the right driver is built.

Quote
Built 4.1-rc1 with config from https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/devicetree.config
That file isn't the latest version, it doesn't have all options enabled. I just pushed an updated one with the chipidea stuff enabled.
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on May 30, 2015, 06:51:52 am
Built 4.1-rc1 with config from https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/devicetree.config

It boots but the problem remains: No device in sight on either dmesg nor lsusb  ???

tangrs, would you be so kind and post the .config you used? :) Just would like to rule out that there's something misconfigured in Vogtinators one

You need to enable a few drivers to get USB fully working. I believe if any of those are missing, the USB driver won't load successfully.


I will update the Hackspire wiki accordingly
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on May 31, 2015, 04:38:06 pm
Quote
You need to enable a few drivers to get USB fully working. I believe if any of those are missing, the USB driver won't load successfully.
Wouldn't it be better to have them as dependencies, then?

Anyway, I started a build on tiplanet.org now, should be available in 10 minutes.

Edit: Finished: http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_20150531_2237.tns
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on June 01, 2015, 04:06:37 pm
Quote
You need to enable a few drivers to get USB fully working. I believe if any of those are missing, the USB driver won't load successfully.
Wouldn't it be better to have them as dependencies, then?

Anyway, I started a build on tiplanet.org now, should be available in 10 minutes.

Edit: Finished: http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_20150531_2237.tns

Is that the same as http://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_latest.tns
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 01, 2015, 06:42:49 pm
It should be, it's a symlink pointing to the latest build.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on June 02, 2015, 10:21:56 am
So would updating from the old kernel to the new dtb kernel be as simple as swapping out kernels and adding the dtb part to the .ll2 script?
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 02, 2015, 07:07:19 pm
In theory, yes, but there may be some breakages.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on June 05, 2015, 02:30:33 pm
I tried updating my kernel, and it seemed to boot fine, but the keyboard wasn't working. Also, is there an IRC channel for nspire linux? If not, one should be created, eg. #nspire-linux
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on June 21, 2015, 05:11:51 pm
Updated at 7th Feb 2013

Can this run Android?

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

Oops

(http://i.imgur.com/qU5lynD.jpg)
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on June 21, 2015, 09:42:49 pm
Updated at 7th Feb 2013

Can this run Android?

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

Oops

(http://i.imgur.com/qU5lynD.jpg)

I hope this is legit and not just a screenshot of android being displayed on the Nspire.
Title: Re: Calling all Linux Kernel developers!
Post by: c4ooo on June 21, 2015, 09:48:41 pm
Updated at 7th Feb 2013

Can this run Android?

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

Oops


I hope this is legit and not just a screenshot of android being displayed on the Nspire.
Its probably a joke.
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on June 22, 2015, 12:09:56 am
Updated at 7th Feb 2013

Can this run Android?

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

Oops


I hope this is legit and not just a screenshot of android being displayed on the Nspire.
Its probably a joke.

It's not a joke... I just don't have a life ;) I hope to release the completed port by tomorrow over at https://github.com/nDroidProject (https://github.com/nDroidProject)

Here's some more screenshots:

(http://i.imgur.com/m2onlUZ.jpg) (http://i.imgur.com/I33rZXC.jpg) (http://i.imgur.com/Z9oI8p8.jpg) (http://i.imgur.com/FVzLk9h.jpg)

*update: huh, it looks like somebody even wrote an article about this: http://www.androidworld.it/2015/06/21/android-calcolatrice-texas-instruments-310800/ (http://www.androidworld.it/2015/06/21/android-calcolatrice-texas-instruments-310800/)
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on June 22, 2015, 08:05:41 am
WOW, this is unexpected. Well done! How does it run? I assume it's not really at a usable speed.

I do wonder why "Minor compilation changes for older GCC versions" was necessary, binary literals have been supported since ages.
You should definitely update your SDK and toolchain!
Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on June 22, 2015, 10:24:03 am
Indeed congrats :)
News articles on community websites (and probably others) coming soon... :)
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on June 22, 2015, 11:38:49 am
WOW, this is unexpected. Well done! How does it run? I assume it's not really at a usable speed.

I do wonder why "Minor compilation changes for older GCC versions" was necessary, binary literals have been supported since ages.
You should definitely update your SDK and toolchain!

Boot up is slow, taking ~3-5 minutes (Although I believe I can speed it up), but after most of the core services are starting the system is actually pretty usable (imagine an HTC Dream running at half-speed), making this a feasible alternative OS to run on the calculator.

And regarding the whole "Minor compilation changes for older GCC versions" commit, I at first (embarrassingly) set my $PATH to the wrong arm GCC toolchain location (which I originally thought was the ndless SDK location). After I fixed that, the whole commit was rather useless but I figured I wouldn't revert it just in case...
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on June 22, 2015, 11:40:26 am
WOW, this is unexpected. Well done! How does it run? I assume it's not really at a usable speed.

I do wonder why "Minor compilation changes for older GCC versions" was necessary, binary literals have been supported since ages.
You should definitely update your SDK and toolchain!

Boot up is slow, taking ~3-5 minutes (Although I believe I can speed it up), but after most of the core services are starting the system is actually pretty usable (imagine an HTC Dream running at half-speed), making this a feasible alternative OS to run on the calculator.

This is awesome! Where is the rootfs stored? I assume it's on an external flashdrive or something.
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on June 22, 2015, 12:08:24 pm
WOW, this is unexpected. Well done! How does it run? I assume it's not really at a usable speed.

I do wonder why "Minor compilation changes for older GCC versions" was necessary, binary literals have been supported since ages.
You should definitely update your SDK and toolchain!

Boot up is slow, taking ~3-5 minutes (Although I believe I can speed it up), but after most of the core services are starting the system is actually pretty usable (imagine an HTC Dream running at half-speed), making this a feasible alternative OS to run on the calculator.

This is awesome! Where is the rootfs stored? I assume it's on an external flashdrive or something.

Until NAND drivers are working on the new kernel, I opted to put the rootfs on an external USB drive via usb-otg. It currently uses 4 partitions, one for the system, one for userdata, one for the cache, and one for the virtual sd card.
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on June 22, 2015, 01:18:35 pm
WOW, this is unexpected. Well done! How does it run? I assume it's not really at a usable speed.

Here's a demo video as well:

Title: Re: Calling all Linux Kernel developers!
Post by: Adriweb on June 22, 2015, 02:22:14 pm
Thanks for the video - I updated the TI-Planet article (https://tiplanet.org/forum/viewtopic.php?f=43&t=16865&lang=en) :)
And it actually runs faster than what I would have expected!
Title: Re: Calling all Linux Kernel developers!
Post by: Legimet on June 22, 2015, 06:44:04 pm
I saw this yesterday and also thought it was a joke. That's a lot faster than I would have expected, well done. :)
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on June 24, 2015, 06:25:01 am
Updated at 7th Feb 2013

Can this run Android?

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

Oops

(http://i.imgur.com/qU5lynD.jpg)

My my! Touche!

Congratulations! That is absolutely amazing!
Title: Re: Calling all Linux Kernel developers!
Post by: Eeems on June 24, 2015, 03:22:52 pm
This was just brought to my attention and I believe news is in order. I'm a bit too busy with work to post one myself but I'll tag a couple people and see which one does it first
@pimathbrainiac @Geekboy1011 @Sorunome @shmibs
Title: Re: Calling all Linux Kernel developers!
Post by: shmibs on June 24, 2015, 03:51:56 pm
i saw this yesterday but didn't realise it was a huge deal. what had to be done to get it running on top of linux stuff? interface drivers? stripping out bloat processes?
Title: Re: Calling all Linux Kernel developers!
Post by: utz on June 25, 2015, 05:18:55 pm
Congratulations on this outstanding achievement, joshumax. Saw it on the main German tech news site (http://www.heise.de/newsticker/meldung/Android-auf-dem-Taschenrechner-2726024.html) earlier today ;)
Title: Re: Calling all Linux Kernel developers!
Post by: neuronix on July 07, 2015, 09:07:35 am
Hello, I have a problem on my ti cx nspire case with android.
When I run it, it load for a little while and then freeze it.
How to remedy it?
Thank you in advance

P.S:
I have a 3.9.1 OS 3.9 and therefore ndl3ss
Title: Re: Calling all Linux Kernel developers!
Post by: Unicorn on July 09, 2015, 07:13:46 pm
Wow, this is soooooo amazing. I did not think you could actually run a game on the android port.  Though, it's not that intensive it it?(Unless that's not on the android port?   :hyper:
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on July 16, 2015, 04:15:11 pm
Hello, I have a problem on my ti cx nspire case with android.
When I run it, it load for a little while and then freeze it.
How to remedy it?
Thank you in advance

P.S:
I have a 3.9.1 OS 3.9 and therefore ndl3ss

Can you describe what's happening while it's loading and where it's freezing? Also, if possible can you send pictures of the problem? I can't really diagnose what's going on without more information...




Wow, this is soooooo amazing. I did not think you could actually run a game on the android port.  Though, it's not that intensive it it?(Unless that's not on the android port?   :hyper:

I posted a video a few posts back of it running the Android SDK game demo "Lunar Lander." (See https://www.youtube.com/watch?v=Skbuc_pQj9g (https://www.youtube.com/watch?v=Skbuc_pQj9g)). It can also run games like Snake rather well; other than that the only real limit is the capability of the hardware, which isn't that high-performance to begin with.


Edit (Eeems (http://ourl.ca/u/Eeems)): Merged double post
Title: Re: Calling all Linux Kernel developers!
Post by: Unicorn on July 18, 2015, 03:43:59 pm
Very cool. :)
Title: Re: Calling all Linux Kernel developers!
Post by: johnvade on July 27, 2015, 10:16:24 am
a
Title: Re: Calling all Linux Kernel developers!
Post by: tangrs on July 28, 2015, 11:02:19 pm
Hello, long time lurker, first time poster here. I have several problems with my TI-Nspire CX running OS 3.6.0.550. When I run linuxloader2, it allocates a maximum of ~31mb RAM (screenshot A), but every video I've watched showcasing Linux on the Ti-Nspire CX shows linuxloader2 allocating ~43mb RAM.

Yeah, that is rather strange. Could be just that OS 3.6 takes up more RAM.

Quote
This keeps me from using the xconfig initrd images.

If I remember right, the xconfig images are too large to be loaded onto the calculator. They load fine but leave too little memory left for Linux to use and decompress the image. You'll most likely need to load this onto a USB drive to get it to boot.

Quote
Another problem is that whenever I try to use an initrd larger than 4mb, despite what the "Improvements over old one" section of the LL2 readme says (Being able to load ramdisks and kernels larger than 4MB (up to ~40MB on the CX), I get a kernel panic.

Is this the xconfig image you're referring to here? In practice, you can only really load initrd images that are ~40% the size of total available RAM. This is because Linux needs memory to function and also needs additional large amounts of memory to store the decompressed initrd image.

Quote
When I try to use the old kernel with a ramdisk larger than 4mb or a flash drive, I get a crptic kernel panic screen (screenshot B).

That's strange. Could be a missing filesystem driver. What did you format the flash drive with? See above for ramdisks.

Quote
When I try to use the new kernel with a ramdisk larger than 4mb, I get a less cryptic panic screen (screenshot C) which doesn't make any sense since LL2 is supposed to support ramdisks larger than 4mb. And finally, when I use a flash drive to boot into Debian Jessie (armel), which only works with the new kernel, I can do most everyday tasks, but I can't properly reboot the system and have to reset (screenshot D). Thanks in advance!

Could be that Debian just takes a while to shut down. If you force a reboot by running
Code: [Select]
reboot -f does it reboot instantly?

Title: Re: Calling all Linux Kernel developers!
Post by: johnvade on July 29, 2015, 04:52:13 am
a
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on July 29, 2015, 04:58:43 pm
Screenshot D says that a feature is not supported, probably it's not enabled in the kernel. I don't know on the top of my head which config option that is, but it should be easily resolvable.
smallconfig and xconfig are too big for using it as an initrd as
-compressed ramdisk
-uncompressed ramdisk
-kernel
are in RAM simultaneously.
It may work if you decompress the ramdisk manually, but they're not intended for use as ramdisk anyway, only busyboxconfig is.
Title: Re: Calling all Linux Kernel developers!
Post by: alnwlsn on September 06, 2015, 10:52:54 pm
Hello, another noob here. I read about linux on the nspire a while ago, and seeing as I now use CAS more often (and can't put a CAS os on my rev. J CX) I figured that I'd give it a try. I followed codinghobbit's tutorial (http://codinghobbit.no-ip.org/blog/?p=81) and installed Debian on my calculator. Then I compiled the (device tree) kernel using vogtinator's config (https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/devicetree.config) with a couple kernel options added to get my usb ethernet adapter working. That worked too. Now I'm trying to get x working.

Installing xorg on debian failed. "Hmm, maybe it's something to do with debian packages."
Fine, instead of debian, put the latest xconfig rootfs from tiplanet (https://tiplanet.org/nspire-linux-builds/) on my flash drive, since I've seen videos of xconfig working.

It boots, but gives a similar error when I try to do startx [attached]. "Ok, maybe it's a problem with my kernel."
Replaced the kernel I built with the latest from tiplanet (also device tree).

The same error occurs.
Both my kernel and the tiplanet one were kernel version 4.2 "Ok, maybe newer kernels don't work."
Fine, install the latest old kernel (non device tree) from tiplanet.

It boots, and startx does start x, but none of the inputs work; the cx keyboard and touchpad don't do anything, so I can't type anything. I don't have a usb keyboard, but I do have a mouse. It doesn't move the mouse cursor. I can tell that it isn't frozen because the clock still works. Then after a couple minutes, the screensaver kicks in and the screen turns off. I can't get out of it, and have to use the reset button.

Therefore, a couple questions:
First, is x possible with the newer kernels? How do I get it working? More kernel options?
Second, how do I get the inputs to work in X? I don't know if the touchpad can work as a mouse, but the keyboard should work. I have looked around and found the "evdev" driver  (http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html) Could this be it? How do I enable it?

At this point I should say that I don't really know what I'm doing. I know some Linux stuff from playing with Raspberry pi, but I've never really done anything at this lower level. I'm just good at googling and poking around.
Title: Re: Calling all Linux Kernel developers!
Post by: Ivoah on September 06, 2015, 11:01:30 pm
Hello, another noob here. I read about linux on the nspire a while ago, and seeing as I now use CAS more often (and can't put a CAS os on my rev. J CX) I figured that I'd give it a try. I followed codinghobbit's tutorial (http://codinghobbit.no-ip.org/blog/?p=81) and installed Debian on my calculator. Then I compiled the (device tree) kernel using vogtinator's config (https://github.com/Vogtinator/nspire-linux-configs/blob/master/kernel/devicetree.config) with a couple kernel options added to get my usb ethernet adapter working. That worked too. Now I'm trying to get x working.

Installing xorg on debian failed. "Hmm, maybe it's something to do with debian packages."
Fine, instead of debian, put the latest xconfig rootfs from tiplanet (https://tiplanet.org/nspire-linux-builds/) on my flash drive, since I've seen videos of xconfig working.

It boots, but gives a similar error when I try to do startx [attached]. "Ok, maybe it's a problem with my kernel."
Replaced the kernel I built with the latest from tiplanet (also device tree).

The same error occurs.
Both my kernel and the tiplanet one were kernel version 4.2 "Ok, maybe newer kernels don't work."
Fine, install the latest old kernel (non device tree) from tiplanet.

It boots, and startx does start x, but none of the inputs work; the cx keyboard and touchpad don't do anything, so I can't type anything. I don't have a usb keyboard, but I do have a mouse. It doesn't move the mouse cursor. I can tell that it isn't frozen because the clock still works. Then after a couple minutes, the screensaver kicks in and the screen turns off. I can't get out of it, and have to use the reset button.

Therefore, a couple questions:
First, is x possible with the newer kernels? How do I get it working? More kernel options?
Second, how do I get the inputs to work in X? I don't know if the touchpad can work as a mouse, but the keyboard should work. I have looked around and found the "evdev" driver  (http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html) Could this be it? How do I enable it?

At this point I should say that I don't really know what I'm doing. I know some Linux stuff from playing with Raspberry pi, but I've never really done anything at this lower level. I'm just good at googling and poking around.

Gah! Why does everyone think I'm codinghobbit??? It says the author of the post is "Ivo". Anyways, I'm the one who wrote the tutorial, and I too tried to get X working (before the new DTB kernel was out for the Nspire) and ran into the same problem you had. I just gave up though, so I don't know what the solution is. Vogtinator or tangrs may be able to help you.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 07, 2015, 08:41:59 am
Hm. I haven't tried X11 in a long time, I'm not sure whether it's even supposed to be working with the DT kernel. Similiar issue with the touchpad, it's only partially implemented mainline and not active by default.

The screenshot has a fairly interesting error: "Address family not supported by protocol". My guess is that that is the ultimate reason why it doesn't work, combined with the "unable to open socket".
I can't tell you which kernel option to activate, but I'll try to get it working (latest devicetree and buildroot) when I've got some free time on my hands :-)

You should try to boot an older, non-devicetree kernel with an older, xconfig image. I can't tell you which versions to try (tiplanet.org is down for me, currently...).
Title: Re: Calling all Linux Kernel developers!
Post by: joshumax on September 14, 2015, 01:47:46 am
Hm. I haven't tried X11 in a long time, I'm not sure whether it's even supposed to be working with the DT kernel. Similiar issue with the touchpad, it's only partially implemented mainline and not active by default.

The screenshot has a fairly interesting error: "Address family not supported by protocol". My guess is that that is the ultimate reason why it doesn't work, combined with the "unable to open socket".
I can't tell you which kernel option to activate, but I'll try to get it working (latest devicetree and buildroot) when I've got some free time on my hands :-)

You should try to boot an older, non-devicetree kernel with an older, xconfig image. I can't tell you which versions to try (tiplanet.org is down for me, currently...).

Sorry about the late reply, but IIRC this is because Unix domain sockets weren't enabled in the kernel build, which is necessary for the AF_LOCAL socket family to work, which Xorg uses.

From net/unix/Kconfig:
Code: [Select]
CONFIG_UNIX:
  │
  │ If you say Y here, you will include support for Unix domain sockets
  │ sockets are the standard Unix mechanism for establishing and
  │ accessing network connections.  Many commonly used programs such as
  │ the X Window system and syslog use these sockets even if your
  │ machine is not connected to any network.  Unless you are working on
  │ an embedded system or something similar, you therefore definitely
  │ want to say Y here.

I hope this helps.
Title: Re: Calling all Linux Kernel developers!
Post by: Vogtinator on September 14, 2015, 05:11:07 am
Enabled in kernel config, currently building on tiplanet.org.

Edit: Build finished: https://tiplanet.org/nspire-linux-builds/devicetree/zImage_expanded_20150914_1111.tns
Title: Re: Calling all Linux Kernel developers!
Post by: tonzaysi7 on February 29, 2016, 03:05:56 pm
Hello

I managed to get linux booting with root filesystem on a USB drive with this kernel command line:

Code: [Select]
cmdline root=/dev/sda rw rootwait
But I can't get the keypad working and I don't know what's wrong with it as the driver should be loaded.
If someone knows about this problem, please help.

Edit: My calc model: Nspire CX CAS
Title: Re: Calling all Linux Kernel developers!
Post by: kitten on October 12, 2016, 02:01:06 pm
Hello

I managed to get linux booting with root filesystem on a USB drive with this kernel command line:

Code: [Select]
cmdline root=/dev/sda rw rootwait
But I can't get the keypad working and I don't know what's wrong with it as the driver should be loaded.
If someone knows about this problem, please help.

Edit: My calc model: Nspire CX CAS

Are you using the DTB, too? You have to download this file (https://tiplanet.org/nspire_linux_builds/devicetree/nspire-cx.dtb), rename it to nspire.dtb.tns, and place it somewhere in your calculator's /documents directory ("My Documents" in the built-in file explorer) and then type the following command before booting Linux.

Code: [Select]
dtb [x]/nspire.dtb.tnsx = the directory where nspire.dtb.tns is (excluding the brackets), leave blank if at root of /documents directory (also remove the "/")

Or you could simply follow the part of Ivoah's guide (https://ivoah.net/blog/2016/03/20/how-to-install-debian-on-a-ti-nspire/) from step 10, just don't follow the part where you set up a Debian USB rootfs. (The files listed on the guide can be found here (https://tiplanet.org/nspire_linux_builds/), looks like @Ivoah forgot to include that!)
Title: Re: Calling all Linux Kernel developers!
Post by: superloach on February 23, 2018, 01:10:00 am
Gosh, what has happened to all of the good threads?!? All the good ndless programs seem dead... :(
Anyway, has anyone gotten this to work recently?
Running linuxloader2 just sits there, showing the last thing that ndless rendered (some micropython stuff in this case).
Same thing happens when running from the start_initrd.ll2.
TI-nspire CX, OS 4.5.0.1180, ndless 4.5.0, latest linuxloader builds from tiplanet.
Hope somebody can help me, because this is like the coolest thing ever to me.
 
Title: Re: Calling all Linux Kernel developers!
Post by: cd109876 on February 28, 2018, 10:28:41 am
Same issue on my CX CAS on os 4.2, it launches linuxloader2 in compatibility mode and will go to a black screen/whatever ndless rendered previously. It needs updating to support newer versions I guess. OS 3.6 works with linuxloader2 fine in firebird-emu.
Title: Re: Calling all Linux Kernel developers!
Post by: Streetwalrus on March 08, 2018, 04:55:22 pm
As far as I can tell, this method of booting Linux is outdated. There are extensive tutorials on TI-Planet to set up a more up to date exploit and kernel:
- nBoot+ControlX https://tiplanet.org/forum/viewtopic.php?f=57&t=18920
- or in case you have newer hardware that requires it, nLoader https://tiplanet.org/forum/viewtopic.php?f=57&t=21094
Title: Re: Calling all Linux Kernel developers!
Post by: tehahb98 on March 29, 2018, 05:59:09 am
Gosh, what has happened to all of the good threads?!? All the good ndless programs seem dead... :(
Anyway, has anyone gotten this to work recently?
Running linuxloader2 just sits there, showing the last thing that ndless rendered (some micropython stuff in this case).
Same thing happens when running from the start_initrd.ll2.
TI-nspire CX, OS 4.5.0.1180, ndless 4.5.0, latest linuxloader builds from tiplanet.
Hope somebody can help me, because this is like the coolest thing ever to me.
I am on 4.3 and it works just fine for me.


On an unrelated note, the hackspire wiki states that the touchpad driver for the DTB kernel is still waiting to be merged into mainline...has this happened yet?

If not...where do I find it?
I want to cherrypick it into my own branch if it hasn't been merged after this long.
Title: Re: Calling all Linux Kernel developers!
Post by: Fatmeatball on April 12, 2019, 07:56:27 pm
(clickpad non-CAS)
Old kernel speaks to me in machine code and doesn't turn on the USB hub, new kernel does turn on the USB hub but always says it can't mount the VFS on "unknown-block 0", tells me to please change my configuration, and then proceeds to show that there are no storage devices besides RAM.
Title: Re: Calling all Linux Kernel developers!
Post by: tsukisuperior on January 22, 2020, 08:48:53 am
I have a CX and I wanted to put Linux on it, but my hardware revision (AE) does not allow for that. I managed to get a copy of linuxloader2 that could run, but the kernel still has problems. A glitchy screen appears, and the screen goes black. I modified /drivers/gpu/drm/panel/panel-simple.c and now it does not go black but has a glitchy screen that changes over time. Does anyone else know what else to change to fix this? I think it is a screen buffer issue.
Title: Re: Calling all Linux Kernel developers!
Post by: NonstickAtom785 on January 22, 2020, 08:58:59 am
What CX are you talking about?
Title: Re: Calling all Linux Kernel developers!
Post by: tsukisuperior on January 22, 2020, 08:14:15 pm
The TI nspire cx 1