Files
sunnypilot/selfdrive/boardd/boardd_setup.py
George Hotz 8db0993663 tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 16:34:55 -07:00

46 lines
1.2 KiB
Python

import subprocess
import platform
from distutils.core import Extension, setup
from Cython.Build import cythonize
from common.cython_hacks import BuildExtWithoutPlatformSuffix
from common.basedir import BASEDIR
import os
PHONELIBS = os.path.join(BASEDIR, 'phonelibs')
ARCH = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if ARCH == "x86_64":
if platform.system() == "Darwin":
libraries = ['can_list_to_can_capnp', 'capnp', 'kj']
ARCH_DIR = 'mac'
else:
libraries = [':libcan_list_to_can_capnp.a', ':libcapnp.a', ':libkj.a']
ARCH_DIR = 'x64'
else:
libraries = [':libcan_list_to_can_capnp.a', 'capnp', 'kj']
if os.path.isdir("/system"):
ARCH_DIR = 'aarch64'
else:
ARCH_DIR = 'larch64'
setup(name='Boardd API Implementation',
cmdclass={'build_ext': BuildExtWithoutPlatformSuffix},
ext_modules=cythonize(
Extension(
"boardd_api_impl",
libraries=libraries,
library_dirs=[
'./',
PHONELIBS + '/capnp-cpp/' + ARCH_DIR + '/lib/',
PHONELIBS + '/capnp-c/' + ARCH_DIR + '/lib/'
],
sources=['boardd_api_impl.pyx'],
language="c++",
extra_compile_args=["-std=c++11"],
)
)
)