AGL on DragonBoard410c

Hi everyone

I want to build and deploy AGL on Dragonboard410c so I am following the instructions from this blog:

I received an error with the first command that it is on the blog:

linaro@linaro-alip:~$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \

 build-essential chrpath socat libsdl1.2-dev xterm cpio curl

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package gcc-multilib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘gcc-multilib’ has no installation candidate:

As you can see, I am not able to install the gcc-multilib package. How can I install it?

Regards

Hi @semanel,

You need to carry out these instructions on the host machine, not on Dragonboard410c. You just need to cross compile AGL for Dragonboard410c.

Hope this helps!

Thanks,
Mani

Hi @semanel

I went one step further and tied building it on the 410c anyways. I figured that we don’t need to cross compile, so we don’t need the mulitlibs so it should just build. I ran the apt-get with all of the other packages except gcc-multilibs. Unfortunately once you get to the bitbake step you get an error:

ERROR: Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[aarch64]

The bitbake system seems to check checksums on everything and decides that it has never been tested and validated on an aarch64 system so it refuses to even try building AGL.

Next I went to an almost Ubuntu system, I tried to do the bitbake on Ubuntu under WSL (Windows Subsystem for Linux) which is an x86_64 system usually works for most things, but bitbake fails on this system also, with many error messages, but most importantly this one:
pyinotify.WatchManagerError: add_watch: cannot watch /home/ljking/workspace/workspace_agl/build/conf WD=-1, Errno=Invalid argument (EINVAL)
it appears that bitbake is trying to use a Linux feature that is not implemented in WSL.

Finally I trued it on a real Linux box, and the bitbake works exactly as expected. It hasn’t finished compiling yet, so I haven’t tested the final image, but I expect it will work just fiine.

@danielt it appears we have two issues here, both not really specific to the DragonBoard

  1. gcc-multilib should be available in the aarch64 Debian packages but isn’t
  2. bitbake needs to learn that it can run on a aarch64 host.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.

I am new on Linux and since the cross compile looks to be the best option, I plan to install a Linux virtual machine on my Windows laptop
Is there any specific requirement that I need to take into account for the Linux installation?

If you can guide me, thanks!

Regards

Thanks for the clarification

@ljking, nice little test :wink:

OE/bitbake is not really meant to be used on ARM, at least not yet. It would be cool to build x86 images on arm though!

A bit more reading on this specific, since you’ve shown some interest:

http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128935.html
and
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128940.html

I never followed up more on that…

I’m not sure gcc-multilib is supposed to exist on aarch64 system. For these platforms co-existance between 32- and 64-bit worlds is handled by “pure” multiarch so the compiler doens’t need multilib:
https://wiki.debian.org/Multiarch

There are a couple of features of Yocto/OpenEmbedded that are a little immature on AArch64.

It looks like uninative is one of these features but I think this could just be turned off (it helps you reuse cached build state even if you share the cache between different distributions so turning it off isn’t too bad).

However if AGL needs golang you’ll probably then get stuck even if you turn uninative off because bootsrapping go with a C compiler doesn’t work on AArch64 because the written-in-C of the compiler doesn’t have AArch64 support (although the written-in-go version does).

Hi @Mani and @ljking

Now I am executing the commands on the host PC but I get the following error:
ubuntu@ubuntu:~/workspace_agl$ source meta-agl/scripts/aglsetup.sh -m dragonboard-410c agl-demo agl-appfw-smack agl-devel agl-netboot
------------ aglsetup.sh: Starting
Generating configuration files:
Build dir: /home/ubuntu/workspace_agl/build
Machine: dragonboard-410c
Features: agl-appfw-smack agl-demo agl-devel agl-netboot
Running /home/ubuntu/workspace_agl/poky/oe-init-build-env
Templates dir: /home/ubuntu/workspace_agl/meta-agl/templates/base
/home/ubuntu/workspace_agl/poky/scripts/oe-buildenv-internal: line 51: python3: command not found
BitBake requires Python 3.4.0 or later as ‘python3’
Error: configuration files generation failed. Environment is not ready.

Can you please help me? Thanks!

Regards

You need python3 also. I forgot to mention that dependency, will update the blog.

Install python3 by below command:

sudo apt-get install python3 python3-dev

Hi,

I am trying to setup AGL SDK. When i tried to start AGL worker container using create container script i got the following error. How can i resolve this issue.

Unable to find image ‘docker.automotivelinux.org/agl/worker-generic:5.0’ locally
docker: Error response from daemon: Get https://docker.automotivelinux.org/v2/: x509: certificate is valid for *, not docker.automotivelinux.org.
See ‘docker run --help’.
Copying your identity to container agl-worker-ubuntu-0-root
wait ssh service …
mkstemp: No such file or directory
Error: No such container: agl-worker-ubuntu-0-root
lstat /home/vijay/.ssh: no such file or directory
Error: No such container: agl-worker-ubuntu-0-root
ssh: connect to host ubuntu port 2222: Connection refused
You can now login using:
ssh -p 2222 devel@ubuntu

Thanks

Hi @vijay,

Have you loaded the docker image as below prior running the create container script?

http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/setup-sdk-environment.html#get-docker-image

Thanks,
Mani

Hi @Mani ,

I have loaded the docker image. docker images command has listed the agl worker image. But when i tried to run the container i got the error.

Thanks,
Vijay

Hi @vijay,

There are couple of things needs to be changed:

  1. Use latest docker image:
    wget -O - https://download.automotivelinux.org/AGL/snapshots/sdk/docker/docker_agl_worker-generic-5.0.tar.xz | sudo docker load;
    
  2. Explicitly specify the docker image name for create_container script:
    ./contrib/create_container 0 docker.automotivelinux.org/agl/worker-generic:5.0
    

Hope this helps!

Thanks,
Mani