xref: /openbmc/openbmc/poky/meta/classes-recipe/core-image.bbclass (revision 8460358c3d24c71d9d38fd126c745854a6301564)
1# Common code for generating core reference images
2#
3# Copyright (C) 2007-2011 Linux Foundation
4#
5# SPDX-License-Identifier: MIT
6
7# IMAGE_FEATURES control content of the core reference images
8#
9# By default we install packagegroup-core-boot and packagegroup-base-extended packages;
10# this gives us working (console only) rootfs.
11#
12# Available IMAGE_FEATURES:
13#
14# - weston              - Weston Wayland compositor
15# - x11                 - X server
16# - x11-base            - X server with minimal environment
17# - x11-sato            - OpenedHand Sato environment
18# - tools-debug         - debugging tools
19# - eclipse-debug       - Eclipse remote debugging support
20# - tools-profile       - profiling tools
21# - tools-testapps      - tools usable to make some device tests
22# - tools-sdk           - SDK (C/C++ compiler, autotools, etc.)
23# - nfs-server          - NFS server
24# - nfs-client          - NFS client
25# - ssh-server-dropbear - SSH server (dropbear)
26# - ssh-server-openssh  - SSH server (openssh)
27# - hwcodecs            - Install hardware acceleration codecs
28# - package-management  - installs package management tools and preserves the package manager database
29# - serial-autologin-root - with 'empty-root-password': autologin 'root' on the serial console
30# - dev-pkgs            - development packages (headers, etc.) for all installed packages in the rootfs
31# - dbg-pkgs            - debug symbol packages for all installed packages in the rootfs
32# - lic-pkgs            - license packages for all installed pacakges in the rootfs, requires
33#                         LICENSE_CREATE_PACKAGE="1" to be set when building packages too
34# - doc-pkgs            - documentation packages for all installed packages in the rootfs
35# - bash-completion-pkgs - bash-completion packages for recipes using bash-completion bbclass
36# - ptest-pkgs          - ptest packages for all ptest-enabled recipes
37# - read-only-rootfs    - tweaks an image to support read-only rootfs
38# - stateless-rootfs    - systemctl-native not run, image populated by systemd at runtime
39# - splash              - bootup splash screen
40#
41# Features for development purposes (previously part of debug-tweaks):
42# - empty-root-password  - the root user has no password set
43# - allow-empty-password - users can have an empty password
44# - allow-root-login     - the root user can login
45# - post-install-logging - log the output of postinstall scriptlets
46#
47FEATURE_PACKAGES_weston = "packagegroup-core-weston"
48FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
49FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
50FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
51FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug"
52FEATURE_PACKAGES_eclipse-debug = "packagegroup-core-eclipse-debug"
53FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile"
54FEATURE_PACKAGES_tools-testapps = "packagegroup-core-tools-testapps"
55FEATURE_PACKAGES_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target"
56FEATURE_PACKAGES_nfs-server = "packagegroup-core-nfs-server"
57FEATURE_PACKAGES_nfs-client = "packagegroup-core-nfs-client"
58FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear"
59FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh"
60FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
61
62
63# IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2'
64# Including image feature foo would replace the image features bar1 and bar2
65IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
66# Do not install openssh complementary packages if either packagegroup-core-ssh-dropbear or dropbear
67# is installed # to avoid openssh-dropbear conflict
68# see [Yocto #14858] for more information
69PACKAGE_EXCLUDE_COMPLEMENTARY:append = "${@bb.utils.contains_any('PACKAGE_INSTALL', 'packagegroup-core-ssh-dropbear dropbear', ' openssh', '' , d)}"
70
71# IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2'
72# An error exception would be raised if both image features foo and bar1(or bar2) are included
73
74MACHINE_HWCODECS ??= ""
75
76CORE_IMAGE_BASE_INSTALL = '\
77    packagegroup-core-boot \
78    packagegroup-base-extended \
79    \
80    ${CORE_IMAGE_EXTRA_INSTALL} \
81    '
82
83CORE_IMAGE_EXTRA_INSTALL ?= ""
84
85IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
86
87inherit image
88