ccmp1: support different DDR3 configurations
This commit implements the support to allow different memory configurations for the CCMP1 platforms, adding support to 512MB and 1GB memory variants for the CCMP15. https://onedigi.atlassian.net/browse/DEL-8752 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
9778490a30
commit
e7d90794f8
|
|
@ -18,8 +18,8 @@ MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAM
|
|||
# boot device
|
||||
# =========================================================================
|
||||
# Configure the list of boards that enable NAND/SDCARD
|
||||
DEVICE_BOARD_ENABLE:NAND += "ccmp13-dvk"
|
||||
DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'ccmp13-dvk', '', d)}"
|
||||
DEVICE_BOARD_ENABLE:NAND += "${STM32MP_DEVICETREE}"
|
||||
DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${STM32MP_DEVICETREE}', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# U-Boot configs
|
||||
|
|
@ -28,14 +28,11 @@ DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard
|
|||
UBOOT_CONFIG = "ccmp13-dvk"
|
||||
UBOOT_CONFIG[ccmp13-dvk] = "ccmp13-dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
|
||||
|
||||
# Platform U-Boot settings
|
||||
UBOOT_DTB_NAME = "ccmp13-dvk.dtb"
|
||||
|
||||
# =========================================================================
|
||||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per board
|
||||
STM32MP_DEVICETREE ??= "ccmp13-dvk"
|
||||
STM32MP_DEVICETREE ??= "ccmp13-dvk-256MB"
|
||||
# Extra DTB for board - need to specify it with .dtb ...
|
||||
STM32MP_KERNEL_DEVICETREE:ccmp13-dvk += " \
|
||||
ccmp133-dvk.dtb \
|
||||
|
|
@ -50,6 +47,8 @@ STM32MP_KERNEL_DEVICETREE:ccmp13-dvk += " \
|
|||
"
|
||||
# Set DTB load address to U-Boot fdt_addr_r
|
||||
UBOOT_DTB_LOADADDRESS = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', '0xc4000000', '', d)}"
|
||||
# List of U-Boot device tree to use
|
||||
UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
|
|
@ -77,6 +76,9 @@ IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
|||
# Default image for install scripts
|
||||
DEFAULT_IMAGE_NAME ?= "core-image-base"
|
||||
|
||||
# Wic files
|
||||
WKS_FILE += "ccmp1-256MB.wks.in"
|
||||
|
||||
# For populate_sdk, gcc-arm-none-eabi_9 has a python2 dependency, so we remove it.
|
||||
ST_TOOLS_FOR_SDK:remove = "nativesdk-gcc-arm-none-eabi"
|
||||
|
||||
|
|
@ -100,7 +102,7 @@ ST_DEBUG_TRACE = "0"
|
|||
# optee
|
||||
# =========================================================================
|
||||
# Map OPTEE configuration to device tree list
|
||||
OPTEE_CONF = "ccmp13-dvk"
|
||||
OPTEE_CONF = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# Flashlayouts
|
||||
|
|
@ -158,8 +160,8 @@ ST_VENDORFS = "0"
|
|||
|
||||
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||
BOOTABLE_ARTIFACTS = " \
|
||||
arm-trusted-firmware/tf-a-ccmp13-dvk-nand.stm32 \
|
||||
fip/fip-ccmp13-dvk-optee.bin \
|
||||
arm-trusted-firmware/tf-a-ccmp13-dvk-256MB-nand.stm32 \
|
||||
fip/fip-ccmp13-dvk-256MB-optee.bin \
|
||||
"
|
||||
|
||||
# TRUSTFENCE basic support
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAM
|
|||
# boot device
|
||||
# =========================================================================
|
||||
# Configure the list of boards that enable NAND/SDCARD
|
||||
DEVICE_BOARD_ENABLE:NAND += "ccmp15-dvk"
|
||||
DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', 'ccmp15-dvk', '', d)}"
|
||||
DEVICE_BOARD_ENABLE:NAND += "${STM32MP_DEVICETREE}"
|
||||
DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard', '${STM32MP_DEVICETREE}', '', d)}"
|
||||
|
||||
# =========================================================================
|
||||
# U-Boot configs
|
||||
|
|
@ -28,14 +28,11 @@ DEVICE_BOARD_ENABLE:SDCARD += "${@bb.utils.contains('BOOTDEVICE_LABELS', 'sdcard
|
|||
UBOOT_CONFIG = "ccmp15-dvk"
|
||||
UBOOT_CONFIG[ccmp15-dvk] = "ccmp15-dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
|
||||
|
||||
# Platform U-Boot settings
|
||||
UBOOT_DTB_NAME = "ccmp15-dvk.dtb"
|
||||
|
||||
# =========================================================================
|
||||
# Machine settings
|
||||
# =========================================================================
|
||||
# Define list of devicetree per board
|
||||
STM32MP_DEVICETREE ??= "ccmp15-dvk"
|
||||
STM32MP_DEVICETREE ??= "ccmp15-dvk-512MB ccmp15-dvk-1GB"
|
||||
# Extra DTB for board - need to specify it with .dtb ...
|
||||
STM32MP_KERNEL_DEVICETREE:ccmp15-dvk += " \
|
||||
ccmp157-dvk.dtb \
|
||||
|
|
@ -57,6 +54,8 @@ STM32MP_KERNEL_DEVICETREE:ccmp15-dvk += " \
|
|||
"
|
||||
# Set DTB load address to U-Boot fdt_addr_r
|
||||
UBOOT_DTB_LOADADDRESS = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', '0xc4000000', '', d)}"
|
||||
# List of U-Boot device tree to use
|
||||
UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# Machine features
|
||||
|
|
@ -85,6 +84,12 @@ IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
|
|||
# Default image for install scripts
|
||||
DEFAULT_IMAGE_NAME ?= "dey-image-webkit"
|
||||
|
||||
# Wic files
|
||||
WKS_FILES += " \
|
||||
ccmp1-512MB.wks.in \
|
||||
ccmp1-1GB.wks.in \
|
||||
"
|
||||
|
||||
# For populate_sdk, gcc-arm-none-eabi_9 has a python2 dependency, so we remove it.
|
||||
ST_TOOLS_FOR_SDK:remove = "nativesdk-gcc-arm-none-eabi"
|
||||
|
||||
|
|
@ -108,7 +113,7 @@ ST_DEBUG_TRACE = "0"
|
|||
# optee
|
||||
# =========================================================================
|
||||
# Map OPTEE configuration to device tree list
|
||||
OPTEE_CONF = "ccmp15-dvk"
|
||||
OPTEE_CONF = "${STM32MP_DEVICETREE}"
|
||||
|
||||
# =========================================================================
|
||||
# Flashlayouts
|
||||
|
|
@ -163,8 +168,10 @@ ST_VENDORFS = "0"
|
|||
|
||||
# Boot artifacts to be copied from the deploy dir to the installer ZIP
|
||||
BOOTABLE_ARTIFACTS = " \
|
||||
arm-trusted-firmware/tf-a-ccmp15-dvk-nand.stm32 \
|
||||
fip/fip-ccmp15-dvk-optee.bin \
|
||||
arm-trusted-firmware/tf-a-ccmp15-dvk-512MB-nand.stm32 \
|
||||
arm-trusted-firmware/tf-a-ccmp15-dvk-1GB-nand.stm32 \
|
||||
fip/fip-ccmp15-dvk-512MB-optee.bin \
|
||||
fip/fip-ccmp15-dvk-1GB-optee.bin \
|
||||
"
|
||||
|
||||
# TRUSTFENCE basic support
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ MULTIUBI_BUILD:remove = "nand_4_256"
|
|||
IMAGE_FSTYPES:remove = "stmultiubi"
|
||||
|
||||
# Wic files
|
||||
WKS_FILE += "ccmp1.wks.in"
|
||||
WKS_FILE_DEPENDS ?= " \
|
||||
virtual/bootloader \
|
||||
virtual/trusted-firmware-a \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2018-2023 Digi International
|
||||
# Copyright (C) 2018-2024 Digi International
|
||||
|
||||
require recipes-bsp/u-boot/u-boot.inc
|
||||
|
||||
|
|
@ -188,10 +188,35 @@ sign_uboot() {
|
|||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Append compile to handle specific device tree compilation
|
||||
#
|
||||
do_compile:append:ccmp1() {
|
||||
if [ -n "${UBOOT_DEVICETREE}" ]; then
|
||||
unset i j
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
i=$(expr $i + 1);
|
||||
for devicetree in ${UBOOT_DEVICETREE}; do
|
||||
# Cleanup previous build artifact
|
||||
[ -f "${B}/${config}/dts/dt.dtb" ] && rm "${B}/${config}/dts/dt.dtb"
|
||||
# Build target for specific device tree
|
||||
oe_runmake -C ${S} O=${B}/${config} DEVICE_TREE=${devicetree} DEVICE_TREE_EXT=${devicetree}.dtb
|
||||
# Install specific binary
|
||||
for binary in ${UBOOT_BINARIES}; do
|
||||
j=$(expr $j + 1);
|
||||
if [ $j -eq $i ]; then
|
||||
binarysuffix=$(echo ${binary} | cut -d'.' -f2)
|
||||
install -m 644 ${B}/${config}/${binary} ${B}/${config}/u-boot-${devicetree}.${binarysuffix}
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
BOOT_TOOLS = "imx-boot-tools"
|
||||
BOOT_TOOLS:ccmp1 = "u-boot"
|
||||
FIP_UBOOT_HEADER = "ccmp15-dvk"
|
||||
FIP_UBOOT_HEADER:ccmp13 = "ccmp13-dvk"
|
||||
|
||||
do_deploy:append:ccimx8m() {
|
||||
# Deploy u-boot-nodtb.bin and ccimx8m[m|n]-dvk.dtb, to be packaged in boot binary by imx-boot
|
||||
|
|
@ -215,15 +240,20 @@ do_deploy:append:ccimx8m() {
|
|||
}
|
||||
|
||||
do_deploy:append:ccmp1() {
|
||||
# Deploy u-boot-nodtb.bin and ccmp1x-dvk.dtb, to be packaged in fip binary by tf-a
|
||||
# Deploy u-boot-nodtb.bin and ccmp1x-dvk-xxxx.dtb, to be packaged in fip binary by tf-a
|
||||
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
|
||||
install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${FIP_UBOOT_DTB}-${FIP_UBOOT_HEADER}.dtb
|
||||
if [ -n "${UBOOT_DEVICETREE}" ]; then
|
||||
for devicetree in ${UBOOT_DEVICETREE}; do
|
||||
# Install u-boot dtb
|
||||
install -m 644 ${B}/${config}/arch/arm/dts/${devicetree}.dtb ${DEPLOYDIR}/${BOOT_TOOLS}/${FIP_UBOOT_DTB}-${devicetree}.dtb
|
||||
done
|
||||
fi
|
||||
install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin
|
||||
|
||||
# Append signature to u-boot DT
|
||||
if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
|
||||
# get name of u-boot devicetree without signature
|
||||
ubootdevicetree="${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-${UBOOT_DTB_NAME}"
|
||||
ubootdevicetree=`ls -1 ${DEPLOYDIR}/${BOOT_TOOLS}/*.dtb | head -n 1`
|
||||
namewithoutsignature=`echo $ubootdevicetree | sed "s/\.dtb/-without-signature.dtb/g"`
|
||||
namewithsignature=`echo $ubootdevicetree | sed "s/\.dtb/-with-signature.dtb/g"`
|
||||
mv $ubootdevicetree $namewithoutsignature
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
install_abort=0
|
||||
BASEFILENAME=0
|
||||
|
||||
setenv INSTALL_ATF_FILENAME tf-a-##MACHINE##-nand.stm32
|
||||
setenv INSTALL_FIP_FILENAME fip-##MACHINE##-optee.bin
|
||||
setenv INSTALL_ATF_FILENAME tf-a-##MACHINE##-${module_ram}-nand.stm32
|
||||
setenv INSTALL_FIP_FILENAME fip-##MACHINE##-${module_ram}-optee.bin
|
||||
setenv INSTALL_MMCDEV 1
|
||||
|
||||
if test -z "${image-name}"; then
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
install_abort=0
|
||||
BASEFILENAME=0
|
||||
|
||||
setenv INSTALL_ATF_FILENAME tf-a-##MACHINE##-nand.stm32
|
||||
setenv INSTALL_FIP_FILENAME fip-##MACHINE##-optee.bin
|
||||
setenv INSTALL_ATF_FILENAME tf-a-##MACHINE##-${module_ram}-nand.stm32
|
||||
setenv INSTALL_FIP_FILENAME fip-##MACHINE##-${module_ram}-optee.bin
|
||||
setenv INSTALL_USBDEV 0
|
||||
|
||||
if test -z "${image-name}"; then
|
||||
|
|
|
|||
|
|
@ -112,6 +112,12 @@ if [ "${check}" = "1" ]; then
|
|||
RUNVOLS=true
|
||||
fi
|
||||
|
||||
# Check module_ram variable exists
|
||||
module_ram=$(getenv "module_ram")
|
||||
if [ -z "${module_ram}" ]; then
|
||||
module_ram="512MB" # Default variant
|
||||
fi
|
||||
|
||||
# remove redirect
|
||||
uuu fb: ucmd setenv stdout serial
|
||||
|
||||
|
|
@ -120,12 +126,12 @@ echo "Determining image files to use..."
|
|||
|
||||
# Determine ATF file to program
|
||||
if [ -z "${INSTALL_ATF_FILENAME}" ]; then
|
||||
INSTALL_ATF_FILENAME="tf-a-##MACHINE##-nand##SIGNED_TFA##.stm32"
|
||||
INSTALL_ATF_FILENAME="tf-a-##MACHINE##-${module_ram}-nand##SIGNED_TFA##.stm32"
|
||||
fi
|
||||
|
||||
# Determine FIP file to program
|
||||
if [ -z "${INSTALL_FIP_FILENAME}" ]; then
|
||||
INSTALL_FIP_FILENAME="fip-##MACHINE##-optee##SIGNED##.bin"
|
||||
INSTALL_FIP_FILENAME="fip-##MACHINE##-${module_ram}-optee##SIGNED##.bin"
|
||||
fi
|
||||
|
||||
# Determine linux, recovery, and rootfs image filenames to update
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@
|
|||
#
|
||||
|
||||
# FSBL partitions aka TF-A BL2
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-1GB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-1GB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Metadata partitions
|
||||
part metadata1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part metadata2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Fip partitions
|
||||
part fip-a --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-a --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 4fd84c93-54ef-463f-a7ef-ae25ff887087
|
||||
part fip-b --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-b --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 09c54952-d5bf-45af-acee-335303766fb3
|
||||
part fip-a --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-a --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-1GB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 4fd84c93-54ef-463f-a7ef-ae25ff887087
|
||||
part fip-b --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-b --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-1GB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 09c54952-d5bf-45af-acee-335303766fb3
|
||||
|
||||
# U-BOOT env
|
||||
part u-boot-env --source empty --part-name=uboot-env --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# short-description: Create SD card image with a boot partition (1GB)
|
||||
# long-description: Creates a partitioned SD card image (1GB)
|
||||
#
|
||||
# - -------- ------------- ------ ------ ------------ -------- --------- --------
|
||||
# | | TFA(2) | Metadata(2) | FIPA | FIPB | U-BOOT ENV | linux | rootfs | data |
|
||||
# - -------- ------------- ------ ------ ------------ -------- --------- --------
|
||||
# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
|
||||
# | | | | | | | | | |
|
||||
# 0 17kB 542kB 1.06MB 5.26MB 9.45MB 9.97MB 77.1MB 898MB 1032MB
|
||||
#
|
||||
# Warning: the first stage of boot (here fsbl1, fsbl2, metadata1, metadata2, fipa, fipb) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
# FSBL partitions aka TF-A BL2
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-256MB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-256MB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Metadata partitions
|
||||
part metadata1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part metadata2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Fip partitions
|
||||
part fip-a --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-a --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-256MB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 4fd84c93-54ef-463f-a7ef-ae25ff887087
|
||||
part fip-b --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-b --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-256MB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 09c54952-d5bf-45af-acee-335303766fb3
|
||||
|
||||
# U-BOOT env
|
||||
part u-boot-env --source empty --part-name=uboot-env --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
|
||||
|
||||
# linux
|
||||
part --source rawcopy --sourceparams="file=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot.vfat" --ondisk mmcblk --fstype=vfat --part-name=linux --active --fixed-size 64M
|
||||
|
||||
# Rootfs
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 783M --uuid e91c4e10-16e6-4c0e-bd0e-77becf4a3582 --part-name=rootfs
|
||||
# data
|
||||
part data --ondisk mmcblk --fstype=ext4 --label data --fixed-size 128M --part-name=data
|
||||
|
||||
bootloader --ptable gpt
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# short-description: Create SD card image with a boot partition (1GB)
|
||||
# long-description: Creates a partitioned SD card image (1GB)
|
||||
#
|
||||
# - -------- ------------- ------ ------ ------------ -------- --------- --------
|
||||
# | | TFA(2) | Metadata(2) | FIPA | FIPB | U-BOOT ENV | linux | rootfs | data |
|
||||
# - -------- ------------- ------ ------ ------------ -------- --------- --------
|
||||
# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
|
||||
# | | | | | | | | | |
|
||||
# 0 17kB 542kB 1.06MB 5.26MB 9.45MB 9.97MB 77.1MB 898MB 1032MB
|
||||
#
|
||||
# Warning: the first stage of boot (here fsbl1, fsbl2, metadata1, metadata2, fipa, fipb) MUST be on GPT partition to be detected.
|
||||
#
|
||||
|
||||
# FSBL partitions aka TF-A BL2
|
||||
part fsbl1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-512MB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K --align 17
|
||||
part fsbl2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fsbl2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/tf-a-${MACHINE}-512MB-sdcard.stm32" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Metadata partitions
|
||||
part metadata1 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata1 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
part metadata2 --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=metadata2 --sourceparams="file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware/metadata.bin" --ondisk mmcblk --part-type 0x8301 --fixed-size 256K
|
||||
|
||||
# Fip partitions
|
||||
part fip-a --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-a --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-512MB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 4fd84c93-54ef-463f-a7ef-ae25ff887087
|
||||
part fip-b --source rawcopy --fstype=ext4 --fsoptions "noauto" --part-name=fip-b --sourceparams="file=${DEPLOY_DIR_IMAGE}/fip/fip-${MACHINE}-512MB-optee.bin" --ondisk mmcblk --part-type 19d5df83-11b0-457b-be2c-7559c13142a5 --fixed-size 4096K --uuid 09c54952-d5bf-45af-acee-335303766fb3
|
||||
|
||||
# U-BOOT env
|
||||
part u-boot-env --source empty --part-name=uboot-env --ondisk mmcblk --part-type 0x8301 --fixed-size 512K
|
||||
|
||||
# linux
|
||||
part --source rawcopy --sourceparams="file=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot.vfat" --ondisk mmcblk --fstype=vfat --part-name=linux --active --fixed-size 64M
|
||||
|
||||
# Rootfs
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --fixed-size 783M --uuid e91c4e10-16e6-4c0e-bd0e-77becf4a3582 --part-name=rootfs
|
||||
# data
|
||||
part data --ondisk mmcblk --fstype=ext4 --label data --fixed-size 128M --part-name=data
|
||||
|
||||
bootloader --ptable gpt
|
||||
Loading…
Reference in New Issue