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

0 Members and 3 Guests are viewing this topic.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #990 on: November 11, 2013, 04:35:24 pm »
The newest for armv5. Probably without any X.org stuff.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #991 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.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #992 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.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline tangrs

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

  • Can get *either* USB peripheral or USB host mode working but no seamless switching yet
  • Device tree compatible USB driver

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
« Last Edit: November 23, 2013, 12:26:39 am by tangrs »

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #994 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.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #995 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.

Offline tangrs

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


Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #997 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?

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

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: Calling all Linux Kernel developers!
« Reply #998 on: November 25, 2013, 04:38:04 am »
Oh god, dual-boot windowa TI/Linux...
Amazing!

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #999 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.

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Calling all Linux Kernel developers!
« Reply #1000 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.
TI-Planet co-admin.

Offline 3_bit

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #1001 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.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #1002 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.

Offline tangrs

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

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #1004 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..