M7350/oe-core/meta/classes/core-image.bbclass

78 lines
3.5 KiB
Plaintext
Raw Normal View History

2024-09-09 08:52:07 +00:00
# Common code for generating core reference images
#
# Copyright (C) 2007-2011 Linux Foundation
2024-09-09 08:57:42 +00:00
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
2024-09-09 08:52:07 +00:00
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
# IMAGE_FEATURES control content of the core reference images
#
2024-09-09 08:57:42 +00:00
# By default we install packagegroup-core-boot and packagegroup-base-extended packages;
# this gives us working (console only) rootfs.
2024-09-09 08:52:07 +00:00
#
# Available IMAGE_FEATURES:
#
2024-09-09 08:57:42 +00:00
# - x11 - X server
# - x11-base - X server with minimal environment
2024-09-09 08:52:07 +00:00
# - x11-sato - OpenedHand Sato environment
# - tools-debug - debugging tools
2024-09-09 08:57:42 +00:00
# - eclipse-debug - Eclipse remote debugging support
2024-09-09 08:52:07 +00:00
# - tools-profile - profiling tools
# - tools-testapps - tools usable to make some device tests
2024-09-09 08:57:42 +00:00
# - tools-sdk - SDK (C/C++ compiler, autotools, etc.)
# - nfs-server - NFS server
2024-09-09 08:52:07 +00:00
# - ssh-server-dropbear - SSH server (dropbear)
# - ssh-server-openssh - SSH server (openssh)
2024-09-09 08:57:42 +00:00
# - qt4-pkgs - Qt4/X11 and demo applications
# - hwcodecs - Install hardware acceleration codecs
# - package-management - installs package management tools and preserves the package manager database
# - debug-tweaks - makes an image suitable for development, e.g. allowing passwordless root logins
# - dev-pkgs - development packages (headers, etc.) for all installed packages in the rootfs
# - dbg-pkgs - debug symbol packages for all installed packages in the rootfs
# - doc-pkgs - documentation packages for all installed packages in the rootfs
# - ptest-pkgs - ptest packages for all ptest-enabled recipes
# - read-only-rootfs - tweaks an image to support read-only rootfs
2024-09-09 08:52:07 +00:00
#
2024-09-09 08:57:42 +00:00
FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug"
FEATURE_PACKAGES_eclipse-debug = "packagegroup-core-eclipse-debug"
FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile"
FEATURE_PACKAGES_tools-testapps = "packagegroup-core-tools-testapps"
FEATURE_PACKAGES_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target"
FEATURE_PACKAGES_nfs-server = "packagegroup-core-nfs-server"
FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear"
FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh"
FEATURE_PACKAGES_qt4-pkgs = "packagegroup-core-qt-demoapps"
FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
# IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2'
# Including image feature foo would replace the image features bar1 and bar2
IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
# IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2'
# An error exception would be raised if both image features foo and bar1(or bar2) are included
MACHINE_HWCODECS ??= ""
CORE_IMAGE_BASE_INSTALL = '\
packagegroup-core-boot \
packagegroup-base-extended \
2024-09-09 08:52:07 +00:00
\
2024-09-09 08:57:42 +00:00
${CORE_IMAGE_EXTRA_INSTALL} \
2024-09-09 08:52:07 +00:00
'
2024-09-09 08:57:42 +00:00
CORE_IMAGE_EXTRA_INSTALL ?= ""
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
2024-09-09 08:52:07 +00:00
inherit image
# Create /etc/timestamp during image construction to give a reasonably sane default time setting
ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
2024-09-09 08:57:42 +00:00
# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'