Tuesday, July 7, 2009

A way to PalmOS-less device IV

This being probably the last article of the series, I decided to sum things up a little. But firstly, I have to admit there's still a minor issue. The system sometimes refuses to suspend and hangs instead. That is being worked on. I made some chart of support available here. As of now, the device is pretty much usable. My current setup looks like the following:
  • xfce4 on debian-based rootfs running from 2Gb class-4 SD card
  • Flash containing UBoot bootloader and basic recovery system (fits well in 16Mb)
Even though I think this kind of full-blown setup might be a little too heavy on a device PalmTC is, it copes with it well.

Now to the kernel stuff, as you might have found out in the previous posts, there are some files available, here's the list:
  • Kernel config: .config
  • Patches: Available here, apply on the following kernel tree
  • U-Boot patch: available here
To compile kernel, do the following:
  • Copy the downloaded .config to kernel source directory, apply all patches (use git am).
  • make ARCH=arm CROSS_COMPILE=arm-something- menuconfig # this is not needed in case you don't want to modify the kernel configuration
  • make ARCH=arm CROSS_COMPILE=arm-something- # this will get you arch/arm/boot/zImage (suitable for Cocoboot)
  • make ARCH=arm CROSS_COMPILE=arm-something- uImage # this will get you arch/arm/boot/uImage (suitable for U-Boot)
  • INSTALL_MOD_PATH=/somewhere/safe make ARCH=arm CROSS_COMPILE=arm-something- modules_install # this will install modules to /somewhere/safe/lib/modules/... You really don't want to mix them with your systems' modules
To compile U-Boot, do the following:
  • Apply all patches (again, git am is your friend)
  • make CROSS_COMPILE=arm-something- clean
  • make CROSS_COMPILE=arm-something- palmtc_config
  • make CROSS_COMPILE=arm-something- # this will get you u-boot.bin, the bootloader binary
You can use busybox to prepare some initramfs for your kernel if needed.

8 comments:

David Powell said...

Just wanted to say how excited I am to discover your blog, your main site, and your project. I have a Tungsten C that's been mostly idle for quite some time and I've always wished I could turn it into a handheld Linux host. I've periodically Googled in search of hacks and today is the first time I've found someone actually messing around with this device (which is still a great piece of hardware).

Marex said...

That's good to hear. You can visit us on IRC (irc.freenode.net #hackndev). I have an installer prepared, but sadly it still has a few weaker points.

David Powell said...

My main concern is not bricking my T|C, since I only have one...and I have to teach myself about patching kernel trees, etc., but I will figure it out and continue to follow your progress. Thanks!

David Powell said...

The first three of the patches (0001-0003) applied successfully, but 0004 and the others will not. Here's what I got when I tried to apply 0004:

$ git am --utf8 --signoff 0004-PalmTC-aSoC-audio.patch
Applying PalmTC aSoC audio
error: patch failed: sound/soc/pxa/Kconfig:97
error: sound/soc/pxa/Kconfig: patch does not apply
error: patch failed: sound/soc/pxa/Makefile:18
error: sound/soc/pxa/Makefile: patch does not apply
Patch failed at 0001.

I'm sure I'm making some kind of newbie mistake...

Marex said...

Well try applying them by hand. Maybe something changed in the kernel tree already.

NHS-GP said...

Hi

Do you think you could post a boot pack for the T|C like it is done for the T|X etc on hackndev?

I think what you describe here is still over my head, but I would love to have my T|C run under Linux.

This would be wonderful!

Refdoc

Marex said...

Not me, but I'm trying to negotiate with some people to prepare bootpacks. The problem is noone generally wants to work on userspace :-/

Lubimez said...

Haw to use on arm ?
/bin/sh: line 1: arm-something-gcc: command not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2