# Local configuration for meta-rpi images
# Yocto Project 2.6 Poky distribution [thud] branch
# This is a sysvinit system

LICENSE_FLAGS_WHITELIST = "commercial"

DISTRO_FEATURES = "ext2 opengl usbhost ${DISTRO_FEATURES_LIBC}"

DISTRO_FEATURES_BACKFILL_CONSIDERED += "pulseaudio"

PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"

PREFERRED_PROVIDER_udev = "eudev"
VIRTUAL-RUNTIME_init_manager = "sysvinit"

MACHINE_FEATURES_remove = "apm"

IMAGE_FSTYPES = "tar.xz rpi-sdimg"

# Choose the board you are building for
#MACHINE="raspberrypi"
#MACHINE="raspberrypi0"
#MACHINE="raspberrypi0-wifi"
#MACHINE="raspberrypi2"
MACHINE = "raspberrypi3"
#MACHINE="raspberrypi-cm"
#MACHINE="raspberrypi-cm3"

BB_NUMBER_THREADS = "8" 
PARALLEL_MAKE = "-j 8"

#######################################################################
# For Raspberry Pi, uncomment the following block:
RPI_USE_U_BOOT = "1"
#MENDER_BOOT_PART_SIZE_MB = "40"
#IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
# IMAGE_FSTYPES_remove += " rpi-sdimg"
#
# Yocto Sumo (2.5) or newer
#MENDER_PARTITION_ALIGNMENT = "4194304"
#
# Yocto Rocko (2.4) or older
# MENDER_PARTITION_ALIGNMENT_KB = "4096"
#
# Lines below not needed for Yocto Rocko (2.4) or newer.
#IMAGE_BOOT_FILES_append = " boot.scr u-boot.bin;${SDIMG_KERNELIMAGE}"
#KERNEL_IMAGETYPE = "uImage"
####################################################################

# Choices are Image or zImage if NOT using u-boot (no u-boot is the default)
# Choices are uImage or zImage if using u-boot, though if you choose zImage
# with u-boot you will also have to change the boot script boot command
#KERNEL_IMAGETYPE = "zImage"

DISABLE_OVERSCAN = "1"
ENABLE_UART = "1"
ENABLE_RPI3_SERIAL_CONSOLE = "1"
SERIAL_CONSOLES = "115200;ttyAMA0"
# SERIAL_CONSOLES_forcevariable = ""

#DL_DIR = "${HOME}/oe-sources"
#SSTATE_DIR = "/oe4/rpi/sstate-cache"
#TMPDIR = "/oe4/rpi/tmp-thud"

DISTRO = "poky"
PACKAGE_CLASSES = "package_ipk"

# i686 or x86_64
SDKMACHINE = "x86_64"

# for no root passwd uncomment the following and comment the two extra user lines
EXTRA_IMAGE_FEATURES = "debug-tweaks"

# for a root passwd, change jumpnowtek below to your password
#INHERIT += "extrausers"
#EXTRA_USERS_PARAMS = "usermod -P jumpnowtek root; "

# this will force root to change password on first login
#INHERIT += "chageusers"
#CHAGE_USERS_PARAMS = "chage -d0 root; "

USER_CLASSES = "image-mklibs image-prelink"
PATCHRESOLVE = "noop"
RM_OLD_IMAGE = "1"
INHERIT += "rm_work"
CONF_VERSION = "1"
