Difference between pages "HP TouchPad" and "Talk:HP TouchPad"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Going native)
 
 
Line 1: Line 1:
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.
+
--[[User:Jeanfrancis|JF]] 19:38, 5 September 2011 (MDT)
 +
Some questions:
 +
* Did you guys have any issue installing WebOS Quick Install? (novacom driver issue?)
 +
* Some ebuilds are on Sunrise (outdated), maybe we should bump them into Funtoo? (I can get this done somewhere this week)
 +
* After installing novacom manually, WebOS Quick Install still doesn't see my TouchPad. Any clue?
  
= Initial Setup with Preware, F4, Xecutah =
+
Edit :
  
{{fancynote|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.
+
* I had to run manually the novacomd from /opt/Palm/novacomd. Preware installed now :)
  
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 <tt>id_dsa.pub</tt> or <tt>id_rsa.pub</tt> public key file to the file <tt>/var/home/root/.ssh/authorized_keys</tt> (ie. rename the file to <tt>authorized_keys</tt>. Use <tt>ifconfig</tt> in xterm to get your TouchPad's IP address, and you should now be able to "ssh" in.
+
--[[User:Jeanfrancis|JF]] 09:23, 8 September 2011 (MDT)
  
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.
+
On my touchpad, there is no /mnt/internal. The vfat filesystem is mounted on /media/internal
  
{{fancynote|You can tell WebOS to keep your screen on when plugged in with the following command: <tt>luna-send -n 1 palm://com.palm.display/control/setProperty '{"onWhenConnected":true}'</tt>}}
+
-- [[User:drobbins|drobbins]]
  
= Let's Get Gentoo Running First =
+
Was a typo, now fixed... :)
  
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:
+
-- [[User:404_Error|404]]
  
# Reboot the system and don't run many apps after rebooting to ensure enough memory is available.
+
Seem we need a functional ARM cross-compilation toolchain, I have some long terms projects running a an ARM processor not counting it would give me extra compilation power to use my x86 desktop for SPARC stages. I can give it a look once my emergencies are cleared.
# 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 <tt>/media/internal</tt>, the built-in VFAT filesystem:
+
-- [[User:drobbins|drobbins]]
  
<pre>
+
We will be using http://landley.net/aboriginal/ which provides a distro-agnostic cross-compile toolchain. This is not absolutely necessary for the TouchPad port though as we have a Gentoo seed stage already, so Metro can build a new stage directly on the TouchPad.
# cd /media/internal
+
# wget http://gentoo.osuosl.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/stage3-armv7a_hardfp-20110830.tar.bz2
+
</pre>
+
  
Now, create the chroot filesystem:
+
--[[User:Jeanfrancis|JF]] 19:01, 8 September 2011 (MDT)
  
<pre>
+
Another small point : I had to remount / read-write in order to create /mnt/gentoo. If you remember having to do so, you should add "mount -o remount,rw /" in the setup of the loopback :)
# dd if=/dev/zero of=gentoo.img bs=1024 count=12000000
+
</pre>
+
  
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:
+
--[[User:Jeanfrancis|JF]] 20:33, 11 September 2011 (MDT)
  
<pre>
+
On my touchpad, the vfat filesystem didn't allow me to create an image of more than 4GB. I decided to restart the Gentoo installation using a "real" ext3 partition following parts of this guide : [[http://pebloy.blogspot.com/2011/09/customize-hp-touchpad.html]]. Note that doing so will require to "reset" the touchpad to defaults (but it will keep your personal files). I created a 12GB ext3 partition, and then reinstalled preware/F4/Xecutah/Govnah/etc
# 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
+
</pre>
+
  
OK, we now have the stage3 extracted. Here's how to set up things after every reboot so you can chroot into it:
+
-- [[User:drobbins|drobbins]]
  
<pre>
+
You can also use ATA over Ethernet to remotely mount a filesystem if you are using the F4 kernel. This way you can have fast remote storage over WIFI. The key here is to optimize WIFI performance and keep the screen on.
# cd /mnt/gentoo
+
# mount --bind /proc proc
+
# mount --bind /sys sys
+
# mount --bind /dev dev
+
</pre>
+
 
+
Then, you can chroot:
+
 
+
<pre>
+
# chroot /mnt/gentoo
+
(chroot) # env-update
+
(chroot) # source /etc/profile
+
</pre>
+
 
+
To use Gentoo, you'll first want to grab a Portage tree. This uses a lot of inodes, which is why we needed the <tt>-N 300000</tt> option to <tt>mkfs.ext3</tt>, earlier:
+
 
+
<pre>
+
(chroot) # emerge --sync
+
</pre>
+
 
+
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:
+
 
+
<pre>
+
(chroot) # echo 'MAKEOPTS="-j2"' >> /etc/make.conf
+
</pre>
+
 
+
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:
+
 
+
<pre>
+
(chroot) # emerge vim
+
</pre>
+
 
+
= 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.
+
 
+
<pre>
+
(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
+
</pre>
+
 
+
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 [http://en.gentoo-wiki.com/wiki/Custom_Stage4 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 [http://forums.funtoo.org 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 [http://forum.xda-developers.com/showthread.php?t=1332629])
+
* Build an initramfs using [https://github.com/slashbeast/better-initramfs]
+
* 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
+
 
+
 
+
[[Category:Featured]]
+
[[Category:HOWTO]]
+

Latest revision as of 05:24, 12 September 2011

--JF 19:38, 5 September 2011 (MDT) Some questions:

  • Did you guys have any issue installing WebOS Quick Install? (novacom driver issue?)
  • Some ebuilds are on Sunrise (outdated), maybe we should bump them into Funtoo? (I can get this done somewhere this week)
  • After installing novacom manually, WebOS Quick Install still doesn't see my TouchPad. Any clue?

Edit :

  • I had to run manually the novacomd from /opt/Palm/novacomd. Preware installed now :)


--JF 09:23, 8 September 2011 (MDT)

On my touchpad, there is no /mnt/internal. The vfat filesystem is mounted on /media/internal

-- drobbins

Was a typo, now fixed... :)

-- 404

Seem we need a functional ARM cross-compilation toolchain, I have some long terms projects running a an ARM processor not counting it would give me extra compilation power to use my x86 desktop for SPARC stages. I can give it a look once my emergencies are cleared.

-- drobbins

We will be using http://landley.net/aboriginal/ which provides a distro-agnostic cross-compile toolchain. This is not absolutely necessary for the TouchPad port though as we have a Gentoo seed stage already, so Metro can build a new stage directly on the TouchPad.

--JF 19:01, 8 September 2011 (MDT)

Another small point : I had to remount / read-write in order to create /mnt/gentoo. If you remember having to do so, you should add "mount -o remount,rw /" in the setup of the loopback :)

--JF 20:33, 11 September 2011 (MDT)

On my touchpad, the vfat filesystem didn't allow me to create an image of more than 4GB. I decided to restart the Gentoo installation using a "real" ext3 partition following parts of this guide : [[1]]. Note that doing so will require to "reset" the touchpad to defaults (but it will keep your personal files). I created a 12GB ext3 partition, and then reinstalled preware/F4/Xecutah/Govnah/etc

-- drobbins

You can also use ATA over Ethernet to remotely mount a filesystem if you are using the F4 kernel. This way you can have fast remote storage over WIFI. The key here is to optimize WIFI performance and keep the screen on.