Install deb packages on Torizon target (NOT on container)

Hi @lucas_a.tx, @sivagganesan

I don’t see in the custom meta layer examples a case that fits exactly my need but I guess the recipe recipes-customer/hello-world/hello-world_1.0.0.bb is a good starting point.

Since I have binary drivers I would then make the binary archive accessible from SRC_URI and have a do_install() script to actually make it installed at the right place ? I would make a recipe like this :

# Package summary
SUMMARY = "Proprietary binary drivers"
# License
LICENSE = "Company providing drivers"
# License checksum file is always required  
LIC_FILES_CHKSUM = "???? WHAT TO DO HERE ?????"

# drivers from local file
SRC_URI = "file://mydriver.run"

# Change source directory to workdirectory where the binary driver file is
S = "${WORKDIR}"

# Install binary and configuration files to final directory (/usr/bin, /etc, )
# nb: the mydriver.run is a self extracting archive that installs the file at the right place
do_install() {
    yes y | sh mydriver.run
}

Alternatively, I could use debian packages so the recipe would become :

...

# drivers from local file
SRC_URI = "file://mydrivers-debs.tgz

# Change source directory to workdirectory where the binary driver file is
S = "${WORKDIR}"

# Install binary and configuration files to final directory (/usr/bin, /etc, )
do_install() {
    tar xfvz  mydrivers-debs.tgz
    dpkg -i mydeb1.deb
    dpkg -i mydeb2.deb
    dpkg -i mydeb3.deb
   ....
}

Could you confirm one (or both) of this way is the way to go before I start ?

I am also wondering how I could generate the LIC_FILES_CHKSUM ?

nb: I am still investigating a way to have the drivers inside the container because I managed to make it work once, but it is not reproducible (when I change the camera, or give the container to a colleague). However that is a discussion that I started in another thread, and I may come back to you later on this (Systemd service management on Torizon).

nb: I am working with @sivagganesan so our issues are actually the same :slight_smile:

Best regards,
Fabian