Skip to content

Compile GLUED for a system

João Costa edited this page Jun 15, 2022 · 13 revisions

Compilation

After you clone the GLUED's repository cd into it.

0. Docker

This step creates a docker environment with the "correct" toolchain (gcc, etc) versions for you to compile GLUED in a consistent manner and without errors.

cd docker

make && make shell

In some cases you may need to use a different DNS (from 8.8.8.8), for that use the command:

make && make shell DNS=8.8.4.4

After the last command is finished a new shell will open, in glued's folder, but inside the docker environment.

To install the docker on Debian / Ubuntu / Mint distributions sudo apt install docker docker.io

1. Generate system's configuration file

./mkconfig.bash <system's name>

E.g. if you want to compile GLUED for lauv-noptilus-2:

./mkconfig.bash lauv-noptilus-2

This will create a folder called lctr-a6xx with the configuration file lauv-noptilus-2.bash with all variables needed for GLUED. You can check the systems folder to check all available systems as well as their configuration and required packages.

To see the list of available systems ./mkconfig.bash list

2. Compile packages

In this step you'll compile all required packages by your system.

./mksystem.bash <system-folder/system-name.bash>

E.g.

./mksystem.bash lctr-a6xx/lauv-noptilus-2.bash

3. Generate toolchain

./pktoolchain.bash <system-folder/system-name.bash>

This will generate an archive glued-<date>.<vehicle-name>-toolchain-<cpu-architecture>.tar.bz2 with the toolchain required to cross-compile dune to your system later.

4. Generate rootfs

./pkrootfs.bash <system-folder/system-name.bash>

This will generate an archive dune-<date>.<vehicle-name>-rootfs.tar.bz2 with all the files and structure which will be your system disk's root partition (binaries, configuration files, etc)

5. Update GLUED in your system

Don't forget to exit docker before running the next commands!

What you have to do next to update your system's GLUED will depend.

To update an existing GLUED installation, copy the archive into the folder /opt/lsts/glued in your system's disk:

scp <system-folder/glued-rootfs-file.tar.bz2> <username>@<ip address>:/opt/lsts/glued/

and then you just need to reboot you system (or ssh into it, and run services dune restart). Note that this will only change the / folder and nothing will happen to the files under /opt/lsts.

To do a clean or first install, connect the disk to your computer and run:

sudo ./mkdisk.bash <system-folder/system-name.bash> <block_device>

This will format the disk, create the necessary partitions and "flash" the rootfs into it. After it finishes just plug the disk into your system.