Skip to content

Cross compile WebRTC for Raspberry Pi

jcweaver997 edited this page Mar 19, 2021 · 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
    
     wget -qO- https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%209.3.0/Raspberry%20Pi%202%2C%203/cross-gcc-9.3.0-pi_2-3.tar.gz  | sudo tar xz -C /opt 
     echo "export PATH=$(ls -d /opt/cross-pi-gcc-*/bin):\$PATH" | sudo tee /etc/profile.d/arm_tools.sh
    
     source /etc/profile
    
  • Download WebRTC :

     fetch --no-history webrtc
     src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm
    
  • Build :

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