The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
HP TouchPad
This page contains a HOWTO of how the ARMv7 port of Funtoo Linux on the HP TouchPad is being created. This document will help you to do cool things with your HP TouchPad such as run Gentoo Linux, and also assist in the port effort if you are so inclined. This is a work in progress.
Initial Setup with Preware, F4, Xecutah
For instructions on how to set up Preware, I recommend purchasing the Preware Homebrew Documentation from the HP App Catalog using your HP TouchPad. It's good documentation and your $0.99 will help to support the WebOS Homebrew community.
Please note that when you are asked to install the novacom driver that a package named dev-embedded/palm-novacom is available in Funtoo.
For those wanting to help, install Preware, the F4 kernel, and OpenSSH and Xecutah. Set up ssh access to your touchpad by using the xterm on TouchPad (launched via Xecutah) to copy a remote id_dsa.pub or id_rsa.pub public key file to the file /var/home/root/.ssh/authorized_keys (ie. rename the file to authorized_keys. Use ifconfig in xterm to get your TouchPad's IP address, and you should now be able to "ssh" in.
For best ssh performance, plug your TouchPad into an AC outlet, set a higher average CPU frequency using Govnah, and most importantly, start Exhibition mode to keep the screen from going to sleep. When the screen goes to sleep, WIFI will go into "wake on LAN" mode and ssh interactive performance will suffer.
You can tell WebOS to keep your screen on when plugged in with the following command: luna-send -n 1 palm://com.palm.display/control/setProperty '{"onWhenConnected":true}'
Let's Get Gentoo Running First
I've decided to go ahead and attempt a native stage3 build on the HP TouchPad. I am going to use Gentoo's existing ARMv7 hardfp build for this, so the first step for getting Funtoo building is to set Gentoo up first. Some tips:
- Reboot the system and don't run many apps after rebooting to ensure enough memory is available.
- We can add more swap to the system to provide additional virtual memory for compiling (I will document how to do this later in the doc.)
- We can also use the existing ARMv7 Gentoo hardfp stage3 as our initial chroot environment.
- On top of this, the F4 kernel supports ATA over Ethernet which allows us to remote-mount a fast filesystem over WIFI. This seems to work very well as long as you take necessary steps to prevent the TouchPad or WIFI from sleeping. We'll cover this later in the document.
Now, to create the chroot. Grab this file and store it on /media/internal, the built-in VFAT filesystem:
# cd /media/internal # wget http://gentoo.osuosl.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/stage3-armv7a_hardfp-20110830.tar.bz2
Now, create the chroot filesystem:
# dd if=/dev/zero of=gentoo.img bs=1024 count=12000000
This will create a 12GB loopback filesystem. Make it smaller if you only have a 16GB TouchPad. 5GB should be sufficient. Now, we'll set up the loopback:
# losetup /dev/loop1 /media/internal/gentoo.img # install -d /mnt/gentoo # mkfs.ext3 -N 300000 /dev/loop1 # mount /dev/loop1 /mnt/gentoo # cd /mnt/gentoo # tar xjpvf /media/internal/stage3-armv7a_hardfp-20010830.tar.bz2
OK, we now have the stage3 extracted. Here's how to set up things after every reboot so you can chroot into it:
# cd /mnt/gentoo # mount --bind /proc proc # mount --bind /sys sys # mount --bind /dev dev
Then, you can chroot:
# chroot /mnt/gentoo (chroot) # env-update (chroot) # source /etc/profile
To use Gentoo, you'll first want to grab a Portage tree. This uses a lot of inodes, which is why we needed the -N 300000 option to mkfs.ext3, earlier:
(chroot) # emerge --sync
The stage3 already has git installed, but you may want to emerge a few things, such as vim. Before you do, take advantage of both cores:
(chroot) # echo 'MAKEOPTS="-j2"' >> /etc/make.conf
To improve performance, put something non-intensive on in exhibition mode to keep the screen from going to sleep (recommended: Govnah so you can monitor system utilization.) On the HP TouchPad, when the screen goes to sleep, the TouchPad itself will always try to go to sleep, and exhibition mode will prevent this from happening. Make sure your HP TouchPad is plugged into the charger:
(chroot) # emerge vim
Convert the Gentoo system into a Funtoo system
Building a Funtoo stage3 using Metro can be tricky from a Gentoo environment as Portage (the tree and the package) and the toolchain differ. To avoid running into problems, let's transform Gentoo into Funtoo.
At the time of writing this document, Funtoo's glibc version is older than Gentoo's version and a glibc downgrade is impossible. This is the reason why the Experimental_branch must be used.
(chroot) # cd /usr (chroot) # rm -r portage (chroot) # git clone git://github.com/funtoo/experimental-mini-2011.git (chroot) # mv experimental-mini-2011 portage (chroot) # echo 'ACCEPT_KEYWORDS="~arm"' >> /etc/make.conf (chroot) # emerge -uNDav @world (chroot) # gcc-config -l (chroot) # gcc-config <number_of_the_latest_gcc>t (chroot) # emerge --oneshot libtool
Now that Gentoo has been converted into Funtoo, let's run Metro.
Building a Funtoo stage3 using Metro
Metro requires a stage3 seed to work. As there are no arm seeds for Funtoo, let's use the current system to build a stage4, and use it as a seed. Follow the instructions from Custom_Stage4 and use the result as a seed in the Metro process.
Read the Metro_Quick_Start_Tutorial to install and use Metro.
When running Metro, use the funtoo-experimental target, and the armv7a subarchitecture. Metro may now run without any issue with a little luck. If not, some manual modifications of Metro may be necessary. Find help on the Funtoo Forums or on #funtoo on Freenode.
Going native
The following are notes about the process to get a native Funtoo on the Touchpad. Do not edit... :)
- Get moboot (from CM7 (CyanogenMod 7) is an easy way to get it)
- Get CM7's hp-touchpad-tenderloin kernel from git and build it (see [1])
- Build an initramfs using [2]
- make a uImage out of the initramfs and build a meta-image with the kernel (see link from point 2).
- You may have to change the kernel options a bit, I'm trying to disable the framebuffer/enable output to framebuffer
- You need xf86-video-msm driver (not packaged yet, soon in Flora!) built and a proper xorg.conf. Still working on that
- I can't get the touchscreen working, and this is a real bad issue ;)
- If mesa don't build, use -O1
- spidermonkey needs to be patched. It tries to force software float abi