Sunday, February 25, 2007

Kernel (almost) correctly recompiled for Tungsten E2 !!!

Good news ! I was able to boot a home compiled kernel for Palm Tungsten E2 today. :-) This time, I downloaded an older kernel revision from hackndev svn (revision 382, I think, from April 2006). It's a modified 2.6.16 and it's probably the revision nerdfeliz used to compile his kernel. The adjustments were simple, and after some trial and error, I was able to setup an USB serial port. Here are the steps to build the TE2 kernel:
  • download hackndev kernel revision 382
  • in the main Makefile, change the CROSS_COMPILE to reflect the prefix name of your cross toolchain (mine was "arm-linux-")
  • in arch/arm/mach-pxa/palmte2/palmte2_buttons.c, remove the __exit macro from palmte2_buttons_remove
  • do a make menuconfig and load nerdfeliz's configuration 20060406.
  • add usb gadget support, pxa usb support and serial gadget with CDC ADM support
  • in boot options, add "g_serial.use_acm=1" option to change usb serial behavior
  • make and cp
That's it. This kernel should boot. :-) To activate USB, we need the following trick:
  • mknod /dev/usb_serial c 127 0 (in TE2 /dev directory, not in your PC ;-) )
  • add a "getty -L 38400 usb_serial" line in TE2 /etc/inittab
  • load Garux and set the "Open Cradle USB" option
  • boot with the device connected to the PC
  • after the many usb error messages disconnect the USB cable, wait your desktop flush /dev (wait 5 seconds) and plug the USB connector again :-D
  • open gtkterm or minicom and open /dev/ttyACM0 in your desktop (or ACMx if you have other ACM devices)
All right, then ! Now, we have a working ARM linux system and a really expensive dumb terminal linked to it !!! Not quite. :-( I was unable to log in the remote system using gtkterm or minicom, either with "root" user or "default" (buildroot default user), even after playing with securetty and passwd/shadow configurations. Also, there's another sad bug: there's some kind of problem with the SD card driver, it keeps popping error messages. More to come...

No comments: