Home Wiki > LinuxAutomotive
Sign up | Login

LinuxAutomotive

tagline: From openSUSE

Automotive Grade Linux

Automotive-grade-linux logo.jpg

AGL Automotive Grade Linux

Download for openSUSE:

Vendor: Linux Foundation


Web: https://www.automotivelinux.org/


Automotive grade linux.png
AGL Automotive Grade Linux Automotive Grade Linux is a collaborative open source project that is bringing together automakers, suppliers and technology companies to accelerate the development and adoption of a fully open software stack for the connected car.

https://www.automotivelinux.org

AGL XDS X(cross) Development System (XDS) provides a multi-platform cross development tool with near-zero installation.

It was created for Automotive Grade Linux (AGL) but can be for other purposes
xds-agent: a tool that must run on user host machine to be able to use XDS.
xds-exec : a wrapper on linux exec command that can be use to execute any command on a remote XDS server.

Xds-screenshots.jpg


AGL Application Framework The AGL application framework on top of the security framework provides the components to install and uninstall applications and to run it in a secured environment.
HVAC.jpg
CANdevStudio CANdevStudio is a CAN bus simulation software. It can work with variety of CAN hardware interfaces (e.g. Microchip, Vector, PEAK-Systems) or even without it (vcan and cannelloni) . CANdevStudio enables to simulate CAN signals such as ignition status, doors status or reverse gear by every automotive developer.
CANdevStudio.png

AGL XDS

Installation AGL XDS

Install package for debian distro type

export DISTRO="xUbuntu_16.04"
wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/Release.key | sudo apt-key add -
sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <<EOF
#AGL
deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/ ./
EOF"
sudo apt-get update
sudo apt-get install agl-xds-agent
sudo apt-get install agl-xds-exec

The value 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, xUbuntu_17.10, Debian_8.0, Debian_9.0}

Install package for openSUSE distro type

source /etc/os-release; export DISTRO="openSUSE_Leap_$VERSION"
sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/isv:LinuxAutomotive:app-Development.repo
sudo zypper --gpg-auto-import-keys ref 
sudo zypper install agl-xds-agent
sudo zypper install agl-xds-exec

The value 'DISTRO' can be set to {openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed}

AGL XDS Documentation

You can find XDS documentation Here

AGL Application Framework

Installation AGL Application Framework

Install package for debian distro type

export DISTRO="xUbuntu_16.04"
wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/Release.key | sudo apt-key add -
sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <<EOF
#AGL
deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/ ./
EOF"
sudo apt-get update
#Install application framework
sudo apt-get install agl-app-framework-binder-bin
sudo apt-get install agl-app-framework-binder-dev

The value 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, xUbuntu_17.10}

Install package for openSUSE distro type

source /etc/os-release; export DISTRO="openSUSE_Leap_$VERSION"
sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/isv:LinuxAutomotive:app-Framework.repo
sudo zypper --gpg-auto-import-keys ref
#For openSUSE_Leap_42.2 gcc config
#For openSUSE_Leap_42.3 gcc config
if [ $VERSION == "42.2" ] ; then sudo zypper install agl-gcc5-setup ; else sudo zypper install agl-gcc6-setup; fi
#Install application framework
sudo zypper install agl-app-framework-binder

The value 'DISTRO' can be set to {openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed}

Search for examples and extra packages

 zypper se agl

Install package for Fedora distro type

source /etc/os-release ; export DISTRO="${NAME}_${VERSION_ID}"
sudo wget -O /etc/yum.repos.d/isv:LinuxAutomotive:app-Framework.repo http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/isv:LinuxAutomotive:app-Framework.repo
# AGL
sudo dnf install agl-app-framework-binder

The value 'DISTRO' can be set to {Fedora_25, Fedora_26, Fedora_27, Fedora_Rawhide}

Install note

build environement

After the first installation you need to start a new user session to have the new environment set (/etc/profile.d/AGL*).

CANdevStudio

Installation

Install package for Fedora >= 27

export DISTRO="Fedora_27"
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/Fedora_27/isv:LinuxAutomotive:app-Development.repo
#Install CANdevStudio
sudo dnf install CANdevStudio

The value 'DISTRO' can only be set to Fedora_27.

Install package for openSUSE distro type

source /etc/os-release; export DISTRO="openSUSE_Tumbleweed"
sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/isv:LinuxAutomotive:app-Development.repo
sudo zypper --gpg-auto-import-keys ref
#Install CANdevStudio
sudo zypper install CANdevStudio

The value 'DISTRO' can be set to The value 'DISTRO' can be set to {openSUSE_Leap_42.3, openSUSE_Tumbleweed}

Install package for debian distro type

export DISTRO="xUbuntu_17.10"
wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/Release.key | sudo apt-key add -
sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <<EOF
#AGL
deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Framework/${DISTRO}/ ./
EOF"
sudo apt-get update
#Install application framework
sudo apt-get install candevstudio

The value 'DISTRO' can be set to {xUbuntu_17.10}

Quickstart

Launch it with following command:

user@hostname:~$ CANdevStudio

Then start a new project

Bringing up a CAN device using socketcan backend

# Find your interface name (e.g. can0)
ip link
# Configure bitrate
sudo ip link set can0 type can bitrate 1000000
# Bring the device up
sudo ip link set can0 up
# Optionally configure CAN termination
sudo ip link set can0 type can termination 1
  • Using slcand:
* Based on FTDI Serial driver
* Requires slcand to "convert" serial device to SocketCAN.
* Officially supported in Linux Kernel v2.6.38
# Create SocketCAN device from serial interface
sudo slcand -o -c -s8 -S1000000 /dev/ttyUSB0 can0
# Bring the device up
sudo ip link set can0 up
  • Using builtin Linux kernel virtual CAN module vcan:
   sudo modprobe vcan
   sudo ip link add dev can0 type vcan
   sudo ip link set can0 up

Add a CAN device in CANdevStudio

Start a new project and grab a CanDevice from the left pane in the Device Layer section and drop it on the grid workspace. Right-Click on it and open its Properties. Here you have to set the backend and the interface name you'll want to use. Backend available are:

  • socketcan: CAN stack present by default in the Linux Kernel. This use Linux socket and open source CAN device driver (More information here).
  • systeccan: CAN bus backend using the SYS TEC CAN adapters.
  • peakcan: CAN bus plugin using the PEAK CAN adapters.
  • tinycan: CAN bus plugin using the MHS CAN adapters.
  • vectorcan: CAN bus plugin using the Vector CAN adapters.

More details about CANdevStudio CAN bus support here.

Interface is the name of the device you want to use. Bring up your CAN device and use the following command to find out which one are available:

ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 90:b1:1c:6b:b2:21 brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:81:38:a8:75 brd ff:ff:ff:ff:ff:ff
12: can0: <NOARP,UP,LOWER_UP> mtu 72 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/can 

Configure a CanRawSender node

CanRawSender node lets you set a predefined list of CAN Raw messages to send.

Click on the + sign to add as much as needed signals to send. For each signals, you has to define:

  • the CAN arbitration ID
  • Data load
  • Loop checkbox make the signal repeat infinitely
  • Interval is used with loop to define how much time between 2 sends

Once clicked on Play button in the main Window to launch the simulation, then each signals will be sent in the same order than defined in the CanRawSender node then using interval to repeat themselves.

Signals without loop checked will not be sent, you have to click manually on the Send button to trigger a sending.

Using CanRawView

CanRawViewer is pretty simple to use, once simulation launched you'll see signal flows in the window. You can use Clear button to wipe the window.

Use the Combine button to stack by arbitration ID the CAN signals. Then only the latest signal for each arbitration ID will be displayed.

Where to find the sources

agl-afb-aaaa

 https://github.com/iotbzh/audio-bindings

agl-afb-controller

 https://github.com/iotbzh/controller-binding

agl-afb-mpdc

 https://github.com/iotbzh/audio-mpc

agl-alsa-lib

 ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2

agl-app-framework-binder

 https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder

agl-audio-bindings

 https://github.com/iotbzh/audio-bindings

agl-debhelper

 https://anonscm.debian.org/git/debhelper/debhelper.git

agl-dh-autoreconf

 git://anonscm.debian.org/collab-maint/dh-autoreconf.git

agl-helloworld-service

 https://github.com/iotbzh/helloworld-service

agl-libmicrohttpd

 https://www.gnu.org/software/libmicrohttpd/

agl-libmpdclient

 http://www.musicpd.org/download/libmpdclient/2/%{name}-%{version}.tar.xz

agl-low-level-can-service

 https://github.com/iotbzh/CAN_signaling

agl-lua-macros

 http://www.lua.org

agl-lua53

 http://www.lua.org

agl-unicens2-binding

 https://github.com/iotbzh/unicens-agent

agl-unicens2-driver

 https://github.com/iotbzh/unicens2-driver

CANdevStudio

 https://github.com/GENIVI/CANdevStudio