Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Dec 27, 2023
1 parent e713b68 commit 9088724
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 14 deletions.
24 changes: 24 additions & 0 deletions multistrap/ubuntu-22.04_armv8_jetson.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[General]
noauth=true
unpack=true
bootstrap=Ports Jetson T234
aptsources=Ports Jetson T234

[Ports]
# packages=apt sudo libstdc++-10-dev libc6-dev
packages=apt libstdc++-10-dev libc6-dev
source=http://ports.ubuntu.com
suite=jammy
components=main universe

[Jetson]
packages=nvidia-jetpack
source=https://repo.download.nvidia.com/jetson/common
suite=r36.2
components=main

[T234]
packages=nvidia-l4t-camera nvidia-l4t-multimedia
source=https://repo.download.nvidia.com/jetson/t234
suite=r36.2
components=main
40 changes: 26 additions & 14 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,20 @@ def apply_patch(patch, dir, depth):

@versioned
def install_webrtc(version, source_dir, install_dir, platform: str):
win = platform.startswith("windows_")
filename = f'webrtc.{platform}.{"zip" if win else "tar.gz"}'
rm_rf(os.path.join(source_dir, filename))
archive = download(
f'https://github.com/shiguredo-webrtc-build/webrtc-build/releases/download/{version}/{filename}',
output_dir=source_dir)
rm_rf(os.path.join(install_dir, 'webrtc'))
extract(archive, output_dir=install_dir, output_dirname='webrtc')
# TODO: revert
# 対応済みの webrtc がリリースされていないため、ローカルでの開発用にコメントアウト
# _install/ubuntu-22.04_armv8_jetson/release/webrtc 以下に 対応済みの wertc を解凍したものを手動で配置している
#
#
# win = platform.startswith("windows_")
# filename = f'webrtc.{platform}.{"zip" if win else "tar.gz"}'
# rm_rf(os.path.join(source_dir, filename))
# archive = download(
# f'https://github.com/shiguredo-webrtc-build/webrtc-build/releases/download/{version}/{filename}',
# output_dir=source_dir)
# rm_rf(os.path.join(install_dir, 'webrtc'))
# extract(archive, output_dir=install_dir, output_dirname='webrtc')
pass


class WebrtcConfig(NamedTuple):
Expand Down Expand Up @@ -751,6 +757,10 @@ def install_vpl(version, configuration, source_dir, build_dir, install_dir, cmak

@versioned
def install_lyra(version, install_dir, base_dir, debug, target, webrtc_version, webrtc_info, webrtc_deps, api_level, temp_dir):
print(f'🐛: version => {version}')
print(f'🐛: install_dir => {install_dir}')
print(f'🐛: target => {target}')
input()
lyra_install_dir = os.path.join(install_dir, 'lyra')
rm_rf(lyra_install_dir)

Expand Down Expand Up @@ -808,7 +818,7 @@ def install_lyra(version, install_dir, base_dir, debug, target, webrtc_version,
os.environ['BAZEL_LLVM_DIR'] = os.path.join(install_dir, 'llvm')
os.environ['BAZEL_WEBRTC_INCLUDE_DIR'] = webrtc_info.webrtc_include_dir
os.environ['BAZEL_WEBRTC_LIBRARY_DIR'] = webrtc_info.webrtc_library_dir
if target == 'ubuntu-20.04_armv8_jetson':
if target in ('ubuntu-20.04_armv8_jetson', 'ubuntu-22.04_armv8_jetson'):
opts += ['--config', 'jetson']
clang_version = get_clang_version(os.path.join(install_dir, 'llvm', 'clang', 'bin', 'clang'))
clang_version = fix_clang_version(os.path.join(install_dir, 'llvm', 'clang'), clang_version)
Expand Down Expand Up @@ -927,7 +937,7 @@ def package_name(self):
if self.os == 'raspberry-pi-os':
return f'raspberry-pi-os_{self.arch}'
if self.os == 'jetson':
return 'ubuntu-20.04_armv8_jetson'
return f'ubuntu-{self.osver}_armv8_jetson'
raise Exception('error')


Expand Down Expand Up @@ -1145,7 +1155,7 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug,
elif platform.target.os == 'raspberry-pi-os':
webrtc_platform = f'raspberry-pi-os_{platform.target.arch}'
elif platform.target.os == 'jetson':
webrtc_platform = 'ubuntu-20.04_armv8'
webrtc_platform = f'ubuntu-{platform.target.osver}_armv8'
else:
raise Exception(f'Unknown platform {platform.target.os}')

Expand Down Expand Up @@ -1538,7 +1548,7 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug,


AVAILABLE_TARGETS = ['windows_x86_64', 'macos_x86_64', 'macos_arm64', 'ubuntu-20.04_x86_64',
'ubuntu-22.04_x86_64', 'ubuntu-20.04_armv8_jetson', 'ios', 'android']
'ubuntu-22.04_x86_64', 'ubuntu-20.04_armv8_jetson', 'ubuntu-22.04_armv8_jetson', 'ios', 'android']
WINDOWS_SDK_VERSION = '10.0.20348.0'


Expand Down Expand Up @@ -1573,7 +1583,9 @@ def main():
elif args.target == 'ubuntu-22.04_x86_64':
platform = Platform('ubuntu', '22.04', 'x86_64')
elif args.target == 'ubuntu-20.04_armv8_jetson':
platform = Platform('jetson', None, 'armv8')
platform = Platform('jetson', '20.04', 'armv8')
elif args.target == 'ubuntu-22.04_armv8_jetson':
platform = Platform('jetson', '22.04', 'armv8')
elif args.target == 'ios':
platform = Platform('ios', None, None)
elif args.target == 'android':
Expand Down Expand Up @@ -1829,7 +1841,7 @@ def main():
cmake_args.append("-DTEST_DEVICE_LIST=ON")
if platform.target.package_name in ('windows_x86_64', 'macos_x86_64', 'macos_arm64',
'ubuntu-20.04_x86_64', 'ubuntu-22.04_x86_64',
'ubuntu-20.04_armv8_jetson'):
'ubuntu-20.04_armv8_jetson', 'ubuntu-22.04_armv8_jetson'):
if not args.no_lyra:
cmake_args.append("-DTEST_LYRA=ON")

Expand Down

0 comments on commit 9088724

Please sign in to comment.