高通部分代码编译需要license,可向公司申请
下载qcom的amss即modem部分代码
下载android代码

modem部分包括sbl1 rpm tz mpss nonhlos.bin

android必须要有amss的代码,amss的代码不能放在android里面

cp ./LINUX/android/vendor/qcom/proprietary ~/Qcomm/msm8909-sdk/msm8909_svn/vendor/qcom/  -fr

编译android

source build/envsetup.sh

lunch msm8909-userdebug

make -j

编译sbl1

cd boot_images/build/ms
./build.sh TARGET_FAMILY=8909 –prod
./build.sh TARGET_FAMILY=8909 –prod -c //清除

修改

Index: boot_images/build/ms/setenv.sh
===================================================================
--- boot_images/build/ms/setenv.sh      (revision 73)
+++ boot_images/build/ms/setenv.sh      (revision 74)
@@ -70,19 +70,24 @@
    }
 # Set up compiler path 
    #ARM_COMPILER_PATH=/pkg/qct/software/arm/RVDS/5.01bld94/sw/debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
-   export ARM_COMPILER_PATH=/pkg/qct/software/arm/RVDS/5.01bld94/bin64
-   export PYTHON_PATH=/pkg/qct/software/python/2.6.6/bin
-   export MAKE_PATH=/pkg/gnu/make/3.81/bin
-   export ARMTOOLS=ARMCT5.01
-   export ARMROOT=/pkg/qct/software/arm/RVDS/5.01bld94
+   export ARM_COMPILER_PATH=/opt/Qualcomm/ARM5.01bld94
+   export PYTHON_PATH=/opt/Qualcomm/PYTHON/Python-2.6.6
+   export MAKE_PATH=/usr/bin
+   export ARMTOOLS=RCVT41
+   export ARMROOT=/opt/Qualcomm/ARM5.01bld94
    export ARMLIB=$ARMROOT/lib
    export ARMINCLUDE=$ARMROOT/include
    export ARMINC=$ARMINCLUDE
    #export ARMCONF=$ARMROOT/sw/Debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
   # export ARMDLL=$ARMROOT/sw/debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
-   export ARMBIN=$ARMROOT/bin64
+   export ARMBIN=$ARMROOT/bin
    export PATH=$MAKE_PATH:$PYTHON_PATH:$ARM_COMPILER_PATH:$PATH
    export ARMHOME=$ARMROOT
-   export_armlmd_license
+   export ARMLMD_LICENSE_FILE=${ARMROOT}/license.dat
+   #export_armlmd_license
+   export "ARMCC5_ASMOPT=--licretry --diag_suppress=9931,9933"
+   export "ARMCC5_CCOPT=--licretry --diag_suppress=9931,9933"
+   export "ARMCC5_FROMELFOPT=--licretry --diag_suppress=9931,9933"
+   export "ARMCC5_LINKOPT=--licretry --diag_suppress=9931,9933"

 fi

sbl1生成在 boot_images/build/ms/bin/8909/emmc/sbl1.mbn

编译rpm

cd rpm_proc/build
./build_8909.sh

修改


Index: rpm_proc/build/build_8909.sh
===================================================================
--- rpm_proc/build/build_8909.sh        (revision 73)
+++ rpm_proc/build/build_8909.sh        (revision 74)
@@ -15,6 +15,9 @@
 export CHIPSET=msm8909
 export CHIPSET_PMIC=pm8909
 export SECPOLICY=USES_SEC_POLICY_DEFAULT_SIGN
+
+source /opt/Qualcomm/setenv_qcom.sh 
+
 cd './rpm_proc/build/'

 python ./build_common.py $@

/opt/Qualcomm/setenv_qcom.sh

#!/bin/bash
export ARMROOT=/opt/Qualcomm/ARM5.01bld94
export ARMTOOLS=RVCT41
export ARMHOME=$ARMROOT
export ARMBIN=${ARMROOT}/bin
export ARMPATH=${ARMROOT}/bin
export ARMINC=${ARMROOT}/include
export ARMINCLUDE=${ARMROOT}/include
export ARMLIB=${ARMROOT}/lib
export ARMLMD_LICENSE_FILE=${ARMROOT}/license.dat

export SCONS_OVERRIDE_NUM_JOBS=8

export PATH=.:${ARMBIN}:$PATH
export "ARMCC5_ASMOPT=--licretry --diag_suppress=9931,9933"
export "ARMCC5_CCOPT=--licretry --diag_suppress=9931,9933"
export "ARMCC5_FROMELFOPT=--licretry --diag_suppress=9931,9933"
export "ARMCC5_LINKOPT=--licretry --diag_suppress=9931,9933"

export LLVMTOOLS=LLVM
#Snapdragon_LLVM_ARM_linux_3.8.4
export LLVMROOT=/opt/Qualcomm/LLVMROOT
export LLVMBIN=$LLVMROOT/bin
export LLVMLIB=$LLVMROOT/lib/clang/3.8.4/lib/linux
export MUSLPATH=$LLVMROOT/tools/lib64
export MUSL32PATH=$LLVMROOT/tools/lib32
export LLVMINC=$MUSLPATH/include
export LLVM32INC=$MUSL32PATH/include
export LLVMTOOLPATH=$LLVMROOT/tools/bin

PYTHON_PATH=/opt/Qualcomm/PYTHON/Python-2.6.6/bin


export GNUROOT=/opt/Qualcomm/GNU/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu

export GNUARM7=/opt/Qualcomm/GNU/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux


export HEXAGON_ROOT=/opt/Qualcomm/HEXAGON_Tools

export PATH=$MAKE_PATH:$PYTHON_PATH:$ARM_COMPILER_PATH:$HEXAGON_ROOT:$HEXAGON_ROOT/6.4.06/gnu/bin:$PATH

上面的HEXAGON_Tools 6.4.06对应的版本居然在高通官网上下不到,其他版本都不行,安装也不成功,这个已安装成功的,还是我向别人要的,然后直接放在对应的路径下

编译tz

cd trustzone_images/build/ms


./build.sh CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widevine isdbtmm aostlm securitytest keymaster commonlib 



./build.sh CHIPSET=msm8909 tz sampleapp tzbsp_no_xpu playready widevine isdbtmm aostlm securitytest keymaster commonlib  -c

修改

Index: trustzone_images/build/ms/setenv.sh
===================================================================
--- trustzone_images/build/ms/setenv.sh (revision 73)
+++ trustzone_images/build/ms/setenv.sh (revision 74)
@@ -43,28 +43,15 @@
      rm -f __temp.out
    }
 # Set up compiler path
-   ARM_COMPILER_PATH=/pkg/qct/software/arm/RVDS/5.01bld94/sw/debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
-   PYTHON_PATH=/pkg/qct/software/python/2.6.6/bin
-   MAKE_PATH=/pkg/gnu/make/3.81/bin
-   export ARMTOOLS=ARMCT5.01
-   export ARMROOT=/pkg/qct/software/arm/RVDS/5.01bld94
-   export ARMLIB=$ARMROOT/lib
-   export ARMINCLUDE=$ARMROOT/include
-   export ARMINC=$ARMINCLUDE
-#   export ARMCONF=$ARMROOT/sw/Debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
-#   export ARMDLL=$ARMROOT/sw/Debugger/configdb/Boards/ARM/Cortex-A8_RTSM/linux-pentium
-   export ARMBIN=$ARMROOT/bin64
+#---------------------------------------------set ARM6 version--------------------------------------------------------------------------

-   # PYTHONBIN specifies version that will be added to PATH
-   if [ -z ${PYTHONBIN} ]; then
-      # Set default version for legacy builds
-      PYTHONBIN=${PYTHON_PATH}
-   fi
+source /opt/Qualcomm/setenv_qcom.sh
+export ARMTOOLS=ARMCT6

-   export PATH=$MAKE_PATH:$PYTHONBIN:$ARM_COMPILER_PATH:$PATH
-   export ARMHOME=$ARMROOT
-   export_armlmd_license

+
+
+  #-----------------------------------------------------------------------------------------------------------------------------------------
 fi

 #==============================================================================

编译MPSS

cd modem_proc/build/ms
./build.sh 8909.gen.prod -k //文档里有三个选项,三个都试下,不然后面打包nonhlos.bin会失败,因为content.xml对应的文件没有,即根据content.xml查找对应的路径


 <file_path>modem_proc/build/ms/bin/8909.gen.prod</file_path>

修改

Index: modem_proc/build/ms/build.sh
===================================================================
--- modem_proc/build/ms/build.sh        (revision 73)
+++ modem_proc/build/ms/build.sh        (revision 74)
@@ -25,6 +25,54 @@
 source ./setenv.sh
 fi

+source  /opt/Qualcomm/setenv_qcom.sh
+export HEXAGON_RTOS_RELEASE=6.4.04
+export ARMTOOLS=RVCT221
+export HEXAGON_ROOT=/opt/Qualcomm/HEXAGON_Tools 
+# export HEXAGON_ROOT=/root/Qualcomm/HEXAGON_Tools
+#export PATH=$HEXAGON_ROOT:$HEXAGON_ROOT/6.4.06/bin:$PATH
+# export ARMTOOLS=RCVT221
+#!/bin/bash
+# --------   ---     ---------------------------------------------------------
+# 4/26/17    sy      Initial creation
+# ==========================================================================
+
+export BUILDSPEC=KLOCWORK
+
+# Set up common path
+export PYTHON_PATH=/usr/bin
+export MAKE_PATH=/usr/bin
+
+# PYTHONBIN specifies version that will be added to PATH
+if [ -z ${PYTHONBIN}  ]; then
+       # Set default version for legacy builds
+          PYTHONBIN=${PYTHON_PATH}
+fi
+      export ARMTOOLS=RVCT41      
+      export ARMROOT=/opt/Qualcomm/ARM5.01bld94    
+      export ARMLIB=$ARMROOT/lib
+      export ARMINCLUDE=$ARMROOT/include
+      export ARMINC=$ARMINCLUDE
+      export ARMBIN=$ARMROOT/bin
+      export ARMHOME=$ARMROOT
+      export SCONS_OVERRIDE_NUM_JOBS=8
+      # Set up LLVM path
+      export LLVMTOOLS=LLVM
+      export LLVMROOT=/opt/Qualcomm/LLVMROOT
+      export LLVMBIN=$LLVMROOT/bin
+      export LLVMLIB=$LLVMROOT/lib/clang/3.8.4/lib/linux
+      export MUSLPATH=$LLVMROOT/tools/lib64
+      export MUSL32PATH=$LLVMROOT/tools/lib32
+      export LLVMINC=$MUSLPATH/include
+      export LLVM32INC=$MUSL32PATH/include
+      export LLVMTOOLPATH=$LLVMROOT/tools/bin
+      export GNUROOT=/opt/Qualcomm/GNU/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu
+      export GNUARM7=/opt/Qualcomm/GNU/gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
+      export "ARMCC5_ASMOPT=--licretry --diag_suppress=9931,9933"
+      export "ARMCC5_CCOPT=--licretry --diag_suppress=9931,9933"
+      export "ARMCC5_FROMELFOPT=--licretry --diag_suppress=9931,9933"
+      export "ARMCC5_LINKOPT=--licretry --diag_suppress=9931,9933"
+      export PATH=$MAKE_PATH:$PYTHON_PATH:$ARM_COMPILER_PATH:$HEXAGON_ROOT:$HEXAGON_ROOT/6.4.06/gnu/bin:$PATH
 # Call the main build command
 python build_variant.py $*
 build_result=$?

这是需要制作分区表
amss_8909/common/build/partition.xml
这里将sec去掉,不然烧录后起不来,除非做sec功能

make rawprogram0.xml patch0.xml

boot_images/core/storage/tools/ptool/ptool.py -x partition.xml
生成
gpt_backup0.bin
gpt_both0.bin
gpt_main0.bin
zeros_1sector.bin
patch0.xml
rawprogram0.xml
将/common/build$ 下的 *.bin rawprogram0.xml patch0.xml 拷贝到android 对应的out目录out/target/product/msm8909/下,

编译 nonhlos.bin

cd ./common/build/
python update_common_info.py –nonhlos

GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐