Rólam Tanulmányok és Oktatás Érdeklődési körök Munkák
|
NOTE: This document is no longer actively developed, since I switched to an Android based device. About this documentThe goal of this is to describe the steps for building and upgrading Linux distribution for Palm LifeDrive PDA. These steps are based on http://www.openembedded.org/index.php/Getting_Started as starting point. Installing required softwaresYou should install into the build environment the softwares mentioned on http://www.openembedded.org/index.php/Required_Software Directory StructureThe next step is completing the same part of the http://www.openembedded.org/index.php/Getting_Started document. NOTE: The same notation will be used for directories as the step uses (namely Obtaining BitBakeI recomend installing BitBake from the svn repository described in Getting Started document. The steps are the followings (included from the document): cd /stuff/ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake Obtaining OpenEmbeddedcd /angstrom-sources git clone git://git.openembedded.org/openembedded cd /stuff git clone /angstrom-sources/openembedded The above commands create two repositories. The first is a mirror from the original repository while the second is mirror of the first one. This is needed because if you want to use a particular commit id, you should do: cd /stuff/openembedded git reset --hard <commitid> This would cause the HEAD relocated on the git repository so you can go back to the original HEAD with: cd /stuff/openembedded git pull The last command would pull from Updating the mirror: cd /angstrom-sources/openembedded git pull If you updated your repository and want to update your working copy, do the following steps: cd /stuff/openembedded git pull TODO: Explore how the git branching system could be used for this task. Creating local configurationcd /stuff mkdir -p build/conf cp openembedded/conf/local.conf.sample build/conf/local.conf Edit your
Setting up build environment variablesThe build process need some environment variables to export. You can set up these every time you want to build. You can also set up your system to export these variables every time you login. For this edit your export PATH=/stuff/bitbake/bin:$PATH # use your bitbake not system wide installed if there is any export BBPATH=/stuff/build:/stuff/openembedded Corrections to the build databaseopie-taskbar-imagesCVS version of this package is selected but it does not compile. PV = "20071011" TODO: Maybe stable 1.2.3 version could be selected with PREFERRED_PROVIDERS. Build the kernel and OPIEcd /stuff/openembedded bitbake virtual/kernel opie-image Go eat a pizza. (This will take long time.) Clean rebuild in a properly set up environment
TODO: bitbake virtual/kernel should be corrected it generates a fully unbootable kernel. Setting up build environment for the kernelcd /stuff/openembedded/tmp/cross/armv5te/bin for prg in gcc ld ar nm objcopy; do ln -s arm-angstrom-linux-gnueabi-$prg arm-linux-$prg done Add the next line to your export PATH=/stuff/openembedded/tmp/cross/arm5vte/bin:$PATH Building the kernelPalm LifeDrive default config works for the first steps. It could bring up the console. It does not boot however but with bitbake virtual/kernel the console is only filled with garbage. There is a bug in the kernel source code version used by the openembedded repository, so you should compile the most up to date kernel from git://git.hackndev.com/hackndev/linux-hnd.git . cd /angstrom-sources git clone git://git.hackndev.com/hackndev/linux-hnd.git TODO: Check if the HEAD of monotone repository uses a good kernel (without battery draining bug). Unpacking initramfs.tar.bz2: su tar -xvvjf /angstrom-sources/initramfs.tar.bz2 -C /stuff Getting the kernel source (from local repository): cd /stuff git clone /angstrom-sources/linux-hnd Updating the kernel source: cd /angstrom-sources/linux-hnd git pull cd /stuff/linux-hnd git pull cd /stuff/linux-hnd make palmld_defconfig make menuconfig In the menu which is bringing up after issuing the
TODO: Check if most up to date kernel contains this bug (PCMCIA). TODO: Check if most up to date kernel contains battery draining if USB support is enabled. After exiting from the menu you should end up with a kernel config ( Start building the kernel. make NOTE: After the kernel is built, you should install your just compiled kernel modules into the image. su -m cd /stuff/linux-hnd modprobe loop rm -rf /tmp/new_modules make INSTALL_MOD_PATH=/tmp/new_modules modules_install rm -f /tmp/new_modules/lib/modules/2.6.21-hnd3/build rm -f /tmp/new_modules/lib/modules/2.6.21-hnd3/source mount -oloop /stuff/openembedded/tmp/deploy/glibc/images/palmld/opie-image-palmld.ext2 /mnt rm -rf /mnt/lib/modules cp -af /tmp/new_modules/lib /mnt rm -rf /tmp/new_modules umount /mnt exit NOTE: I will integrate kernel building process into bitbake package. Making the touchscreen workIn the generated opie image the touchscreen is not working for some reason. You should use this su -m modprobe loop mount -oloop /stuff/org.openembedded.dev/tmp/deploy/glibc/images/palmld/opie-image-palmld.ext2 /mnt tar -xvvjf /angstrom-sources/etc.tar.bz2 -C /mnt umount /mnt exit TODO: Integrate etc.tar.bz2 content to the bitbake files. TODO: Document that initramfs could be added by setting CONFIG_INITRAMFS_SOURCES to the apropriate directory/file. TODO: initramfs should be automatically/automagically be assembled, generate list file for this. Displaying the power state of the deviceBitbake opie-batteryapplet: cd /stuff/org.openembedded.dev bitbake opie-batteryapplet Copy the resulting opie-batteryapplet_1.2.3.ipk to the device and install it from the running OS. TODO: This step and the previous (build & install) should be achived by bitbake opie-image. Under the running OS issue the following command to load battery support: modprobe palm_battery TODO: This should be done automatically by inserting the palm_battery line to the correct file in /etc. TODO: This should be set up automatically by correcting the image which is generated by bitbake opie-image. (After the touchscreen bug is eliminated.) TODO: Update initramfs capability to the one provided by TP2 image. This is build 20080102.This build is the above steps repeated from clean sources. Integrated experiments from build 20071113 and build 20071231. This build results in a fully bootable image. NOTE: With the most up to date kernel, USB module unloaded, palm_battery module loaded and opie-batteryapplet installed it seems that the battery draining problem is gone. Next step is to bring sound device into working state (if TP2 can do it). TODO: Disabling bluetooth results in freeze - probably opie application tries to remove the bluetooth module and causes a kernel crash (need to test on TP2 too). TODO: Opie-batteryapplet says that remaining power is near 50% however palm's own application says it is near 90%. (There could be an error in reading the remaining power from the hardware.) Tested on both 20080102 build and on TP2. TODO: Need to tap twice on Suspend menu to start the suspending of the OS. MTN versions
QA tests
Stay tunned :) cd /stuff/org.openembedded.dev/tmp/work/palmld-angstrom-linux-gnueabi/linux-hackndev-2.6-2.6.21-hnd2-r11/trunk bitbake opie-zsafe |
1.7.5.1