Permalink
Browse files

Initial test of removing the input filter code and using EVIOCGRAB in…

…stead
  • Loading branch information...
lmagder committed Jan 7, 2017
1 parent 0a419b7 commit 5885171ca8f3c80ccd52eeac3e54930e84fc3c11
View
@@ -1,6 +1,3 @@
[submodule "mazda/mazda-connector"]
path = mazda/mazda-connector
url = https://github.com/lmagder/mazda-connector
[submodule "mazda/m3-toolchain"]
path = mazda/m3-toolchain
url = https://github.com/lmagder/m3-toolchain
View
@@ -15,7 +15,6 @@ CXXFLAGS=$(CFLAGS) -std=c++11 -static-libstdc++
#static link dbus-c++-glib-1 since it's not on the car
LFLAGS= --sysroot=$(SYSROOT) -g -rdynamic -pthread -ldl -static-libstdc++ $(shell ./pkg-config-wrapper $(SYSROOT) --libs gstreamer-0.10 gstreamer-app-0.10 gstreamer-video-0.10 dbus-1 libusb-1.0 libcrypto openssl glib-2.0 dbus-c++-1) -l:libdbus-c++-glib-1.a -L$(PROTOTOOLCHAIN)/lib -lprotobuf -L$(LIBUNWIND)/lib -lunwind
LFLAGS_IF= --sysroot=$(SYSROOT) -static-libstdc++ $(shell ./pkg-config-wrapper $(SYSROOT) --libs dbus-1)
#headunit binary
SRCS = $(TOP)/hu/hu_aad.cpp
@@ -39,15 +38,7 @@ DEPS = $(addsuffix .arm.d, $(basename $(SRCS)))
APP = headunit
SRCS_IF = mazda-connector/src/input_filter/input_filter.cpp
OBJS_IF = $(addsuffix .arm.o, $(basename $(SRCS_IF)))
DEPS_IF = $(addsuffix .arm.d, $(basename $(SRCS_IF)))
#input_filter binary
APP_IF = input_filter
all: proto dbusxx $(APP) $(APP_IF)
all: proto dbusxx $(APP)
proto: $(TOP)/hu/generated.arm/hu.pb.cc
@@ -56,9 +47,6 @@ dbusxx: dbus/generated_hu.h dbus/generated_cmu.h
$(APP): $(OBJS)
$(CXX) -MD -g -o $(APP) $(OBJS) $(LFLAGS)
$(APP_IF): $(OBJS_IF)
$(CXX) -MD -g -o $(APP_IF) $(OBJS_IF) $(LFLAGS_IF)
$(TOP)/hu/generated.arm/hu.pb.cc $(TOP)/hu/generated.arm/hu.pb.h: $(TOP)/hu/hu.proto
$(PROTOTOOLCHAIN)/bin/protoc $< --proto_path=$(TOP)/hu/ --cpp_out=$(TOP)/hu/generated.arm/
@@ -76,13 +64,11 @@ dbus/generated_cmu.h dbus/generated_hu.h: dbus/cmu_interfaces.xml dbus/hu_interf
$(CXX) -MD -g $(CXXFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -f *~ $(TOP)/hu/generated.arm/* dbus/generated_*.* $(OBJS) $(OBJS_IF) $(APP) $(APP_IF) $(DEPS) $(DEPS_IF)
rm -f *~ $(TOP)/hu/generated.arm/* dbus/generated_*.* $(OBJS) $(APP) $(DEPS)
install: all
cp -a -f input_filter installer/config/androidauto/data_persist/dev/bin/
cp -a -f headunit installer/config/androidauto/data_persist/dev/bin/
-include $(DEPS)
-include $(DEPS_IF)
.PHONY: clean
@@ -4,8 +4,4 @@ export LD_LIBRARY_PATH="/tmp/mnt/data_persist/dev/androidauto/custlib:/jci/lib:/
export LD_PRELOAD=/tmp/mnt/data_persist/dev/androidauto/custlib/libmfw_gst_isink.so
echo 3 > /proc/sys/vm/drop_caches
kill -SIGUSR1 $(pgrep input_filter)
taskset 3 /data_persist/dev/bin/headunit
kill -SIGUSR2 $(pgrep input_filter)
@@ -118,7 +118,6 @@ function androidauto() {
debugTxt = debugTxt + event.data + '\n';
if ( event.data.indexOf("END") > -1) {
ws.send("kill -SIGUSR2 $(pgrep input_filter)");
var psconsole = $('#aaStatusText');
psconsole.focus();
psconsole.append(debugTxt);
View
@@ -130,25 +130,13 @@ show_message "INSTALL ANDROID AUTO HEADUNIT APP ..."
cp -a ${MYDIR}/config/androidauto/data_persist/dev/* /tmp/mnt/data_persist/dev/
cp -a ${MYDIR}/config/androidauto/jci/gui/apps/_androidauto /jci/gui/apps/
cp -a ${MYDIR}/config/androidauto/jci/opera/opera_dir/userjs/additionalApps.* /jci/opera/opera_dir/userjs/
if [ ! -e /jci/opera/opera_dir/userjs/fps.js.bak ]
then
mv /jci/opera/opera_dir/userjs/fps.js /jci/opera/opera_dir/userjs/fps.js.bak
fi
cp -a ${MYDIR}/config/androidauto/usr/lib/gstreamer-0.10/libgsth264parse.so /usr/lib/gstreamer-0.10
cp -a ${MYDIR}/config/androidauto/usr/lib/gstreamer-0.10/libgstalsa.so /usr/lib/gstreamer-0.10
cp -a ${MYDIR}/config/androidauto/jci/sm/* /jci/sm/
log_message "=== Copied Android Auto Headunit App files ==="
chmod 755 /tmp/mnt/data_persist/dev/bin/websocketd
chmod 755 /tmp/mnt/data_persist/dev/bin/headunit
chmod 755 /tmp/mnt/data_persist/dev/bin/headunit-wrapper
chmod 755 /tmp/mnt/data_persist/dev/bin/input_filter
#once you are sure you are not in a boot loop, make this 2, putting it in data_persist doesn't work since it's not writable normally
show_message "Setting /tmp/mnt/data/enable_input_filter to 1"
echo "1" > /tmp/mnt/data/enable_input_filter
#echo "2" > /tmp/mnt/data/enable_input_filter
chmod 755 /tmp/mnt/data/enable_input_filter
#add androidauto.js to stage_wifi
if [ -e "/jci/scripts/stage_wifi.sh" ]
Oops, something went wrong.

0 comments on commit 5885171

Please sign in to comment.