2015年2月4日 星期三

Compile Qualcomm MSM8909

OS: Ubuntu 12.04 Desktop 64bit
安裝compile環境:


1.    sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-de:i386
2.    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
4.    chmod a+x ~/bin/repo


HLOS 部份 (Android+Linux)


HLOS BuildType
Use / Description
user
limited access; suited for production
userdebug
like “user” but with root access and debuggability; preferred for debugging
eng
development configuration with additional debugging tools

前往https://www.codeaurora.org/xwiki/bin/QAEP/release找一份Qualcomm 8x09的code下載,
指令為 (假設要download  LA.BR.1.2.3-02010):
repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.BR.1.2.3-02010-8x09.0.xml --repo-url=git://codeaurora.org/tools/repo.git
詳情請參考: https://www.codeaurora.org/xwiki/bin/QAEP/WebHome

compile:
cd 該目錄
source build/envsetup.sh
lunch msm8909-userdebug
make -j8   (假定PC有8核CPU, 可cat /proc/cpuinfo取得核心數)

Non-HLOS (chipcode)

假定ARM_Compiler與HEXAGON_TOOLS都安裝在 HOME目錄中, 即:
$(HOME)/ARM_Compiler_5
$(HOME)/Qualcomm/HEXAGON_Tools/5.0.x
注意: ARM Compile需要另安裝一個 license server (此假定在安裝在 主機: 192.168.0.1)

setup.sh設定檔1(modem 專用)內容:
export  COMPILE_TOOLS_ROOT=$HOME
export  HEXAGON_ROOT=$COMPILE_TOOLS_ROOT/Qualcomm/HEXAGON_Tools
export  HEXAGON_RTOS_RELEASE=6.4.04
export  HEXAGON_Q6VERSION=v5
export  HEXAGON_IMAGE_ENTRY=0x08000000
export  ARMTOOLS=ARMCT5.01
export  ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export  ARM_COMPILER_PATH=$ARMROOT/bin64
export  ARMHOME=$ARMROOT
export  ARMLIB=$ARMROOT/lib
export  ARMINCLUDE=$ARMROOT/include
export  ARMBIN=$ARMROOT/bin64
export  ARMINC=$ARMINCLUDE
export  ARMLMD_LICENSE_FILE=8224@192.168.0.1
export  SCONS_MAX_NUM_JOBS=1
export  PYTHON_PATH=/usr/bin/python
export  PYTHONPATH=/usr/bin/python
export  MAKE_PATH=/usr/bin/make
export  PATH=$MAKE_PATH:$ARM_COMPILER_PATH:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/qc/bin:$HEXAGON_ROOT/$HEXAGON_RTOS_RELEASE/gnu/bin:$PATH:PYTHONPATH


setup.sh設定檔2 內容:
export  COMPILE_TOOLS_ROOT=$HOME
export  ARMTOOLS=ARMCT5.01
export  ARMROOT=$COMPILE_TOOLS_ROOT/ARM_Compiler_5
export  ARM_COMPILER_PATH=$ARMROOT/bin64
export  ARMHOME=$ARMROOT
export  ARMLIB=$ARMROOT/lib
export  ARMINCLUDE=$ARMROOT/include
export  ARMBIN=$ARMROOT/bin64
export  ARMINC=$ARMINCLUDE
export  ARMLMD_LICENSE_FILE=8224@192.168.0.1
export  SCONS_MAX_NUM_JOBS=1
export  MAKE_PATH=/usr/bin/make
export  PATH=$MAKE_PATH:$ARM_COMPILER_PATH




APSS HLOS
(boot.img, cace.img, dt.img, persist.img, ramdisk.img, recovery.img, system.img, userdata.img, emmc_appsboot.mbn)

result: out/target/product/msm8909/
ubuntu 12.04+
OpenJDK7
souce build/envsetup.sh
lunch msm8909-userdebug
Compile:
make -j8

Clean:
make clobber


MPSS

result:
modem_proc/build/ms/bin/
Hexagon tool set 6.4.05
Python 2.7.6+
Perl 5.14.2
SCons v2.0.0+

用設定檔1
[NON-HLOS]/modem_proc/build/ms/
Compile:
./build.sh 8909.gen.prod -k
./build.sh 8909.gps.prod -k
Clean:
./build.sh 8909.gen.prod -c
./build.sh 8909.gps.prod -c
BOOT loaders

result:
boot_images/build/ms/bin/8909/emmc/
ARM compiler tools
5.01 update 3(build 94)
Python 2.6.6+
Perl 5.8.x+
SCons v2.0.0+

用設定檔2
[NON-HLOS]/boot_images/build/ms
Compile:
./build.sh TARGET_FAMILY=8909 --prod
Clean:
./build.sh -c TARGET_FAMILY=8909 --prod
RPM

result:
rpm_proc/build/ms/bin/8909/
ARM compiler tools
5.01 update 3(build 94)
Python 2.6.6+
Perl 5.6.1+
SCons v2.0.0+
[NON-HLOS]/rpm_proc/build/
Compile:
./build_8909.sh
Clean:
./build_8909.sh -c
CNSS

result:
wcnss_proc/build/ms/bin/SCAQMAZ/

binary only

TZ

result: trustzone_images/build/ms/bin/MAZAANAA
ARM compiler tools
5.01 update 3(build 94)
Python 2.6.6+
Perl 5.10.1+
SCons v2.0.0+

用設定檔2
[NON-HLOS]/trustzone_images/build/ms/
Compile:
./build.sh CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widevine  securitytest keymaster commonlib
Clean:
./build.sh CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widwvine securitytest keymaster commonlib -c

沒有留言:

張貼留言