From 5c095a6adb58dd858191f073e66d7ba9b41553f1 Mon Sep 17 00:00:00 2001 From: ken Date: Wed, 6 Apr 2022 14:44:20 -0400 Subject: [PATCH] Tools v21 updates --- scripts/build_tincan.sh | 5 +- scripts/build_webrtc.sh | 18 ++++-- scripts/evio-tools-v21.sh | 118 ++++++++++---------------------------- scripts/get_archives.sh | 2 +- scripts/get_include.sh | 2 +- 5 files changed, 46 insertions(+), 99 deletions(-) diff --git a/scripts/build_tincan.sh b/scripts/build_tincan.sh index f12e0fc..00defe4 100755 --- a/scripts/build_tincan.sh +++ b/scripts/build_tincan.sh @@ -27,7 +27,7 @@ fi if [ "$build_type" != "debug" ] && [ "$build_type" != "release" ]; then echo "Wrong build type spelling" helpFunction -elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ]; then +elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ] && [ "$target" != "debian-arm64" ]; then echo "Wrong target spelling" helpFunction fi @@ -48,9 +48,10 @@ GN="$WrkspaceRoot"/EdgeVPNio/tools/bin/gn NJ="$WrkspaceRoot"/EdgeVPNio/tools/bin/ninja if [ "$target" == "debian-x64" ]; then $GN gen out/"$target"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"$WrkspaceRoot/EdgeVPNio/external\" use_debug_fission=$fission_flag clang_base_path=\"$WrkspaceRoot/EdgeVPNio/tools/llvm/bin"\" - elif [ "$target" == "debian-arm" ]; then $GN gen out/"$target"/"$build_type" "--args=target_cpu=\"arm\" use_lld=true use_debug_fission=$fission_flag target_sysroot_dir=\"$WrkspaceRoot/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"$WrkspaceRoot/EdgeVPNio/tools/llvm/bin\"" +elif [ "$target" == "debian-arm64" ]; then + $GN gen out/"$target"/"$build_type" "--args=target_cpu=\"arm64\" use_lld=true use_debug_fission=$fission_flag target_sysroot_dir=\"$WrkspaceRoot/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"$WrkspaceRoot/EdgeVPNio/tools/llvm/bin\"" fi $NJ -C out/"$target"/"$build_type" diff --git a/scripts/build_webrtc.sh b/scripts/build_webrtc.sh index 1202e9e..af6db05 100755 --- a/scripts/build_webrtc.sh +++ b/scripts/build_webrtc.sh @@ -30,7 +30,7 @@ fi if [ "$build_type" != "debug" ] && [ "$build_type" != "$build_type" ]; then echo "Wrong build type spelling" helpFunction -elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ]; then +elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ] && [ "$target" != "debian-arm64" ]; then echo "Wrong target spelling" helpFunction fi @@ -42,8 +42,9 @@ fi Workspace_root=`pwd` mkdir -p "$Workspace_root"/webrtc-checkout && cd "$Workspace_root"/webrtc-checkout -git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git - +if [ ! -d "./depot_tools" ]; then + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git +fi export PATH=$Workspace_root/webrtc-checkout/depot_tools:"$PATH" #To update the setup with depot_tools in path @@ -67,7 +68,10 @@ if [ "$target" == "debian-arm" ]; then echo Downloading Debian ARM sysroot ./src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm fi - +if [ "$target" == "debian-arm64" ]; then + echo Downloading Debian ARM64 sysroot + ./src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 +fi cd src git checkout branch-heads/4147 @@ -85,11 +89,13 @@ if [ "$target" == "debian-x64" ] && [ "$debug_flag" = true ]; then elif [ "$target" == "debian-x64" ] && [ "$debug_flag" = false ]; then gn gen out/"$target"/"$build_type" "--args=enable_iterator_debugging=false is_debug=$debug_flag" #raspberry-pi/debian-arm debug build -elif [ "$target" == "raspberry-pi" ] && [ "$debug_flag" = true ]; then +elif [ "$target" == "debian-arm" ] && [ "$debug_flag" = true ]; then gn gen out/"$target"/"$build_type" "--args=target_os=\"linux\" target_cpu=\"arm\" is_debug=$debug_flag enable_iterator_debugging=false use_debug_fission=false" -else +elif [ "$target" == "debian-arm" ] && [ "$debug_flag" = false ]; then #raspberry-pi/debian-arm release build gn gen out/"$target"/"$build_type" "--args=target_os=\"linux\" target_cpu=\"arm\" is_debug=$debug_flag enable_iterator_debugging=false" +elif [ "$target" == "debian-arm64" ] && [ "$debug_flag" = false ]; then + gn gen out/"$target"/"$build_type" "--args=target_os=\"linux\" target_cpu=\"arm64\" is_debug=$debug_flag enable_iterator_debugging=false use_debug_fission=false treat_warnings_as_errors=false clang_use_chrome_plugins=false" fi #ninja cmd to compile the required webrtc libraries diff --git a/scripts/evio-tools-v21.sh b/scripts/evio-tools-v21.sh index f9122da..24e63e7 100755 --- a/scripts/evio-tools-v21.sh +++ b/scripts/evio-tools-v21.sh @@ -56,12 +56,14 @@ function sync_repos function make_debpak { + sudo rm -rf $EVIO_DIR/controller/modules/__pycache__/ $TOOLS_DIR/debian-package/evio/opt/evio/modules/__pycache__/ + display_env wd=$(pwd) mkdir -p $TOOLS_DIR/debian-package/evio/etc/opt/evio # copy controller and tincan files to debpak directory - cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/Controller.py $TOOLS_DIR/debian-package/evio/opt/evio/ && \ - cp $WorkspaceRoot/EdgeVPNio/evio/controller/template-config.json $TOOLS_DIR/debian-package/evio/etc/opt/evio/config.json && \ - cp -r $WorkspaceRoot/EdgeVPNio/evio/controller/modules/ $WorkspaceRoot/EdgeVPNio/evio/controller/framework/ $TOOLS_DIR/debian-package/evio/opt/evio/ && \ + cp -r $EVIO_DIR/controller/Controller.py $TOOLS_DIR/debian-package/evio/opt/evio/ && \ + cp $EVIO_DIR/controller/template-config.json $TOOLS_DIR/debian-package/evio/etc/opt/evio/config.json && \ + cp -r $EVIO_DIR/controller/modules/ $EVIO_DIR/controller/framework/ $TOOLS_DIR/debian-package/evio/opt/evio/ && \ chmod 0775 $TOOLS_DIR/debian-package/evio/opt/evio/framework/ && \ chmod 0664 $TOOLS_DIR/debian-package/evio/opt/evio/framework/* && \ chmod 0775 $TOOLS_DIR/debian-package/evio/opt/evio/modules/ && \ @@ -141,27 +143,6 @@ function make_dkrimg rm $TOOLS_DIR/docker-image/evio.deb } -function install_openfire -{ - docker run --name openfire -d \ - -p 9090:9090 -p 5222:5222 \ - -p 5269:5269 -p 5223:5223 \ - -p 7443:7443 -p 7777:7777 \ - -p 7070:7070 -p 5229:5229 \ - -p 5275:5275 \ - edgevpnio/openfire_edgevpn_demo -} - -function install_portal -{ - #TODO(ken): visualizer not yet available - cd $WorkspaceRoot/EdgeVPNio - git clone $PORTAL_REPO - cd portal/setup - ./setup.sh - chown -R $USER /users/$USER/ -} - function do_clean { #TODO(ken): Unit test @@ -191,6 +172,7 @@ function do_clean function build_webrtc() { + display_env wd=$(pwd) cd $WorkspaceRoot chmod +x $BuildWRTC $GetArchives $GetInclude @@ -207,6 +189,7 @@ function build_webrtc() } function build_tincan { + display_env cd $WorkspaceRoot chmod +x $BuildTincan git -C "$EXT_DIR" checkout $PLATFORM @@ -223,16 +206,6 @@ function do_build make_dkrimg } -function do_build_debian_x64_debug -{ - $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - VER=$($PY $Versioning --version) - PLATFORM="debian-x64" - BUILD_TYPE="debug" - ARCH="amd64" - do_build -} - function do_build_debian_x64_release { $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files @@ -243,13 +216,13 @@ function do_build_debian_x64_release do_build } -function do_build_debian_arm_debug +function do_build_debian_arm64_release { $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files VER=$($PY $Versioning --version) - PLATFORM="debian-arm" - BUILD_TYPE="debug" - ARCH="armhf" + PLATFORM="debian-arm64" + BUILD_TYPE="release" + ARCH="arm64" do_build } @@ -271,24 +244,10 @@ case $1 in setup_testbed) install_testbed_deps ;; - xmpp) - install_openfire - ;; - clean) - echo do_clean - ;; next_bld_num) $PY $Versioning --next_build_num $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - ;; - debpak_x64_dbg) - VER=$($PY $Versioning --version) - PLATFORM="debian-x64" - BUILD_TYPE="debug" - ARCH="amd64" - $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - make_debpak - ;; + ;; debpak_x64_rel) VER=$($PY $Versioning --version) PLATFORM="debian-x64" @@ -297,14 +256,6 @@ case $1 in $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files make_debpak ;; - debpak_arm_dbg) - VER=$($PY $Versioning --version) - PLATFORM="debian-arm" - BUILD_TYPE="debug" - ARCH="armhf" - $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - make_debpak - ;; debpak_arm_rel) VER=$($PY $Versioning --version) PLATFORM="debian-arm" @@ -313,14 +264,6 @@ case $1 in $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files make_debpak ;; - debpak_arm64_dbg) - VER=$($PY $Versioning --version) - PLATFORM="debian-arm64" - BUILD_TYPE="debug" - ARCH="arm64" - $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - make_debpak - ;; debpak_arm64_rel) VER=$($PY $Versioning --version) PLATFORM="debian-arm64" @@ -339,27 +282,27 @@ case $1 in ARCH="armhf" make_dkrimg ;; - build_webrtc_dx64_dbg) + build_webrtc_x64_dbg) PLATFORM="debian-x64" BUILD_TYPE="debug" build_webrtc ;; - build_webrtc_dx64_rel) + build_webrtc_x64_rel) PLATFORM="debian-x64" BUILD_TYPE="release" build_webrtc ;; - build_webrtc_darm_dbg) - PLATFORM="debian-arm" - BUILD_TYPE="debug" + build_webrtc_arm64_rel) + PLATFORM="debian-arm64" + BUILD_TYPE="release" build_webrtc ;; - build_webrtc_darm_rel) + build_webrtc_arm_rel) PLATFORM="debian-arm" BUILD_TYPE="release" build_webrtc ;; - build_tincan_dx64_dbg) + build_tincan_x64_dbg) $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files VER=$($PY $Versioning --version) PLATFORM="debian-x64" @@ -387,13 +330,6 @@ case $1 in BUILD_TYPE="debug" build_tincan ;; - build_tincan_darm_rel) - $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files - VER=$($PY $Versioning --version) - PLATFORM="debian-arm" - BUILD_TYPE="release" - build_tincan - ;; build_tincan_darm64_rel) $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files VER=$($PY $Versioning --version) @@ -401,16 +337,20 @@ case $1 in BUILD_TYPE="release" build_tincan ;; - build_dx64_dbg) - do_build_debian_x64_debug + build_tincan_darm_rel) + $PY $Versioning --workspace_root=$WorkspaceRoot --gen_version_files + VER=$($PY $Versioning --version) + PLATFORM="debian-arm" + BUILD_TYPE="release" + build_tincan ;; - build_dx64_rel) + build_debx64_rel) do_build_debian_x64_release ;; - build_darm_dbg) - do_build_debian_arm_debug + build_debarm64_rel) + do_build_debian_arm64_release ;; - build_darm_rel) + build_debarm_rel) do_build_debian_arm_release ;; *) diff --git a/scripts/get_archives.sh b/scripts/get_archives.sh index a6ee20e..0f3cdca 100755 --- a/scripts/get_archives.sh +++ b/scripts/get_archives.sh @@ -27,7 +27,7 @@ fi if [ "$build_type" != "debug" ] && [ "$build_type" != "release" ]; then echo "Wrong build_type spelling" helpFunction -elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ]; then +elif [ "$target" != "debian-x64" ] && [ "$target" != "debian-arm" ] && [ "$target" != "debian-arm64" ]; then echo "Wrong OS type spelling" helpFunction fi diff --git a/scripts/get_include.sh b/scripts/get_include.sh index 3d22b03..98211ad 100755 --- a/scripts/get_include.sh +++ b/scripts/get_include.sh @@ -21,7 +21,7 @@ copyHeaders webrtc-checkout/src/api out/include/webrtc copyHeaders webrtc-checkout/src/base out/include/webrtc copyHeaders webrtc-checkout/src/call out/include/webrtc copyHeaders webrtc-checkout/src/common_video out/include/webrtc -copyHeaders webrtc-checkout/src/logging/rtc_event_log out/include/webrtc +copyHeaders webrtc-checkout/src/logging/rtc_event_log out/include/webrtc/logging copyHeaders webrtc-checkout/src/media out/include/webrtc copyHeaders webrtc-checkout/src/modules out/include/webrtc copyHeaders webrtc-checkout/src/p2p out/include/webrtc