DESCRIPTION = "FOFB system for DAMC-FMC2ZUP"

COMPATIBLE_MACHINE = "damc-fmc2zup"

# disable autologin at startup on serial tty
IMAGE_AUTOLOGIN = "0"

# Based on techlab headless image
require recipes-core/images/techlab-headless.inc

# Include ZUP common
# this deploy HW packages for zup, zup-demo package
# and some applications (htop, vim, nano, python3...)
require ./recipes-core/images/techlab-common.inc

# Add features
IMAGE_FEATURES_append = " \
    package-management \
    petalinux-python-modules \
    debug-tweaks \
    "

# If we want FPGA manager
#IMAGE_FEATURES_append = " fpga-manager"

# Add applications
IMAGE_INSTALL_append = " packagegroup-zup-support"
IMAGE_INSTALL_append = " util-linux glibc-utils sudo"
IMAGE_INSTALL_append = " python3-asyncua"
IMAGE_INSTALL_append = " deviceaccess"
IMAGE_INSTALL_append = " deviceaccess-python-bindings"
IMAGE_INSTALL_append = " fofb-opcua-server"
IMAGE_INSTALL_append = " xilinx-xvc-server"
#IMAGE_INSTALL_append = " python3-pytango"

# We do not need that
IMAGE_INSTALL_remove = " git python3-pip sudo"

# Remove graphical features
DISTRO_FEATURES_remove = " x11 wayland opengl qt jupyter"
# Not sure the following is usefull...
IMAGE_FEATURES_remove = " x11 wayland opengl qt jupyter"

# Remove unwanted features
DISTRO_FEATURES_remove = " wifi bluetooth 3g nfc"

# User
inherit extrausers
EXTRA_USERS_PARAMS = "\
    usermod -s /bin/zsh -P 'fofb' root; \
    useradd -s /bin/zsh -G sudo -P 'diag91' diag; \
    "

# If the FPGA system has a Block Design, try to generate the Device Tree
DT_FROM_BD_ENABLE = "1"