Difference between revisions of "WOCE Build Instructions"

From WebOS-Ports
Jump to navigation Jump to search
(Created page with "==Installing Ubuntu== You can download VirtualBox here : https://www.virtualbox.org/wiki/Downloads You can download ISO files to burn Ubuntu CD or DVD here : http://www.ubuntu.c...")
 
 
(57 intermediate revisions by 10 users not shown)
Line 1: Line 1:
==Installing Ubuntu==
+
==Supported Platforms==
  
You can download VirtualBox here : https://www.virtualbox.org/wiki/Downloads
+
Currently the only supported platform is Ubuntu 12.04. We have tested and confirmed that x32 and <strike>x64</strike> Ubuntu Desktop and Server successfully build WOCE. Other platforms may work but are not supported.
You can download ISO files to burn Ubuntu CD or DVD here : http://www.ubuntu.com/download/ubuntu/download
 
but if you want to spend a litle time for installing Ubuntu in VirtualBox, then use Ubunbu image available here : http://virtualboxes.org/images/ubuntu/
 
After installing your ubuntu image, don't forget to use bridge network configuration in Virtualbox. Then in the Ubuntu console, type  :
 
  
sudo apt-get install telnet ssh virtualbox-ose
+
Older versions of Ubuntu may also work, it's been tested successfully on Ubuntu 10.10. It's also very likely that you'll have success with Debian or Debian-based distributions.
sudo apt-get update
 
sudo apt-get upgrade
 
  
In the Ubuntu desktop menu, go in System -> Preferences -> Keyboard -> Layouts tab to change the keyboard type. Then next reboot your ubuntu.
 
  
==Installation on Ubuntu==
+
<span style="color:red"><b> '''We recommend you follow the instructions to install [[WOCE Build Environment]]. continue at your own risk!''' </b></span>
 +
<span style="color:red"><b> '''USE 32-bit.''' </b></span>
  
===Prerequisites===
+
 
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.
+
==Prerequisites on Debian-based systems==
 +
Your Debian/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.
  
 
{| border="1"
 
{| border="1"
 
|+  
 
|+  
|'''git''' || sudo apt-get install git-core
+
|'''git''' || <code>sudo apt-get install git</code>
 
|-
 
|-
|'''gcc''' || sudo apt-get install build-essential
+
|'''gcc''' || <code>sudo apt-get install build-essential</code>
 
|-
 
|-
|'''curl''' || sudo apt-get install curl
+
|'''python''' || <code>sudo apt-get install python</code>
 
|-
 
|-
|'''unzip'''|| sudo apt-get install unzip
+
|'''curl''' || <code>sudo apt-get install curl</code>
 
|-
 
|-
|'''7zip *'''|| sudo apt-get install p7zip-full
+
|'''unzip''' || <code>sudo apt-get install unzip</code>
|-
+
|}
|'''autoconf'''|| sudo apt-get install autoconf
+
 
|-
+
If you're uncertain at all, just cut and paste the following. If some of these packages are already installed and up-to-date, they'll be skipped.
|'''subversion'''|| sudo apt-get install subversion
+
 
|-
+
sudo apt-get install git build-essential python curl unzip
|'''libtool'''|| sudo apt-get install libtool
+
 
|-
+
'''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.
|'''wget'''|| sudo apt-get install wget
+
 
|-
+
'''Note:''' If you are using x64 ubuntu you also need to install the following package
|'''pkg-config'''|| sudo apt-get install pkg-config
+
 
|-
+
{| border="1"
|'''gettext'''|| sudo apt-get install gettext
+
|+
|-
+
|'''ia32-libs and g++-multilib''' || <code>sudo apt-get install ia32-libs g++-multilib</code>
|'''fakeroot'''|| sudo apt-get install fakeroot
 
|-
 
|'''javac *'''|| sudo apt-get install sun-java6-jdk (if this command line does not work, then do :  sudo add-apt-repository ppa:ferramroberto/java; sudo apt-get update; sudo apt-get install sun-java6-jdk )
 
|-
 
|'''ant'''|| sudo apt-get install ant
 
|-
 
|'''cmake'''|| sudo apt-get install cmake
 
|-
 
|'''xsltproc'''|| sudo apt-get install xsltproc
 
|-
 
|'''intltool'''|| sudo apt-get install intltool
 
|-
 
|'''mkimage'''|| sudo apt-get install uboot-mkimage
 
|-
 
|'''lsdiff'''|| sudo apt-get install patchutils
 
|-
 
|'''flex'''|| sudo apt-get install flex
 
|-
 
|'''bison'''|| sudo apt-get install bison
 
|-
 
|'''libssl-dev'''|| sudo apt-get install libssl-dev
 
|-
 
|'''zlib1g-dev'''|| sudo apt-get install zlib1g-dev
 
|-
 
|'''libbz2-dev'''|| sudo apt-get install libbz2-dev
 
|-
 
|'''xar *'''|| sudo apt-get install xar
 
|-
 
|'''help2man'''|| sudo apt-get install help2man
 
|-
 
|'''texinfo'''|| sudo apt-get install texinfo
 
|-
 
|'''automake 1.10'''|| sudo apt-get install automake1.10
 
|-
 
|'''autopoint'''|| sudo apt-get install autopoint
 
 
|-
 
|-
|'''xutils-dev'''|| sudo apt-get install xutils-dev
 
 
|}
 
|}
  
* 7-Zip version 4.59 or greater is needed
+
==Start setup==
* it has been reported that sun-java6-jdk isn't necessary
+
 
* On Ubuntu 11.04 xar might not install using <code>sudo apt-get install xar</code> See Note 2 Below
+
*Create a WOCE directory, we recommend you place it in your home directory.
 +
*Clone down the woce-build repo from github
 +
git clone <nowiki>git://www.github.com/woce/woce-build</nowiki>
 +
*Start the build. This is as simple as cd'ing into the woce-build directory and running '''make''' or if you have multiple cores '''make -j<number of cores here>'''
 +
*When the build finishes the binaries will be under the packages folder in their appropriate directories (e.g. LunaSysMgr in <code>./packages/sysmgr/luna-sysmgr/build/woce/armv7-stage/release-topaz/LunaSysMgr</code>)
 +
 
 +
==Installing the Binaries==
 +
 
 +
*Install the [https://developer.palm.com/content/resources/develop/sdk_pdk_download.html#linux  SDK/PDK]
 +
*Enable 'Developer Mode' on your TouchPad ([https://developer.palm.com/content/api/dev-guide/tools/enabling-developer-mode.html How To Enable Developer Mode])
 +
*Connect your TouchPad via USB to your (Linux) computer
 +
*From your TouchPad, when the connection is detected, just tap 'Close' in the notification window. 
 +
 
 +
From your (Linux) computer, execute the following commands - take note that there is an assumption of where the new LunaSysMgr is at:
 +
 
 +
novacom run -- file:///sbin/stop LunaSysMgr
 +
novacom run file://bin/mount -- -o remount,rw /
 +
novacom put file:///usr/bin/LunaSysMgr < ./packages/sysmgr/luna-sysmgr/build/woce/armv7-stage/release-topaz/LunaSysMgr
 +
novacom run file://bin/mount -- -o remount,ro /
 +
novacom run -- file:///sbin/reboot
 +
 
 +
Your device will reboot in to the new LunaSysMgr
 +
 
 +
==Done!==
 +
'''You're done!''' Your very own LunaSysMgr should now start on your TouchPad.
 +
 
 +
Don't forget to join the IRC channel [irc://irc.freenode.net/webos-ports #webos-ports on Freenode] and report any issues to [http://issues.webos-ports.org/ WebOS Port's bugtracker]. Oh, and contribute your code changes!
 +
 
 +
==Packaging==
 +
 
 +
'''Beware: Dragons Ahead. These instructions will probably *not* be in a functional state when you try them.'''
 +
 
 +
First, you need a custom version of woce-build. For now lets use ShiftyAxel's woce-build.
 +
 
 +
<pre>git clone git://github.com/ShiftyAxel/woce-build.git
 +
cd woce-build
 +
git pull origin alpha
 +
</pre>
  
If you're uncertain at all, and you're using Ubuntu 11.04, just cut and paste the following.  If they are already installed, they'll be skipped. xar is not included in the code below.
+
now that you have the packaging repo, we need to setup the custom target to get full woce with patches building.
  
sudo apt-get install git-core build-essential curl unzip p7zip-full autoconf subversion libtool wget pkg-config gettext fakeroot ant xsltproc intltool uboot-mkimage patchutils flex bison libssl-dev zlib1g-dev libbz2-dev help2man texinfo automake1.10 autopoint xutils-dev cmake
+
<pre>cd ~/
 +
git clone git://github.com/ShiftyAxel/LunaSysMgr.git
 +
cd LunaSysMgr
 +
git pull origin alpha-testing
 +
cd ''wherever you put your woce-build''
 +
cd config
 +
edit the custom.mk and remove the 2 warning lines.
 +
</pre>
  
'''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.
+
Trigger the main build.
 +
 
 +
<pre>cd ..
 +
make CONFIG=custom</pre>
  
'''Note 2:''' If <code>xar</code> cannot be installed with <code>sudo apt-get install xar</code>, then you have to download two <code>.deb</code>-files manually and install them (in the order they are listed):
+
Trigger the packaging
* If you're using Ubuntu 11.04:
 
# [http://packages.ubuntu.com/hardy/libxar1 libxar1]
 
# [http://packages.ubuntu.com/hardy/xar xar]
 
* If you're using Debian 6.0.2 (Squeeze):
 
# [http://packages.debian.org/lenny/libxar1 libxar1]
 
# [http://packages.debian.org/lenny/xar xar]
 
  
If you have not xar packages in your repo, then find the files in the previous links and next install manually xar files :
+
<pre>cd packages/sysmgr/luna-sysmgr
sudo dpkg -i libxar1_1.5.1-1_i386.deb xar_1.5.1-1_i386.deb
+
make CONFIG=custom; make CONFIG=custom package
 +
</pre>
  
After that execute the above command again.
+
Take the package that just was generated and install it with preware.  
  
Use these 2 command line :<BR>
+
'''IMPORTANT: Do not restart your device at this point! Perform a luna restart.'''
Update repositories  :
 
sudo aptitude update (if it doesn't work use : sudo apt-get update )
 
And next, update the packages :
 
sudo aptitude safe-upgrade (if it doesn't work use : sudo apt-get upgrade )
 
  
If you're on a 64-bit system, you will also need to install the ia32-libs package.
+
Profit?
  
'''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.
+
==Developer Extras==
  
====Start setup====
+
* Follow the instructions above to ensure you have the needed software and that the build works for you as-is.
 +
* Clone a copy of LunaSysMgr somewhere for your development pleasure
 +
* Edit config/custom.mk:
 +
** Remove the error and warning lines as indicated
 +
** Change LUNASYSMGR_URL to point to your LunaSysMgr source tree
 +
* run 'make custom' ('make custom -j8' or similar) to build LunaSysMgr from your source tree.  If you change a source file, another 'make custom' will rebuild only what's needed.
 +
* Test your new feature(s) and submit pull requests to woce/LunaSysMgr! :)

Latest revision as of 05:49, 9 August 2013

Supported Platforms

Currently the only supported platform is Ubuntu 12.04. We have tested and confirmed that x32 and x64 Ubuntu Desktop and Server successfully build WOCE. Other platforms may work but are not supported.

Older versions of Ubuntu may also work, it's been tested successfully on Ubuntu 10.10. It's also very likely that you'll have success with Debian or Debian-based distributions.


We recommend you follow the instructions to install WOCE Build Environment. continue at your own risk! USE 32-bit.


Prerequisites on Debian-based systems

Your Debian/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.

git sudo apt-get install git
gcc sudo apt-get install build-essential
python sudo apt-get install python
curl sudo apt-get install curl
unzip sudo apt-get install unzip

If you're uncertain at all, just cut and paste the following. If some of these packages are already installed and up-to-date, they'll be skipped.

sudo apt-get install git build-essential python curl unzip

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.

Note: If you are using x64 ubuntu you also need to install the following package

ia32-libs and g++-multilib sudo apt-get install ia32-libs g++-multilib

Start setup

  • Create a WOCE directory, we recommend you place it in your home directory.
  • Clone down the woce-build repo from github
git clone git://www.github.com/woce/woce-build
  • Start the build. This is as simple as cd'ing into the woce-build directory and running make or if you have multiple cores make -j<number of cores here>
  • When the build finishes the binaries will be under the packages folder in their appropriate directories (e.g. LunaSysMgr in ./packages/sysmgr/luna-sysmgr/build/woce/armv7-stage/release-topaz/LunaSysMgr)

Installing the Binaries

  • Install the SDK/PDK
  • Enable 'Developer Mode' on your TouchPad (How To Enable Developer Mode)
  • Connect your TouchPad via USB to your (Linux) computer
  • From your TouchPad, when the connection is detected, just tap 'Close' in the notification window.

From your (Linux) computer, execute the following commands - take note that there is an assumption of where the new LunaSysMgr is at:

novacom run -- file:///sbin/stop LunaSysMgr
novacom run file://bin/mount -- -o remount,rw /
novacom put file:///usr/bin/LunaSysMgr < ./packages/sysmgr/luna-sysmgr/build/woce/armv7-stage/release-topaz/LunaSysMgr
novacom run file://bin/mount -- -o remount,ro /
novacom run -- file:///sbin/reboot

Your device will reboot in to the new LunaSysMgr

Done!

You're done! Your very own LunaSysMgr should now start on your TouchPad.

Don't forget to join the IRC channel #webos-ports on Freenode and report any issues to WebOS Port's bugtracker. Oh, and contribute your code changes!

Packaging

Beware: Dragons Ahead. These instructions will probably *not* be in a functional state when you try them.

First, you need a custom version of woce-build. For now lets use ShiftyAxel's woce-build.

git clone git://github.com/ShiftyAxel/woce-build.git
cd woce-build
git pull origin alpha

now that you have the packaging repo, we need to setup the custom target to get full woce with patches building.

cd ~/
git clone git://github.com/ShiftyAxel/LunaSysMgr.git
cd LunaSysMgr
git pull origin alpha-testing
cd ''wherever you put your woce-build''
cd config
edit the custom.mk and remove the 2 warning lines.

Trigger the main build.

cd ..
make CONFIG=custom

Trigger the packaging

cd packages/sysmgr/luna-sysmgr
make CONFIG=custom; make CONFIG=custom package

Take the package that just was generated and install it with preware.

IMPORTANT: Do not restart your device at this point! Perform a luna restart.

Profit?

Developer Extras

  • Follow the instructions above to ensure you have the needed software and that the build works for you as-is.
  • Clone a copy of LunaSysMgr somewhere for your development pleasure
  • Edit config/custom.mk:
    • Remove the error and warning lines as indicated
    • Change LUNASYSMGR_URL to point to your LunaSysMgr source tree
  • run 'make custom' ('make custom -j8' or similar) to build LunaSysMgr from your source tree. If you change a source file, another 'make custom' will rebuild only what's needed.
  • Test your new feature(s) and submit pull requests to woce/LunaSysMgr! :)