diff options
Diffstat (limited to 'meta-amd-bsp/conf/machine')
3 files changed, 206 insertions, 0 deletions
diff --git a/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc b/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc new file mode 100644 index 00000000..8134bad3 --- /dev/null +++ b/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc @@ -0,0 +1,79 @@ +require conf/machine/include/amd-features.inc +require conf/machine/include/amd-multimedia.inc + +POKY_DEFAULT_DISTRO_FEATURES_remove = "wayland" + +PREFERRED_PROVIDER_jpeg ?= "jpeg" +PREFERRED_PROVIDER_jpeg-native ?= "jpeg-native" +PREFERRED_VERSION_linux-yocto ?= "4.14%" +PREFERRED_VERSION_libav ?= "9.18" +PREFERRED_PROVIDER_llvm ?= "llvm9.0.0" + +# Components that depend on LLVM should set versions here +# so we know what needs to be changed/validated as LLVM moves +MESA_LLVM_RELEASE_amd = "9.0.0" +CLAMAV_LLVM_RELEASE_amd = "9.0.0" + +MULTILIBS ?= "" +require conf/multilib.conf + +MACHINE_FEATURES += "wifi efi alsa" + +# QEMU does not support some of the enhanced instructions available +# on the AMD chips which causes some build time failures. +MACHINE_FEATURES_remove = "qemu-usermode" + +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules alsa-utils" +MACHINE_EXTRA_RRECOMMENDS += "${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "vdpauinfo", "", d)} grub parted util-linux-blkid" +MACHINE_EXTRA_RRECOMMENDS += "rtc-test watchdog-test spi-test smbus-test gpio-test" +MACHINE_EXTRA_RRECOMMENDS += "amd-wdt amd-spi" + +# Add serial consoles to kernel commandline, these should occur before the tty0 +KERNEL_SERIAL_CONSOLE ??= "" +APPEND += "${KERNEL_SERIAL_CONSOLE}" + +# Make sure the kernel messages go to the VGA console +APPEND += "console=tty0" + +# Set a generic video mode, use gfxpayload=wxh for grub2 +GRUB_OPTS_append = ";set gfxpayload=1024x768" + +# We use ext4 rootfs normally so give it priority rather than trying other FS first +APPEND += "rootfstype=ext4,ext3,ext2" + +APPEND_ADDITIONAL ??= "" +APPEND += "${APPEND_ADDITIONAL}" + +EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi" + +# IMAGE_FSTYPES "live" is enabled by default in oe-core which is +# responsible for building both "iso" & "hddimg". Although the +# right way to specify which ones to build is using NOISO & NOHDD +# vars, there's a specific scenario where Toaster build artifacts +# collection mechanism depends on the IMAGE_FSTYPES variable to +# specify the image types explicitly (See: commit a5b1aa4). +# Also, "iso" doesn't get built even if specified explicitly +# because NOISO = "1" by default (See c787dcd in oe-core). +# Therefore, we do as follows: +IMAGE_FSTYPES += "wic wic.bmap iso" +NOISO = "0" +NOHDD = "1" + +WKS_FILES ?= "amd-usbimage.wks" + +# Contents of IMAGE_BOOT_FILES are deployed into "amd-usbimage.wks" wic image +IMAGE_BOOT_FILES = " \ + ${EFIIMGDIR}${EFIDIR}/*;EFI/BOOT/ \ + ${EFIIMGDIR}/startup.nsh;startup.nsh \ + ${KERNEL_IMAGETYPE} \ + ${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz;initrd \ + ${ROOTFS};rootfs.img \ +" + +# This makes sure that boot files are deployed before do_image_wic starts execution +do_image_wic[depends] += "${IMAGE_BASENAME}:do_bootimg" + +IMAGE_OVERHEAD_FACTOR = "1.1" + +# Add common feartures to be supported for all machines here +EXTRA_IMAGE_FEATURES += "amd-misc-pkgs" diff --git a/meta-amd-bsp/conf/machine/include/amd-features.inc b/meta-amd-bsp/conf/machine/include/amd-features.inc new file mode 100644 index 00000000..d23f51d0 --- /dev/null +++ b/meta-amd-bsp/conf/machine/include/amd-features.inc @@ -0,0 +1,77 @@ +# This file defines AMD Features that can be added as EXTRA_IMAGE_FEATURES to +# different machines based on what is supported on a machine (MACHINE_FEATURES) +# and which additional features a user is requesting through EXTRA_IMAGE_FEATURES. +# This gives a broad flexibility and control over packages being installed on a +# machine for any image without needing to create bbappends for all the images +# that are to be supported. +# +# > Each feature can contain packages and packagegroups as its components. +# > Feature components can be dependent on DISTRO, EXTRA_IMAGE_FEATURES, or any +# variable in general other than a particular image's related variable so most +# things should be based on global configs rather than image configs. +# e.g.: Components of "amd-feature-graphics" may be dependent on "x11-base" as +# an IMAGE_FEATURE. Some packages may only be included for a specific +# DISTRO. Some packages may only be installed if user allows them in local.conf etc. +# > Each machine must add the requested features to EXTRA_IMAGE_FEATURES in its +# own machine config file regardless of the image being built, if that particular +# feature is not handled in the common fragments. +# > Each machine can also override feature components in its own machine config +# when adding the feature to EXTRA_IMAGE_FEATURES. e.g.: A feature may be added +# to a specific machine with minimal (or extended) packages based on requirement. +# +# Features are classified as: +# +# * amd-misc-pkgs : Intended for Platform Specific Packages, Common Packages to be added to all machines, etc. +# * amd-feature-multimedia : Multimedia packages (it does not depend on graphics because a machine may not have a GUI but could play videos and sounds from console) +# * amd-feature-graphics : Graphics packages +# * amd-feature-networking : Networking packages +# * amd-feature-debug-profile : Debugging and Profiling tools +# * <add more features here> : <feature summary> + +GSTREAMER_PKGS ?= " \ + ${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "gstreamer1.0-meta-x11-base", "", d)} \ + ${@bb.utils.contains("COMBINED_FEATURES", "alsa", "gstreamer1.0-meta-audio", "", d)} \ + gstreamer1.0-meta-debug \ + gstreamer1.0-meta-video \ + ${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "gstreamer1.0-omx", "", d)} \ + ${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "gstreamer1.0-vaapi", "", d)} \ +" +VULKAN_PKGS ?= "" +CODEXL_PKGS ?= "" +DPDK_PKGS ?= "" + +# Additional packages can be added to the following feature specific +# variables from each machine's config file +AMD_PLATFORM_SPECIFIC_PKGS ?= "" +AMD_FEATURE_MULTIMEDIA_PKGS ?= "" +AMD_FEATURE_GRAPHICS_PKGS ?= "" +AMD_FEATURE_NETWORKING_PKGS ?= "" +AMD_FEATURE_DEBUG_PROFILE_PKGS ?= "" + +FEATURE_PACKAGES_amd-misc-pkgs = "\ + bc \ + ${AMD_PLATFORM_SPECIFIC_PKGS} \ +" + +FEATURE_PACKAGES_amd-feature-multimedia = "\ + ${GSTREAMER_PKGS} \ + ${AMD_FEATURE_MULTIMEDIA_PKGS} \ +" + +FEATURE_PACKAGES_amd-feature-graphics = "\ + ${@bb.utils.contains("INCLUDE_VULKAN", "yes", "${VULKAN_PKGS}", "", d)} \ + ${AMD_FEATURE_GRAPHICS_PKGS} \ +" +FEATURE_PACKAGES_amd-feature-graphics_append_amdgpu = " ${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "mesa-demos", "", d)}" +FEATURE_PACKAGES_amd-feature-graphics_append_radeon = " ${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "mesa-demos", "", d)}" + +FEATURE_PACKAGES_amd-feature-networking = "\ + ${DPDK_PKGS} \ + strongswan \ + ${AMD_FEATURE_NETWORKING_PKGS} \ +" + +FEATURE_PACKAGES_amd-feature-debug-profile = "\ + ${@bb.utils.contains("INCLUDE_CODEXL", "yes", "${CODEXL_PKGS}", "", d)} \ + ${AMD_FEATURE_DEBUG_PROFILE_PKGS} \ +" diff --git a/meta-amd-bsp/conf/machine/include/amd-multimedia.inc b/meta-amd-bsp/conf/machine/include/amd-multimedia.inc new file mode 100644 index 00000000..3e2c2f57 --- /dev/null +++ b/meta-amd-bsp/conf/machine/include/amd-multimedia.inc @@ -0,0 +1,50 @@ +# AMD provides the functionality to build packages with license-restricted +# algorithms or software. Their configuration variables can be set to +# "yes" or "no" in the local.conf file to enable or disable the +# functionality to include them in the build. The option to build these +# packages is NOT enabled in the default configuration. After enabling the +# option to build, when you build your target image, the BitBake utility +# fetches package sources from the canonical upstream location. If you do +# not have an active network connection, your build with these packages +# will fail. +# +# Building packages with license-restricted algorithms or software may add +# proprietary IP or functionality with other restrictions to your output. +# AMD has no connection with or responsibility for such +# license-restricted algorithms or software, and failure to abide by the +# relevant license terms may have legal consequences. +# +# AMD does not distribute or endorse sources for license-restricted +# algorithms or software, and disclaims any liability for their use. + +# Using mpv requires the use of license-restricted algorithms +# or software. +INCLUDE_MPV ??= "no" + +COMMERCIAL_LIC_FLAGS_MPV = "commercial_mpv commercial_ffmpeg commercial_x264" +LICENSE_FLAGS_WHITELIST_append = "${@' ${COMMERCIAL_LIC_FLAGS_MPV}' if bb.utils.to_boolean('${INCLUDE_MPV}') else ''}" +CORE_IMAGE_EXTRA_INSTALL_append = "${@' mpv' if bb.utils.to_boolean('${INCLUDE_MPV}') else ''}" + +# Certain multimedia formats also require license restricted codecs and +# software components which are not included in build by default. +INCLUDE_COMMERCIAL_MULTIMEDIA ??= "no" + +COMMERCIAL_LIC_FLAGS_MULTIMEDIA = "\ + commercial_gstreamer1.0-plugins-ugly \ + commercial_gstreamer1.0-libav \ + commercial_mpeg2dec \ + commercial_ffmpeg \ + commercial_x264 \ + commercial_faad2 \ +" + +LICENSE_FLAGS_WHITELIST_append = "${@' ${COMMERCIAL_LIC_FLAGS_MULTIMEDIA}' if bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" +CORE_IMAGE_EXTRA_INSTALL_append = "${@' packagegroup-multimedia-risky' if bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" + +# To fix the following error: +# Missing or unbuildable dependency chain was: ['core-image-sato', 'gstreamer1.0-vaapi', 'gstreamer1.0-plugins-bad', 'faad2'] +GSTREAMER_PKGS_remove = "${@' gstreamer1.0-vaapi' if not bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" + +# To fix the following error: +# Missing or unbuildable dependency chain was: ['core-image-sato', 'packagegroup-core-x11-sato', 'gst-examples', 'gstreamer1.0-plugins-bad', 'faad2'] +GSTEXAMPLES_remove = "${@' gst-examples' if not bb.utils.to_boolean('${INCLUDE_COMMERCIAL_MULTIMEDIA}') else ''}" |