mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 08:52:05 +08:00
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>
This commit is contained in:
+25
-9
@@ -14,32 +14,46 @@ AddOption('--asan',
|
||||
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
|
||||
if platform.system() == "Darwin":
|
||||
arch = "Darwin"
|
||||
if arch == "aarch64" and not os.path.isdir("/system"):
|
||||
arch = "larch64"
|
||||
|
||||
webcam = bool(ARGUMENTS.get("use_webcam", 0))
|
||||
|
||||
if arch == "aarch64":
|
||||
if arch == "aarch64" or arch == "larch64":
|
||||
lenv = {
|
||||
"LD_LIBRARY_PATH": '/data/data/com.termux/files/usr/lib',
|
||||
"PATH": os.environ['PATH'],
|
||||
"ANDROID_DATA": os.environ['ANDROID_DATA'],
|
||||
"ANDROID_ROOT": os.environ['ANDROID_ROOT'],
|
||||
}
|
||||
|
||||
if arch == "aarch64":
|
||||
# android
|
||||
lenv["ANDROID_DATA"] = os.environ['ANDROID_DATA']
|
||||
lenv["ANDROID_ROOT"] = os.environ['ANDROID_ROOT']
|
||||
|
||||
cpppath = [
|
||||
"#phonelibs/opencl/include",
|
||||
]
|
||||
|
||||
libpath = [
|
||||
"#phonelibs/snpe/aarch64-android-clang3.8",
|
||||
"/usr/lib",
|
||||
"/data/data/com.termux/files/usr/lib",
|
||||
"/system/vendor/lib64",
|
||||
"/system/comma/usr/lib",
|
||||
"#phonelibs/nanovg",
|
||||
"#phonelibs/libyuv/lib",
|
||||
]
|
||||
|
||||
cflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
if arch == "larch64":
|
||||
cpppath += ["#phonelibs/capnp-cpp/include", "#phonelibs/capnp-c/include"]
|
||||
libpath += ["#phonelibs/snpe/larch64"]
|
||||
libpath += ["#phonelibs/libyuv/larch64/lib"]
|
||||
libpath += ["#external/capnparm/lib", "/usr/lib/aarch64-linux-gnu"]
|
||||
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
else:
|
||||
libpath += ["#phonelibs/snpe/aarch64"]
|
||||
libpath += ["#phonelibs/libyuv/lib"]
|
||||
cflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM", "-mcpu=cortex-a57"]
|
||||
|
||||
rpath = ["/system/vendor/lib64"]
|
||||
else:
|
||||
@@ -177,9 +191,11 @@ def abspath(x):
|
||||
# rpath works elsewhere
|
||||
return x[0].path.rsplit("/", 1)[1][:-3]
|
||||
|
||||
#zmq = 'zmq'
|
||||
# still needed for apks
|
||||
zmq = FindFile("libzmq.a", libpath)
|
||||
if arch == 'larch64':
|
||||
zmq = 'zmq'
|
||||
else:
|
||||
zmq = FindFile("libzmq.a", libpath)
|
||||
Export('env', 'arch', 'zmq', 'SHARED', 'webcam')
|
||||
|
||||
# cereal and messaging are shared with the system
|
||||
|
||||
Reference in New Issue
Block a user