Show Posts

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


Messages - tangrs

Pages: 1 ... 10 11 [12] 13 14 ... 16
166
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 21, 2012, 06:54:33 pm »
Sorry, does this allow you to run linux programs?

Yep.

167
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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. :(

168
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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 :)

169
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 16, 2012, 07:46:41 am »
Hands up for new, sexy bootloader! Woooo :P



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

170
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

171
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

172
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

173
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

174
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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?

175
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

176
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

177
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

178
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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:


179
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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.

180
TI-Nspire / Re: Calling all Linux Kernel developers!
« 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

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

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