The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Adaptation/Touchpad

From Mer Wiki
Jump to: navigation, search

Contents

HP Touchpad Device Adaptation for Mer

Booting

In order to boot Mer on the HP touchpad we create a new LVM under webos named /dev/store/meego and unpack one of armv7hl images in it.

Kernel

The WebOS kernel is a 2.6.35 with some patches. It's all available from palm here.

The default kernel configuration will boot Meego but won't get you very far as it's lacking some essential elements for systemd :

  • cgroupfs support
  • accept4 support
  • 'active' sysfs attribute for tty0 and console device

A kernel with all the patches applied is available here

To compile the kernel for the touchpad you should have an arm cross compiler environnement set up and use the following comamnds :

 make tenderloin_meego_defconfig

At this point you have to edit your .config, and change the CONFIG_CMDLINE option to match your touchpad : if you have the 3G version your boardtype must be 'topaz-3G-pvt' if it's a wifi version use 'topaz-Wifi-pvt' in order to be sure whate boardtype you need you can issue a dmesg in WebOS and check the kernel command line

 make CONFIG_NO_ERROR_ON_MISMATCH=y uImage

Initramfs

In order to boot from an LVM volume we need an initramfs. I created a very basic one that just mounts the partition and then switches to it.

You can find the initramfs source here

Creating the boot image

The touchpad bootloader can directly boot an image if it's properly formatted. The image needs to be a multi-image uimage containing a kernel uimage and an initramfs uimage. To create such an image here are the steps :

  • Create a gzipped cpio initramfs image
 cd initramfs
 find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../initramfs.cpio.gz
 cd ..
  • Create the uimage for the initramfs
 mkimage -A arm -O Linux -T ramdisk -n 'Meego boot initrd' -C none -e 0 -a 0 -d initramfs.cpio.gz initramfs.uImage
  • Combine both images into one uImage
 mkimage -A arm -O Linux -T multi -n 'Meego boot' -C none -e 0 -a 0 -d linux-2.6.35/arch/arm/boot/uImage:initramfs.uImage meego.uImage

Now you can boot this image using novacom (downloadable here) To boot using nvacom first shutdown the touchpad, then plug the usb cable to your computer and the touchpad while holding the volume up button. You should see the USB logo on the touchpad. Now you can issue the following command :

 novacom boot mem:// < meego.uImage

Creating an image

Here are the steps to create your own Mer image for the touchpad

Creating a bootstrap

Issue the following command in the directory where you want to build your image :

 sudo mic-create-bootstrap -n trunk -k ./cache -r http://repo.meego.com/MeeGo/builds/trunk/latest/repos/oss/ia32/packages/ -o ./bootstrap

Creating the image

Get the kickstart file of your choice from https://gitorious.org/mertp/kickstarts

Now issue this command to build the image :

 sudo mic-image-creator --bootstrap=./bootstrap --format=fs --compress-disk-image=tar.bz2 --config=<your_kickstart_file> -a armv7hl --ignore-siteconf --pkgmgr=yum --cache=./cache

It will build your image

Personal tools