Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seco-ne/yocto/layers/meta-seconorth-machine
1 result
Show changes
Commits on Source (7)
Showing
with 171 additions and 59 deletions
Subproject commit 42bfe4f0d8f51e894f64a2ffa59732d777c137b3
Subproject commit e207c443f31cfbec0c76075aae3296cf68afafca
......@@ -4,8 +4,8 @@
# ---------------------------------------------------------------------------------------
include:
- project: '${CI_PROJECT_ROOT_NAMESPACE}/yocto/infrastructure/gitlab-ci'
ref: 42bfe4f0d8f51e894f64a2ffa59732d777c137b3
ref: e207c443f31cfbec0c76075aae3296cf68afafca
file: 'manifest-integration.yml'
variables:
GITLAB_CI_REVISION: 42bfe4f0d8f51e894f64a2ffa59732d777c137b3
GITLAB_CI_REVISION: e207c443f31cfbec0c76075aae3296cf68afafca
......@@ -51,7 +51,7 @@ UBOOT_SUFFIX = "bin"
UBOOT_MAKE_TARGET = ""
SPL_BINARY = "spl/u-boot-spl.bin"
BOOT_SPACE = "65536"
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG ??= "sd_no_console sd"
PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
PREFERRED_VERSION:linux-imx = "5.15.32"
......
......@@ -23,10 +23,11 @@ PREFERRED_PROVIDER_virtual/bootloader = "u-boot-seco-imx"
PREFERRED_VERSION:u-boot = "2020.04"
PREFERRED_PROVIDER_fw-sysdata = "u-boot-seco-imx-fw-sysdata"
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG ??= "sd_no_console sd"
# Not sure, if UBOOT_MACHINE or UBOOT_CONFIG should be set to select the proper platform.
# Setting both is not possible.
UBOOT_CONFIG[sd] = "seco-mx6_defconfig,sdcard"
UBOOT_CONFIG[sd_no_console] = "seco-mx6_no_console_defconfig,sdcard"
UBOOT_DTB_NAME = "imx6q-san.dtb"
......
......@@ -22,6 +22,7 @@ SUPPORTED_HARDWARE = " \
# Not sure, if UBOOT_MACHINE or UBOOT_CONFIG should be set to select the proper platform.
# Setting both is not possible.
UBOOT_CONFIG[sd] = "tanaro_v1r1_1gb_defconfig,sdcard"
UBOOT_CONFIG[sd_no_console] = "tanaro_v1r1_1gb_no_console_defconfig,sdcard"
# @TODO: Can we move to a proper DTB (like tanaro.dtb)?
UBOOT_DTB_NAME = "kuk-trizeps8mini.dtb"
......
......@@ -21,6 +21,7 @@ SUPPORTED_HARDWARE = " \
# Not sure, if UBOOT_MACHINE or UBOOT_CONFIG should be set to select the proper platform.
# Setting both is not possible.
UBOOT_CONFIG[sd] = "trizeps8plus_defconfig,sdcard"
UBOOT_CONFIG[sd_no_console] = "trizeps8plus_no_console_defconfig,sdcard"
UBOOT_DTB_NAME = "kuk-trizeps8plus.dtb"
UBOOT_ADDITIONAL_DTB_NAMES = " seco-mx8mp-mc3.dtb seco-imx8mp-d18.dtb "
......@@ -48,6 +49,9 @@ DDR_FIRMWARE_NAME = " \
KERNEL_DEVICETREE ?= " \
seconorth/seconorth-trizeps8plus_v1r3-dual-espresso.dtb \
seco/seco-imx8mp-d18.dtb \
seco/seco-imx8mp-d18-mv-qx-070wsvgamml01d.dtb \
seco/seco-imx8mp-d18-mv-g101ean02.dtb \
seco/seco-imx8mp-d18-mv-g156han02.dtb \
seconorth/seconorth-mc3-baseboard.dtb \
seconorth/seconorth-mc3-full.dtb \
seconorth/seconorth-mc3-hdmi-backplane.dtb \
......
......@@ -9,60 +9,142 @@ do_compile:prepend() {
}
do_compile:append() {
for config in ${UBOOT_CONFIG}; do
# Integrate fw_env.config and u-boot-initial-env
cp "${DEPLOY_DIR_IMAGE}/u-boot-initial-env-${MACHINE}-${config}.bin" "${S}"
cp "${DEPLOY_DIR_IMAGE}/fw_env-${MACHINE}-${config}.config" "${S}"
# Integrate fw_env.config and u-boot-initial-env
cp "${DEPLOY_DIR_IMAGE}/u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin" "${S}"
cp "${DEPLOY_DIR_IMAGE}/fw_env-${MACHINE}-${UBOOT_CONFIG}.config" "${S}"
cd ${S}
cd ${S}
for target in ${IMXBOOT_TARGETS}; do
# Store an md5sum to check the files on target before installation
md5sum ${BOOT_CONFIG_MACHINE}-${target} \
u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \
fw_env-${MACHINE}-${UBOOT_CONFIG}.config \
> ${BOOT_CONFIG_MACHINE}-${target}.md5
for target in ${IMXBOOT_TARGETS}; do
# Store an md5sum to check the files on target before installation
md5sum ${BOOT_NAME}-${MACHINE}-${config}.bin-${target} \
u-boot-initial-env-${MACHINE}-${config}.bin \
fw_env-${MACHINE}-${config}.config \
> ${BOOT_NAME}-${MACHINE}-${config}.bin-${target}.md5
done
cd -
done
cd -
}
do_deploy:append() {
for target in ${IMXBOOT_TARGETS}; do
# Create a tar from the bootfiles, compressed gz, dereference links (copy the file not the link into the tar)
cd ${S}
tar chzf ${DEPLOYDIR}/${BOOT_CONFIG_MACHINE}-${target}.tar.gz \
${BOOT_CONFIG_MACHINE}-${target} \
${BOOT_CONFIG_MACHINE}-${target}.md5 \
u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \
fw_env-${MACHINE}-${UBOOT_CONFIG}.config
for config in ${UBOOT_CONFIG}; do
for target in ${IMXBOOT_TARGETS}; do
# Create a tar from the bootfiles, compressed gz, dereference links (copy the file not the link into the tar)
cd ${S}
tar chzf ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}-${config}.bin-${target}.tar.gz \
${BOOT_NAME}-${MACHINE}-${config}.bin-${target} \
${BOOT_NAME}-${MACHINE}-${config}.bin-${target}.md5 \
u-boot-initial-env-${MACHINE}-${config}.bin \
fw_env-${MACHINE}-${config}.config
cd -
cd ${DEPLOYDIR}
ln -sf ${BOOT_CONFIG_MACHINE}-${target}.tar.gz ${BOOT_NAME}.tar.gz
cd -
cd -
cd ${DEPLOYDIR}
# The creation of the link name is a little hacky, as it assumes the config to begin with sd, but it works
ln -sf ${BOOT_NAME}-${MACHINE}-${config}.bin-${target}.tar.gz ${BOOT_NAME}${config#sd}.tar.gz
cd -
done
done
}
# Copy of the original compile function, as UBOOT_ADDITIONAL_DTB_NAMES had to
# be added to the make call
do_compile() {
do_compile:mx8m() {
bbnote 8MQ/8MM/8MN/8MP boot binary build
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} "
cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING}
done
cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
# Use DTB binary patched with signature node
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME}
fi
cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
# mkimage for i.MX8
# Copy TEE binary to SoC target folder to mkimage
if ${DEPLOY_OPTEE}; then
cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING}
fi
for config in ${UBOOT_CONFIG}; do
cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${config} \
${BOOT_STAGING}/u-boot-spl.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${config} \
${BOOT_STAGING}/u-boot-nodtb.bin
cp ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin-${config} ${BOOT_STAGING}/u-boot.bin
for target in ${IMXBOOT_TARGETS}; do
if [ "$target" = "flash_linux_m4_no_v2x" ]; then
# Special target build for i.MX 8DXL with V2X off
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
else
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs="${UBOOT_DTB_NAME} ${UBOOT_ADDITIONAL_DTB_NAMES}" ${target}
fi
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_NAME}-${MACHINE}-${config}.bin-${target}
fi
done
done
}
do_compile() {
bberror "SOC specific do_compile override function is not found. Please create one."
}
do_install () {
install -d ${D}/boot
for config in ${UBOOT_CONFIG}; do
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${S}/${BOOT_NAME}-${MACHINE}-${config}.bin-${target} ${D}/boot/
done
done
}
deploy_mx8m() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
for config in ${UBOOT_CONFIG}; do
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${config} \
${DEPLOYDIR}/${BOOT_TOOLS}
done
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS}
done
install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
}
do_deploy() {
deploy_${SOC_FAMILY}
# copy the sc fw, dcd and uboot to deploy path
for config in ${UBOOT_CONFIG}; do
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin-${config} ${DEPLOYDIR}/${BOOT_TOOLS}
done
# copy tee.bin to deploy path
if ${DEPLOY_OPTEE}; then
install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS}
fi
# copy makefile (soc.mak) for reference
install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS}
# copy the generated boot image to deploy path
for target in ${IMXBOOT_TARGETS}; do
compile_${SOC_FAMILY}
if [ "$target" = "flash_linux_m4_no_v2x" ]; then
# Special target build for i.MX 8DXL with V2X off
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
else
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs="${UBOOT_DTB_NAME} ${UBOOT_ADDITIONAL_DTB_NAMES}" ${target}
fi
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
# Use first "target" as IMAGE_IMXBOOT_TARGET
if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then
IMAGE_IMXBOOT_TARGET="$target"
echo "Set boot target as $IMAGE_IMXBOOT_TARGET"
fi
for config in ${UBOOT_CONFIG}; do
install -m 0644 ${S}/${BOOT_NAME}-${MACHINE}-${config}.bin-${target} ${DEPLOYDIR}
done
done
ln -sf ${BOOT_NAME}-${MACHINE}-${config}.bin-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME}
}
......@@ -28,25 +28,34 @@ if fatload mmc ${current_partition} ${loadaddr} boot-alt.cfg && env import -t $
done
fi
temp_overlay="none"
if test -n ${cpu_temp_grade}; then
if test "${cpu_temp_grade}" = "industrial"; then
temp_overlay="${soc_type}-industrial-temp-overlay.dtbo"
temp_overlay="${soc_type}-industrial-temp-overlay"
fi
if test "${cpu_temp_grade}" = "extcommercial"; then
temp_overlay="${soc_type}-industrial-temp-overlay.dtbo"
temp_overlay="${soc_type}-industrial-temp-overlay"
fi
if test "${cpu_temp_grade}" = "automotive"; then
temp_overlay="${soc_type}-automotive-temp-overlay.dtbo"
temp_overlay="${soc_type}-automotive-temp-overlay"
fi
fi
if test -n ${temp_overlay}; then
if fatload mmc ${current_partition} ${loadaddr} ${temp_overlay}; then
echo "Overlaying ${temp_overlay} ..."
fdt resize ${filesize} && fdt apply ${loadaddr}
else
echo "No temp overlay applied for ${cpu_temp_grade} grade"
if test ! ${temp_overlay} = "none"; then
fatload mmc ${current_partition} ${loadaddr} "${temp_overlay}.dtbo"
if test $? = 1; then
fatload mmc ${current_partition} ${loadaddr} "${temp_overlay}.dtb"
if test $? = 1; then
echo "No temp overlay applied for ${cpu_temp_grade} grade"
temp_overlay="none"
fi
fi
fi
if test ! ${temp_overlay} = "none"; then
echo "Overlaying ${temp_overlay} ..."
fdt resize ${filesize} && fdt apply ${loadaddr}
fi
else
echo "Failed to load devicetree ${devicetree}"
......
......@@ -28,25 +28,34 @@ if fatload mmc ${current_partition} ${loadaddr} boot.cfg && env import -t ${loa
done
fi
temp_overlay="none"
if test -n ${cpu_temp_grade}; then
if test "${cpu_temp_grade}" = "industrial"; then
temp_overlay="${soc_type}-industrial-temp-overlay.dtbo"
temp_overlay="${soc_type}-industrial-temp-overlay"
fi
if test "${cpu_temp_grade}" = "extcommercial"; then
temp_overlay="${soc_type}-industrial-temp-overlay.dtbo"
temp_overlay="${soc_type}-industrial-temp-overlay"
fi
if test "${cpu_temp_grade}" = "automotive"; then
temp_overlay="${soc_type}-automotive-temp-overlay.dtbo"
temp_overlay="${soc_type}-automotive-temp-overlay"
fi
fi
if test -n ${temp_overlay}; then
if fatload mmc ${current_partition} ${loadaddr} ${temp_overlay}; then
echo "Overlaying ${temp_overlay} ..."
fdt resize ${filesize} && fdt apply ${loadaddr}
else
echo "No temp overlay applied for ${cpu_temp_grade} grade"
if test ! ${temp_overlay} = "none"; then
fatload mmc ${current_partition} ${loadaddr} "${temp_overlay}.dtbo"
if test $? = 1; then
fatload mmc ${current_partition} ${loadaddr} "${temp_overlay}.dtb"
if test $? = 1; then
echo "No temp overlay applied for ${cpu_temp_grade} grade"
temp_overlay="none"
fi
fi
fi
if test ! ${temp_overlay} = "none"; then
echo "Overlaying ${temp_overlay} ..."
fdt resize ${filesize} && fdt apply ${loadaddr}
fi
else
echo "Failed to load devicetree ${devicetree}"
......
......@@ -289,6 +289,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_NO_HZ=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NULL_TTY=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_SNVS_LPGPR=y
CONFIG_NVMEM_VF610_OCOTP=y
......
......@@ -419,6 +419,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_NO_HZ=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NULL_TTY=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_SNVS_LPGPR=y
CONFIG_OPTEE=y
......
......@@ -497,6 +497,7 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NO_HZ_IDLE=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NULL_TTY=y
CONFIG_NUMA_BALANCING=y
CONFIG_NUMA=y
CONFIG_NVMEM_IMX_OCOTP_SCU=y
......@@ -683,6 +684,7 @@ CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SPDIF=m
CONFIG_SND_SOC_TAS2552=y
CONFIG_SND_SOC_TAS571X=m
CONFIG_SND_SOC_TLV320AIC32X4_I2C=y
CONFIG_SND_SOC_WM8524=y
CONFIG_SND_SOC_WM8904=m
CONFIG_SND_SOC_WM8960=y
......
......@@ -263,6 +263,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_NO_HZ=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NULL_TTY=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_SNVS_LPGPR=y
CONFIG_NVMEM_VF610_OCOTP=y
......
......@@ -388,6 +388,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_NO_HZ=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_NULL_TTY=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_SNVS_LPGPR=y
CONFIG_OPTEE=y
......