Skip to content

Cross compile WebRTC for Raspberry Pi

Andrzej Pomirski edited this page Jul 10, 2017 · 12 revisions
  • Install Toolchain :

     sudo git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools
     echo "export PATH=/opt/depot_tools:\$PATH" | sudo tee /etc/profile.d/depot_tools.sh
    
     sudo mkdir /opt/arm_tools && sudo chown `whoami` /opt/arm_tools
     pushd
     cd /opt/arm_tools && wget https://releases.linaro.org/components/toolchain/binaries/latest-6/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
     tar -xvf gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
     rm gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
     popd
    
     echo “export PATH=/opt/arm_tools/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin:\$PATH” | sudo tee /etc/profile.d/arm_tools.sh
     source /etc/profile
    
  • Download WebRTC :

     export GYP_DEFINES="target_arch=arm"
     fetch --no-history webrtc
    

If it failed, run gclient sync

  • Build :

     pushd src 
     gn gen arm/out/Release --args='is_debug=false rtc_use_h264=true ffmpeg_branding="Chrome" rtc_include_tests=false is_clang=false target_cpu="arm" treat_warnings_as_errors=false rtc_enable_protobuf=false'
     ninja -C arm/out/Release
     popd
    
Clone this wiki locally