# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES += " \
    ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \
    ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \
    ${LAYERDIR}/recipes-*/*/*.bb \
    ${LAYERDIR}/recipes-*/*/*.bbappend \
"

BBFILE_COLLECTIONS += "rcar-gen3-cogent"
BBFILE_PATTERN_rcar-gen3-cogent := "^${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/"
BBFILE_PRIORITY_rcar-gen3-cogent = "7"

LAYERSERIES_COMPAT_rcar-gen3-cogent = "zeus"

# Custom packages
IMAGE_INSTALL_append_rcar-gen3 = " \
    can-utils \
    libsocketcan \
    spidev-dbg spidev-test \
    e2fsprogs \
    e2fsprogs-tune2fs \
    ethtool \
    pciutils \
    usbutils \
    mtd-utils \
    capture \
    v4l2-fw \
    iperf3 \
    bonnie++ \
    lmbench \
    eglibc-utils \
    mm-init \
    iio-utils \
    most-tools \
"

# Radio packages
IMAGE_INSTALL_append_rcar-gen3 += " \
    si-tools \
    si-init \
    linux-firmware-wl18xx \
    ti-bt \
    ti-bt-firmware \
    bluez5 \
    bluez5-testtools \
    ofono \
    ofono-tests \
"

# IMP
IMAGE_INSTALL_append_r8a7797 += " \
    kernel-module-uio-imp \
    kernel-module-cmemdrv \
    udev-rules-cvlib \
"

IMAGE_INSTALL_append_r8a7798 += " \
    kernel-module-uio-imp \
    kernel-module-cmemdrv \
    udev-rules-cvlib \
"

DISTRO_FEATURES_append = " surroundview "
DISTRO_FEATURES_append = " bluetooth"


BBMASK += "/meta-rcar-gen3-adas/recipes-core/systemd/"
BBMASK += "/meta-rcar-gen3-adas/recipes-graphics/opencv/"
BBMASK += "/meta-rcar-gen3-adas/recipes-devtools/valgrind/"