CLASSES/MACHINES: update for v2.0.0
Several updates integrated: - removal of no more supported basic boot scheme - removal of no more supported boot device (nor-nand and nor-emmc) - rework of providers and machine features - introduction of new board versions (a, c, d, f) - update of extlinuxconf-stm32mp class to manage multiple board versions - configure 'extlinux.conf' file to manage PARTUUID to select rootfs partition - new partition images management (easy to add or remove partition through new PARTITIONS_CONFIG var - specific configuration on machine side for all storage device supported Change-Id: I7e4d3d16535a5654c7fd80f9b56296a61050def3
This commit is contained in:
1 parent
2fbe4ce39c
commit
af5ae28215
33 files changed
+1297
-1245
No files matched your search
@@ -1,38 +1,13 @@
|
||||
SUMMARY = "STM32MP bootfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_BOOTFS_LABEL}fs"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_BOOTFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_BOOTFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Set ROOTFS_MAXSIZE to expected ROOTFS_SIZE to use the whole disk partition and leave extra space to user
|
||||
IMAGE_ROOTFS_SIZE = "${BOOTFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${BOOTFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${IMAGE_ROOTFS_SIZE}"
|
||||
IMAGE_OVERHEAD_FACTOR = "1"
|
||||
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
kernel-imagebootfs \
|
||||
@@ -40,38 +15,8 @@ PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('MACHINE_FEATURES', 'splashscreen', 'u-boot-stm32mp-splash', '', d)} \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# remove specific systemd task
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd-systemctl-native;"
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd_preset_all;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -d ${IMAGE_ROOTFS}/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
# Add specific autoresize package to bootfs
|
||||
AUTORESIZE ?= ""
|
||||
PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '${AUTORESIZE}', '', d)} \
|
||||
"
|
||||
@@ -0,0 +1,67 @@
|
||||
inherit core-image
|
||||
|
||||
# Disable flashlayout generation for the partition image as this is supposed
|
||||
# to be done only for complete image
|
||||
ENABLE_FLASHLAYOUT_CONFIG = "0"
|
||||
|
||||
# Disable image license summary generation for the partition image as this is
|
||||
# supposed to be done only for complete image
|
||||
ENABLE_IMAGE_LICENSE_SUMMARY = "0"
|
||||
|
||||
# Remove WIC image generation for the partition image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
# Append DISTRO to image name even if we're not using ST distro setting
|
||||
# Mandatory to ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
bbnote "Mountpoint ${IMAGE_PARTITION_MOUNTPOINT} found in ${IMAGE_ROOTFS}"
|
||||
bbnote ">>> Remove all files and folder except ${IMAGE_PARTITION_MOUNTPOINT}"
|
||||
TARGETROOTFS=${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}
|
||||
while [ "${TARGETROOTFS}" != "${IMAGE_ROOTFS}" ]
|
||||
do
|
||||
find $(dirname ${TARGETROOTFS})/ -mindepth 1 ! -regex "^${TARGETROOTFS}\(/.*\)?" -delete
|
||||
TARGETROOTFS=$(dirname ${TARGETROOTFS})
|
||||
done
|
||||
bbnote ">>> Move ${IMAGE_PARTITION_MOUNTPOINT} contents to ${IMAGE_ROOTFS}"
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
bbnote ">>> Remove remaining ${IMAGE_PARTITION_MOUNTPOINT} folder"
|
||||
# Remove empty boot folder
|
||||
TARGETROOTFS=${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}
|
||||
while [ "${TARGETROOTFS}" != "${IMAGE_ROOTFS}" ]
|
||||
do
|
||||
bbnote ">>> Delete ${TARGETROOTFS}"
|
||||
rm -rf ${TARGETROOTFS}/
|
||||
TARGETROOTFS=$(dirname ${TARGETROOTFS})
|
||||
done
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
@@ -1,35 +1,11 @@
|
||||
SUMMARY = "STM32MP userfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_USERFS_LABEL}"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_USERFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_USERFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Define to null ROOTFS_MAXSIZE
|
||||
IMAGE_ROOTFS_MAXSIZE = ""
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
m4projects-stm32mp1-userfs \
|
||||
@@ -40,40 +16,3 @@ PACKAGE_INSTALL += " \
|
||||
PACKAGE_INSTALL += " \
|
||||
packagegroup-st-demo \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/ | grep -v $(dirname ${IMAGE_PARTITION_MOUNTPOINT}/))
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/ ${IMAGE_ROOTFS}$(dirname ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
@@ -1,77 +1,18 @@
|
||||
SUMMARY = "STM32MP vendorfs Image"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# WIC image generation is not needed for this image
|
||||
IMAGE_FSTYPES_remove = "${WKS_IMAGE_FSTYPES}"
|
||||
|
||||
IMAGE_NAME_SUFFIX = ".${STM32MP_VENDORFS_LABEL}"
|
||||
|
||||
IMAGE_PARTITION_MOUNTPOINT = "${STM32MP_VENDORFS_MOUNTPOINT_IMAGE}"
|
||||
|
||||
# Specific for UBI volume
|
||||
UBI_VOLNAME = "${STM32MP_VENDORFS_LABEL}"
|
||||
|
||||
# Fix to append DISTRO to image name even if we're not using ST distro setting
|
||||
# This ease flashlayout file configuration
|
||||
IMAGE_BASENAME_append = "${@'' if 'openstlinuxcommon' in OVERRIDES.split(':') else '-${DISTRO}'}"
|
||||
|
||||
# Reset image feature
|
||||
IMAGE_FEATURE = ""
|
||||
include recipes-st/images/st-image-partitions.inc
|
||||
|
||||
# Set ROOTFS_MAXSIZE to expected ROOTFS_SIZE to use the whole disk partition and leave extra space to user
|
||||
IMAGE_ROOTFS_SIZE = "${VENDORFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${VENDORFS_PARTITION_SIZE}"
|
||||
IMAGE_ROOTFS_MAXSIZE = "${IMAGE_ROOTFS_SIZE}"
|
||||
IMAGE_OVERHEAD_FACTOR = "1"
|
||||
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
||||
|
||||
# Reset PACKAGE_INSTALL to avoid getting installed packages added in machine through IMAGE_INSTALL_append:
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
# Reset LINGUAS_INSTALL to avoid getting installed any locale-base package
|
||||
LINGUAS_INSTALL = ""
|
||||
IMAGE_LINGUAS = ""
|
||||
|
||||
# Add specific package for our image:
|
||||
PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('MACHINE_FEATURES', 'gpu', d.getVar('GPU_USERLAND_LIBRARIES_INSTALL') or '', '', d)} \
|
||||
"
|
||||
|
||||
# Reset LDCONFIG to avoid runing ldconfig on image.
|
||||
LDCONFIGDEPEND = ""
|
||||
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND useless buildinfo
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "buildinfo;"
|
||||
# Remove from IMAGE_PREPROCESS_COMMAND the prelink_image as it could be run after
|
||||
# we clean rootfs folder leading to cp error if '/etc/' folder is missing:
|
||||
# cp: cannot create regular file
|
||||
# ‘/local/YOCTO/build/tmp-glibc/work/stm32mp1-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/etc/prelink.conf’:
|
||||
# No such file or directory
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "prelink_image;"
|
||||
|
||||
IMAGE_PREPROCESS_COMMAND_append = "reformat_rootfs;"
|
||||
|
||||
# remove specific systemd task
|
||||
# Remove specific systemd task
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd-systemctl-native;"
|
||||
IMAGE_PREPROCESS_COMMAND_remove = "systemd_preset_all;"
|
||||
|
||||
|
||||
# Cleanup rootfs newly created
|
||||
reformat_rootfs() {
|
||||
if [ -d ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT} ]; then
|
||||
# Keep only IMAGE_PARTITION_MOUNTPOINT folder
|
||||
for f in $(ls -1 -d ${IMAGE_ROOTFS}/*/ | grep -v ${IMAGE_PARTITION_MOUNTPOINT}/)
|
||||
do
|
||||
rm -rf $f
|
||||
done
|
||||
|
||||
# Move all expected files in /rootfs
|
||||
mv ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/* ${IMAGE_ROOTFS}/
|
||||
|
||||
# Remove empty boot folder
|
||||
rm -rf ${IMAGE_ROOTFS}${IMAGE_PARTITION_MOUNTPOINT}/
|
||||
else
|
||||
bbwarn "${IMAGE_PARTITION_MOUNTPOINT} folder not available in rootfs folder, no reformat done..."
|
||||
fi
|
||||
}
|
||||
Reference in new issue
Block a user