MACHINE = "genericx86-64"
DISTRO = "poky"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
IMAGE_INSTALL:append = " openssh ssh-keys"
EXTRA_IMAGE_FEATURES += "ssh-server-openssh"

# Image formats for QEMU testing and deployment
IMAGE_FSTYPES += "ext4 tar.bz2"

# Root access configuration
EXTRA_IMAGE_FEATURES += "empty-root-password"
EXTRA_IMAGE_FEATURES += "allow-empty-password"

# SSH configuration
EXTRA_IMAGE_FEATURES += "ssh-server-openssh"

# Memory optimization settings
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"

# Limit memory usage for builds
BB_SCHEDULER = "completion"
INHERIT += "rm_work"

# Rust support
ENABLE_RUST = "1"

# GUI support  
DISTRO_FEATURES:append = " wayland systemd pam usrmerge"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

# Add GUI packages to image
CORE_IMAGE_EXTRA_INSTALL += "gui-app weston liberation-fonts"

# Needed to enable terminal on tty2
EXTRA_IMAGE_FEATURES += "debug-tweaks"

# WiFi support - Intel Centrino Advanced-N 6235 specific
DISTRO_FEATURES += "wifi opengl"
IMAGE_INSTALL:append = " wpa-supplicant iw linux-firmware packagegroup-base-wifi pciutils usbutils"
IMAGE_INSTALL:append = " linux-firmware-iwlwifi-6000g2b-6"

# Enable iwlwifi driver in kernel
KERNEL_FEATURES:append = " features/iwlwifi/iwlwifi.scc"