Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openauto recipe #1

Open
matt2005 opened this issue Jan 27, 2021 · 19 comments
Open

Openauto recipe #1

matt2005 opened this issue Jan 27, 2021 · 19 comments

Comments

@matt2005
Copy link
Owner

Link issue

@matt2005
Copy link
Owner Author

@sharavan-lab suggest we use this for the yocto work

@sharavan-lab
Copy link

sure

@matt2005
Copy link
Owner Author

@sharavan-lab Can you share your openauto recipe?

@sharavan-lab
Copy link

Right now I am using your recipe for openauto. I see libaasdk_protobuf linking issues. Do you face similar issue,tooo?
ninja: error: '/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/image/usr/bin/libaasdk_proto.so', needed by '/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/git/bin/btservice', missing and no known rule to make it

Its trying to finf aasdk lib in openauto bin folder

@sharavan-lab
Copy link

Your build command expansion for opeauto.bb

cmake -G Ninja -DCMAKE_MAKE_PROGRAM=ninja /home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/openauto -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_TOOLCHAIN_FILE=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/toolchain.cmake -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 -DOE_QMAKE_PATH_PREFIX=/usr -DOE_QMAKE_PATH_HEADERS=/usr/include -DOE_QMAKE_PATH_LIBS=/usr/lib -DOE_QMAKE_PATH_ARCHDATA=/usr/lib -DOE_QMAKE_PATH_DATA=/usr/share -DOE_QMAKE_PATH_BINS=/usr/bin -DOE_QMAKE_PATH_LIBEXECS=/usr/lib/libexec -DOE_QMAKE_PATH_PLUGINS=/usr/lib/plugins -DOE_QMAKE_PATH_QML=/usr/lib/qml -DOE_QMAKE_PATH_TRANSLATIONS=/usr/share/translations -DOE_QMAKE_PATH_DOCS=/usr/share/doc -DOE_QMAKE_PATH_SETTINGS=/etc -DOE_QMAKE_PATH_EXAMPLES=/usr/share/examples -DOE_QMAKE_PATH_TESTS=/usr/share/tests -DOE_QMAKE_PATH_HOST_PREFIX=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/recipe-sysroot-native -DOE_QMAKE_PATH_HOST_BINS=/usr/bin -DOE_QMAKE_PATH_HOST_DATA=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/recipe-sysroot/usr/lib -DOE_QMAKE_PATH_HOST_LIBS=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/recipe-sysroot/usr/lib -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/recipe-sysroot-native/usr/bin -DOE_QMAKE_PATH_QT_HEADERS=/usr/include -DOE_QMAKE_PATH_QT_ARCHDATA=/usr/lib -DOE_QMAKE_PATH_QT_DATA=/usr/share -DOE_QMAKE_PATH_QT_BINS=/usr/bin -DOE_QMAKE_PATH_QT_TRANSLATIONS=/usr/share/translations -DOE_QMAKE_PATH_QT_DOCS=/usr/share/doc -DOE_QMAKE_PATH_QT_SETTINGS=/etc -DOE_QMAKE_PATH_QT_EXAMPLES=/usr/share/examples -DOE_QMAKE_PATH_QT_TESTS=/usr/share/tests -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=TRUE -DAASDK_INCLUDE_DIRS=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/../aasdk/include -DAASDK_LIBRARIES=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/image/usr/bin/libaasdk.so -DAASDK_PROTO_INCLUDE_DIRS=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/../aasdk -DAASDK_PROTO_LIBRARIES=/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/image/usr/bin/libaasdk_proto.so ../git -Wno-dev

@matt2005
Copy link
Owner Author

yeah, i hit that error too. I'm working on fix with aasdk detection.

@matt2005
Copy link
Owner Author

try the latewst one, I removed the paths and rely on the autodetection

@sharavan-lab
Copy link

sharavan-lab commented Feb 8, 2021 via email

@adrianalin
Copy link
Collaborator

The problem with userland may be that it is still not 64bit compatible. I just changed -DRPI3_BUILD=FALSE in openauto.bb recipe. And it works ok now. I could event test the autoapp by running:

root@raspberrypi4-64:~# autoapp -platform vnc
And on my development laptop, i used a VNC client so i can get the UI.

The problem i encountered now, is after i connect my android device via USB to Raspberry, i get:

...
[2018-03-09 13:46:56.236246] [0x0000007f89ffb130] [debug]   [AaSdk] Message from channel 4
[2018-03-09 13:46:56.236684] [0x0000007f89ffb130] [info]    [OpenAuto] [AudioService] setup request, channel: MEDIA_AUDIO, config index: 1
[2018-03-09 13:46:56.236804] [0x0000007f89ffb130] [info]    [OpenAuto] [AudioService] setup status: 2, channel: MEDIA_AUDIO
[2018-03-09 13:46:56.236990] [0x0000007f89ffb130] [debug]   [AaSdk] f1x.aasdk.proto.messages.AVChannelSetupResponse - media_status: OK
max_unacked: 1
configs: 0

[2018-03-09 13:46:56.238799] [0x0000007f8affd130] [debug]   [AaSdk] Message from channel 6
[2018-03-09 13:46:56.239219] [0x0000007f8affd130] [info]    [OpenAuto] [AudioService] setup request, channel: SYSTEM_AUDIO, config index: 1
[2018-03-09 13:46:56.239343] [0x0000007f8affd130] [info]    [OpenAuto] [AudioService] setup status: 2, channel: SYSTEM_AUDIO
[2018-03-09 13:46:56.239525] [0x0000007f8affd130] [debug]   [AaSdk] f1x.aasdk.proto.messages.AVChannelSetupResponse - media_status: OK
max_unacked: 1
configs: 0

Warning: "Failed to connect: Connection refused"
Error: "Internal data stream error."
appsrc: push buffer wrong state
appsrc: push buffer wrong state
...
[2018-03-09 13:47:05.377241] [0x0000007f8a7fc130] [error]   [OpenAuto] [AudioService] channel error: AaSdk error code: 10, native code: 1, channel: SYSTEM_AUDIO
[2018-03-09 13:47:05.377333] [0x0000007f8a7fc130] [error]   [OpenAuto] [SensorService] channel error: AaSdk error code: 10, native code: 1
[2018-03-09 13:47:05.377391] [0x0000007f8a7fc130] [error]   [OpenAuto] [SensorService] channel error: AaSdk error code: 10, native code: 1
[2018-03-09 13:47:05.377446] [0x0000007f8a7fc130] [error]   [OpenAuto] [AudioInputService] channel error: AaSdk error code: 10, native code: 1
[2018-03-09 13:47:05.377509] [0x0000007f8a7fc130] [error]   [OpenAuto] [AndroidAutoEntity] channel error: AaSdk error code: 10, native code: 1
[2018-03-09 13:47:05.377562] [0x0000007f8a7fc130] [info]    [OpenAuto] [App] onAndroidAutoQuit.
[2018-03-09 13:47:05.377617] [0x0000007f8a7fc130] [info]    [OpenAuto] [AndroidAutoEntity] stop.
[2018-03-09 13:47:05.377665] [0x0000007f8a7fc130] [info]    [OpenAuto] [AudioInputService] stop.
[2018-03-09 13:47:05.377754] [0x0000007f8a7fc130] [info]    [OpenAuto] [AudioService] stop, channel: SYSTEM_AUDIO
[2018-03-09 13:47:05.377823] [0x0000007f8a7fc130] [info]    [OpenAuto] [SensorService] stop.
[2018-03-09 13:47:05.377882] [0x0000007f8a7fc130] [info]    [OpenAuto] [InputService] stop.
[2018-03-09 13:47:05.377930] [0x0000007f8a7fc130] [info]    [OpenAuto] [InputDevice] stop.
[2018-03-09 13:47:05.378223] [0x0000007f8a7fc130] [info]    [OpenAuto] [App] Waiting for device...
[2018-03-09 13:47:05.378290] [0x0000007f8a7fc130] [info]    [OpenAuto] Listening for WIFI clients on port 5000
[2018-03-09 13:47:05.378349] [0x0000007f8a7fc130] [debug]   [OpenAuto] [AndroidAutoEntity] destroy.
...

I guess audio is not correctly configured yet, still need to debug.

@sharavan-lab
Copy link

hello adrianalin,
is there a change in gps_read () , funciton. It's spitting error of definition mismatch.

autoapp/Service/SensorService.cpp:233:50: error: too many arguments to function 'int gps_read(gps_data_t*)'
(gps_read(&this->gpsData_, msg, 10) > 0) &&
^
In file included from /home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/git/include/f1x/openauto/autoapp/Service/SensorService.hpp:21,
from /home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/git/src/autoapp/Service/SensorService.cpp:21:
/home/sharavan/sara_raspi/raspi_build/tmp/work/aarch64-poky-linux/openauto/0.1-r0/recipe-sysroot/usr/include/gps.h:2078:12: note: declared here
extern int gps_read(struct gps_data_t *);
^~~~~~~~

regards

@matt2005
Copy link
Owner Author

matt2005 commented Feb 14, 2021

i've got it build and running on a pi zero, now i'm going to try it on pi4 in x64.
I'm just working out the steps i did to make a recipe for it.
This is it running in qemu.
image

@matt2005
Copy link
Owner Author

matt2005 commented Feb 14, 2021

i'll add a steps to readme so @sharavan-lab can test the same steps to build image.

but here are what i did to run in qemu

git clone [email protected]:dhruvvyas90/qemu-rpi-kernel.git
& "c:\Program Files\qemu\qemu-system-arm.exe" -M versatilepb -cpu arm1176 -m 256 -drive "file=raspberrypi0-wifi_Crankshaft-Image-Yocto-raspberrypi0-wifi-20210214111210.rootfs.rpi-sdimg,if=none,index=0,media=disk,format=raw,id=disk0" -device "virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off" -net "user,hostfwd=tcp::5022-:22" -net nic -dtb qemu-rpi-kernel/versatile-pb-buster-5.4.51.dtb -kernel qemu-rpi-kernel/kernel-qemu-5.4.51-buster -append 'root=/dev/vda2 panic=1' -no-reboot

@sharavan-lab
Copy link

sharavan-lab commented Feb 15, 2021 via email

@matt2005
Copy link
Owner Author

matt2005 commented Feb 15, 2021

i have it working already. i just need to write steps. give me a couple of days.
but here are the rough steps

Raspberry Pi Zero

This took about 36 hours

mkdir -p ~/yocto
cd ~/yocto
sudo chmod 777 ~/yocto
repo init -u https://github.com/matt2005/yocto_manifests.git -b main
repo sync
mkdir -p ~/yocto/rpi/build/conf
cp ~/yocto/rpi/meta-rpi/conf/local.conf.sample ~/yocto/rpi/build/conf/local.conf
cp ~/yocto/rpi/meta-rpi/conf/bblayers.conf.sample ~/yocto/rpi/build/conf/bblayers.conf
sed -i 's/IMAGE_FSTYPES = "tar.xz"/IMAGE_FSTYPES = "tar.xz rpi-sdimg"/g' ~/yocto/rpi/build/conf/local.conf
sed -i 's/MACHINE = "raspberrypi3"/#MACHINE = "raspberrypi3"/g' ~/yocto/rpi/build/conf/local.conf
sed -i 's/DISTRO_FEATURES = "ext2/DISTRO_FEATURES = "x11 ext2/g' ~/yocto/rpi/build/conf/local.conf
export MACHINE=raspberrypi0-wifi
source ~/yocto/poky-dunfell/oe-init-build-env ~/yocto/rpi/build
bitbake crankshaft-image

then for pi3

export MACHINE=raspberrypi3
bitbake crankshaft-image

That will produce 2 images using x11 sato.

@sharavan-lab
Copy link

sharavan-lab commented Feb 15, 2021 via email

matt2005 added a commit that referenced this issue Feb 15, 2021
@sharavan-lab
Copy link

fixed gps_read issue...I am on sumo branch , which branch you guys working on. thisi is the issue I have now...

@sharavan-lab
Copy link

MainWindow.cpp:1263:54: error: 'class QMediaContent' has no member named 'request'
/qt issue...please let me know which version of QT you guys use..

THanks

@matt2005
Copy link
Owner Author

This will build same as my setup try running this for a pi3, it'll take about 48hours to build fully.

mkdir -p ~/yocto
cd ~/yocto
sudo chmod 777 ~/yocto
repo init -u https://github.com/matt2005/yocto_manifests.git -b main
repo sync
mkdir -p ~/yocto/rpi/build/conf
cp ~/yocto/poky-dunfell/meta-crankshaft/conf/local.conf.sample ~/yocto/rpi/build/conf/local.conf
cp ~/yocto/poky-dunfell/meta-crankshaft/conf/bblayers.conf.sample ~/yocto/rpi/build/conf/bblayers.conf
export MACHINE=raspberrypi3
source ~/yocto/poky-dunfell/oe-init-build-env ~/yocto/rpi/build
bitbake crankshaft-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants