<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fix.kowalski</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fix.kowalski"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Fix.kowalski"/>
	<updated>2026-04-19T13:39:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=11929</id>
		<title>How To Recover</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=11929"/>
		<updated>2010-10-23T16:06:30Z</updated>

		<summary type="html">&lt;p&gt;Fix.kowalski: /* Pre not booting? webOS Doctor How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pre not booting? webOS Doctor How-To =&lt;br /&gt;
{{tux|Tux_with_Broken_Pre.png|float:right;}}&lt;br /&gt;
Fortunately, Palm has created a tool called webOS Doctor intended for users to easily restore their devices in the event that they cannot boot for one reason or another.&lt;br /&gt;
&lt;br /&gt;
Note: Before Trying the following steps below. Try removing the battery first and reinsert the battery and turn on the device this will determine whether or not you need to perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Note 2: As of WebOS 1.3.1 your USB data (Pictures, Videos, etc.) is no longer deleted during the process.  Older versions of WebOS Doctor WILL DELETE ALL YOUR PERSONAL DATA ON THE DEVICE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Palm webOS Doctor:''' [http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html]&lt;br /&gt;
&lt;br /&gt;
'''All Palm WebOS Doctor Versions:''' [http://www.webos-internals.org/wiki/Webos_Doctor_Versions http://www.webos-internals.org/wiki/Webos_Doctor_Versions]&lt;br /&gt;
&lt;br /&gt;
After the download is complete, launch webOS Doctor:&lt;br /&gt;
&lt;br /&gt;
# Select you language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to you PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
{{tux|Tux_with_Pre_and_Screwdriver.png|float:right;}}&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
''One'' user experience: If none of the above works (that happened to me), retry with the upper volume switch turned to red (mute).&lt;br /&gt;
&lt;br /&gt;
The process usually proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
(If you're on a Mac, you can follow the progress in /var/log/system.log)&lt;br /&gt;
&lt;br /&gt;
# WebOS Doctor begins&lt;br /&gt;
# At 3%, a ramdisk is transferred to the phone, and the phone is rebooted &lt;br /&gt;
# At 4%, the screen changes to the palm logo&lt;br /&gt;
# At 9%, the screen changes to a big arrow pointing down to an integrated circuit&lt;br /&gt;
# Novaterm access is available from 12% onwards&lt;br /&gt;
# The progress bar advances by 2% increments every 20 seconds or so&lt;br /&gt;
# If it gets stuck at 52% for more than 30 seconds, it's not going to progress further and you will need to try again.&lt;br /&gt;
# Around 54% the filesystems are being partitioned&lt;br /&gt;
# Around 64% the modem firmware is being reflashed&lt;br /&gt;
# Around 72% the carrier apps are being installed&lt;br /&gt;
# Around 82% the ROM is being verified&lt;br /&gt;
&lt;br /&gt;
If the process fails at 84% or later, the flash and modem have actually been written, so if you reboot you will get what you were flashing.&lt;br /&gt;
&lt;br /&gt;
== Modifications to the recovery process ==&lt;br /&gt;
&lt;br /&gt;
Between about 18% and 54% complete, you can novaterm into the device while it is being flashed, and modify the filesystem that will be run after the phone reboots (e.g. to touch /var/luna/preferences/ran-first-use).&lt;br /&gt;
&lt;br /&gt;
If you stay in a mounted directory, you can even cause the flashing to abort after the carrier apps are installed and just before the ROM is verified.  This is another point where manual modifications can be made.&lt;br /&gt;
&lt;br /&gt;
After you have made your modifications, unmount any filesystems you have mounted and &amp;quot;tellbootie reboot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can't boot into recovery mode? ==&lt;br /&gt;
&lt;br /&gt;
In the very unlikely event that your Pre will not boot into recovery mode (indicating that your boot loader on the flash disk may be damaged or corrupted) you can try booting bootie into recovery mode over USB instead: [[Last_Resort_Emergency_BootLoader_Recovery]] '''Note that there has only been one incidence of this being required which ultimately was due to hardware failure, we do not recommend that you attempt this unless you have tried all the steps above exactly as described at least 10 times.'''&lt;br /&gt;
&lt;br /&gt;
Short of hardware damage, it should not be possible to &amp;quot;brick&amp;quot; a Pre.&lt;/div&gt;</summary>
		<author><name>Fix.kowalski</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=11471</id>
		<title>WebOS Internals PDK</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=11471"/>
		<updated>2010-09-21T22:25:07Z</updated>

		<summary type="html">&lt;p&gt;Fix.kowalski: /* Prerequisites */ complete the dep on xar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
Palm's binary sdk  the &amp;quot;Plugin Developer Kit&amp;quot; became available to all developers in March 2010.&lt;br /&gt;
&lt;br /&gt;
In addition to the PDK, WebOS Internals has released a full &amp;quot;WIDK&amp;quot; (WebOS Internals Development Kit) for you using Scratchbox2.  &lt;br /&gt;
&lt;br /&gt;
We ''strongly'' urge the community to standardize on this WIDK.   It uses the same underlying technologies, and is entirely open.  &lt;br /&gt;
&lt;br /&gt;
Scratchbox 2 is a cross-compilation engine, it can be used to create a highly flexible SDK.&lt;br /&gt;
&lt;br /&gt;
As installed below, the install process uses a script which extracts the required Palm provided files from a copy of webos doctor, and  downloads from other sources, and builds a complete compilation environment automatically which can compile SDL and openGLES apps for webOS.  &lt;br /&gt;
&lt;br /&gt;
SB2 ''itself'' is totally distribution neutral but the webOS cross-compile environment is designed and tested on Ubuntu 9.10 32 bit. (At least one user in #webos-internals reports complete success running the cross compile environment in Ubuntu 9.10 64 bit after installing curl via apt-get.) See [[WebOS_Internals_PDK_on_Mandriva]] if you want to run it on Mandriva and are willing to support that yourself and not ask WebOS Internals any questions about it.  Otherwise, use the recommended OS.&lt;br /&gt;
&lt;br /&gt;
The webOS Internals team ''strongly suggest'' apt-get install into that environment only for this purpose. The same installation of Sun Virtualbox which hosts the Palm SDK emulator can host an Ubuntu 9.10 server with very little effort. &lt;br /&gt;
&lt;br /&gt;
Developers wanting to work in an open environment 'without' SB2 can consider using the [[PuffTheMagic NDK]].&lt;br /&gt;
&lt;br /&gt;
==SB2 Homepage==&lt;br /&gt;
[http://www.freedesktop.org/wiki/Software/sbox2 http://www.freedesktop.org/wiki/Software/sbox2]pdk&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
Scratchbox 2 is distributed under LGPL version 2.1, portions are under GPL version 2. Some minor stuff is under MIT style license.&lt;br /&gt;
&lt;br /&gt;
== Installation on Ubuntu for WebOS PDK cross compiling ==&lt;br /&gt;
&lt;br /&gt;
If setting up in a Virtual Box instance, it is recommended that you first complete the openSSH config as described in the VirtualBox tips for Windows users to the right.  This is helpful even with a Linux host, as SSH into the PDK Virtual Machine will allow copy and paste of the commands listed below and reduce errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; clear:right; width:30%&amp;quot;&amp;gt;{{Ubuntu_VM_notes_for_Windows_users}}&amp;lt;/div&amp;gt;&lt;br /&gt;
===Toolchain===&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
Your Ubuntu installation will need the following installed.  If you do not have them, run the command after the package name. You can test if they are found by just typing the command name.  If it says command not found, you need to install it.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|'''git''' || sudo apt-get install git-core&lt;br /&gt;
|-&lt;br /&gt;
|'''gcc''' || sudo apt-get install build-essential&lt;br /&gt;
|-&lt;br /&gt;
|'''curl''' || sudo apt-get install curl&lt;br /&gt;
|-&lt;br /&gt;
|'''unzip'''|| sudo apt-get install unzip&lt;br /&gt;
|-&lt;br /&gt;
|'''autoconf'''|| sudo apt-get install autoconf&lt;br /&gt;
|-&lt;br /&gt;
|'''subversion'''|| sudo apt-get install subversion&lt;br /&gt;
|-&lt;br /&gt;
|'''libtool'''|| sudo apt-get install libtool&lt;br /&gt;
|-&lt;br /&gt;
|'''wget'''|| sudo apt-get install wget&lt;br /&gt;
|-&lt;br /&gt;
|'''pkg-config'''|| sudo apt-get install pkg-config&lt;br /&gt;
|-&lt;br /&gt;
|'''gettext'''|| sudo apt-get install gettext&lt;br /&gt;
|-&lt;br /&gt;
|'''fakeroot'''|| sudo apt-get install fakeroot&lt;br /&gt;
|-&lt;br /&gt;
|'''javac'''|| sudo apt-get install sun-java6-jdk&lt;br /&gt;
|-&lt;br /&gt;
|'''ant'''|| sudo apt-get install ant&lt;br /&gt;
|-&lt;br /&gt;
|'''xsltproc'''|| sudo apt-get install xsltproc&lt;br /&gt;
|-&lt;br /&gt;
|'''intltool'''|| sudo apt-get install intltool&lt;br /&gt;
|-&lt;br /&gt;
|'''mkimage'''|| sudo apt-get install uboot-mkimage&lt;br /&gt;
|-&lt;br /&gt;
|'''lsdiff'''|| sudo apt-get install patchutils&lt;br /&gt;
|-&lt;br /&gt;
|'''flex'''|| sudo apt-get install flex&lt;br /&gt;
|-&lt;br /&gt;
|'''bison'''|| sudo apt-get install bison&lt;br /&gt;
|-&lt;br /&gt;
|'''libssl-dev'''|| sudo apt-get install libssl-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''libz-dev'''|| sudo apt-get install libz-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''libbz2-dev'''|| sudo apt-get install libbz2-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''xar'''|| sudo apt-get install xar&lt;br /&gt;
|-&lt;br /&gt;
|'''help2man'''|| sudo apt-get install help2man&lt;br /&gt;
|-&lt;br /&gt;
|'''texinfo'''|| sudo apt-get install texinfo&lt;br /&gt;
|-&lt;br /&gt;
|'''xar'''|| sudo apt-get install xar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* it has been reported that sun-java6-jdk isn't necessary&lt;br /&gt;
&lt;br /&gt;
If you're uncertain at all, just cut and paste the following.  If they are already installed, they'll be skipped.  &lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install git-core build-essential curl unzip autoconf subversion libtool wget pkg-config gettext fakeroot ant xsltproc intltool uboot-mkimage patchutils flex bison libssl-dev libz-dev libbz2-dev xar help2man texinfo xar&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are a beginner with Ubuntu Linux Distribution, you should update all the packages on your system to avoid problems when you will compile.&amp;lt;BR&amp;gt;&lt;br /&gt;
Use these 2 command line :&amp;lt;BR&amp;gt;&lt;br /&gt;
Update repositories   :&lt;br /&gt;
 sudo aptitude update&lt;br /&gt;
And next, update the packages :&lt;br /&gt;
 sudo aptitude safe-upgrade&lt;br /&gt;
&lt;br /&gt;
If you're on a 64-bit system, you will also need to install the ia32-libs package.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The ''make toolchain'' command and later steps will download approximately a half-gig of tools and sources from various locations.  Do not start this if you do not have time for a large download.  Additionally, if you already have downloaded a copy of the correct version of the WebOS doctor, you can reduce the download time by copying the doctor file into cross-compile/doctors/ with the correct name.  This will cause the appropriate command to skip that download.  Note that codesourcery rate limts downloads and at a minimum this process will take 10 to 15 minutes irrespective of your connection speed. &lt;br /&gt;
&lt;br /&gt;
====Start setup====&lt;br /&gt;
Create a preware folder, copy the cross-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to begin the set up of the compilation toolchain. &lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /srv/preware&lt;br /&gt;
 cd /srv/preware&lt;br /&gt;
 sudo chmod 777 .&lt;br /&gt;
 git clone git://git.webos-internals.org/preware/cross-compile.git&lt;br /&gt;
 cd cross-compile&lt;br /&gt;
 make toolchain&lt;br /&gt;
&lt;br /&gt;
====Fix mmap errors====&lt;br /&gt;
The following commands appear redundant.  They are not.  The install this fixes your mmap config to fix an mmap: permission denied error, but we don't need the package itself.&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install qemu-arm-static&lt;br /&gt;
 sudo apt-get remove qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;span style=&amp;quot;font-size:150%&amp;quot;&amp;gt;OR&amp;lt;/span&amp;gt; As a workaround, if this package is not available, &lt;br /&gt;
::: the following commands can be executed in a root shell (sudo -s) to fix the mmap configuration to enable qemu-arm to work.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;vm.mmap_min_addr = 4096&amp;quot; &amp;gt; /etc/sysctl.d/mmap_min_addr.conf&lt;br /&gt;
 /etc/init.d/procps restart&lt;br /&gt;
&lt;br /&gt;
(note that the value should not be &amp;quot;0&amp;quot;. 4096 is chosen to avoid null pointer attacks.)&lt;br /&gt;
&lt;br /&gt;
====Verify sh shell====&lt;br /&gt;
On Ubuntu /bin/sh is a symbolic link to dash.  This will cause errors with the make stage command below, as some of the scripts assume bash.  Run the following command to see what shell sh is linked to.&lt;br /&gt;
&lt;br /&gt;
  ls -l /bin/sh&lt;br /&gt;
&lt;br /&gt;
If the result is a link to dash:&lt;br /&gt;
&lt;br /&gt;
  lrwxrwxrwx 1 root root 4 2010-07-06 23:55 /bin/sh -&amp;gt; dash&lt;br /&gt;
&lt;br /&gt;
You will want to correct it with the following:&lt;br /&gt;
&lt;br /&gt;
  sudo dpkg-reconfigure dash&lt;br /&gt;
&lt;br /&gt;
You will be asked if you want to &amp;quot;Install dash as /bin/sh?&amp;quot;.  Select &amp;quot;&amp;lt;No&amp;gt;&amp;quot; and bash will be used.  Rerun the command to verify:&lt;br /&gt;
&lt;br /&gt;
  ls -l /bin/sh&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
  lrwxrwxrwx 1 root root 4 2010-07-09 21:12 /bin/sh -&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
====Setup Scratchbox====&lt;br /&gt;
Now, use apt-get to setup scratchbox...&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install scratchbox2 qemu-kvm-extras&lt;br /&gt;
&lt;br /&gt;
...and set it up for compiling for webOS. &lt;br /&gt;
&lt;br /&gt;
 cd /srv/preware/cross-compile/toolchain/arm-2007q3/arm-none-linux-gnueabi/libc&lt;br /&gt;
 PATH=/srv/preware/cross-compile/toolchain/arm-2007q3/bin:${PATH} sb2-init -c /usr/bin/qemu-arm armv7 arm-none-linux-gnueabi-gcc&lt;br /&gt;
 cd /srv/preware/cross-compile&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 make stage&lt;br /&gt;
&lt;br /&gt;
Once this setup is complete, compiling sdl apps for webOS is very simple.&lt;br /&gt;
&lt;br /&gt;
==Errors during make stage (Feb 27 8:45 UTC)==&lt;br /&gt;
Confirmed by 2 people:&lt;br /&gt;
===Ecore===&lt;br /&gt;
*TRUE and FALSE are not defined&lt;br /&gt;
&lt;br /&gt;
Manually add the definition:&lt;br /&gt;
&lt;br /&gt;
 #ifndef TRUE&lt;br /&gt;
 # define TRUE 1&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
 #ifndef FALSE&lt;br /&gt;
 # define FALSE 0&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===/bin/sh errors===&lt;br /&gt;
If you are getting a &amp;quot;bad fd number&amp;quot; or other /bin/sh error, make sure your /bin/sh points to bash, not another shell (such as dash.)&lt;br /&gt;
&lt;br /&gt;
Go back through the Verify sh shell section above to correct.&lt;br /&gt;
&lt;br /&gt;
==Sample build of [[Application:Doom]]==&lt;br /&gt;
&lt;br /&gt;
Now, go to [[Building DOOM with scratchbox2]] and follow the simple directions.&lt;br /&gt;
&lt;br /&gt;
==In Process Enhancements==&lt;br /&gt;
[[Extracting the PDK on Linux]]&lt;/div&gt;</summary>
		<author><name>Fix.kowalski</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=11470</id>
		<title>WebOS Internals PDK</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WebOS_Internals_PDK&amp;diff=11470"/>
		<updated>2010-09-21T21:50:00Z</updated>

		<summary type="html">&lt;p&gt;Fix.kowalski: /* Prerequisites */ add xar as a build dependecy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: SDL]]&lt;br /&gt;
Palm's binary sdk  the &amp;quot;Plugin Developer Kit&amp;quot; became available to all developers in March 2010.&lt;br /&gt;
&lt;br /&gt;
In addition to the PDK, WebOS Internals has released a full &amp;quot;WIDK&amp;quot; (WebOS Internals Development Kit) for you using Scratchbox2.  &lt;br /&gt;
&lt;br /&gt;
We ''strongly'' urge the community to standardize on this WIDK.   It uses the same underlying technologies, and is entirely open.  &lt;br /&gt;
&lt;br /&gt;
Scratchbox 2 is a cross-compilation engine, it can be used to create a highly flexible SDK.&lt;br /&gt;
&lt;br /&gt;
As installed below, the install process uses a script which extracts the required Palm provided files from a copy of webos doctor, and  downloads from other sources, and builds a complete compilation environment automatically which can compile SDL and openGLES apps for webOS.  &lt;br /&gt;
&lt;br /&gt;
SB2 ''itself'' is totally distribution neutral but the webOS cross-compile environment is designed and tested on Ubuntu 9.10 32 bit. (At least one user in #webos-internals reports complete success running the cross compile environment in Ubuntu 9.10 64 bit after installing curl via apt-get.) See [[WebOS_Internals_PDK_on_Mandriva]] if you want to run it on Mandriva and are willing to support that yourself and not ask WebOS Internals any questions about it.  Otherwise, use the recommended OS.&lt;br /&gt;
&lt;br /&gt;
The webOS Internals team ''strongly suggest'' apt-get install into that environment only for this purpose. The same installation of Sun Virtualbox which hosts the Palm SDK emulator can host an Ubuntu 9.10 server with very little effort. &lt;br /&gt;
&lt;br /&gt;
Developers wanting to work in an open environment 'without' SB2 can consider using the [[PuffTheMagic NDK]].&lt;br /&gt;
&lt;br /&gt;
==SB2 Homepage==&lt;br /&gt;
[http://www.freedesktop.org/wiki/Software/sbox2 http://www.freedesktop.org/wiki/Software/sbox2]pdk&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
Scratchbox 2 is distributed under LGPL version 2.1, portions are under GPL version 2. Some minor stuff is under MIT style license.&lt;br /&gt;
&lt;br /&gt;
== Installation on Ubuntu for WebOS PDK cross compiling ==&lt;br /&gt;
&lt;br /&gt;
If setting up in a Virtual Box instance, it is recommended that you first complete the openSSH config as described in the VirtualBox tips for Windows users to the right.  This is helpful even with a Linux host, as SSH into the PDK Virtual Machine will allow copy and paste of the commands listed below and reduce errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; clear:right; width:30%&amp;quot;&amp;gt;{{Ubuntu_VM_notes_for_Windows_users}}&amp;lt;/div&amp;gt;&lt;br /&gt;
===Toolchain===&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
Your Ubuntu installation will need the following installed.  If you do not have them, run the command after the package name. You can test if they are found by just typing the command name.  If it says command not found, you need to install it.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|'''git''' || sudo apt-get install git-core&lt;br /&gt;
|-&lt;br /&gt;
|'''gcc''' || sudo apt-get install build-essential&lt;br /&gt;
|-&lt;br /&gt;
|'''curl''' || sudo apt-get install curl&lt;br /&gt;
|-&lt;br /&gt;
|'''unzip'''|| sudo apt-get install unzip&lt;br /&gt;
|-&lt;br /&gt;
|'''autoconf'''|| sudo apt-get install autoconf&lt;br /&gt;
|-&lt;br /&gt;
|'''subversion'''|| sudo apt-get install subversion&lt;br /&gt;
|-&lt;br /&gt;
|'''libtool'''|| sudo apt-get install libtool&lt;br /&gt;
|-&lt;br /&gt;
|'''wget'''|| sudo apt-get install wget&lt;br /&gt;
|-&lt;br /&gt;
|'''pkg-config'''|| sudo apt-get install pkg-config&lt;br /&gt;
|-&lt;br /&gt;
|'''gettext'''|| sudo apt-get install gettext&lt;br /&gt;
|-&lt;br /&gt;
|'''fakeroot'''|| sudo apt-get install fakeroot&lt;br /&gt;
|-&lt;br /&gt;
|'''javac'''|| sudo apt-get install sun-java6-jdk&lt;br /&gt;
|-&lt;br /&gt;
|'''ant'''|| sudo apt-get install ant&lt;br /&gt;
|-&lt;br /&gt;
|'''xsltproc'''|| sudo apt-get install xsltproc&lt;br /&gt;
|-&lt;br /&gt;
|'''intltool'''|| sudo apt-get install intltool&lt;br /&gt;
|-&lt;br /&gt;
|'''mkimage'''|| sudo apt-get install uboot-mkimage&lt;br /&gt;
|-&lt;br /&gt;
|'''lsdiff'''|| sudo apt-get install patchutils&lt;br /&gt;
|-&lt;br /&gt;
|'''flex'''|| sudo apt-get install flex&lt;br /&gt;
|-&lt;br /&gt;
|'''bison'''|| sudo apt-get install bison&lt;br /&gt;
|-&lt;br /&gt;
|'''libssl-dev'''|| sudo apt-get install libssl-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''libz-dev'''|| sudo apt-get install libz-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''libbz2-dev'''|| sudo apt-get install libbz2-dev&lt;br /&gt;
|-&lt;br /&gt;
|'''xar'''|| sudo apt-get install xar&lt;br /&gt;
|-&lt;br /&gt;
|'''help2man'''|| sudo apt-get install help2man&lt;br /&gt;
|-&lt;br /&gt;
|'''texinfo'''|| sudo apt-get install texinfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* it has been reported that sun-java6-jdk isn't necessary&lt;br /&gt;
&lt;br /&gt;
If you're uncertain at all, just cut and paste the following.  If they are already installed, they'll be skipped.  &lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install git-core build-essential curl unzip autoconf subversion libtool wget pkg-config gettext fakeroot ant xsltproc intltool uboot-mkimage patchutils flex bison libssl-dev libz-dev libbz2-dev xar help2man texinfo xar&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are a beginner with Ubuntu Linux Distribution, you should update all the packages on your system to avoid problems when you will compile.&amp;lt;BR&amp;gt;&lt;br /&gt;
Use these 2 command line :&amp;lt;BR&amp;gt;&lt;br /&gt;
Update repositories   :&lt;br /&gt;
 sudo aptitude update&lt;br /&gt;
And next, update the packages :&lt;br /&gt;
 sudo aptitude safe-upgrade&lt;br /&gt;
&lt;br /&gt;
If you're on a 64-bit system, you will also need to install the ia32-libs package.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The ''make toolchain'' command and later steps will download approximately a half-gig of tools and sources from various locations.  Do not start this if you do not have time for a large download.  Additionally, if you already have downloaded a copy of the correct version of the WebOS doctor, you can reduce the download time by copying the doctor file into cross-compile/doctors/ with the correct name.  This will cause the appropriate command to skip that download.  Note that codesourcery rate limts downloads and at a minimum this process will take 10 to 15 minutes irrespective of your connection speed. &lt;br /&gt;
&lt;br /&gt;
====Start setup====&lt;br /&gt;
Create a preware folder, copy the cross-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to begin the set up of the compilation toolchain. &lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /srv/preware&lt;br /&gt;
 cd /srv/preware&lt;br /&gt;
 sudo chmod 777 .&lt;br /&gt;
 git clone git://git.webos-internals.org/preware/cross-compile.git&lt;br /&gt;
 cd cross-compile&lt;br /&gt;
 make toolchain&lt;br /&gt;
&lt;br /&gt;
====Fix mmap errors====&lt;br /&gt;
The following commands appear redundant.  They are not.  The install this fixes your mmap config to fix an mmap: permission denied error, but we don't need the package itself.&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install qemu-arm-static&lt;br /&gt;
 sudo apt-get remove qemu-arm-static&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;span style=&amp;quot;font-size:150%&amp;quot;&amp;gt;OR&amp;lt;/span&amp;gt; As a workaround, if this package is not available, &lt;br /&gt;
::: the following commands can be executed in a root shell (sudo -s) to fix the mmap configuration to enable qemu-arm to work.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;vm.mmap_min_addr = 4096&amp;quot; &amp;gt; /etc/sysctl.d/mmap_min_addr.conf&lt;br /&gt;
 /etc/init.d/procps restart&lt;br /&gt;
&lt;br /&gt;
(note that the value should not be &amp;quot;0&amp;quot;. 4096 is chosen to avoid null pointer attacks.)&lt;br /&gt;
&lt;br /&gt;
====Verify sh shell====&lt;br /&gt;
On Ubuntu /bin/sh is a symbolic link to dash.  This will cause errors with the make stage command below, as some of the scripts assume bash.  Run the following command to see what shell sh is linked to.&lt;br /&gt;
&lt;br /&gt;
  ls -l /bin/sh&lt;br /&gt;
&lt;br /&gt;
If the result is a link to dash:&lt;br /&gt;
&lt;br /&gt;
  lrwxrwxrwx 1 root root 4 2010-07-06 23:55 /bin/sh -&amp;gt; dash&lt;br /&gt;
&lt;br /&gt;
You will want to correct it with the following:&lt;br /&gt;
&lt;br /&gt;
  sudo dpkg-reconfigure dash&lt;br /&gt;
&lt;br /&gt;
You will be asked if you want to &amp;quot;Install dash as /bin/sh?&amp;quot;.  Select &amp;quot;&amp;lt;No&amp;gt;&amp;quot; and bash will be used.  Rerun the command to verify:&lt;br /&gt;
&lt;br /&gt;
  ls -l /bin/sh&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
  lrwxrwxrwx 1 root root 4 2010-07-09 21:12 /bin/sh -&amp;gt; bash&lt;br /&gt;
&lt;br /&gt;
====Setup Scratchbox====&lt;br /&gt;
Now, use apt-get to setup scratchbox...&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install scratchbox2 qemu-kvm-extras&lt;br /&gt;
&lt;br /&gt;
...and set it up for compiling for webOS. &lt;br /&gt;
&lt;br /&gt;
 cd /srv/preware/cross-compile/toolchain/arm-2007q3/arm-none-linux-gnueabi/libc&lt;br /&gt;
 PATH=/srv/preware/cross-compile/toolchain/arm-2007q3/bin:${PATH} sb2-init -c /usr/bin/qemu-arm armv7 arm-none-linux-gnueabi-gcc&lt;br /&gt;
 cd /srv/preware/cross-compile&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 make stage&lt;br /&gt;
&lt;br /&gt;
Once this setup is complete, compiling sdl apps for webOS is very simple.&lt;br /&gt;
&lt;br /&gt;
==Errors during make stage (Feb 27 8:45 UTC)==&lt;br /&gt;
Confirmed by 2 people:&lt;br /&gt;
===Ecore===&lt;br /&gt;
*TRUE and FALSE are not defined&lt;br /&gt;
&lt;br /&gt;
Manually add the definition:&lt;br /&gt;
&lt;br /&gt;
 #ifndef TRUE&lt;br /&gt;
 # define TRUE 1&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
 #ifndef FALSE&lt;br /&gt;
 # define FALSE 0&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===/bin/sh errors===&lt;br /&gt;
If you are getting a &amp;quot;bad fd number&amp;quot; or other /bin/sh error, make sure your /bin/sh points to bash, not another shell (such as dash.)&lt;br /&gt;
&lt;br /&gt;
Go back through the Verify sh shell section above to correct.&lt;br /&gt;
&lt;br /&gt;
==Sample build of [[Application:Doom]]==&lt;br /&gt;
&lt;br /&gt;
Now, go to [[Building DOOM with scratchbox2]] and follow the simple directions.&lt;br /&gt;
&lt;br /&gt;
==In Process Enhancements==&lt;br /&gt;
[[Extracting the PDK on Linux]]&lt;/div&gt;</summary>
		<author><name>Fix.kowalski</name></author>
	</entry>
</feed>