Difference between revisions of "SDM850 build instructions"

From ESS-WIKI
Jump to: navigation, search
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
== board support package source build ==
+
== fetch NP850 board support package ==
'''1. Unzip the SDM850 BSP package to D:\BSP'''
 
  
   [[File:SDM850 BUILD 01.png|RTENOTITLE]]
+
1. git config settings
  
 +
&nbsp; &nbsp;<span style="color:#0000FF;">git config --global core.autocrlf true</span>
  
 +
&nbsp; &nbsp;<span style="color:#0000FF;">git config --global http.postBuffer 524288000</span>
  
'''2. Copy ACPI compiler'''
+
2. fetch NP850 BSP from Advantech Gitlab
  
&nbsp; &nbsp;&nbsp;copy "D:\EWDK\Program Files\Windows Kits\10\Tools\arm64\ACPIVerify\asl.exe" to "WP\src\acpi\rel\10.4\bin\"
+
&nbsp; &nbsp;[http://advgitlab.eastasia.cloudapp.azure.com/SDM850/sdm850-wp-1-2_amss_standard_oem http://advgitlab.eastasia.cloudapp.azure.com/SDM850/sdm850-wp-1-2_amss_standard_oem]
  
'''3.&nbsp;Modify "WP\src\acpi\rel\10.4\acpi.wp63.proj”'''
 
  
&nbsp; &nbsp;add "<Target Name="<span style="color:#FF0000;">Clean</span>"> &lt;/Target&gt;" after "&lt;Target Name="Build"&gt; &lt;/Target&gt;"
 
  
'''4.&nbsp;Modify “WP\src\tools\rel\10.4\qcbuildwp63.cmd”'''
+
== build board support package source ==
 +
 
 +
1. Unzip the SDM850 BSP package to D:\BSP
 +
 
 +
[[File:SDM850 BUILD 01.png|RTENOTITLE]]
 +
 
 +
2. Copy ACPI compiler
 +
 
 +
&nbsp; &nbsp; copy "D:\EWDK\Program Files\Windows Kits\10\Tools\arm64\ACPIVerify\asl.exe" to "WP\src\acpi\rel\10.4\bin\"
 +
 
 +
3.&nbsp;Modify "WP\src\acpi\rel\10.4\acpi.wp63.proj”
 +
 
 +
&nbsp; &nbsp; add "<Target Name="<span style="color:#FF0000;">Clean</span>"> &lt;/Target&gt;" after "&lt;Target Name="Build"&gt; &lt;/Target&gt;"
 +
 
 +
4.&nbsp;Modify “WP\src\tools\rel\10.4\qcbuildwp63.cmd”
  
 
&nbsp; &nbsp;&nbsp;Find all "ATTRIB +R" and replace to "<span style="color:#FF0000;">ATTRIB -R</span>"
 
&nbsp; &nbsp;&nbsp;Find all "ATTRIB +R" and replace to "<span style="color:#FF0000;">ATTRIB -R</span>"
  
'''5.&nbsp;Delete or Rename "WP\src\tools\rel\10.4\<span style="color:#FF0000;">CrmParallelization.py</span>" to skip this python script'''
+
5.&nbsp;Delete or Rename "WP\src\tools\rel\10.4\<span style="color:#FF0000;">CrmParallelization.py</span>" to skip this python script
  
'''6. Run administrator command shell'''
+
6. Run administrator command shell
  
 
&nbsp; &nbsp; A. D:\EWDK>LaunchBuildEnv.cmd
 
&nbsp; &nbsp; A. D:\EWDK>LaunchBuildEnv.cmd
Line 30: Line 43:
  
  
'''7. Compilation'''
+
7. Compilation
  
 
&nbsp; &nbsp; A.&nbsp;Build for all&nbsp;: run the following command in WP\src folder after setting environment
 
&nbsp; &nbsp; A.&nbsp;Build for all&nbsp;: run the following command in WP\src folder after setting environment
  
<span style="color:#0000FF;">&nbsp; &nbsp;&nbsp;.\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64</span>
+
<span style="color:#0000FF;">&nbsp; &nbsp; &nbsp; &nbsp; .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64</span>
  
 
&nbsp; &nbsp; B.&nbsp;Build component
 
&nbsp; &nbsp; B.&nbsp;Build component
  
<span style="color:#0000FF;">&nbsp; &nbsp;&nbsp;.\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput&nbsp;%1</span>
+
<span style="color:#0000FF;">&nbsp; &nbsp; &nbsp; &nbsp; .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput&nbsp;%1</span>
  
 
&nbsp; &nbsp; C.&nbsp;If ACPI compile fail at first time. Please rebuild it again with below command
 
&nbsp; &nbsp; C.&nbsp;If ACPI compile fail at first time. Please rebuild it again with below command
  
<span style="color:#0000FF;">&nbsp; &nbsp;&nbsp;.\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput acpi</span>
+
<span style="color:#0000FF;">&nbsp; &nbsp; &nbsp; &nbsp; .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput acpi</span>
 +
 
 +
 
 +
 
 +
== build non-HLOS image ==
 +
 
 +
<span style="color:#FF0000;">The environment setting commands should be triggered before compiling each non-HLOS image</span> &nbsp; &nbsp;
 +
 
 +
&nbsp; &nbsp; A. D:\EWDK>LaunchBuildEnv.cmd
 +
 
 +
&nbsp; &nbsp; B.&nbsp;D:\>setenv.bat
 +
 
 +
&nbsp; &nbsp;&nbsp;[[File:SDM850 BUILD 02.png|RTENOTITLE]]
 +
 
 +
1. bootloader -&nbsp;build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd boot_images\QcomPkg\</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python buildex.py --variant WP -r DEBUG,RELEASE -t SDM845Pkg,QcomToolsPkg</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python buildex.py --variant WP -r DEBUG,RELEASE -t SDM845Pkg,QcomToolsPkg --build_flags=cleanall</span>
 +
 
 +
2. TZ - build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd trustzone_images\build\ms</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build_all.py CHIPSET=sdm845 -b TZ.XF.5.0.1 --cfg build_config_windows.xml --recompile</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build_all.py CHIPSET=sdm845 -b TZ.XF.5.0.1 --cfg build_config_windows.xml --clean</span>
 +
 
 +
3. AOP - build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd aop_proc\build</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # build_845.bat</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # build_845.bat -c</span>
 +
 
 +
4. aDSP - build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd adsp_proc\build</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o all -f aDSP</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o clean -f aDSP</span>
 +
 
 +
5. cDSP - build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd cdsp_proc\build</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o all -f CDSP</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o clean -f CDSP</span>
 +
 
 +
6. MPSS (modem) - build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd modem_proc\build\ms</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build_variant.py sdm845.gen.prod bparams=-k</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build_variant.py sdm845.gen.prod --clean</span>
 +
 
 +
7. SLPI
 +
 
 +
&nbsp; (1) Download "nanopb-0.3.6-windows-x86.zip" from "[http://jpa.kapsi.fi/nanopb/download/ http://jpa.kapsi.fi/nanopb/download/]"
 +
 
 +
&nbsp; (2) copy "nanopb-0.3.6-windows-x86.zip" to "slpi_proc\ssc\tools\"
 +
 
 +
&nbsp; (3) unzip nanopb-0.3.6-windows-x86.zip and set nanopb dependency
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd slpi_proc</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python ssc\build\config_nanopb_dependency.py -f nanopb-0.3.6-windows-x86</span>
 +
 
 +
&nbsp; (4) build & clean
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # cd build\</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o all -f SNS_DISABLE_ISLAND,SNS_REDUCED_SDC_PRAM</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp; &nbsp; # python build.py -c sdm845 -o clean</span>
 +
 
 +
== build WD image with adding drivers ==
 +
 
 +
1.&nbsp;Copy D:\DesktopOS into D:\BSP\NP850\prebuilt\
 +
 
 +
<br/>&nbsp; &nbsp;[[File:SDM850 BUILD 03.png|RTENOTITLE]]
 +
 
 +
2.&nbsp;Copy folder "WP\src\build\Qualcomm\DISM" to "WP\prebuild\DesktopOS\”
 +
 
 +
3.&nbsp;Copy folder "WP\src\build\Qualcomm\BCDBoot" to "WP\prebuild\DesktopOS\”
 +
 
 +
4.&nbsp;Remove some .proj files to avoid building. Or you can rename them to<span style="color:#FF0000;">.proj_</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;createwdtargetsfile_19H1.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;featuremerger.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;inf2cat.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;isogen_19H1.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;isogen_thumbdrive_19H1.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp;&nbsp;postsign_phone.proj</span>
 +
 
 +
<span style="color:#0000FF;">&nbsp;&nbsp; &nbsp;regroup_drivers.proj</span>
 +
 
 +
 
 +
 
 +
5. Modify “WP\prebuilt\850\isogen_thumbdrive.proj” fles
 +
 
 +
&nbsp; &nbsp; A.&nbsp;Modify all "$(DesktopOS)\Install.wim" to "$(DesktopOS)\<span style="color:#FF0000;">sources</span>\Install.wim"
 +
 
 +
&nbsp; &nbsp; B.&nbsp;Modify all "$(DesktopOS)\**\Install.wim" to "$(DesktopOS)\<span style="color:#FF0000;">sources</span>\Install.wim"
 +
 
 +
&nbsp; &nbsp; C.&nbsp;Search &lt;WD_Target Condition="'$(WD_Target)'=="&gt;MTP;QRD;CLS&lt;/WD_Target&gt;
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp; Edit as &lt;WD_Target Condition="'$(WD_Target)'=="&gt;<span style="color:#FF0000;">SFF</span>&lt;/WD_Target&gt;
 +
 
 +
6. Modify "WP\prebuild\850\isogen.proj" files&nbsp;&nbsp;&nbsp;
 +
 
 +
&nbsp; &nbsp;A.&nbsp;Search &lt;WD_Target Condition="'$(WD_Target)'=="&gt;MTP;CLS&lt;/WD_Target&gt;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit as &lt;WD_Target Condition="'$(WD_Target)'=="&gt;<span style="color:#FF0000;">SFF</span>&lt;/WD_Target&gt;<br/>&nbsp;&nbsp;&nbsp;B.&nbsp;Search "&lt;Error Text= "Incorrect WD_Taget alias. Please check WD_Target parameter. Exiting Build." Condition="'%(WDTargets.Identity)'!='MTP' AND '%(WDTargets.Identity)'!='CLS'" /&gt;" .&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit as&nbsp;&nbsp;<Error Text= "Incorrect WD_Taget alias. Please check WD_Target parameter. Exiting Build." Condition="'%(WDTargets.Identity)'!='MTP' AND '%(WDTargets.Identity)'!='CLS'&nbsp;
 +
 
 +
<span style="color:#FF0000;">&nbsp; &nbsp; &nbsp; &nbsp; AND '%(WDTargets.Identity)'!='SFF'</span>" /><br/>&nbsp;&nbsp;&nbsp;C.&nbsp;Copy your driver files(.ing .sys .cat .pdb...) to "WP\\prebuilt\850\driver\common\"
 +
 
 +
7.&nbsp;Modify "WP\prebuilt\850\DesktopScripts\drivers.txt to add your driver name.
 +
 
 +
8.&nbsp;Delete folder "WP\prebuild\850\ARM64\" and “WP\prebuild\850\ISOGEN\” if you have before image building every time
 +
 
 +
9. Starting building
 +
 
 +
&nbsp; &nbsp; A. D:\EWDK>LaunchBuildEnv.cmd
 +
 
 +
&nbsp; &nbsp; B.&nbsp;D:\>setenv.bat
 +
 
 +
&nbsp; &nbsp; C: cd WP\prebuilt\
 +
 
 +
&nbsp; &nbsp; D: postbld.bat

Latest revision as of 10:00, 26 September 2019

fetch NP850 board support package

1. git config settings

   git config --global core.autocrlf true

   git config --global http.postBuffer 524288000

2. fetch NP850 BSP from Advantech Gitlab

   http://advgitlab.eastasia.cloudapp.azure.com/SDM850/sdm850-wp-1-2_amss_standard_oem


build board support package source

1. Unzip the SDM850 BSP package to D:\BSP

RTENOTITLE

2. Copy ACPI compiler

    copy "D:\EWDK\Program Files\Windows Kits\10\Tools\arm64\ACPIVerify\asl.exe" to "WP\src\acpi\rel\10.4\bin\"

3. Modify "WP\src\acpi\rel\10.4\acpi.wp63.proj”

    add "<Target Name="Clean"> </Target>" after "<Target Name="Build"> </Target>"

4. Modify “WP\src\tools\rel\10.4\qcbuildwp63.cmd”

    Find all "ATTRIB +R" and replace to "ATTRIB -R"

5. Delete or Rename "WP\src\tools\rel\10.4\CrmParallelization.py" to skip this python script

6. Run administrator command shell

    A. D:\EWDK>LaunchBuildEnv.cmd

    B. D:\>setenv.bat

    RTENOTITLE


7. Compilation

    A. Build for all : run the following command in WP\src folder after setting environment

        .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64

    B. Build component

        .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput %1

    C. If ACPI compile fail at first time. Please rebuild it again with below command

        .\tools\rel\10.4\qcpackbuild.cmd -p 850 -platform ARM64 -componentsinput acpi


build non-HLOS image

The environment setting commands should be triggered before compiling each non-HLOS image    

    A. D:\EWDK>LaunchBuildEnv.cmd

    B. D:\>setenv.bat

    RTENOTITLE

1. bootloader - build & clean

    # cd boot_images\QcomPkg\

    # python buildex.py --variant WP -r DEBUG,RELEASE -t SDM845Pkg,QcomToolsPkg

    # python buildex.py --variant WP -r DEBUG,RELEASE -t SDM845Pkg,QcomToolsPkg --build_flags=cleanall

2. TZ - build & clean

    # cd trustzone_images\build\ms

    # python build_all.py CHIPSET=sdm845 -b TZ.XF.5.0.1 --cfg build_config_windows.xml --recompile

    # python build_all.py CHIPSET=sdm845 -b TZ.XF.5.0.1 --cfg build_config_windows.xml --clean

3. AOP - build & clean

    # cd aop_proc\build

    # build_845.bat

    # build_845.bat -c

4. aDSP - build & clean

    # cd adsp_proc\build

    # python build.py -c sdm845 -o all -f aDSP

    # python build.py -c sdm845 -o clean -f aDSP

5. cDSP - build & clean

    # cd cdsp_proc\build

    # python build.py -c sdm845 -o all -f CDSP

    # python build.py -c sdm845 -o clean -f CDSP

6. MPSS (modem) - build & clean

    # cd modem_proc\build\ms

    # python build_variant.py sdm845.gen.prod bparams=-k

    # python build_variant.py sdm845.gen.prod --clean

7. SLPI

  (1) Download "nanopb-0.3.6-windows-x86.zip" from "http://jpa.kapsi.fi/nanopb/download/"

  (2) copy "nanopb-0.3.6-windows-x86.zip" to "slpi_proc\ssc\tools\"

  (3) unzip nanopb-0.3.6-windows-x86.zip and set nanopb dependency

    # cd slpi_proc

    # python ssc\build\config_nanopb_dependency.py -f nanopb-0.3.6-windows-x86

  (4) build & clean

    # cd build\

    # python build.py -c sdm845 -o all -f SNS_DISABLE_ISLAND,SNS_REDUCED_SDC_PRAM

    # python build.py -c sdm845 -o clean

build WD image with adding drivers

1. Copy D:\DesktopOS into D:\BSP\NP850\prebuilt\


   RTENOTITLE

2. Copy folder "WP\src\build\Qualcomm\DISM" to "WP\prebuild\DesktopOS\”

3. Copy folder "WP\src\build\Qualcomm\BCDBoot" to "WP\prebuild\DesktopOS\”

4. Remove some .proj files to avoid building. Or you can rename them to.proj_

   createwdtargetsfile_19H1.proj

   featuremerger.proj

   inf2cat.proj

   isogen_19H1.proj

   isogen_thumbdrive_19H1.proj

   postsign_phone.proj

    regroup_drivers.proj


5. Modify “WP\prebuilt\850\isogen_thumbdrive.proj” fles

    A. Modify all "$(DesktopOS)\Install.wim" to "$(DesktopOS)\sources\Install.wim"

    B. Modify all "$(DesktopOS)\**\Install.wim" to "$(DesktopOS)\sources\Install.wim"

    C. Search <WD_Target Condition="'$(WD_Target)'==">MTP;QRD;CLS</WD_Target>

        Edit as <WD_Target Condition="'$(WD_Target)'==">SFF</WD_Target>

6. Modify "WP\prebuild\850\isogen.proj" files   

   A. Search <WD_Target Condition="'$(WD_Target)'==">MTP;CLS</WD_Target>   
        Edit as <WD_Target Condition="'$(WD_Target)'==">SFF</WD_Target>
   B. Search "<Error Text= "Incorrect WD_Taget alias. Please check WD_Target parameter. Exiting Build." Condition="'%(WDTargets.Identity)'!='MTP' AND '%(WDTargets.Identity)'!='CLS'" />" . 
        Edit as  <Error Text= "Incorrect WD_Taget alias. Please check WD_Target parameter. Exiting Build." Condition="'%(WDTargets.Identity)'!='MTP' AND '%(WDTargets.Identity)'!='CLS' 

        AND '%(WDTargets.Identity)'!='SFF'" />
   C. Copy your driver files(.ing .sys .cat .pdb...) to "WP\\prebuilt\850\driver\common\"

7. Modify "WP\prebuilt\850\DesktopScripts\drivers.txt to add your driver name.

8. Delete folder "WP\prebuild\850\ARM64\" and “WP\prebuild\850\ISOGEN\” if you have before image building every time

9. Starting building

    A. D:\EWDK>LaunchBuildEnv.cmd

    B. D:\>setenv.bat

    C: cd WP\prebuilt\

    D: postbld.bat