Commit af226bbe authored by Xueliang Zhong's avatar Xueliang Zhong
Browse files

Introduce meta-arm-image layer



Introduce meta-arm-image layer for OpenEmbedded.

meta-arm-image:
- This layer provides a common image shared between Corstone1000 Arm platforms.
- The image is called corstone1000-image.
- Each platform can extend corstone1000-image by including inc files to provide
  custom image settings tailored to the selected machine.
Signed-off-by: Xueliang Zhong's avatarXueliang Zhong <xueliang.zhong@arm.com>
parent 627a9a1e
# meta-arm-image
Introduction
------------
This repository contains meta-arm-image layer for OpenEmbedded
meta-arm-image:
This layer provides a common image shared between Corstone1000 Arm platforms.
The image is called corstone1000-image.
Each platform can extend corstone1000-image by including inc files to provide
custom image settings tailored to the selected machine.
For more information please contact the maintainers.
Maintainer(s)
-------------
* Jon Mason <jon.mason@arm.com>
* Rui Miguel Silva <rui.silva@arm.com>
* Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
# This class removes the empty partition table header
# in the WIC file when --no-table WKS option is used
IMAGE_TYPES += "wic.nopt"
CONVERSIONTYPES += "nopt"
# 1024 bytes are skipped which corresponds to the size of the partition table header to remove
CONVERSION_CMD:nopt = "tail -c +1025 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.nopt"
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2021 Arm Limited
#
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*/*.bb \
${LAYERDIR}/recipes-*/*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-arm-image"
BBFILE_PATTERN_meta-arm-image := "^${LAYERDIR}/"
LAYERDEPENDS_meta-arm-image = "meta-arm-bsp"
LAYERSERIES_COMPAT_meta-arm-image = "gatesgarth hardknott honister"
SUMARY = "Corstone1000 platform Image"
DESCRIPTION = "This is the main image which is the container of all the binaries \
generated for the Corstone1000 platform."
LICENSE = "MIT"
inherit core-image
inherit wic_nopt
IMAGE_FEATURES += "debug-tweaks"
IMAGE_FSTYPES += "wic wic.nopt"
SUMARY = "Corstone1000 platform Initramfs Image"
DESCRIPTION = "This is the main Linux image which includes an initramfs kernel/rootfs bundle."
LICENSE = "MIT"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
# By default all basic packages required for a bootable system are installed
# by core-image . These packages are: packagegroup-core-boot and
# packagegroup-base-extended
inherit image-buildinfo
IMAGE_FEATURES += "debug-tweaks"
# deleting the /usr/lib/opkg/alternatives folder
# because we do not need alternative commands to what
# busybox offers. This saves around 1MB flash
remove_alternative_files () {
rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg
}
ROOTFS_POSTPROCESS_COMMAND += "remove_alternative_files;"
#package management is not supported in corstone1000
IMAGE_FEATURES:remove = "package-management"
# all optee packages
IMAGE_INSTALL += "optee-client"
# FF-A Debugfs driver
IMAGE_INSTALL += "ffa-debugfs-mod"
#
# images inheriting image.bbclass are forced to have do_populate_sysroot dependency from the recipes
# listed under EXTRA_IMAGEDEPENDS
# initramfs image doesn't need to use sysroot data provided by EXTRA_IMAGEDEPENDS recipes
# The code below sets the right dependency of do_image_complete task
# This prevents dependency loops
#
python () {
if d.getVar('IMAGE_BASENAME') == "corstone1000-initramfs-image":
d.setVarFlag('do_image_complete', 'depends', 'corstone1000-initramfs-image:do_image')
}
# WIC partitioning for corstone1000
# Layout and maximum sizes (to be defined):
#
part --source rawcopy --sourceparams="file=bl2_signed.bin" --align 1 --no-table --fixed-size 64k
part --source rawcopy --sourceparams="file=bl2_signed.bin" --align 1 --no-table --fixed-size 64k
part --source rawcopy --sourceparams="file=tfm_s_signed.bin" --align 1 --no-table --fixed-size 384k
part --source rawcopy --sourceparams="file=tfm_s_signed.bin" --align 1 --no-table --fixed-size 384k
# Rawcopy of the FIP binary
part --source rawcopy --sourceparams="file=signed_fip-corstone1000.bin" --align 1 --no-table --fixed-size 2
# Rawcopy of kernel with initramfs
part --source rawcopy --sourceparams="file=Image-initramfs-${MACHINE}.bin" --no-table --fixed-size 12
#bootloader --ptable gpt
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment