Merge branch 'dey-4.0/master' into dey-4.0/maint

This commit is contained in:
Arturo Buzarra 2023-02-27 16:34:53 +01:00
commit aae03774ab
291 changed files with 3988 additions and 3587 deletions

View File

@ -1,71 +0,0 @@
# Class for the generation of boot artifacts
# This function returns a list with the RAM_CONFIGS that match the RAM size
# in the list of UBOOT_CONFIG
def get_uboot_ram_combinations(d):
import re
types = d.getVar('UBOOT_CONFIG', True) or ""
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
# Convert to arrays
types = types.split(" ")
ram_configs = ram_configs.split(" ")
# Obtain the list of RAM_CONFIGS for whose RAM size there is a match
# in UBOOT_CONFIG
matches = []
for type in types:
ramsize = re.search("([0-9]*[G|M]B)", type).group(1)
for ramc in ram_configs:
if ramsize in ramc:
matches.append(ramc)
return " ".join(matches)
UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}"
# This function returns a list with the bootable artifacts
def get_bootable_artifacts(d):
import re
types = d.getVar('UBOOT_CONFIG', True) or ""
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
soc_revisions = d.getVar('SOC_REVISIONS', True) or ""
uboot_prefix = d.getVar('UBOOT_PREFIX', True) or ""
uboot_suffix = d.getVar('UBOOT_SUFFIX', True) or ""
atf_types = d.getVar('TF_A_CONFIG', True) or ""
fip_type = d.getVar('FIP_UBOOT_CONFIG', True) or ""
atf_boot_modes = ['nand']
artifacts = []
# For platforms with a FIP artifact, ignore u-boot artifacts
if fip_type != "":
machine = d.getVar('MACHINE', True) or ""
# Add ATF artifacts
for t in atf_types.split(" "):
if t in atf_boot_modes:
artifacts.append("arm-trusted-firmware/tf-a-%s-%s.stm32" % (machine, t))
# Add FIP artifact
artifacts.append("fip/fip-%s-%s.bin" % (machine, fip_type))
return " ".join(artifacts)
# For platforms without RAM_CONFIGS, build the artifacts from UBOOT_CONFIG
if ram_configs == "":
for t in types.split(" "):
artifacts.append("%s-%s.%s" % (uboot_prefix, t.replace("_","-"), uboot_suffix))
return " ".join(artifacts)
else:
machine = d.getVar('MACHINE', True) or ""
ram_combinations = get_uboot_ram_combinations(d)
if soc_revisions == "":
for ramc in ram_combinations.split(" "):
artifacts.append("%s-%s-%s.%s" % (uboot_prefix, machine, ramc, uboot_suffix))
else:
for soc_rev in soc_revisions.split(" "):
for ramc in ram_combinations.split(" "):
artifacts.append("%s-%s-%s-%s.%s" % (uboot_prefix, machine, soc_rev, ramc, uboot_suffix))
return " ".join(artifacts)
BOOTABLE_ARTIFACTS = "${@get_bootable_artifacts(d)}"

View File

@ -6,7 +6,7 @@ inherit image_types
BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
def TRUSTFENCE_BOOTIMAGE_DEPENDS(d):
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or ""
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE') or ""
return "%s:do_image_complete" % tf_initramfs if tf_initramfs else ""
do_image_boot_vfat[depends] += " \

View File

@ -28,7 +28,6 @@ LAYERSERIES_COMPAT_digi-arm = "kirkstone"
EULA_FILE_ST_${MACHINE} = "${LAYERDIR}/conf/eula/${MACHINE}"
EULA_FILE_ST_MD5SUM_${MACHINE} = "8b505090fb679839cefbcc784afe8ce9"
BBMASK += "meta-freescale/recipes-bsp/imx-atf/imx-atf_2.4.bb"
# Ignore some STM recipes
BBMASK += " \
meta-st-stm32mp/recipes-bsp/alsa/alsa-state-stm32mp1.bb \
@ -47,3 +46,6 @@ LICENSE_PATH += "${LAYERDIR}/custom-licenses"
DIGI_MTK_GIT ?= "git://stash.digi.com"
DIGI_PKG_SRC ?= "https://ftp1.digi.com/support/digiembeddedyocto/source"
DIGI_GITHUB_GIT ?= "git://github.com/digi-embedded"
# Disable CVE report generation by default
do_vigiles_check[noexec] = "1"

View File

@ -47,3 +47,9 @@ XBEE_TTY ?= "ttymxc4"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
u-boot-ccimx6qpsbc1GB.imx \
u-boot-ccimx6qpsbc2GB.imx \
"

View File

@ -49,3 +49,12 @@ XBEE_TTY ?= "ttymxc4"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
u-boot-ccimx6dlsbc512MB.imx \
u-boot-ccimx6dlsbc.imx \
u-boot-ccimx6qsbc2GB.imx \
u-boot-ccimx6qsbc512MB.imx \
u-boot-ccimx6qsbc.imx \
"

View File

@ -34,3 +34,10 @@ XBEE_TTY ?= "ttymxc1"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"tar.bz2 boot.ubifs recovery.ubifs squashfs", \
"tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
u-boot-ccimx6ulsbc1GB.imx \
u-boot-ccimx6ulsbc512MB.imx \
u-boot-ccimx6ulsbc.imx \
"

View File

@ -33,3 +33,10 @@ IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
# Default image for install scripts
DEFAULT_IMAGE_NAME ?= "core-image-base"
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
u-boot-ccimx6ulstarter1GB.imx \
u-boot-ccimx6ulstarter512MB.imx \
u-boot-ccimx6ulstarter.imx \
"

View File

@ -12,21 +12,23 @@ BOOTLOADER_SEEK_USERDATA = "33"
BOOTLOADER_SEEK_BOOT = "0"
# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx8mm_dvk"
UBOOT_CONFIG[ccimx8mm_dvk] = "ccimx8mm_dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
#
# At the moment config label should be "machine" because SDIMG_BOOTLOADER
# expects a boot artifact named after machine to create the sdcard image.
UBOOT_CONFIG ??= "ccimx8mm-dvk"
UBOOT_CONFIG[ccimx8mm-dvk] = "ccimx8mm_dvk_defconfig"
SPL_BINARY = "spl/u-boot-spl.bin"
# Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mm-dvk.dtb"
ATF_PLATFORM = "imx8mm"
IMX_BOOT_SOC_TARGET = "iMX8MM"
KERNEL_DEVICETREE ?= " \
digi/ccimx8mm-dvk.dtb \
digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \
digi/_ov_board_gpio-watchdog_ccimx8m-dvk.dtbo \
digi/_ov_board_hsd101pfw2-lvds_ccimx8m-dvk.dtbo \
digi/_ov_board_lvds_ccimx8m-dvk.dtbo \
digi/_ov_board_user-leds_ccimx8m-dvk.dtbo \
digi/_ov_som_bt_ccimx8m.dtbo \
@ -48,3 +50,6 @@ XBEE_TTY ?= "ttymxc3"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mm-dvk.bin"

View File

@ -12,21 +12,23 @@ BOOTLOADER_SEEK_USERDATA = "32"
BOOTLOADER_SEEK_BOOT = "0"
# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx8mn_dvk"
UBOOT_CONFIG[ccimx8mn_dvk] = "ccimx8mn_dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
#
# At the moment config label should be "machine" because SDIMG_BOOTLOADER
# expects a boot artifact named after machine to create the sdcard image.
UBOOT_CONFIG ??= "ccimx8mn-dvk"
UBOOT_CONFIG[ccimx8mn-dvk] = "ccimx8mn_dvk_defconfig"
SPL_BINARY = "spl/u-boot-spl.bin"
# Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb"
ATF_PLATFORM = "imx8mn"
IMX_BOOT_SOC_TARGET = "iMX8MN"
KERNEL_DEVICETREE ?= " \
digi/ccimx8mn-dvk.dtb \
digi/_ov_board_flexspi_ccimx8m-dvk.dtbo \
digi/_ov_board_gpio-watchdog_ccimx8m-dvk.dtbo \
digi/_ov_board_hsd101pfw2-lvds_ccimx8m-dvk.dtbo \
digi/_ov_board_lvds_ccimx8m-dvk.dtbo \
digi/_ov_board_user-leds_ccimx8m-dvk.dtbo \
digi/_ov_board_v1-v2_ccimx8mn-dvk.dtbo \
@ -50,3 +52,6 @@ XBEE_TTY ?= "ttymxc3"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = "imx-boot-ccimx8mn-dvk.bin"

View File

@ -1,56 +0,0 @@
#@TYPE: Machine
#@NAME: ConnectCore 8M Plus Development Kit.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8M Plus DVK.
# Include the machine configuration for Digi's ConnectCore 8M module.
include conf/machine/include/ccimx8m.inc
# Temporarily remove wifi and bluetooth machine features until
# we have proper support for the Murata module.
MACHINE_FEATURES:remove = "wifi bluetooth"
DIGI_FAMILY = "ccimx8mp"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mp:ccimx8m:${DIGI_FAMILY}:"
BOOTLOADER_SEEK_USERDATA = "32"
BOOTLOADER_SEEK_BOOT = "0"
# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx8mp_dvk"
UBOOT_CONFIG[ccimx8mp_dvk] = "ccimx8mp_dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
# Set DDR FIRMWARE
DDR_FIRMWARE_VERSION = "202006"
DDR_FIRMWARE_NAME = " \
lpddr4_pmu_train_1d_dmem_${DDR_FIRMWARE_VERSION}.bin \
lpddr4_pmu_train_1d_imem_${DDR_FIRMWARE_VERSION}.bin \
lpddr4_pmu_train_2d_dmem_${DDR_FIRMWARE_VERSION}.bin \
lpddr4_pmu_train_2d_imem_${DDR_FIRMWARE_VERSION}.bin \
"
SPL_BINARY = "spl/u-boot-spl.bin"
# Set u-boot DTB
UBOOT_DTB_NAME = "ccimx8mp-dvk.dtb"
ATF_PLATFORM = "imx8mp"
KERNEL_DEVICETREE ?= " \
digi/ccimx8mp-dvk.dtb \
"
SERIAL_CONSOLES ?= "115200;ttymxc0"
# Bluetooth tty
BT_TTY ?= "ttymxc1"
# XBees
XBEE_RESET_N_GPIO ?= "mca-gpio@15,gpio1@8"
XBEE_SLEEP_RQ_GPIO ?= "mca-gpio@11,gpio1@7"
XBEE_TTY ?= "ttymxc3"
# Image FS types
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'

View File

@ -33,3 +33,15 @@ XBEE_TTY ?= "ttyLP0"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
imx-boot-ccimx8x-sbc-express-B0-1GB_16bit.bin \
imx-boot-ccimx8x-sbc-express-B0-1GB_32bit.bin \
imx-boot-ccimx8x-sbc-express-B0-2GB_32bit.bin \
imx-boot-ccimx8x-sbc-express-B0-512MB_16bit.bin \
imx-boot-ccimx8x-sbc-express-C0-1GB_16bit.bin \
imx-boot-ccimx8x-sbc-express-C0-1GB_32bit.bin \
imx-boot-ccimx8x-sbc-express-C0-2GB_32bit.bin \
imx-boot-ccimx8x-sbc-express-C0-512MB_16bit.bin \
"

View File

@ -46,3 +46,15 @@ XBEE_TTY ?= "ttyMCA0"
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat tar.bz2 recovery.vfat squashfs", \
"boot.vfat ext4.gz sdcard.gz tar.bz2 recovery.vfat", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = " \
imx-boot-ccimx8x-sbc-pro-B0-1GB_16bit.bin \
imx-boot-ccimx8x-sbc-pro-B0-1GB_32bit.bin \
imx-boot-ccimx8x-sbc-pro-B0-2GB_32bit.bin \
imx-boot-ccimx8x-sbc-pro-B0-512MB_16bit.bin \
imx-boot-ccimx8x-sbc-pro-C0-1GB_16bit.bin \
imx-boot-ccimx8x-sbc-pro-C0-1GB_32bit.bin \
imx-boot-ccimx8x-sbc-pro-C0-2GB_32bit.bin \
imx-boot-ccimx8x-sbc-pro-C0-512MB_16bit.bin \
"

View File

@ -0,0 +1,40 @@
#@TYPE: Machine
#@NAME: ConnectCore 93 Development Kit
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 93 DVK
require include/ccimx93.inc
# U-Boot configurations
UBOOT_CONFIG ??= "ccimx93-dvk"
UBOOT_CONFIG[ccimx93-dvk] = "ccimx93-dvk_defconfig"
UBOOT_DTB_NAME = "ccimx93-dvk.dtb"
KERNEL_DEVICETREE ?= " \
digi/ccimx93-dvk.dtb \
digi/_ov_board_lvds_ccimx93-dvk.dtbo \
digi/_ov_som_bt_ccimx93.dtbo \
digi/_ov_som_mca_ccimx93.dtbo \
digi/_ov_som_wifi_ccimx93.dtbo \
"
# Remove additional bluetooth packages
MACHINE_BLUETOOTH_EXTRA_INSTALL = ""
IMAGE_BOOT_FILES:append:use-nxp-bsp = " \
imx93_m33_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \
imx93_m33_TCM_rpmsg_lite_str_echo_rtos.bin \
"
WKS_FILE_DEPENDS:append = " imx-m33-demos"
# XBee
XBEE_RESET_N_GPIO ?= "gpio2@19"
XBEE_SLEEP_RQ_GPIO ?= ""
XBEE_TTY ?= "ttyLP3"
# Image FS types
IMAGE_FSTYPES ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"boot.vfat recovery.vfat squashfs tar.bz2", \
"boot.vfat recovery.vfat ext4.gz tar.bz2 sdcard.gz", d)}'
# Boot artifacts to be copied from the deploy dir to the installer ZIP
BOOTABLE_ARTIFACTS = "imx-boot-ccimx93-dvk.bin"

View File

@ -27,13 +27,6 @@ UBOOT_CONFIG[ccmp13-dvk] = "ccmp13-dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
# Platform U-Boot settings
UBOOT_DTB_NAME = "ccmp13-dvk.dtb"
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "bin"
UBOOT_HAS_FASTBOOT = "true"
# Set U-Boot FIP settings
FIP_UBOOT_DTB = "u-boot"
FIP_UBOOT_CONFIG = "optee"
# =========================================================================
# Machine settings
@ -46,6 +39,8 @@ STM32MP_KERNEL_DEVICETREE:ccmp13-dvk += " \
_ov_board_mikroe-accel2-click_ccmp13-dvk.dtbo \
_ov_board_mikroe-gyro-click_ccmp13-dvk.dtbo \
_ov_board_mikroe-i2c-to-spi-click_ccmp13-dvk.dtbo \
_ov_board_pwm8_ccmp13-dvk.dtbo \
_ov_board_usart3_ccmp13-dvk.dtbo \
_ov_som_bt_ccmp13.dtbo \
_ov_som_wifi_ccmp13.dtbo \
"
@ -55,7 +50,6 @@ STM32MP_KERNEL_DEVICETREE:ccmp13-dvk += " \
# =========================================================================
MACHINE_FEATURES += "bluetooth"
MACHINE_FEATURES += "wifi"
MACHINE_FEATURES += "mca"
# =========================================================================
# Firmware
@ -172,11 +166,11 @@ DISTRO_FEATURES:append = " initrd "
# add support to pulseaudio
DISTRO_FEATURES:append = "pulseaudio"
# Disabling sysvinit
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager ?= "systemd"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
# Disable use of vendorfs partition
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 \
"

View File

@ -27,13 +27,6 @@ UBOOT_CONFIG[ccmp15-dvk] = "ccmp15-dvk_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
# Platform U-Boot settings
UBOOT_DTB_NAME = "ccmp15-dvk.dtb"
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "bin"
UBOOT_HAS_FASTBOOT = "true"
# Set U-Boot FIP settings
FIP_UBOOT_DTB = "u-boot"
FIP_UBOOT_CONFIG = "optee"
# =========================================================================
# Machine settings
@ -63,7 +56,6 @@ STM32MP_KERNEL_DEVICETREE:ccmp15-dvk += " \
MACHINE_FEATURES += "bluetooth"
MACHINE_FEATURES += "wifi"
MACHINE_FEATURES += "gpu"
MACHINE_FEATURES += "mca"
# =========================================================================
# Firmware
@ -82,6 +74,9 @@ IMAGE_FSTYPES += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", \
"tar.bz2 boot.ubifs recovery.ubifs squashfs", \
"tar.bz2 ubifs boot.ubifs recovery.ubifs", d)}'
# Default image for install scripts
DEFAULT_IMAGE_NAME ?= "dey-image-webkit"
# 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"
@ -184,15 +179,15 @@ DISTRO_FEATURES:append = " initrd "
# add support to pulseaudio
DISTRO_FEATURES:append = "pulseaudio"
# Disabling sysvinit
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager ?= "systemd"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
# Disable use of vendorfs partition
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 \
"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.ubifs"
ROOTFS_EXT ?= ".ubifs"
@ -200,6 +195,5 @@ ROOTFS_EXT ?= ".ubifs"
BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mtd"

View File

@ -11,7 +11,6 @@ include conf/machine/include/arm/armv7a/tune-cortexa9.inc
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "imx"
UBOOT_HAS_FASTBOOT = "true"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig"
@ -35,10 +34,9 @@ MACHINE_EXTRA_RDEPENDS += " \
MACHINE_EXTRA_RRECOMMENDS += " \
${MACHINE_FIRMWARE} \
${WIRELESS_MODULE} \
${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)} \
"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth pci"
MACHINE_FEATURES += "accel-graphics wifi bluetooth pci"
# TrustFence
TRUSTFENCE_SIGN_MODE = "HAB"
@ -54,6 +52,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mmcblk0boot0"

View File

@ -8,10 +8,12 @@ MACHINEOVERRIDES =. "mx6:mx6ul:${DIGI_FAMILY}:"
include conf/machine/include/imx-digi-base.inc
include conf/machine/include/arm/armv7a/tune-cortexa7.inc
# Override default init manager from distro config
INIT_MANAGER ?= "sysvinit"
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "imx"
UBOOT_HAS_FASTBOOT = "true"
STORAGE_MEDIA = "mtd"
@ -33,9 +35,7 @@ MACHINE_EXTRA_RDEPENDS += " \
MACHINE_EXTRA_RRECOMMENDS += " \
${MACHINE_FIRMWARE} \
${WIRELESS_MODULE} \
${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)} \
"
MACHINE_EXTRA_RRECOMMENDS:remove:use-mainline-bsp = "${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)}"
MACHINE_FEATURES += "wifi bluetooth cryptochip mca"
MACHINE_FEATURES:remove:use-mainline-bsp = "wifi"
@ -58,9 +58,8 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa
BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mtd"
# U-Boot environment offset (within partition)
UBOOT_ENV_OFFSET ?= "0x0"
UBOOT_ENV_REDUND_OFFSET ?= "${UBOOT_ENV_SIZE}"

View File

@ -8,16 +8,21 @@ require conf/machine/include/arm/armv8a/tune-cortexa53.inc
# Platform u-boot settings
UBOOT_PREFIX = "imx-boot"
UBOOT_SUFFIX = "bin"
UBOOT_HAS_FASTBOOT = "true"
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
EXTRA_IMAGEDEPENDS = "imx-boot"
EXTRA_IMAGEDEPENDS += "imx-boot"
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
# Set LPDDR4 FIRMWARE
DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
# LPDDR4 firmware
DDR_FIRMWARE_NAME = " \
lpddr4_pmu_train_1d_imem.bin \
lpddr4_pmu_train_1d_dmem.bin \
lpddr4_pmu_train_2d_imem.bin \
lpddr4_pmu_train_2d_dmem.bin \
"
IMXBOOT_TARGETS = "flash_evk"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8_defconfig"
@ -46,13 +51,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \
${WIRELESS_MODULE} \
"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip mca optee"
# AARCH64 doesn't support self-extracting zImage
KERNEL_IMAGETYPE = "Image.gz"
VIRTUAL-RUNTIME_init_manager ?= "systemd"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
MACHINE_FEATURES += "accel-graphics wifi bluetooth cryptochip mca optee"
# TrustFence
TRUSTFENCE_SIGN_MODE = "HAB"
@ -60,7 +59,6 @@ TRUSTFENCE_SIGN_MODE = "HAB"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Vulkan is necessary for wayland to build
DISTRO_FEATURES:append = " wayland vulkan systemd pam"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"
@ -69,6 +67,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mmcblk0boot0"

View File

@ -11,10 +11,9 @@ include conf/machine/include/arm/armv8a/tune-cortexa35.inc
# Platform u-boot settings
UBOOT_PREFIX = "imx-boot"
UBOOT_SUFFIX = "bin"
UBOOT_HAS_FASTBOOT = "true"
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
EXTRA_IMAGEDEPENDS = "imx-boot"
EXTRA_IMAGEDEPENDS += "imx-boot"
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
# BOOTLOADER_SEEK_USERDATA is 33 for step A of the silicon and 32 for step B
BOOTLOADER_SEEK_USERDATA = "32"
@ -53,6 +52,10 @@ MACHINE_FIRMWARE ?= "firmware-imx-vpu-imx8 firmware-imx-sdma-imx7d"
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_BT', '1', 'firmware-qualcomm-qca6574-bt', '', d)}"
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-qualcomm-qca6574-wifi', '', d)}"
# For the ccimx8x, we generate images for both the B0 and the C0 revisions of
# the i.MX8X silicon, so deploy both versions of the firmware.
SECO_FIRMWARE_NAME:ccimx8x = "mx8qx*0-ahab-container.img"
MACHINE_EXTRA_RDEPENDS += " \
e2fsprogs-mke2fs \
e2fsprogs-resize2fs \
@ -65,13 +68,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \
${WIRELESS_MODULE} \
"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip pci mca"
# AARCH64 doesn't support self-extracting zImage
KERNEL_IMAGETYPE = "Image.gz"
VIRTUAL-RUNTIME_init_manager ?= "systemd"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
MACHINE_FEATURES += "accel-graphics wifi bluetooth cryptochip pci mca"
# TrustFence
TRUSTFENCE_SIGN_MODE = "AHAB"
@ -79,7 +76,6 @@ TRUSTFENCE_SIGN_MODE = "AHAB"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Vulkan is necessary for wayland to build
DISTRO_FEATURES:append = " wayland vulkan systemd pam"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"
@ -88,6 +84,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mmcblk0boot0"

View File

@ -0,0 +1,67 @@
#@TYPE: Machine
#@NAME: ConnectCore 93 family of SOMs
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 93 family of SOMs
DIGI_FAMILY = "ccimx93"
MACHINEOVERRIDES =. "${DIGI_FAMILY}:"
MACHINEOVERRIDES =. "mx93:"
require conf/machine/include/imx-digi-base.inc
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
# Platform u-boot settings
UBOOT_PREFIX = "imx-boot"
UBOOT_SUFFIX = "bin"
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
EXTRA_IMAGEDEPENDS += "imx-boot"
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
DDR_FIRMWARE_NAME = " \
lpddr4_dmem_1d_v202201.bin \
lpddr4_dmem_2d_v202201.bin \
lpddr4_imem_1d_v202201.bin \
lpddr4_imem_2d_v202201.bin \
"
MACHINE_FEATURES += "pci wifi bluetooth"
MACHINE_FEATURES:append:use-nxp-bsp = " optee jailhouse"
STORAGE_MEDIA = "mmc"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx93_defconfig"
SPL_BINARY = "spl/u-boot-spl.bin"
# Set ATF platform name
ATF_PLATFORM = "imx93"
MACHINE_EXTRA_RDEPENDS += " \
xbee-init \
"
# TrustFence
TRUSTFENCE_SIGN_MODE = "AHAB"
IMXBOOT_TARGETS = "flash_singleboot"
IMX_BOOT_SOC_TARGET = "iMX9"
IMX_BOOT_SEEK = "32"
SERIAL_CONSOLES = "115200;ttyLP5"
# Bluetooth tty
BT_TTY ?= "ttyLP0"
# Add additional firmware
MACHINE_FIRMWARE:append = " ethos-u-firmware"
# Adding 'wayland' along with 'x11' enables the xwayland backend
DISTRO_FEATURES:append = " wayland pam"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"
ROOTFS_EXT ?= ".ext4.gz"

View File

@ -11,6 +11,8 @@ DIGI_FAMILY = "ccmp1"
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "bin"
# Set U-Boot FIP settings
FIP_UBOOT_DTB = "u-boot"
STORAGE_MEDIA = "mtd"
@ -24,9 +26,8 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa
BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
UBOOT_DEV_NAME ?= "/dev/mtd"
# U-Boot environment offset (within partition)
UBOOT_ENV_OFFSET ?= "0x0"
UBOOT_ENV_REDUND_OFFSET ?= "0x0"
@ -37,6 +38,10 @@ UBOOT_ENV_SIZE ?= "0x20000"
# available space in the environment partition)
UBOOT_ENV_RANGE ?= ""
MACHINE_EXTRA_RDEPENDS += " \
mtd-utils-ubifs \
"
# Extra udev rules
MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf"

View File

@ -16,7 +16,7 @@ PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
# ccimx8x 5.4 2020.04 (packaged in imx-boot)
# ccimx8mn 5.4 2020.04 (packaged in imx-boot)
# ccimx8mm 5.4 2020.04 (packaged in imx-boot)
# ccimx8mp 5.10 2021.04 (packaged in imx-boot)
# ccimx93 5.15 2022.04 (packaged in imx-boot)
# ccmp15 5.15 2021.10
# ccmp13 5.15 2021.10
#
@ -26,6 +26,9 @@ HAVE_WIFI = "${@bb.utils.contains('MACHINE_FEATURES', 'wifi', '1', '', d)}
HAVE_BT = "${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', '1', '', d)}"
HAVE_GUI = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '1', '', d)}"
# Default value for WiFi virtual wlans
HAS_WIFI_VIRTWLANS ?= "false"
#
# Ethernet, Wi-Fi, and Bluetooth configuration used in recipes
#
@ -60,10 +63,6 @@ USE_VT ?= "0"
MACHINE_VARIANT ?= ""
MACHINEOVERRIDES .= "${@['', ':${MACHINE_VARIANT}']['${MACHINE_VARIANT}' != '']}"
# U-Boot symlink
UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"
BOOTABLE_ARTIFACTS ?= ""
# Extra RDEPENDS
MACHINE_EXTRA_RDEPENDS += " \
${@bb.utils.contains("MACHINE_FEATURES", "mca", "mca-tool", "", d)} \

View File

@ -13,6 +13,13 @@ include conf/machine/include/digi-defaults.inc
IMX_DEFAULT_BSP ?= "nxp"
MACHINEOVERRIDES =. "use-${IMX_DEFAULT_BSP}-bsp:"
# Allow setting the UART used during the boot by ATF.
# FIXME: We should return INVALID here but currently only i.MX8M has support to override the UART
# base address in source code.
SOC_ATF_BOOT_UART_BASE = ""
SOC_ATF_BOOT_UART_BASE:ccimx8m = "0x30860000"
ATF_BOOT_UART_BASE ?= "${SOC_ATF_BOOT_UART_BASE}"
XSERVER_DRIVER = "xf86-video-fbdev"
XSERVER_DRIVER:imxgpu2d = "xf86-video-imx-vivante"
XSERVER_DRIVER:append:mx8-generic-bsp = " xf86-video-modesetting"
@ -34,6 +41,7 @@ DEFAULTTUNE:mx6-generic-bsp ?= "cortexa9thf-neon"
DEFAULTTUNE:mx6ul-generic-bsp ?= "cortexa7thf-neon"
DEFAULTTUNE:mx8m-generic-bsp ?= "cortexa53-crypto"
DEFAULTTUNE:mx8x-generic-bsp ?= "cortexa35-crypto"
DEFAULTTUNE:mx93-generic-bsp ?= "cortexa55"
INHERIT += "machine-overrides-extender"
@ -48,6 +56,7 @@ MACHINEOVERRIDES_EXTENDER:mx8mn:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxd
MACHINEOVERRIDES_EXTENDER:mx8mp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8m-generic-bsp:mx8m-nxp-bsp:mx8mp-generic-bsp:mx8mp-nxp-bsp"
MACHINEOVERRIDES_EXTENDER:mx8qxp:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8qxp-generic-bsp:mx8qxp-nxp-bsp"
MACHINEOVERRIDES_EXTENDER:mx8dx:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d:imxvulkan:mx8-generic-bsp:mx8-nxp-bsp:mx8x-generic-bsp:mx8x-nxp-bsp:mx8dx-generic-bsp:mx8dx-nxp-bsp"
MACHINEOVERRIDES_EXTENDER:mx93:use-nxp-bsp = "imx-generic-bsp:imx-nxp-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-nxp-bsp:mx93-generic-bsp:mx93-nxp-bsp"
#######
### Mainline BSP specific overrides
@ -60,6 +69,7 @@ MACHINEOVERRIDES_EXTENDER:mx8mn:use-mainline-bsp = "imx-generic-bsp:imx-mainlin
MACHINEOVERRIDES_EXTENDER:mx8mp:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8m-generic-bsp:mx8m-mainline-bsp:mx8mp-generic-bsp:mx8mp-mainline-bsp"
MACHINEOVERRIDES_EXTENDER:mx8qxp:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8x-generic-bsp:mx8x-mainline-bsp:mx8qxp-generic-bsp:mx8qxp-mainline-bsp"
MACHINEOVERRIDES_EXTENDER:mx8dx:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:mx8-generic-bsp:mx8-mainline-bsp:mx8x-generic-bsp:mx8x-mainline-bsp:mx8dx-generic-bsp:mx8dx-mainline-bsp"
MACHINEOVERRIDES_EXTENDER:mx93:use-mainline-bsp = "imx-generic-bsp:imx-mainline-bsp:imxdrm:imxpxp:mx9-generic-bsp:mx9-mainline-bsp:mx93-generic-bsp:mx93-mainline-bsp"
MACHINEOVERRIDES_EXTENDER_FILTER_OUT = " \
mx6 \
@ -88,6 +98,7 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT = " \
mx8qxp \
mx8dx \
mx8dxl \
mx93 \
"
MACHINEOVERRIDES_FILTERED_OUT_QA_ERROR = "%s overrides cannot be used and need conversion to use the new BSP-specific overrides. Check 'meta-freescale/scripts/convert-bsp-specific-overrides'."
@ -102,6 +113,7 @@ MACHINE_SOCARCH_SUFFIX:mx8mn-nxp-bsp = "-mx8mn"
MACHINE_SOCARCH_SUFFIX:mx8mp-nxp-bsp = "-mx8mp"
MACHINE_SOCARCH_SUFFIX:mx8qxp-nxp-bsp = "-mx8"
MACHINE_SOCARCH_SUFFIX:mx8dx-nxp-bsp = "-mx8"
MACHINE_SOCARCH_SUFFIX:mx93-nxp-bsp = "-mx93"
# For Mainline we use a single SoC suffix as we don't have different build options
MACHINE_SOCARCH_SUFFIX:imx-mainline-bsp = "-imx"
@ -125,11 +137,15 @@ MACHINE_SOCARCH_FILTER:append:imxvulkan = " \
"
MACHINE_SOCARCH_FILTER:append:imxgpu = " \
virtual/egl \
virtual/mesa \
virtual/libopenvg \
virtual/mesa \
virtual/opencl-icd \
libdrm \
cairo \
libgal-imx \
opencl-icd-loader \
opencl-clhpp \
opencl-headers \
opencv \
pango \
"
@ -153,16 +169,6 @@ MACHINE_SOCARCH_FILTER:append:imx-mainline-bsp = " \
pango \
qtbase \
"
MACHINE_SOCARCH_FILTER:append:mx6q-nxp-bsp = " \
opencl-icd-loader \
opencl-clhpp \
opencl-headers \
"
MACHINE_SOCARCH_FILTER:append:mx8-nxp-bsp = " \
opencl-icd-loader \
opencl-clhpp \
opencl-headers \
"
MACHINE_SOCARCH_FILTER:append:mx8qm-nxp-bsp = " \
virtual/libopenvx \
"
@ -177,26 +183,36 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS:append = " \
imx-test->virtual/imxvpu \
"
# Firmware used for boot.
IMX_EXTRA_FIRMWARE ?= ""
IMX_EXTRA_FIRMWARE:mx8-generic-bsp = "firmware-imx-8 imx-sc-firmware imx-seco"
IMX_EXTRA_FIRMWARE:mx8m-generic-bsp = "firmware-imx-8m"
IMX_EXTRA_FIRMWARE:mx8x-generic-bsp = "imx-sc-firmware imx-seco"
IMX_EXTRA_FIRMWARE:mx93-generic-bsp = "firmware-imx-9 firmware-sentinel"
# Extra audio support
IMX_ALSA_EXTRA = ""
IMX_ALSA_EXTRA:imx-nxp-bsp = "imx-alsa-plugins"
MACHINE_EXTRA_RRECOMMENDS:append:mx6-nxp-bsp = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}"
MACHINE_EXTRA_RRECOMMENDS:append:mx8-nxp-bsp = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}"
# Extra udev rules
MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf udev-rules-imx"
# GStreamer 1.0 plugins
MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
MACHINE_GSTREAMER_1_0_PLUGIN:mx6dl-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx6q-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx6ul-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8mm-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8mn-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8mp-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8qxp-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8dx-nxp-bsp ?= "imx-gst1.0-plugin imx-gst1.0-plugin-gplay imx-gst1.0-plugin-grecorder"
MACHINE_GSTREAMER_1_0_PLUGIN:mx6dl-nxp-bsp ?= "imx-gst1.0-plugin"
MACHINE_GSTREAMER_1_0_PLUGIN:mx6q-nxp-bsp ?= "imx-gst1.0-plugin"
MACHINE_GSTREAMER_1_0_PLUGIN:mx6ul-nxp-bsp ?= "imx-gst1.0-plugin"
MACHINE_GSTREAMER_1_0_PLUGIN:mx8-nxp-bsp ?= "imx-gst1.0-plugin"
MACHINE_GSTREAMER_1_0_PLUGIN:mx9-nxp-bsp ?= "imx-gst1.0-plugin"
# In 'meta-freescale' these gstreamer preferred versions are restricted to 'mx8-nxp-bsp'
# but in DEY we use them also in the 6UL, so relax the override to 'imx-nxp-base'
PREFERRED_VERSION_gstreamer1.0:imx-nxp-bsp ??= "1.20.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-base:imx-nxp-bsp ??= "1.20.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-good:imx-nxp-bsp ??= "1.20.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-bad:imx-nxp-bsp ??= "1.20.0.imx"
PREFERRED_VERSION_gstreamer1.0:imx-nxp-bsp ??= "1.20.3.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-base:imx-nxp-bsp ??= "1.20.3.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-good:imx-nxp-bsp ??= "1.20.3.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-bad:imx-nxp-bsp ??= "1.20.3.imx"
PREFERRED_VERSION_ffmpeg:imx-nxp-bsp ??= "4.4.1"
# Determines if the SoC has support for Vivante kernel driver
@ -221,6 +237,7 @@ PREFERRED_PROVIDER_virtual/libgles2:imxgpu3d ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles3:imxgpu3d ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libg2d ?= "imx-gpu-g2d"
PREFERRED_PROVIDER_virtual/libg2d:imxdpu ?= "imx-dpu-g2d"
PREFERRED_PROVIDER_virtual/libg2d:mx93-nxp-bsp ?= "imx-pxp-g2d"
PREFERRED_PROVIDER_opencl-clhpp:imxgpu ?= "imx-gpu-viv"
PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv"
PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv"
@ -232,30 +249,40 @@ PREFERRED_VERSION_weston:imx-mainline-bsp = ""
PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.25.imx"
PREFERRED_VERSION_wayland-protocols:mx7-nxp-bsp ??= "1.25.imx"
PREFERRED_VERSION_wayland-protocols:mx8-nxp-bsp ??= "1.25.imx"
PREFERRED_VERSION_wayland-protocols:mx9-nxp-bsp ??= "1.25.imx"
# Use i.MX libdrm Version
PREFERRED_VERSION_libdrm:mx6-nxp-bsp ??= "2.4.109.imx"
PREFERRED_VERSION_libdrm:mx7-nxp-bsp ??= "2.4.109.imx"
PREFERRED_VERSION_libdrm:mx8-nxp-bsp ??= "2.4.109.imx"
PREFERRED_VERSION_libdrm:mx9-nxp-bsp ??= "2.4.109.imx"
PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.2.182.0"
PREFERRED_VERSION_vulkan-loader:imxvulkan ??= "1.2.182.0"
PREFERRED_VERSION_vulkan-tools:imxvulkan ??= "1.2.182.0"
# Use i.MX optee Version
PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.17.0.imx"
PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.17.0.imx"
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx"
PREFERRED_VERSION_optee-os:mx8-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-os:mx9-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-client:mx9-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "3.19.0.imx"
#Use i.MX opencv Version for mx8
# Use i.MX opencv Version
PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx"
PREFERRED_VERSION_opencv:mx9-nxp-bsp ??= "4.6.0.imx"
EXTRA_IMAGEDEPENDS = "u-boot"
EXTRA_IMAGEDEPENDS += "u-boot"
KERNEL_IMAGETYPE ?= "zImage"
KERNEL_IMAGETYPE = "zImage"
KERNEL_IMAGETYPE:aarch64 = "Image.gz"
MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen"
# Add a generic gstreamer distro feature for all IMX platforms
DISTRO_FEATURES:append = " gstreamer"
# U-Boot 2017.X requires a specific dtc version.
PREFERRED_VERSION_dtc-native:ccimx6 ?= "1.4.5"
PREFERRED_VERSION_nativesdk-dtc:ccimx6 ?= "1.4.5"

View File

@ -0,0 +1,21 @@
# Copyright 2022 NXP
SUMMARY = "Freescale i.MX firmware for i.MX 9 family"
DESCRIPTION = "Freescale i.MX firmware for i.MX 9 family"
require recipes-bsp/firmware-imx/firmware-imx-${PV}.inc
inherit deploy
do_install[noexec] = "1"
do_deploy() {
# Synopsys DDR
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR}
done
}
addtask deploy after do_install before do_build
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx9-nxp-bsp)"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2022, Digi International Inc.
# Copyright (C) 2023, Digi International Inc.
do_install:append() {
# meta-freescale deletes the SDMA firmware provided by the firmware-imx package,

View File

@ -11,10 +11,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
index 83ebad65b..f47bdec22 100644
index a24e41fd77e9..1c8c66435db7 100644
--- a/plat/imx/imx8m/imx8mm/platform.mk
+++ b/plat/imx/imx8m/imx8mm/platform.mk
@@ -62,7 +62,7 @@ $(eval $(call add_define,BL32_BASE))
@@ -153,7 +153,7 @@ $(eval $(call add_define,BL32_BASE))
BL32_SIZE ?= 0x2000000
$(eval $(call add_define,BL32_SIZE))
@ -22,4 +22,4 @@ index 83ebad65b..f47bdec22 100644
+IMX_BOOT_UART_BASE ?= 0x30860000
$(eval $(call add_define,IMX_BOOT_UART_BASE))
ifeq (${SPD},trusty)
$(eval $(call add_define,IMX8M_DDR4_DVFS))

View File

@ -12,10 +12,10 @@ Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
index f63b9fcad..8c9aa4de1 100644
index 8702d5160a45..8ffeed204e90 100644
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
@@ -58,7 +58,7 @@ static const struct imx_rdc_cfg rdc[] = {
@@ -108,7 +108,7 @@ static const struct imx_rdc_cfg rdc[] = {
RDC_MDAn(RDC_MDA_M4, DID1),
/* peripherals domain permission */

View File

@ -12,10 +12,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
index 71f3758c3..19be3e91c 100644
index c87748a1888a..2dd3ab409e97 100644
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
@@ -51,7 +51,7 @@ static const struct imx_rdc_cfg rdc[] = {
@@ -106,7 +106,7 @@ static const struct imx_rdc_cfg rdc[] = {
/* peripherals domain permission */
RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
@ -25,10 +25,10 @@ index 71f3758c3..19be3e91c 100644
/* memory region */
diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
index 22846f289..fb5bef02d 100644
index 8da9b298cfba..90c8bd0bab6b 100644
--- a/plat/imx/imx8m/imx8mn/platform.mk
+++ b/plat/imx/imx8m/imx8mn/platform.mk
@@ -62,7 +62,7 @@ $(eval $(call add_define,BL32_BASE))
@@ -63,7 +63,7 @@ $(eval $(call add_define,BL32_BASE))
BL32_SIZE ?= 0x2000000
$(eval $(call add_define,BL32_SIZE))
@ -36,4 +36,4 @@ index 22846f289..fb5bef02d 100644
+IMX_BOOT_UART_BASE ?= 0x30860000
$(eval $(call add_define,IMX_BOOT_UART_BASE))
ifeq (${SPD},trusty)
$(eval $(call add_define,IMX8M_DDR4_DVFS))

View File

@ -13,10 +13,10 @@ Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
index 19be3e91c..c7c504788 100644
index 2dd3ab409e97..0ad3bd9edf83 100644
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
@@ -50,7 +50,7 @@ static const struct imx_rdc_cfg rdc[] = {
@@ -105,7 +105,7 @@ static const struct imx_rdc_cfg rdc[] = {
RDC_MDAn(RDC_MDA_M7, DID1),
/* peripherals domain permission */

View File

@ -0,0 +1,22 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Thu, 20 Oct 2022 17:04:37 +0200
Subject: [PATCH] ccimx93: use UART6 for the default console
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
plat/imx/imx93/include/platform_def.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/imx/imx93/include/platform_def.h b/plat/imx/imx93/include/platform_def.h
index a820c27a5b49..a563d8852d23 100644
--- a/plat/imx/imx93/include/platform_def.h
+++ b/plat/imx/imx93/include/platform_def.h
@@ -47,7 +47,7 @@
#define MAX_XLAT_TABLES 12
#define MAX_MMAP_REGIONS 16
-#define IMX_LPUART_BASE 0x44380000
+#define IMX_LPUART_BASE 0x425a0000
#define IMX_BOOT_UART_CLK_IN_HZ 24000000 /* Select 24MHz oscillator */
#define IMX_CONSOLE_BAUDRATE 115200

View File

@ -1,73 +0,0 @@
# Copyright (C) 2017-2021 NXP
DESCRIPTION = "i.MX ARM Trusted Firmware"
SECTION = "BSP"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
PV .= "+git${SRCPV}"
SRCBRANCH = "lf_v2.4"
ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https"
SRC_URI = "${ATF_SRC};branch=${SRCBRANCH} \
"
SRCREV = "5782363f92a2fdf926784449270433cf3ddf44bd"
SRC_URI:append:ccimx8mn = " file://0001-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
file://0002-imx8mn-Disable-M7-debug-console.patch"
SRC_URI:append:ccimx8mm = " file://0001-imx8mm-Define-UART1-as-console-for-boot-stage.patch \
file://0002-imx8mm-Disable-M4-debug-console.patch"
S = "${WORKDIR}/git"
inherit deploy
BOOT_TOOLS = "imx-boot-tools"
PLATFORM ?= "INVALID"
PLATFORM:mx8qm-nxp-bsp = "imx8qm"
PLATFORM:mx8x-nxp-bsp = "imx8qx"
PLATFORM:mx8mq-nxp-bsp = "imx8mq"
PLATFORM:mx8mm-nxp-bsp = "imx8mm"
PLATFORM:mx8mn-nxp-bsp = "imx8mn"
PLATFORM:mx8mnul-nxp-bsp = "imx8mn"
PLATFORM:mx8mp-nxp-bsp = "imx8mp"
PLATFORM:mx8mpul-nxp-bsp = "imx8mp"
PLATFORM:mx8dx-nxp-bsp = "imx8dx"
PLATFORM:mx8dxl-nxp-bsp = "imx8dxl"
PLATFORM:mx8ulp-nxp-bsp = "imx8ulp"
# Clear LDFLAGS to avoid the option -Wl recognize issue
# Clear CFLAGS to avoid coherent_arm out of OCRAM size limitation (64KB) - i.MX 8MQ only
CLEAR_FLAGS ?= "LDFLAGS"
CLEAR_FLAGS:mx8mq-nxp-bsp = "LDFLAGS CFLAGS"
EXTRA_OEMAKE += " \
CROSS_COMPILE="${TARGET_PREFIX}" \
PLAT=${PLATFORM} \
"
BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
do_compile() {
unset ${CLEAR_FLAGS}
oe_runmake bl31
if ${BUILD_OPTEE}; then
oe_runmake clean BUILD_BASE=build-optee
oe_runmake BUILD_BASE=build-optee SPD=opteed bl31
fi
}
do_install[noexec] = "1"
do_deploy() {
install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin
if ${BUILD_OPTEE}; then
install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee
fi
}
addtask deploy after do_compile
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"

View File

@ -0,0 +1,20 @@
# Copyright (C) 2022,2023 Digi International
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
SRC_URI:append = " \
file://0001-imx8mm-Define-UART1-as-console-for-boot-stage.patch \
file://0002-imx8mm-Disable-M4-debug-console.patch \
file://0003-imx8mn-Define-UART1-as-console-for-boot-stage.patch \
file://0004-imx8mn-Disable-M7-debug-console.patch \
file://0005-ccimx93-use-UART6-for-the-default-console.patch \
"
BOOT_TOOLS = "imx-boot-tools"
do_deploy:append() {
install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin
if ${BUILD_OPTEE}; then
install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin-optee
fi
}

View File

@ -1,19 +1,5 @@
# Copyright 2017,2021 NXP
# Copyright (C) 2023 Digi International
PV = "5.9+${SRCPV}"
PLATFORM:mx9-nxp-bsp = "IMX8ULP"
SRCBRANCH = "lf-5.10.72_2.2.0"
IMXLIB_SRC ?= "git://source.codeaurora.org/external/imx/imx-lib.git;protocol=https"
SRC_URI = " \
${IMXLIB_SRC};branch=${SRCBRANCH} \
"
SRCREV = "87ddd80953835eb29027d1d5a12044a08e809e40"
PLATFORM:mx8ulp-nxp-bsp = "IMX8ULP"
do_install:append () {
# Remove .go file for Android
find ${D}/ -name *.go -exec rm {} \;
}
COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8ulp-nxp-bsp)"
COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)"

View File

@ -0,0 +1,79 @@
From 70b7d067ca0f6659e4f842f8d841714a26bf9d8c Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Thu, 21 Oct 2021 08:53:38 +0000
Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
mkimage tool is provided as a part of sysroot from Yocto build. Current
implementation on the imx-mkimge on the other hand copies it locally in
order to invoke it from within the build folder.
Since recent updates, mkimage requires openssl.so to be installed, which
when local copy is used causes the tool not to operate and fails the
build.
Use it from the build sysroot, and do not pull the local version of it.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
iMX8M/soc.mak | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Index: git/iMX8M/soc.mak
===================================================================
--- git.orig/iMX8M/soc.mak
+++ git/iMX8M/soc.mak
@@ -149,7 +149,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
+ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
@rm -f u-boot.its $(dtb)
dtb_ddr3l = valddr3l.dtb
@@ -161,7 +161,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l) > u-boot-ddr3l.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
@rm -f u-boot.its $(dtb_ddr3l)
dtb_ddr3l_evk = evkddr3l.dtb
@@ -173,7 +173,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr3l_evk) > u-boot-ddr3l-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
@rm -f u-boot.its $(dtb_ddr3l_evk)
dtb_ddr4 = valddr4.dtb
@@ -185,7 +185,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4) > u-boot-ddr4.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
@rm -f u-boot.its $(dtb_ddr4)
dtb_ddr4_evk = evkddr4.dtb
@@ -197,7 +197,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb_ddr4_evk) > u-boot-ddr4-evk.its
- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
@rm -f u-boot.its $(dtb_ddr4_evk)
ifeq ($(HDMI),yes)
@@ -343,7 +343,6 @@ nightly :
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
@$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin
- @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
archive :
git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME)

View File

@ -16,28 +16,29 @@ Remove the file removal to avoid this.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX8M/soc.mak | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 4bfdc37..b6595bc 100644
index 0a69b7167c5c..4a0cd4e59360 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -149,7 +149,7 @@ u-boot.itb: $(dtb)
@@ -154,7 +154,7 @@ u-boot.itb: $(dtb)
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb) > u-boot.its
./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
BL32=$(TEE) DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ../$(SOC_DIR)/mkimage_fit_atf.sh $(dtb) > u-boot.its
mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
- @rm -f u-boot.its $(dtb)
+ @rm -f u-boot.its
dtb_ddr3l = valddr3l.dtb
$(dtb_ddr3l):
@@ -283,7 +283,6 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
@@ -322,7 +322,6 @@ print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ./print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
- @rm -f $(dtb)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
./$(PAD_IMAGE) tee.bin
./$(PAD_IMAGE) $(TEE)

View File

@ -0,0 +1,45 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Thu, 9 Feb 2023 11:15:54 +0100
Subject: [PATCH] imx8m: soc.mak: capture commands output into a log file
This is later used to get the needed information for the signing of the
boot artifacts.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
iMX8M/soc.mak | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
index 4a0cd4e59360..6b3a01f2b790 100644
--- a/iMX8M/soc.mak
+++ b/iMX8M/soc.mak
@@ -1,5 +1,6 @@
MKIMG = mkimage_imx8
OUTIMG = flash.bin
+MKIMAGE_LOG = "mkimage-$(firstword $(MAKECMDGOALS)).log"
CC ?= gcc
CFLAGS ?= -O2 -Wall -std=c99 -static
@@ -274,7 +275,7 @@ endif
flash_evk_no_hdmi: $(MKIMG) u-boot-spl-ddr.bin u-boot.itb
- ./mkimage_imx8 -version $(VERSION) -fit -loader u-boot-spl-ddr.bin $(SPL_LOAD_ADDR) -second_loader u-boot.itb 0x40200000 0x60000 -out $(OUTIMG)
+ ./mkimage_imx8 -version $(VERSION) -fit -loader u-boot-spl-ddr.bin $(SPL_LOAD_ADDR) -second_loader u-boot.itb 0x40200000 0x60000 -out $(OUTIMG) 2>&1 | tee $(MKIMAGE_LOG)
flash_evk_no_hdmi_dual_bootloader: $(MKIMG) u-boot-spl-ddr.bin u-boot.itb
./mkimage_imx8 -version $(VERSION) -fit -loader u-boot-spl-ddr.bin $(SPL_LOAD_ADDR) -out $(OUTIMG)
@@ -318,10 +319,10 @@ flash_dp_spl_uboot: flash_dp_evk
flash_spl_uboot: flash_evk_no_hdmi
print_fit_hab: u-boot-nodtb.bin bl31.bin $(dtb)
- ./$(PAD_IMAGE) $(TEE)
+ ./$(PAD_IMAGE) $(TEE) 2>&1 | tee $(MKIMAGE_LOG)
./$(PAD_IMAGE) bl31.bin
./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
- TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb)
+ { echo $@; TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) VERSION=$(VERSION) ../$(SOC_DIR)/print_fit_hab.sh $(PRINT_FIT_HAB_OFFSET) $(dtb) 2>&1; } | tee -a $(MKIMAGE_LOG)
print_fit_hab_ddr4: u-boot-nodtb.bin bl31.bin $(dtb_ddr4_evk)
./$(PAD_IMAGE) $(TEE)

View File

@ -1,370 +1,65 @@
# Copyright 2017-2021 NXP
# Copyright 2019-2021 Digi International, Inc.
require imx-mkimage_git.inc
IMX_M4_DEMOS = ""
IMX_M4_DEMOS:mx8-nxp-bsp = "imx-m4-demos:do_deploy"
IMX_M4_DEMOS:mx8m-nxp-bsp = ""
M4_DEFAULT_IMAGE ?= "m4_image.bin"
M4_DEFAULT_IMAGE:mx8qxp-nxp-bsp = "imx8qx_m4_TCM_power_mode_switch.bin"
M4_DEFAULT_IMAGE:mx8dxl-nxp-bsp = "imx8dxl_m4_TCM_power_mode_switch.bin"
M4_DEFAULT_IMAGE:mx8dx-nxp-bsp = "imx8qx_m4_TCM_power_mode_switch.bin"
# Setting for i.MX 8ULP
IMX_M4_DEMOS:mx8ulp-nxp-bsp = "imx-m33-demos:do_deploy"
M4_DEFAULT_IMAGE:mx8ulp-nxp-bsp = "imx8ulp_m33_TCM_rpmsg_lite_str_echo_rtos.bin"
ATF_MACHINE_NAME:mx8ulp-nxp-bsp = "bl31-imx8ulp.bin"
IMX_EXTRA_FIRMWARE:mx8ulp-nxp-bsp = "firmware-upower firmware-sentinel"
SECO_FIRMWARE_NAME:mx8ulp-nxp-bsp = "mx8ulpa0-ahab-container.img"
SOC_TARGET:mx8ulp-nxp-bsp = "iMX8ULP"
SOC_FAMILY:mx8ulp-nxp-bsp = "mx8ulp"
do_compile[depends] += "${IMX_M4_DEMOS}"
do_compile:prepend() {
case ${SOC_FAMILY} in
mx8)
cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_TCM_power_mode_switch_m40.bin \
${BOOT_STAGING}/m4_image.bin
cp ${DEPLOY_DIR_IMAGE}/imx8qm_m4_TCM_power_mode_switch_m41.bin \
${BOOT_STAGING}/m4_1_image.bin
;;
mx8x)
cp ${DEPLOY_DIR_IMAGE}/${M4_DEFAULT_IMAGE} ${BOOT_STAGING}/m4_image.bin
;;
mx8ulp)
cp ${DEPLOY_DIR_IMAGE}/${M4_DEFAULT_IMAGE} ${BOOT_STAGING}/m33_image.bin
;;
esac
}
compile_mx8ulp() {
bbnote 8ULP boot binary build
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
${BOOT_STAGING}/u-boot-spl.bin
fi
# Copy SECO F/W and upower.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin
}
do_deploy:append() {
case ${SOC_FAMILY} in
mx8)
install -m 0644 ${BOOT_STAGING}/m4_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/m4_1_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
;;
mx8x)
install -m 0644 ${BOOT_STAGING}/m4_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
;;
mx8ulp)
install -m 0644 ${BOOT_STAGING}/m33_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
;;
esac
# Digi: omit this step to avoid build errors
# Append a tag to the bootloader image used in the SD card image
#cp ${DEPLOYDIR}/${BOOT_NAME} ${DEPLOYDIR}/${BOOT_NAME}-tagged
#ln -sf ${BOOT_NAME}-tagged ${DEPLOYDIR}/${BOOT_NAME}
#stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${BOOT_NAME} \
# >> ${DEPLOYDIR}/${BOOT_NAME}
}
deploy_mx8ulp() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
${DEPLOYDIR}/${BOOT_TOOLS}
fi
}
#######################
# Digi customizations #
#######################
inherit boot-artifacts
require dynamic-layers/freescale-layer/recipes-bsp/imx-seco/ccimx8x-seco-fw.inc
# Copyright (C) 2022 Digi International
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append:ccimx8m = " file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch"
IMX_EXTRA_FIRMWARE:ccimx8x = "digi-sc-firmware imx-seco"
IMX_BOOT_SOC_TARGET:mx8mm-nxp-bsp = "iMX8MM"
IMX_BOOT_SOC_TARGET:mx8mn-nxp-bsp = "iMX8MN"
IMX_BOOT_SOC_TARGET:mx8mp-nxp-bsp = "iMX8MP"
IMX_BOOT_SOC_TARGET:mx8x-nxp-bsp = "iMX8QX"
DEPENDS:append:ccimx8x = " coreutils-native"
DEPENDS:append:mx8-nxp-bsp = " ${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
IMX_M4_DEMOS:mx8mm-nxp-bsp = "imx-m4-demos:do_deploy"
M4_DEFAULT_IMAGE:mx8mm-nxp-bsp = "imx8mm_m4_TCM_hello_world.bin"
IMX_M7_DEMOS = ""
IMX_M7_DEMOS:mx8mn-nxp-bsp = "imx-m7-demos:do_deploy"
M7_DEFAULT_IMAGE ?= "m7_image.bin"
M7_DEFAULT_IMAGE:mx8mn-nxp-bsp = "imx8mn_m7_TCM_hello_world.bin"
do_compile[depends] += " \
${IMX_M7_DEMOS} \
SRC_URI:append = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
file://0002-imx8m-soc.mak-capture-commands-output-into-a-log-fil.patch \
"
# This package aggregates dependencies with other packages,
# so also define the license dependencies.
do_populate_lic[depends] += " \
virtual/bootloader:do_populate_lic \
${@' '.join('%s:do_populate_lic' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \
imx-atf:do_populate_lic \
${@bb.utils.contains('IMX_M4_DEMOS', 'imx-m4-demos:do_deploy', 'imx-m4-demos:do_populate_lic', '', d)} \
${@bb.utils.contains('IMX_M7_DEMOS', 'imx-m7-demos:do_deploy', 'imx-m7-demos:do_populate_lic', '', d)} \
firmware-imx:do_populate_lic \
"
DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}"
IMXBOOT_TARGETS:ccimx8x = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
'flash flash_regression_linux_m4', d)}"
# Do not tag imx-boot
UUU_BOOTLOADER = ""
UUU_BOOTLOADER_TAGGED = ""
IMXBOOT_TARGETS:ccimx8m = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_spl_uboot', d)}"
compile_mx8x() {
bbnote 8QX boot binary build
cp ${DEPLOY_DIR_IMAGE}/${M4_DEFAULT_IMAGE} ${BOOT_STAGING}/m4_image.bin
cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
for type in ${UBOOT_CONFIG}; do
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/
done
for ramc in ${RAM_CONFIGS}; do
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${ramc} ${BOOT_STAGING}/
done
}
compile_mx8m() {
bbnote 8MQ/8MM/8MN boot binary build
if [ -e ${DEPLOY_DIR_IMAGE}/${M7_DEFAULT_IMAGE} ] ; then
cp ${DEPLOY_DIR_IMAGE}/${M7_DEFAULT_IMAGE} ${BOOT_STAGING}/m7_image.bin
fi
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}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
${BOOT_STAGING}/u-boot-spl.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \
${BOOT_STAGING}/u-boot-nodtb.bin
bbnote "\
Using standard mkimage from u-boot-tools for FIT image builds. The standard \
mkimage is compatible for this use, and using it saves us from having to \
maintain a custom recipe."
ln -sf ${STAGING_DIR_NATIVE}${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
# Create dummy DEK blob
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
compile_mx8m:append:ccimx8m() {
# Create dummy DEK blob to support building with encrypted u-boot
if [ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
dd if=/dev/zero of=${BOOT_STAGING}/dek_blob_fit_dummy.bin bs=96 count=1 oflag=sync
fi
}
do_compile () {
compile_${SOC_FAMILY}
if ${DEPLOY_OPTEE}; then
cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING}
fi
# mkimage for i.MX8
for type in ${UBOOT_CONFIG}; do
if [ "${IMX_BOOT_SOC_TARGET}" = "iMX8QX" ]; then
RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')"
for ramc in ${RAM_CONFIGS}; do
if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then
# Match U-Boot memory size and and SCFW memory configuration
cd ${BOOT_STAGING}
ln -sf u-boot-${type}.bin u-boot.bin
ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin
cd -
for target in ${IMXBOOT_TARGETS}; do
for rev in ${SOC_REVISIONS}; do
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${ramc} - REV=${rev} ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} REV=${rev} ${target} > ${S}/mkimage-${target}.log 2>&1
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target}
fi
SCFWBUILT="yes"
done
done
rm ${BOOT_STAGING}/scfw_tcm.bin
rm ${BOOT_STAGING}/u-boot.bin
# Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot
rm ${BOOT_STAGING}/u-boot-atf.bin
rm ${BOOT_STAGING}/u-boot-hash.bin
fi
done
else
# mkimage for i.MX8M
for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${REV_OPTION} ${target} > ${S}/mkimage-${target}.log 2>&1
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}.bin-${target}
fi
done
do_compile:append:ccimx8m() {
bbnote "building ${IMX_BOOT_SOC_TARGET} - print_fit_hab"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab
}
# Log HAB FIT information
bbnote "building ${IMX_BOOT_SOC_TARGET} - print_fit_hab"
make SOC=${IMX_BOOT_SOC_TARGET} dtbs=${UBOOT_DTB_NAME} print_fit_hab > ${S}/mkimage-print_fit_hab.log 2>&1
do_deploy:append() {
# imx-boot recipe in meta-freescale assumes only *one* build configuration
# (otherwise variable BOOT_CONFIG_MACHINE would expand to something incorrect)
for target in ${IMXBOOT_TARGETS}; do
mv ${DEPLOYDIR}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}.bin-${target}
done
ln -sf ${BOOT_NAME}-${MACHINE}.bin-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME}-${MACHINE}.bin
ln -sf ${BOOT_NAME}-${MACHINE}.bin-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME}
}
do_deploy:append:ccimx8m() {
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${BOOT_STAGING}/mkimage-${target}.log ${DEPLOYDIR}/${BOOT_TOOLS}
done
install -m 0644 ${BOOT_STAGING}/mkimage-print_fit_hab.log ${DEPLOYDIR}/${BOOT_TOOLS}
}
do_deploy[postfuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence_sign_imxboot', '', d)}"
trustfence_sign_imxboot() {
TF_SIGN_ENV="CONFIG_SIGN_KEYS_PATH=${TRUSTFENCE_SIGN_KEYS_PATH}"
TF_SIGN_ENV="$TF_SIGN_ENV CONFIG_FIT_HAB_LOG_PATH=${DEPLOYDIR}/${BOOT_TOOLS}/mkimage-print_fit_hab.log"
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && TF_SIGN_ENV="$TF_SIGN_ENV CONFIG_KEY_INDEX=${TRUSTFENCE_KEY_INDEX}"
[ -n "${TRUSTFENCE_SIGN_MODE}" ] && TF_SIGN_ENV="$TF_SIGN_ENV CONFIG_SIGN_MODE=${TRUSTFENCE_SIGN_MODE}"
[ -n "${TRUSTFENCE_SRK_REVOKE_MASK}" ] && TF_SIGN_ENV="$TF_SIGN_ENV SRK_REVOKE_MASK=${TRUSTFENCE_SRK_REVOKE_MASK}"
[ -n "${TRUSTFENCE_UNLOCK_KEY_REVOCATION}" ] && TF_SIGN_ENV="$TF_SIGN_ENV CONFIG_UNLOCK_SRK_REVOKE=${TRUSTFENCE_UNLOCK_KEY_REVOCATION}"
# Sign/encrypt boot image
for target in ${IMXBOOT_TARGETS}; do
TF_SIGN_ENV="$TF_SIGN_ENV CONFIG_MKIMAGE_LOG_PATH=${DEPLOYDIR}/${BOOT_TOOLS}/mkimage-${target}.log"
env $TF_SIGN_ENV trustfence-sign-uboot.sh ${BOOT_NAME}-${MACHINE}.bin-${target} ${BOOT_NAME}-signed-${MACHINE}.bin-${target}
if [ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
TF_ENC_ENV="CONFIG_DEK_PATH=${TRUSTFENCE_DEK_PATH} ENABLE_ENCRYPTION=y"
env $TF_SIGN_ENV $TF_ENC_ENV trustfence-sign-uboot.sh ${BOOT_NAME}-${MACHINE}.bin-${target} ${BOOT_NAME}-encrypted-${MACHINE}.bin-${target}
fi
done
# Check that SCFW was built at least once
if [ "${IMX_BOOT_SOC_TARGET}" = "iMX8QX" and "${SCFWBUILT}" != "yes" ]; then
bbfatal "SCFW was not built!"
fi
}
# ConnectCore 8M Nano and 8M Mini do not have different binaries
UBOOT_RAM_COMBINATIONS:ccimx8m = ""
do_install () {
install -d ${D}/boot
if [ "${UBOOT_RAM_COMBINATIONS}" = "" ]; then
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${D}/boot/
done
else
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
for target in ${IMXBOOT_TARGETS}; do
for rev in ${SOC_REVISIONS}; do
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${D}/boot/
done
done
done
fi
}
deploy_mx8m:append() {
if [ -e ${BOOT_STAGING}/m7_image.bin ] ; then
cp ${BOOT_STAGING}/m7_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
fi
}
do_deploy () {
deploy_${SOC_FAMILY}
# 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
if [ "${UBOOT_RAM_COMBINATIONS}" = "" ]; then
IMAGE_IMXBOOT_TARGET=""
for target in ${IMXBOOT_TARGETS}; do
# 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
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${DEPLOYDIR}
# copy make log for reference
install -m 0644 ${S}/mkimage-${target}.log ${DEPLOYDIR}/${BOOT_TOOLS}
done
# copy fit_hab log for reference
install -m 0644 ${S}/mkimage-print_fit_hab.log ${DEPLOYDIR}/${BOOT_TOOLS}
cd ${DEPLOYDIR}
ln -sf ${UBOOT_PREFIX}-${MACHINE}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}.bin
# Link to default bootable U-Boot filename.
ln -sf ${UBOOT_PREFIX}-${MACHINE}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
cd -
else
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
for rev in ${SOC_REVISIONS}; do
IMAGE_IMXBOOT_TARGET=""
for target in ${IMXBOOT_TARGETS}; do
# 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
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${DEPLOYDIR}
# copy make log for reference
install -m 0644 ${S}/mkimage-${target}.log ${DEPLOYDIR}/${BOOT_TOOLS}
done
cd ${DEPLOYDIR}
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin
# Link to default bootable U-Boot filename. It gets overwritten
# on every loop so the only last RAM_CONFIG will survive.
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
cd -
done
done
fi
}
do_deploy:append () {
if [ "${TRUSTFENCE_SIGN}" = "1" ]; then
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
[ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ] && export CONFIG_DEK_PATH="${TRUSTFENCE_DEK_PATH}"
[ -n "${TRUSTFENCE_SIGN_MODE}" ] && export CONFIG_SIGN_MODE="${TRUSTFENCE_SIGN_MODE}"
[ -n "${TRUSTFENCE_SRK_REVOKE_MASK}" ] && export SRK_REVOKE_MASK="${TRUSTFENCE_SRK_REVOKE_MASK}"
[ -n "${TRUSTFENCE_UNLOCK_KEY_REVOCATION}" ] && export CONFIG_UNLOCK_SRK_REVOKE="${TRUSTFENCE_UNLOCK_KEY_REVOCATION}"
# Sign U-boot image
if [ "${UBOOT_RAM_COMBINATIONS}" = "" ]; then
for target in ${IMXBOOT_TARGETS}; do
# Point to make logs
export CONFIG_MKIMAGE_LOG_PATH="${DEPLOYDIR}/${BOOT_TOOLS}/mkimage-${target}.log"
export CONFIG_FIT_HAB_LOG_PATH="${DEPLOYDIR}/${BOOT_TOOLS}/mkimage-print_fit_hab.log"
trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-signed-${MACHINE}.bin-${target}
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
export ENABLE_ENCRYPTION=y
trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-encrypted-${MACHINE}.bin-${target}
unset ENABLE_ENCRYPTION
fi
done
else
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
for rev in ${SOC_REVISIONS}; do
for target in ${IMXBOOT_TARGETS}; do
# Point to make log
export CONFIG_MKIMAGE_LOG_PATH="${DEPLOYDIR}/${BOOT_TOOLS}/mkimage-${target}.log"
trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-signed-${MACHINE}-${rev}-${ramc}.bin-${target}
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
export ENABLE_ENCRYPTION=y
trustfence-sign-uboot.sh ${DEPLOYDIR}/${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${target} ${DEPLOYDIR}/${UBOOT_PREFIX}-encrypted-${MACHINE}-${rev}-${ramc}.bin-${target}
unset ENABLE_ENCRYPTION
fi
if [ "${SWUPDATE_UBOOTIMG}" = "true" ]; then
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]; then
ln -sf ${UBOOT_PREFIX}-encrypted-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
elif [ "${TRUSTFENCE_SIGN}" = "1" ]; then
ln -sf ${UBOOT_PREFIX}-signed-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
else
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${rev}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
fi
fi
done
done
done
fi
cp ${B}/SRK_efuses.bin ${DEPLOYDIR}
fi
}
COMPATIBLE_MACHINE = "(ccimx8x|ccimx8m)"
trustfence_sign_imxboot[dirs] = "${DEPLOYDIR}"
trustfence_sign_imxboot[vardeps] += "TRUSTFENCE_SIGN_KEYS_PATH TRUSTFENCE_KEY_INDEX TRUSTFENCE_DEK_PATH TRUSTFENCE_SIGN_MODE TRUSTFENCE_SRK_REVOKE_MASK TRUSTFENCE_UNLOCK_KEY_REVOCATION"

View File

@ -1,5 +1,5 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2021 NXP
# Copyright 2017-2022 NXP
require imx-mkimage_git.inc
@ -8,28 +8,14 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
SRC_URI:append:ccimx8mn = " file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch"
EXTRA_OEMAKE = "SOC=iMX8M mkimage_imx8"
# Beware: applied last to first
DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-fdebug-prefix-map=${STAGING_DIR_HOST}= \
-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
"
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
do_compile () {
cd ${S}
oe_runmake clean
oe_runmake bin
oe_runmake -C iMX8M -f soc.mak mkimage_imx8
}
do_install () {
cd ${S}
do_install() {
install -d ${D}${bindir}
install -m 0755 iMX8M/mkimage_imx8 ${D}${bindir}/mkimage_imx8m
install -m 0755 iMX8M/mkimage_fit_atf.sh ${D}${bindir}/mkimage_fit_atf.sh
install -m 0755 iMX8M/print_fit_hab.sh ${D}${bindir}/print_fit_hab.sh
install -m 0755 mkimage_imx8 ${D}${bindir}/mkimage_imx8
}
FILES:${PN} = "${bindir}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,12 @@
# Copyright (C) 2022 Digi International
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " \
file://0001-imx8m-soc.mak-preserve-dtbs-after-build.patch \
"
# "fmacro-prefix-map" is not supported on old versions of GCC
DEBUG_PREFIX_MAP:remove:class-nativesdk = "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,11 +1,14 @@
# Copyright 2017-2021 NXP
DEPENDS = "zlib-native openssl-native"
# Copyright 2017-2022 NXP
DEPENDS = "zlib openssl"
SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH} \
file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
"
IMX_MKIMAGE_SRC ?= "git://github.com/nxp-imx/imx-mkimage.git;protocol=https"
SRCBRANCH = "lf-5.15.71_2.2.0"
SRCREV = "3bfcfccb71ddf894be9c402732ccb229fe72099e"
SRCBRANCH = "lf-5.10.72_2.2.0"
IMX_MKIMAGE_SRC ?= "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https"
SRC_URI = "${IMX_MKIMAGE_SRC};branch=${SRCBRANCH}"
SRCREV = "7a277c8a1a21ff921d217889dde6a9f84e6d2168"
S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools"

View File

@ -1,3 +0,0 @@
# For the ccimx8x, we generate images for both the B0 and the C0 revisions of
# the i.MX8X silicon, so deploy both versions of the firmware.
SECO_FIRMWARE_NAME:ccimx8x = "mx8qx*0-ahab-container.img"

View File

@ -1,27 +0,0 @@
From 9e89d173a7fab97c913960344ae01dfa409b6258 Mon Sep 17 00:00:00 2001
From: Cristinel Panfir <cristinel.panfir@nxp.com>
Date: Mon, 27 Jul 2020 18:55:30 +0000
Subject: [PATCH] Makefile: Fix LIBDIR for multilib
Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index b16cebf..492d700 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@ all: she_test hsm_test v2x_test she_lib.a seco_nvm_manager.a hsm_lib.a
CFLAGS = -O1 -Werror -fPIC
DESTDIR ?= export
BINDIR ?= /usr/bin
-LIBDIR ?= /usr/lib
+base_libdir ?= /lib
+LIBDIR ?= /usr/$(base_libdir)
INCLUDEDIR ?= /usr/include
ifdef COVERAGE
--
2.7.4

View File

@ -1,32 +0,0 @@
From b62f020ea723dc33f28e5e865d0ddd13219971c9 Mon Sep 17 00:00:00 2001
From: Cristinel Panfir <cristinel.panfir@nxp.com>
Date: Mon, 29 Mar 2021 15:24:42 +0300
Subject: [PATCH] Makefile: Add v2x test to the installed-binaries
Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
[regenerate the patch to be applied after meta-imx patches]
Signed-off-by: Fausto Chiatante <fausto.chiatante@nxp.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 25ad333..a397814 100644
--- a/Makefile
+++ b/Makefile
@@ -61,9 +61,9 @@ hsm_doc: include/hsm/hsm_api.h
cp doc/latex/refman.pdf doc/hsm_api_document.pdf
rm -rf doc/latex/
-install: hsm_test she_test she_lib.a seco_nvm_manager.a hsm_lib.a
+install: hsm_test she_test v2x_test she_lib.a seco_nvm_manager.a hsm_lib.a
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
cp seco_nvm_manager.a hsm_lib.a she_lib.a $(DESTDIR)$(LIBDIR)
- cp hsm_test she_test $(DESTDIR)$(BINDIR)
+ cp hsm_test she_test v2x_test $(DESTDIR)$(BINDIR)
cp -a include/* $(DESTDIR)$(INCLUDEDIR)
--
2.25.1

View File

@ -1,33 +0,0 @@
From 99249f0f199d95f4a5213561dc0ce33f70b1e717 Mon Sep 17 00:00:00 2001
From: Cristinel Panfir <cristinel.panfir@nxp.com>
Date: Mon, 29 Mar 2021 15:20:55 +0300
Subject: [PATCH] Makefile: Fix install to clear host-user-contaminated
warnings [HSM-483]
WARNING: imx-seco-libs-git-r0 do_package_qa: QA Issue:
imx-seco-libs: /usr/lib/hsm_lib.a is owned by uid 26292, which is the same as the user running bitbake. This may be due to host contamination
imx-seco-libs: /usr/lib/she_lib.a is owned by uid 26292, which is the same as the user running bitbake. This may be due to host contamination
imx-seco-libs: /usr/lib/seco_nvm_manager.a is owned by uid 26292, which is the same as the user running bitbake.
This may be due to host contamination [host-user-contaminated]
Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 492d700..25ad333 100644
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ hsm_doc: include/hsm/hsm_api.h
install: hsm_test she_test she_lib.a seco_nvm_manager.a hsm_lib.a
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
- cp -a seco_nvm_manager.a hsm_lib.a she_lib.a $(DESTDIR)$(LIBDIR)
+ cp seco_nvm_manager.a hsm_lib.a she_lib.a $(DESTDIR)$(LIBDIR)
cp hsm_test she_test $(DESTDIR)$(BINDIR)
cp -a include/* $(DESTDIR)$(INCLUDEDIR)
--
2.25.1

View File

@ -1,30 +0,0 @@
# Copyright 2019-21 NXP
SUMMARY = "NXP i.MX SECO library"
DESCRIPTION = "NXP IMX SECO library"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://EULA.txt;md5=76871788f27c28af824e2ec1ca187832"
DEPENDS = "zlib"
SRCBRANCH = "lf-5.10.72_2.2.0"
SECO_LIB_SRC ?= "git://github.com/NXP/imx-seco-libs.git;protocol=https"
SRC_URI = "${SECO_LIB_SRC};branch=${SRCBRANCH} \
file://0001-Makefile-Fix-LIBDIR-for-multilib.patch \
file://0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch \
file://0001-add-v2x_test-to-the-installed-binaries.patch \
"
SRCREV = "3e8ad6b168f23a8c6ecd75edabc18d2673403e24"
S = "${WORKDIR}/git"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install () {
oe_runmake DESTDIR=${D} install
chown -R root:root "${D}"
}
COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
COMPATIBLE_MACHINE:mx8m-nxp-bsp = "(^$)"

View File

@ -1,2 +0,0 @@
# Copyright (C) 2013-2021 Digi International.
require ccimx8x-seco-fw.inc

View File

@ -1,28 +0,0 @@
# Copyright 2019-2021 NXP
SUMMARY = "NXP i.MX SECO firmware"
DESCRIPTION = "NXP IMX SECO firmware"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f"
inherit fsl-eula-unpack use-imx-security-controller-firmware deploy
SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
SRC_URI[md5sum] = "38d298cda9ea91db945b266bd6774e07"
SRC_URI[sha256sum] = "ed65381fac7a17a7594099191952821ed3f3f54c944937926dc19f82ecd8fef5"
do_compile[noexec] = "1"
do_install() {
}
addtask deploy after do_install
do_deploy () {
# Deploy i.MX8 SECO firmware files
install -m 0644 ${S}/firmware/seco/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}
}
COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"
COMPATIBLE_MACHINE:mx8m-nxp-bsp = "(^$)"

View File

@ -0,0 +1,28 @@
# Copyright 2021-2022 NXP
SUMMARY = "NXP i.MX SECURE ENCLAVE library"
DESCRIPTION = "NXP IMX SECURE ENCLAVE library"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://EULA.txt;md5=76871788f27c28af824e2ec1ca187832"
DEPENDS = "zlib"
EXTRA_OEMAKE = "PLAT=ele"
SRCBRANCH = "master"
SECURE_ENCLAVE_LIB_SRC ?= "git://github.com/NXP/imx-secure-enclave.git;protocol=https"
SRC_URI = "${SECURE_ENCLAVE_LIB_SRC};branch=${SRCBRANCH}"
SRCREV = "e39f7b1aa54b8f654a13c6d8492e0c12eccbe6d7"
S = "${WORKDIR}/git"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install () {
oe_runmake DESTDIR=${D} install_tests
}
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx93-nxp-bsp)"

View File

@ -1,13 +1,5 @@
# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2017-2021 NXP
# Copyright (c) 2023, Digi International Inc.
SRCBRANCH = "lf-5.10.72_2.2.0"
IMXTEST_SRC ?= "git://source.codeaurora.org/external/imx/imx-test.git;protocol=https"
SRC_URI = " \
${IMXTEST_SRC};branch=${SRCBRANCH} \
file://memtool_profile \
"
SRCREV = "a26b1ee51177e317aa05251d4c8f10c4c68064f6"
DEPENDS:append:mx9-nxp-bsp = " imx-lib"
PACKAGECONFIG:append:mx8m-nxp-bsp = " swpdm"
PLATFORM:mx9-nxp-bsp = "IMX8ULP"

View File

@ -0,0 +1,29 @@
# Copyright 2021-2022 NXP
DESCRIPTION = "i.MX Hantro V4L2 Daemon"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cd8bc2a79509c22fc9c1782a151210b1"
DEPENDS = "imx-vpu-hantro"
DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc"
SRC_URI = "${FSL_MIRROR}/${BP}.tar.gz"
SRC_URI[md5sum] = "485b2eb3cb145c2dd0f77d1a4a2f9834"
SRC_URI[sha256sum] = "f8a9130865829aa3212d4ed568ac8220fa8cf495bb172e5dd082730d13da2293"
PLATFORM:mx8mm-nxp-bsp = "IMX8MM"
PLATFORM:mx8mq-nxp-bsp = "IMX8MQ"
PLATFORM:mx8mp-nxp-bsp = "IMX8MP"
EXTRA_OEMAKE = " \
CROSS_COMPILE="${HOST_PREFIX}" \
SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \
CTRLSW_HDRPATH="${STAGING_INCDIR}" \
PLATFORM="${PLATFORM}" \
"
do_install () {
oe_runmake install DEST_DIR="${D}"
}
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx8mq-nxp-bsp|mx8mm-nxp-bsp|mx8mp-nxp-bsp)"

View File

@ -1,10 +1,11 @@
The M4 demo app version of each SoCs are followed:
* 2.10.0 -- i.MX 7ULP, 8MM, 8MQ
* 2.12.0 -- i.MX 7ULP, 8MQ, 8MM
* 2.9.0 -- i.MX 8DXL, 8QM, 8QXP
* 1.0.1 -- i.MX 7D
The M7 demo app version of each SoCs are followed:
* 2.10.0 -- i.MX 8MNLite, 8MN, 8MP
* 2.12.0 -- i.MX 8MNULite, 8MN, 8MP
The M33 demo app version of each SoCs are followed:
* 2.11.0 -- i.MX 8ULP
* 2.13.0 -- i.MX 93
* 2.13.0 -- i.MX 8ULP

View File

@ -1,11 +0,0 @@
# Copyright 2021 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f"
SRC_URI[imx8ulp.md5sum] = "de0499fd2de02922c524d4b106d3bc30"
SRC_URI[imx8ulp.sha256sum] = "17e239b96dfbb0d05e3f61c93a57bfd8a98bc021bb802a365da34d99040c6cb0"
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp)"

View File

@ -0,0 +1,15 @@
# Copyright 2022 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM:mx8ulp-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx93-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
SRC_URI[imx8ulp.md5sum] = "7a4c8e667749d429f57a64cefc096d0e"
SRC_URI[imx8ulp.sha256sum] = "40d6184e50e5dfad78973ccf4da9fdd221737558b5ed8963167b6fd81e6752c4"
SRC_URI[imx93.md5sum] = "b63358a6ed6f2b95c8196c54140b4a23"
SRC_URI[imx93.sha256sum] = "e87cd109bf4a20c5f28ea9e927d300f59386c0e2edeef95e2e3496882101469f"
COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx93-nxp-bsp)"

View File

@ -1,28 +0,0 @@
SUMMARY = "i.MX M4 core Demo images"
SECTION = "app"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=8cf95184c220e247b9917e7244124c5a"
inherit deploy fsl-eula-unpack
M4_SOC ?= "INVALID"
M4_SOC:mx7d-nxp-bsp = "imx7d-sabresd"
SRC_URI = "${FSL_MIRROR}/${M4_SOC}-m4-freertos-${PV}.bin;fsl-eula=true"
S = "${WORKDIR}/${M4_SOC}-m4-freertos-${PV}"
SRC_URI[md5sum] = "b05b780ff3916f4953ab58ac95233c38"
SRC_URI[sha256sum] = "cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254"
do_deploy () {
# Install the demo binaries
install -d ${DEPLOYDIR}
cp ${S}/*.bin ${DEPLOYDIR}/
ls ${DEPLOYDIR}/
}
addtask deploy before do_build after do_compile
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(mx7d-nxp-bsp)"

View File

@ -1,17 +0,0 @@
# Copyright 2017-2021 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa"
SRC_URI[imx7ulp.md5sum] = "f3d312d2a12d76cc353e23ee08ba1c1c"
SRC_URI[imx7ulp.sha256sum] = "43f2de5db02bcb406160886e04d083e7a9253f688fe7b3be75bc9c9e13d425cc"
SRC_URI[imx8mm.md5sum] = "3ece10e2ca255e6964b405f17c9f6342"
SRC_URI[imx8mm.sha256sum] = "c14f6d2f41d2a16eb9f948c6182ef3fbb9dfccdd5399b78e2fe3fa8ae9006dde"
SRC_URI[imx8mq.md5sum] = "b5034e35dca3c2b6c1b4d38b16cddaa7"
SRC_URI[imx8mq.sha256sum] = "ec44b737630c088dd23c1f855ce8478bae531d75a9c7021eb25e9268a8b9a425"
COMPATIBLE_MACHINE = "(mx7ulp-nxp-bsp|mx8mm-nxp-bsp|mx8mq-nxp-bsp)"

View File

@ -0,0 +1,19 @@
# Copyright 2017-2022 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM:mx8mm-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx8mq-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx7ulp-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
SRC_URI[imx8mm.md5sum] = "c2261058127d67605910b048585d6b67"
SRC_URI[imx8mm.sha256sum] = "0150edef613130b8c09644356087185a370e4148bc6974eac47b8b01b2735b72"
SRC_URI[imx8mq.md5sum] = "e6e8b52671cbdd3e756cad23b05fe77b"
SRC_URI[imx8mq.sha256sum] = "745db64406babca6311f2b760a5e325298c028b55de694affd831b94f772e0f3"
SRC_URI[imx7ulp.md5sum] = "501d223d55787eecebb2438e20c0ca1e"
SRC_URI[imx7ulp.sha256sum] = "69b576541f3815a9b5bc19ba188da6e1764e6244cad178282f13ff27da1e4c59"
COMPATIBLE_MACHINE = "(mx7ulp-nxp-bsp|mx8mm-nxp-bsp|mx8mq-nxp-bsp)"

View File

@ -4,7 +4,8 @@
require imx-mcore-demos.inc
LIC_FILES_CHKSUM:mx8dxl-nxp-bsp = "file://COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a"
LIC_FILES_CHKSUM = "file://COPYING;md5=a632fefd1c359980434f9389833cab3a"
LIC_FILES_CHKSUM:mx8qm-nxp-bsp = "file://COPYING;md5=a632fefd1c359980434f9389833cab3a"
LIC_FILES_CHKSUM:mx8qxp-nxp-bsp = "file://COPYING;md5=a632fefd1c359980434f9389833cab3a"
SRC_URI[imx8dxl.md5sum] = "8850c04a8af91e2bd822cecd5ec56e12"
SRC_URI[imx8dxl.sha256sum] = "66ddba970712ed394de4034b362334a12caa5865a6afc1dfb5a897bb55b4fcf1"
@ -15,4 +16,4 @@ SRC_URI[imx8qm.sha256sum] = "c695e72b0c7f609132f5990469cf950c03e137de887bd7e24d0
SRC_URI[imx8qx.md5sum] = "5bc15014f59b2b11c71299fac608be5d"
SRC_URI[imx8qx.sha256sum] = "bbb268a30a58a86e38966122191c8aa69f427c6c1d56b0ce81e518f4d652782a"
COMPATIBLE_MACHINE = "(mx7ulp-nxp-bsp|mx8dxl-nxp-bsp|mx8mq-nxp-bsp|mx8qm-nxp-bsp|mx8qxp-nxp-bsp)"
COMPATIBLE_MACHINE = "(mx8dxl-nxp-bsp|mx8qm-nxp-bsp|mx8qxp-nxp-bsp|mx8dx-nxp-bsp)"

View File

@ -1,17 +0,0 @@
# Copyright 2019-2021 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=e565271ec9a80ce47abbddc4bffe56fa"
SRC_URI[imx8mnddr3l.md5sum] = "f7d651d04ffc4b8fa26b19b1289f5d65"
SRC_URI[imx8mnddr3l.sha256sum] = "9377eceaddb973f1cb51ae75d8dd47c7a0bc4d82f915bf25a81cddd5d633e805"
SRC_URI[imx8mn.md5sum] = "11ee5b3f9494ba99c440b249eb99617a"
SRC_URI[imx8mn.sha256sum] = "aa4a57ed2ddbf6e27a14269be38f5ab3803889d71e8dcca76f8586a77802b010"
SRC_URI[imx8mp.md5sum] = "5167520c8493e8e2d54d1d60e22ff5d4"
SRC_URI[imx8mp.sha256sum] = "cdb9478d1b7fb74f21d15bee56a8f6d48fe3e4f97dd17a5e4499c72040988ed2"
COMPATIBLE_MACHINE = "(mx8mnul-nxp-bsp|mx8mn-nxp-bsp|mx8mp-nxp-bsp|mx8mpul-nxp-bsp)"

View File

@ -0,0 +1,20 @@
# Copyright 2019-2022 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-mcore-demos.inc
LIC_FILES_CHKSUM:mx8mn-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx8mnul-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx8mp-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
LIC_FILES_CHKSUM:mx8mpul-nxp-bsp = "file://COPYING;md5=5a0bf11f745e68024f37b4724a5364fe"
SRC_URI[imx8mn.md5sum] = "d7ade5eef38ebeb297eb855d4bf565eb"
SRC_URI[imx8mn.sha256sum] = "ba7f078d17369e3a9e3ddd74dbe3853cbfa127ad1cbdb7fd2b99f58427a5bfb1"
SRC_URI[imx8mnddr3l.md5sum] = "c0768666809999af84d8a529b8ec140f"
SRC_URI[imx8mnddr3l.sha256sum] = "79d716e0d4de689bb0cd015a3d2102e28bfa0f89291fb61210a72bc0afec442e"
SRC_URI[imx8mp.md5sum] = "f8d11f51d3c30c8d06df1e2da6852218"
SRC_URI[imx8mp.sha256sum] = "21ebebaf38a4334e1aabea4a91a5c6a5580e474f45c49d8a4623e4376f1e585d"
COMPATIBLE_MACHINE = "(mx8mn-nxp-bsp|mx8mnul-nxp-bsp|mx8mp-nxp-bsp|mx8mpul-nxp-bsp)"

View File

@ -1,36 +0,0 @@
# Copyright 2021 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "i.MX M33 core Demo images"
SECTION = "app"
LICENSE = "Proprietary"
inherit deploy fsl-eula2-unpack2
SOC ?= "INVALID"
SOC:mx8ulp-nxp-bsp = "imx8ulp"
MCORE_TYPE ?= "m33"
MCORE_TYPE:mx8ulp-nxp-bsp = "m33"
IMX_PACKAGE_NAME = "${SOC}-${MCORE_TYPE}-demo-${PV}"
SRC_URI:append = ";name=${SOC}"
SCR = "SCR-${SOC}-${MCORE_TYPE}-demo.txt"
do_install () {
# install elf format binary to /lib/firmware
install -d ${D}${base_libdir}/firmware
install -m 0644 ${S}/*.elf ${D}${base_libdir}/firmware
}
DEPLOY_FILE_EXT ?= "bin"
do_deploy () {
# Install the demo binaries
install -m 0644 ${S}/*.${DEPLOY_FILE_EXT} ${DEPLOYDIR}/
}
addtask deploy after do_install
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -7,7 +7,7 @@ LICENSE = "Proprietary"
inherit deploy fsl-eula2-unpack2
SOC ?= "INVALID"
SOC ?= "INVALID"
SOC:mx7ulp-nxp-bsp = "imx7ulp"
SOC:mx8dxl-nxp-bsp = "imx8dxl"
SOC:mx8mm-nxp-bsp = "imx8mm"
@ -18,7 +18,9 @@ SOC:mx8mpul-nxp-bsp = "imx8mp"
SOC:mx8mq-nxp-bsp = "imx8mq"
SOC:mx8qm-nxp-bsp = "imx8qm"
SOC:mx8qxp-nxp-bsp = "imx8qx"
SOC:mx8dx-nxp-bsp = "imx8qx"
SOC:mx8ulp-nxp-bsp = "imx8ulp"
SOC:mx93-nxp-bsp = "imx93"
MCORE_TYPE ?= "m4"
MCORE_TYPE:mx8mn-nxp-bsp = "m7"
@ -26,6 +28,7 @@ MCORE_TYPE:mx8mnul-nxp-bsp = "m7"
MCORE_TYPE:mx8mp-nxp-bsp = "m7"
MCORE_TYPE:mx8mpul-nxp-bsp = "m7"
MCORE_TYPE:mx8ulp-nxp-bsp = "m33"
MCORE_TYPE:mx93-nxp-bsp = "m33"
IMX_PACKAGE_NAME = "${SOC}-${MCORE_TYPE}-demo-${PV}"
SRC_URI:append = ";name=${SOC}"

View File

@ -0,0 +1,34 @@
# Copyright (c) 2023, Digi International Inc.
PACKAGECONFIG_IMPLEMENTATION:mx93-nxp-bsp = "pxp"
PACKAGECONFIG[dpu] = " \
BUILD_IMPLEMENTATION=dpu, \
, \
imx-dpu-g2d wayland-native wayland wayland-protocols, \
, \
, \
gpu-drm gpu-fbdev pxp"
PACKAGECONFIG[gpu-drm] = " \
BUILD_IMPLEMENTATION=gpu-drm, \
, \
imx-gpu-g2d wayland-native wayland wayland-protocols, \
, \
, \
dpu gpu-fbdev pxp"
PACKAGECONFIG[gpu-fbdev] = " \
BUILD_IMPLEMENTATION=gpu-fbdev, \
, \
imx-gpu-g2d, \
, \
, \
dpu gpu-drm pxp"
PACKAGECONFIG[pxp] = " \
BUILD_IMPLEMENTATION=pxp, \
, \
imx-pxp-g2d wayland-native wayland wayland-protocols, \
, \
, \
dpu gpu-drm gpu-fbdev"
COMPATIBLE_MACHINE = "(imxgpu2d|mx93-nxp-bsp)"

View File

@ -1,5 +1,17 @@
# Copyright (C) 2022, Digi International Inc.
# Copyright (C) 2022-2023, Digi International Inc.
# Workaround for crank storyboard engine which is provided in binary format,
# and needs an explicit 'libEGL.so' runtime provides.
#
# Workarounds for Crank storyboard engine
#
# Put the devel symlink in the normal package
FILES:libegl-gcnano += "${libdir}/libEGL${SOLIBSDEV}"
FILES:libgles1-gcnano += "${libdir}/libGLESv1_CM${SOLIBSDEV}"
FILES:libgles2-gcnano += "${libdir}/libGLESv2${SOLIBSDEV}"
FILES:libopenvg-gcnano += "${libdir}/libOpenVG${SOLIBSDEV}"
# Add explicit runtime provides for libEGL.so, libGLESv2.so, libGLESv1_CM.so and libOpenVG.so
RPROVIDES:libegl-gcnano:prepend = "libEGL.so "
RPROVIDES:libgles1-gcnano:prepend = "libGLESv1_CM.so "
RPROVIDES:libgles2-gcnano:prepend = "libGLESv2.so "
RPROVIDES:libopenvg-gcnano:prepend = "libOpenVG.so "

View File

@ -35,6 +35,7 @@ do_install:append() {
install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston
install -m 0644 ${WORKDIR}/digi_background.png ${D}${datadir}/weston/backgrounds/digi_background.png
printf "\n[launcher]\nicon=${datadir}/weston/terminal.png\npath=${bindir}/weston-terminal\n" >> ${D}${sysconfdir}/xdg/weston/weston.ini
install -d ${D}${systemd_system_unitdir} ${D}${sbindir}
@ -61,7 +62,7 @@ do_install:append() {
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
# /etc/default/weston
install -d ${D}${sysconfdir}/default
echo "WESTON_USER=weston" > ${D}${sysconfdir}/default/weston
echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston
# check GPU
install -d ${D}/home/root/

View File

@ -104,7 +104,7 @@ else
echo "Configure weston on pixman" > /dev/kmsg
echo "#Autogenerated" > /etc/default/weston
echo "OPTARGS=--use-pixman" >> /etc/default/weston
echo "WESTON_USER=weston" >> /etc/default/weston
echo "WESTON_USER=root" >> /etc/default/weston
fi
fi

View File

@ -29,11 +29,7 @@ do
done
EOF
chmod +x /tmp/pulse_temp_switch.sh
if [ "$USER" == "weston" ]; then
script -qc "/tmp/pulse_temp_switch.sh"
else
script -qc "su -l weston -c /tmp/pulse_temp_switch.sh"
fi
script -qc "/tmp/pulse_temp_switch.sh"
rm -f /tmp/pulse_temp_switch.sh

View File

@ -30,11 +30,11 @@ ConditionPathExists=/dev/tty0
# Requires systemd-notify.so Weston plugin.
#Type=notify
EnvironmentFile=-/etc/default/weston
Environment="XDG_RUNTIME_DIR=/home/weston"
Environment="WESTON_USER=weston"
Environment="XDG_RUNTIME_DIR=/home/root"
Environment="WESTON_USER=root"
Environment="WL_EGL_GBM_FENCE=0"
#ExecStart=/usr/bin/weston-launch -- --modules=systemd-notify.so --log=/home/weston/weston.log $OPTARGS
ExecStart=/usr/bin/weston-start --modules=systemd-notify.so --log=/home/weston/weston.log $OPTARGS
ExecStart=/usr/bin/weston-start --modules=systemd-notify.so --log=/home/root/weston.log $OPTARGS
ExecStop=/usr/bin/killall weston-launch
# Optional watchdog setup
@ -42,11 +42,11 @@ ExecStop=/usr/bin/killall weston-launch
#WatchdogSec=20
# The user to run Weston as.
User=weston
Group=weston
User=root
Group=root
# Make sure the working directory is the users home directory
WorkingDirectory=/home/weston
WorkingDirectory=/home/root
# Set up a full user session for the user, required by Weston.
PAMName=weston-autologin

View File

@ -3,7 +3,7 @@
weston_args=$*
if [ -z "$WESTON_USER" ]; then
WESTON_USER=weston
WESTON_USER=root
fi
if [ "$USER" != "$WESTON_USER" ]; then
weston_args_user="-u $WESTON_USER"

View File

@ -1,11 +1,11 @@
if [ "$USER" == "weston" ]; then
export XDG_RUNTIME_DIR=/run/user/`id -u weston`
if [ "$USER" == "root" ]; then
export XDG_RUNTIME_DIR=/run/user/`id -u root`
export ELM_ENGINE=wayland_shm
export ECORE_EVAS_ENGINE=wayland_shm
export ECORE_EVAS_ENGINE=wayland_shm
export GDK_BACKEND=wayland
export PULSE_RUNTIME_PATH=/run/user/`id -u weston`
export PULSE_RUNTIME_PATH=/run/user/`id -u root`
if [ -e $XDG_RUNTIME_DIR/wayland-0 ]; then
export WAYLAND_DISPLAY=wayland-0
else

View File

@ -1,6 +1,6 @@
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Thu, 19 Mar 2020 12:15:19 +0100
Subject: [PATCH] Allow to get hdmi output with several outputs
Subject: [PATCH 1/4] Allow to get hdmi output with several outputs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -15,7 +15,7 @@ Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/compositor/main.c b/compositor/main.c
index 322f2ff57b28..055eed3bf7c2 100644
index 322f2ff..055eed3 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -2246,8 +2246,14 @@ drm_process_layoutput(struct wet_compositor *wet, struct wet_layoutput *lo)
@ -33,4 +33,4 @@ index 322f2ff57b28..055eed3bf7c2 100644
+ //return -1;
}
}

View File

@ -1,191 +0,0 @@
From: Pierre-Yves MORDRET <pierre-yves.mordret@st.som>
Date: Mon, 23 May 2022 14:27:13 +0200
Subject: [PATCH] Remove useless code from new Fragment Shader
Generic Weston 10.0 consumes more GPU than before (8.0).
The compilation doesn't get rid from unreachable code.
Since not used and not optimized during compilation
state, we simply remove the code.
Change-Id: I37880d5fcb8487c77e084b289db8d2fb945c21ab
Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.som>
---
libweston/renderer-gl/fragment.glsl | 110 ++--------------------------
libweston/renderer-gl/gl-shaders.c | 5 --
2 files changed, 5 insertions(+), 110 deletions(-)
diff --git a/libweston/renderer-gl/fragment.glsl b/libweston/renderer-gl/fragment.glsl
index cfadb8859567..f735ab3a0a44 100644
--- a/libweston/renderer-gl/fragment.glsl
+++ b/libweston/renderer-gl/fragment.glsl
@@ -42,33 +42,17 @@
#define SHADER_VARIANT_SOLID 7
#define SHADER_VARIANT_EXTERNAL 8
-/* enum gl_shader_color_curve */
-#define SHADER_COLOR_CURVE_IDENTITY 0
-#define SHADER_COLOR_CURVE_LUT_3x1D 1
-
#if DEF_VARIANT == SHADER_VARIANT_EXTERNAL
#extension GL_OES_EGL_image_external : require
#endif
-#ifdef GL_FRAGMENT_PRECISION_HIGH
-#define HIGHPRECISION highp
-#else
-#define HIGHPRECISION mediump
-#endif
-
-precision HIGHPRECISION float;
+precision mediump float;
/*
* These undeclared identifiers will be #defined by a runtime generated code
* snippet.
*/
compile_const int c_variant = DEF_VARIANT;
-compile_const bool c_input_is_premult = DEF_INPUT_IS_PREMULT;
-compile_const bool c_green_tint = DEF_GREEN_TINT;
-compile_const int c_color_pre_curve = DEF_COLOR_PRE_CURVE;
-
-compile_const bool c_need_color_pipeline =
- c_color_pre_curve != SHADER_COLOR_CURVE_IDENTITY;
vec4
yuva2rgba(vec4 yuva)
@@ -94,6 +78,7 @@ yuva2rgba(vec4 yuva)
color_out.g = Y - 0.39176229 * su - 0.81296764 * sv;
color_out.b = Y + 2.01723214 * su;
+ color_out.rgb *= yuva.w;
color_out.a = yuva.w;
return color_out;
@@ -110,8 +95,6 @@ uniform sampler2D tex1;
uniform sampler2D tex2;
uniform float alpha;
uniform vec4 unicolor;
-uniform HIGHPRECISION sampler2D color_pre_curve_lut_2d;
-uniform HIGHPRECISION vec2 color_pre_curve_lut_scale_offset;
vec4
sample_input_texture()
@@ -157,99 +140,16 @@ sample_input_texture()
return yuva2rgba(yuva);
}
-/*
- * Texture coordinates go from 0.0 to 1.0 corresponding to texture edges.
- * When we do LUT look-ups with linear filtering, the correct range to sample
- * from is not from edge to edge, but center of first texel to center of last
- * texel. This follows because with LUTs, you have the exact end points given,
- * you never extrapolate but only interpolate.
- * The scale and offset are precomputed to achieve this mapping.
- */
-float
-lut_texcoord(float x, vec2 scale_offset)
-{
- return x * scale_offset.s + scale_offset.t;
-}
-
-/*
- * Sample a 1D LUT which is a single row of a 2D texture. The 2D texture has
- * four rows so that the centers of texels have precise y-coordinates.
- */
-float
-sample_color_pre_curve_lut_2d(float x, compile_const int row)
-{
- float tx = lut_texcoord(x, color_pre_curve_lut_scale_offset);
-
- return texture2D(color_pre_curve_lut_2d,
- vec2(tx, (float(row) + 0.5) / 4.0)).x;
-}
-
-vec3
-color_pre_curve(vec3 color)
-{
- vec3 ret;
-
- if (c_color_pre_curve == SHADER_COLOR_CURVE_IDENTITY) {
- return color;
- } else if (c_color_pre_curve == SHADER_COLOR_CURVE_LUT_3x1D) {
- ret.r = sample_color_pre_curve_lut_2d(color.r, 0);
- ret.g = sample_color_pre_curve_lut_2d(color.g, 1);
- ret.b = sample_color_pre_curve_lut_2d(color.b, 2);
- return ret;
- } else {
- /* Never reached, bad c_color_pre_curve. */
- return vec3(1.0, 0.3, 1.0);
- }
-}
-
-vec4
-color_pipeline(vec4 color)
-{
- color.rgb = color_pre_curve(color.rgb);
-
- return color;
-}
-
void
main()
{
vec4 color;
- /* Electrical (non-linear) RGBA values, may be premult or not */
+ /* Electrical (non-linear) RGBA values, pre-multiplied */
color = sample_input_texture();
- if (c_need_color_pipeline) {
- /* Ensure straight alpha */
- if (c_input_is_premult) {
- if (color.a == 0.0)
- color.rgb = vec3(0, 0, 0);
- else
- color.rgb *= 1.0 / color.a;
- }
-
- color = color_pipeline(color);
-
- /* View alpha (opacity) */
- color.a *= alpha;
-
- /* pre-multiply for blending */
- color.rgb *= color.a;
- } else {
- /* Fast path for disabled color management */
-
- if (c_input_is_premult) {
- /* View alpha (opacity) */
- color *= alpha;
- } else {
- /* View alpha (opacity) */
- color.a *= alpha;
- /* pre-multiply for blending */
- color.rgb *= color.a;
- }
- }
-
- if (c_green_tint)
- color = vec4(0.0, 0.3, 0.0, 0.2) + color * 0.8;
+ /* View alpha (opacity) */
+ color *= alpha;
gl_FragColor = color;
}
diff --git a/libweston/renderer-gl/gl-shaders.c b/libweston/renderer-gl/gl-shaders.c
index 97f288c07c9e..c8e3d297e29c 100644
--- a/libweston/renderer-gl/gl-shaders.c
+++ b/libweston/renderer-gl/gl-shaders.c
@@ -263,11 +263,6 @@ gl_shader_create(struct gl_renderer *gr,
shader->alpha_uniform = glGetUniformLocation(shader->program, "alpha");
shader->color_uniform = glGetUniformLocation(shader->program,
"unicolor");
- shader->color_pre_curve_lut_2d_uniform =
- glGetUniformLocation(shader->program, "color_pre_curve_lut_2d");
- shader->color_pre_curve_lut_scale_offset_uniform =
- glGetUniformLocation(shader->program, "color_pre_curve_lut_scale_offset");
-
free(conf);
wl_list_insert(&gr->shader_list, &shader->link);

View File

@ -1,6 +1,6 @@
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Thu, 19 Mar 2020 12:20:32 +0100
Subject: [PATCH] Force to close all output
Subject: [PATCH 2/4] Force to close all output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -14,7 +14,7 @@ Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/compositor/main.c b/compositor/main.c
index 055eed3bf7c2..ac366a01f8e6 100644
index 055eed3..ac366a0 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -2322,7 +2322,11 @@ drm_heads_changed(struct wl_listener *listener, void *arg)

View File

@ -1,45 +0,0 @@
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Tue, 26 Apr 2022 09:59:10 +0200
Subject: [PATCH] Disable gles3
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
libweston/renderer-gl/gl-renderer.c | 6 ++++++
.../renderer-gl/gl-shader-config-color-transformation.c | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
index a5f5eae44f83..2f7941f942eb 100644
--- a/libweston/renderer-gl/gl-renderer.c
+++ b/libweston/renderer-gl/gl-renderer.c
@@ -29,7 +29,13 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#if 0
#include <GLES3/gl3.h>
+#else
+#define GL_RGBA16F 0x881A
+#define GL_RGB10_A2 0x8059
+#define GL_HALF_FLOAT 0x140B
+#endif
#include <stdbool.h>
#include <stdint.h>
diff --git a/libweston/renderer-gl/gl-shader-config-color-transformation.c b/libweston/renderer-gl/gl-shader-config-color-transformation.c
index 21a4565393fe..d5f249169219 100644
--- a/libweston/renderer-gl/gl-shader-config-color-transformation.c
+++ b/libweston/renderer-gl/gl-shader-config-color-transformation.c
@@ -25,7 +25,12 @@
#include "config.h"
+#if 0
#include <GLES3/gl3.h>
+#else
+#include <GLES2/gl2.h>
+#define GL_R32F 0x822E
+#endif
#include <GLES2/gl2ext.h>
#include <assert.h>

View File

@ -0,0 +1,30 @@
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Thu, 25 Aug 2022 09:34:23 +0200
Subject: [PATCH 4/4] Disable request to EGL_DRM_RENDER_NODE_FILE_EXT
Depending on GPU userland implementationn the reqest of EGL_DRM_RENDER_NODE_FILE_EXT
return /dev/dri/renderD128 but this interface are not always present.
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
libweston/renderer-gl/egl-glue.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libweston/renderer-gl/egl-glue.c b/libweston/renderer-gl/egl-glue.c
index 013172a..46063c5 100644
--- a/libweston/renderer-gl/egl-glue.c
+++ b/libweston/renderer-gl/egl-glue.c
@@ -480,9 +480,9 @@ gl_renderer_set_egl_device(struct gl_renderer *gr)
gl_renderer_log_extensions("EGL device extensions", extensions);
/* Try to query the render node using EGL_DRM_RENDER_NODE_FILE_EXT */
- if (weston_check_egl_extension(extensions, "EGL_EXT_device_drm_render_node"))
- gr->drm_device = gr->query_device_string(gr->egl_device,
- EGL_DRM_RENDER_NODE_FILE_EXT);
+/* if (weston_check_egl_extension(extensions, "EGL_EXT_device_drm_render_node"))*/
+/* gr->drm_device = gr->query_device_string(gr->egl_device,*/
+/* EGL_DRM_RENDER_NODE_FILE_EXT);*/
/* The extension is not supported by the Mesa version of the system or
* the query failed. Fallback to EGL_DRM_DEVICE_FILE_EXT */
--

View File

@ -1,52 +0,0 @@
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Fri, 6 May 2022 11:41:10 +0200
Subject: [PATCH] Revert gl-renderer: Add EGL_IMAGE_PRESERVED_KHR to our
attributes
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
libweston/renderer-gl/gl-renderer.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
index 2f7941f942eb..2ab707c5650d 100644
--- a/libweston/renderer-gl/gl-renderer.c
+++ b/libweston/renderer-gl/gl-renderer.c
@@ -2152,7 +2152,7 @@ gl_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer,
struct weston_compositor *ec = es->compositor;
struct gl_renderer *gr = get_renderer(ec);
struct gl_surface_state *gs = get_surface_state(es);
- EGLint attribs[5];
+ EGLint attribs[3];
GLenum target;
int i, num_planes;
@@ -2205,9 +2205,7 @@ gl_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer,
for (i = 0; i < num_planes; i++) {
attribs[0] = EGL_WAYLAND_PLANE_WL;
attribs[1] = i;
- attribs[2] = EGL_IMAGE_PRESERVED_KHR;
- attribs[3] = EGL_TRUE;
- attribs[4] = EGL_NONE;
+ attribs[2] = EGL_NONE;
gs->images[i] = egl_image_create(gr,
EGL_WAYLAND_BUFFER_WL,
@@ -2242,7 +2240,7 @@ import_simple_dmabuf(struct gl_renderer *gr,
struct dmabuf_attributes *attributes)
{
struct egl_image *image;
- EGLint attribs[52];
+ EGLint attribs[50];
int atti = 0;
bool has_modifier;
@@ -2260,8 +2258,6 @@ import_simple_dmabuf(struct gl_renderer *gr,
attribs[atti++] = attributes->height;
attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
attribs[atti++] = attributes->format;
- attribs[atti++] = EGL_IMAGE_PRESERVED_KHR;
- attribs[atti++] = EGL_TRUE;
if (attributes->modifier[0] != DRM_FORMAT_MOD_INVALID) {
if (!gr->has_dmabuf_import_modifiers)

View File

@ -0,0 +1,40 @@
From: Erik Kurzinger <ekurzinger@nvidia.com>
Date: Fri, 12 Aug 2022 08:22:26 -0700
Subject: [PATCH] clients/simple-egl: call eglSwapInterval after eglMakeCurrent
If weston-simple-egl is run with the "-b" flag, it will attempt to set
the swap interval to 0 during create_surface. However, at that point, it
will not have made its EGLContext current yet, causing the
eglSwapInterval call to have no effect. To fix this, wait until the
EGLContext has been made current in init_gl before updating the swap
interval.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
---
clients/simple-egl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 2c7059c0..79d296a9 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -276,6 +276,9 @@ init_gl(struct window *window)
window->egl_surface, window->display->egl.ctx);
assert(ret == EGL_TRUE);
+ if (!window->frame_sync)
+ eglSwapInterval(window->display->egl.dpy, 0);
+
frag = create_shader(window, frag_shader_text, GL_FRAGMENT_SHADER);
vert = create_shader(window, vert_shader_text, GL_VERTEX_SHADER);
@@ -399,9 +402,6 @@ create_surface(struct window *window)
window->wait_for_configure = true;
wl_surface_commit(window->surface);
-
- if (!window->frame_sync)
- eglSwapInterval(display->egl.dpy, 0);
}
static void

View File

@ -3,10 +3,10 @@ FILESEXTRAPATHS:prepend:stm32mpcommon := "${THISDIR}/${PN}:"
SRC_URI:append:stm32mpcommon = " \
file://0001-Allow-to-get-hdmi-output-with-several-outputs.patch \
file://0002-Force-to-close-all-output.patch \
file://0003-Disable-gles3.patch \
file://0004-Revert-gl-renderer-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch \
file://0001-Remove-useless-code-from-new-Fragment-Shader.patch \
file://0004-Disable-request-to-EGL_DRM_RENDER_NODE_FILE_EXT.patch \
file://0005-clients-simple-egl-call-eglSwapInterval-after-eglMak.patch \
"
SIMPLECLIENTS="egl,touch,dmabuf-v4l,dmabuf-egl"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \

View File

@ -0,0 +1,51 @@
From 2eb1cc3d1af83020cfbce5193b1a273078257668 Mon Sep 17 00:00:00 2001
From: Hugues Fruchet <hugues.fruchet@foss.st.com>
Date: Tue, 11 Oct 2022 12:26:15 +0200
Subject: [PATCH] waylandsink: fix shm pool wrongly selected with some
GStreamer elements
With some GStreamer elements, and depending on their position in
pipeline, propose_allocation() may be called right before set_caps(),
leading to use sink->use_dmabuf while not being set.
Fix this by checking for dmabuf format also in propose_allocation()
instead of relying on sink->use_dmabuf.
Example of pipeline which underline the problem:
gst-launch-1.0 filesrc location=<png> ! pngdec ! videoconvert ! imagefreeze ! waylandsink
Problem is not reproduced with this pipeline:
gst-launch-1.0 filesrc location=<png> ! pngdec ! imagefreeze ! videoconvert ! waylandsink
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
ext/wayland/gstwaylandsink.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c
index 1f68546..3bbb736 100644
--- a/ext/wayland/gstwaylandsink.c
+++ b/ext/wayland/gstwaylandsink.c
@@ -688,8 +688,20 @@ gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
GstAllocator *alloc;
GstCaps *pcaps;
guint config_min_buf, config_max_buf;
+ gboolean use_dmabuf;
+ GstVideoFormat format;
+
+ format = GST_VIDEO_INFO_FORMAT (&sink->video_info);
- if (!sink->use_dmabuf)
+ /* Force usage of dmabuf buffer pool by default, ie
+ * even if video/x-raw(memory:DMABuf) is not set in caps.
+ * This allows 0-copy path with software downstream elements
+ * (use of dmabuf buffers mmapped memory directly instead
+ * of copying)
+ */
+ use_dmabuf = gst_wl_display_check_format_for_dmabuf (sink->display, format);
+
+ if (!use_dmabuf)
return gst_wayland_sink_propose_shm_allocation(bsink, query);
/*
--
2.25.1

View File

@ -17,6 +17,7 @@ SRC_URI:append = " \
file://0014-waylandsink-add-waylandpool-on-meson-build.patch \
\
file://0016-Add-new-gtkwaylandsink-element.patch \
file://0017-waylandsink-fix-shm-pool-wrongly-selected-with-some-.patch \
"
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
@ -31,6 +32,7 @@ PACKAGECONFIG ?= " \
bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \
ttml uvch264 webp \
kms \
v4l2codecs \
"
do_install:append() {

View File

@ -27,7 +27,7 @@ python() {
# variable.
wolfssl_fips_local_path = d.getVar('WOLFSSL_FIPS_PKG_PATH')
if wolfssl_fips_local_path:
premirrors = d.getVar('PREMIRRORS', True)
premirrors = d.getVar('PREMIRRORS')
d.setVar('PREMIRRORS', "http:///not/exist/${WOLFSSL_FIPS_PKG_NAME}.7z file://%s \\n %s" % (wolfssl_fips_local_path, premirrors))
# Yocto does not support unpacking password protected packages, so configure the

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2022 Digi International.
# Copyright (C) 2013-2023 Digi International.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
@ -13,6 +13,7 @@ SRC_URI:append:ccimx6 = " \
SRC_URI:append:ccimx6ul = " file://asound.state"
SRC_URI:append:ccimx8x = " file://asound.state"
SRC_URI:append:ccimx8m = " file://asound.state"
SRC_URI:append:ccimx93 = " file://asound.state"
SRC_URI:append:ccmp1 = " file://asound.state"
do_install:append:ccimx6() {

View File

@ -0,0 +1,9 @@
pcm.imxmax98088 {
type hw
card 0
}
ctl.imxmax98088 {
type hw
card 0
}
ctl.!default imxmax98088

File diff suppressed because it is too large Load Diff

View File

@ -66,4 +66,4 @@ INSANE_SKIP:${PN} += "build-deps"
INSANE_SKIP:${PN} += "file-rdeps"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(ccimx8mp|ccmp1)"
COMPATIBLE_MACHINE = "(ccmp1)"

View File

@ -13,19 +13,24 @@ DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-too
PROVIDES += "u-boot"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
# Select internal or Github U-Boot repo
UBOOT_URI_STASH = "${DIGI_MTK_GIT}/uboot/u-boot-denx.git;protocol=ssh"
UBOOT_URI_GITHUB = "${DIGI_GITHUB_GIT}/u-boot.git;protocol=https"
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_URI_STASH}', '${UBOOT_URI_GITHUB}', d)}"
INSTALL_FW_UBOOT_SCRIPTS = " \
file://install_linux_fw_sd.txt \
file://install_linux_fw_usb.txt \
file://install_linux_fw_uuu.sh \
"
SRC_URI = " \
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
file://altboot.txt \
file://boot.txt \
file://install_linux_fw_sd.txt \
file://install_linux_fw_usb.txt \
${@oe.utils.conditional('UBOOT_HAS_FASTBOOT', 'true', 'file://install_linux_fw_uuu.sh', '', d)} \
${INSTALL_FW_UBOOT_SCRIPTS} \
"
BUILD_UBOOT_SCRIPTS ?= "true"
@ -33,120 +38,53 @@ BUILD_UBOOT_SCRIPTS ?= "true"
BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
LOCALVERSION ?= ""
inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-u-boot-localversion', '', d)}
EXTRA_OEMAKE:append = " KCFLAGS=-fgnu89-inline"
UBOOT_EXTRA_CONF ?= ""
# Use default initial env name so userspace tools work as expected
UBOOT_INITIAL_ENV = "u-boot-initial-env"
# Disable u-boot environment artifacts
UBOOT_INITIAL_ENV = ""
python __anonymous() {
if (d.getVar("TRUSTFENCE_DEK_PATH", True) not in ["0", None]) and (d.getVar("TRUSTFENCE_SIGN", True) != "1"):
if (d.getVar("TRUSTFENCE_DEK_PATH") not in ["0", None]) and (d.getVar("TRUSTFENCE_SIGN") != "1"):
bb.fatal("Only signed U-Boot images can be encrypted. Generate signed images (TRUSTFENCE_SIGN = \"1\") or remove encryption (TRUSTFENCE_DEK_PATH = \"0\")")
}
do_compile () {
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
fi
unset LDFLAGS
unset CFLAGS
unset CPPFLAGS
if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
then
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
if [ -n "${UBOOT_CONFIG}" ]
then
unset i j k
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]
then
oe_runmake -C ${S} O=${B}/${config} ${config}
# Reconfigure U-Boot with Digi UBOOT_EXTRA_CONF
for var in ${UBOOT_EXTRA_CONF}; do
echo "${var}" >> ${B}/${config}/.config
done
oe_runmake -C ${S} O=${B}/${config} oldconfig
oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
for binary in ${UBOOT_BINARIES}; do
k=$(expr $k + 1);
if [ $k -eq $i ]; then
cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
fi
done
# Generate the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
oe_runmake -C ${S} O=${B}/${config} u-boot-initial-env
cp ${B}/${config}/u-boot-initial-env ${B}/${config}/u-boot-initial-env-${type}
fi
unset k
# Secure boot artifacts
if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]
then
cp ${B}/${config}/u-boot-dtb-signed.imx ${B}/${config}/u-boot-dtb-signed-${type}.${UBOOT_SUFFIX}
cp ${B}/${config}/u-boot-dtb-usb-signed.imx ${B}/${config}/u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX}
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]
then
cp ${B}/${config}/u-boot-dtb-encrypted.imx ${B}/${config}/u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX}
fi
fi
fi
done
unset j
done
unset i
else
oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
# Generate the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
oe_runmake -C ${S} O=${B} u-boot-initial-env
fi
fi
do_configure[prefuncs] += "${@oe.utils.ifelse(d.getVar('UBOOT_TF_CONF'), 'trustfence_config', '')}"
python trustfence_config() {
config_path = d.expand('${WORKDIR}/uboot-trustfence.cfg')
with open(config_path, 'w') as f:
for cfg in d.getVar('UBOOT_TF_CONF').split():
f.write('%s\n' % cfg)
d.appendVar('SRC_URI', ' file://%s' % config_path)
}
TF_BOOTSCRIPT_SEDFILTER = "${@tf_bootscript_sedfilter(d)}"
def tf_bootscript_sedfilter(d):
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or ""
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE') or ""
return "s,\(^[[:blank:]]*\)true.*,\\1setenv boot_initrd true\\n\\1setenv initrd_file %s-${MACHINE}.cpio.gz.u-boot.tf,g" % tf_initramfs if tf_initramfs else ""
build_uboot_scripts() {
# DEY firmware install scripts
sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt
sed -i -e 's,##MACHINE##,${MACHINE},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt
sed -i -e 's,##GRAPHICAL_IMAGES##,${GRAPHICAL_IMAGES},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt
sed -i -e 's,##DEFAULT_IMAGE_NAME##,${DEFAULT_IMAGE_NAME},g' ${WORKDIR}/install_linux_fw_sd.txt ${WORKDIR}/install_linux_fw_usb.txt
mkimage -T script -n "DEY firmware install script" -C none -d ${WORKDIR}/install_linux_fw_sd.txt ${DEPLOYDIR}/install_linux_fw_sd.scr
mkimage -T script -n "DEY firmware install script" -C none -d ${WORKDIR}/install_linux_fw_usb.txt ${DEPLOYDIR}/install_linux_fw_usb.scr
if [ "${@oe.utils.conditional('UBOOT_HAS_FASTBOOT', 'true', 'true', '', d)}" = "true" ]; then
# DEY firmware install uuu script
sed -i -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' ${WORKDIR}/install_linux_fw_uuu.sh
sed -i -e 's,##MACHINE##,${MACHINE},g' ${WORKDIR}/install_linux_fw_uuu.sh
sed -i -e 's,##GRAPHICAL_IMAGES##,${GRAPHICAL_IMAGES},g' ${WORKDIR}/install_linux_fw_uuu.sh
sed -i -e 's,##DEFAULT_IMAGE_NAME##,${DEFAULT_IMAGE_NAME},g' ${WORKDIR}/install_linux_fw_uuu.sh
install -m 775 ${WORKDIR}/install_linux_fw_uuu.sh ${DEPLOYDIR}/
fi
for f in $(echo ${INSTALL_FW_UBOOT_SCRIPTS} | sed -e 's,file\:\/\/,,g'); do
f_ext="${f##*.}"
TMP_INSTALL_SCR="$(mktemp ${WORKDIR}/${f}.XXXXXX)"
sed -e 's,##GRAPHICAL_BACKEND##,${GRAPHICAL_BACKEND},g' \
-e 's,##MACHINE##,${MACHINE},g' \
-e 's,##GRAPHICAL_IMAGES##,${GRAPHICAL_IMAGES},g' \
-e 's,##DEFAULT_IMAGE_NAME##,${DEFAULT_IMAGE_NAME},g' \
${WORKDIR}/${f} > ${TMP_INSTALL_SCR}
if [ "${f_ext}" = "txt" ]; then
mkimage -T script -n "DEY firmware install script" -C none -d ${TMP_INSTALL_SCR} ${DEPLOYDIR}/${f%.*}.scr
else
install -m 775 ${TMP_INSTALL_SCR} ${DEPLOYDIR}/${f}
fi
rm -f ${TMP_INSTALL_SCR}
done
# Boot script for DEY images (reconfigure on-the-fly if TRUSTFENCE is enabled)
TMP_BOOTSCR="$(mktemp ${WORKDIR}/bootscr.XXXXXX)"
sed -e "${TF_BOOTSCRIPT_SEDFILTER}" ${WORKDIR}/boot.txt > ${TMP_BOOTSCR}
mkimage -T script -n bootscript -C none -d ${TMP_BOOTSCR} ${DEPLOYDIR}/boot.scr
rm -f ${TMP_BOOTSCR}
# Alternate boot script for dualboot
mkimage -T script -n "Alternate bootscript" -C none -d ${WORKDIR}/altboot.txt ${DEPLOYDIR}/altboot.scr
@ -167,7 +105,6 @@ build_uboot_scripts() {
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}"
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/altboot.scr"
fi
rm -f ${TMP_BOOTSCR}
}
do_deploy:append() {
@ -186,21 +123,21 @@ do_deploy:append() {
then
cd ${DEPLOYDIR}
rm -r ${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-${type}.${UBOOT_SUFFIX}
ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]; then
install ${B}/${config}/SRK_efuses.bin SRK_efuses-${PV}-${PR}.bin
ln -sf SRK_efuses-${PV}-${PR}.bin SRK_efuses.bin
install ${B}/${config}/u-boot-dtb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-signed-${type}.${UBOOT_SUFFIX}
install ${B}/${config}/${UBOOT_BINARYNAME}-dtb-signed.imx ${UBOOT_BINARYNAME}-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf ${UBOOT_BINARYNAME}-dtb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARYNAME}-dtb-signed-${type}.${UBOOT_SUFFIX}
install ${B}/${config}/u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-usb-signed-${type}.${UBOOT_SUFFIX}
install ${B}/${config}/${UBOOT_BINARYNAME}-dtb-usb-signed.imx ${UBOOT_BINARYNAME}-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf ${UBOOT_BINARYNAME}-dtb-usb-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARYNAME}-dtb-usb-signed-${type}.${UBOOT_SUFFIX}
if [ "${TRUSTFENCE_DEK_PATH}" != "0" ]
then
install ${B}/${config}/u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-dtb-encrypted-${type}.${UBOOT_SUFFIX}
install ${B}/${config}/${UBOOT_BINARYNAME}-dtb-encrypted.imx ${UBOOT_BINARYNAME}-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf ${UBOOT_BINARYNAME}-dtb-encrypted-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARYNAME}-dtb-encrypted-${type}.${UBOOT_SUFFIX}
fi
fi
fi
@ -252,7 +189,7 @@ 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
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}-${FIP_UBOOT_CONFIG}.dtb
install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${FIP_UBOOT_DTB}-${FIP_UBOOT_HEADER}.dtb
install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin
}

View File

@ -73,7 +73,7 @@ else
fi
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -101,7 +101,7 @@ else
fi
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -70,7 +70,7 @@ else
fi
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux nand ${mtdbootpart}

View File

@ -70,7 +70,7 @@ else
fi
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux nand ${mtdbootpart}

View File

@ -81,7 +81,7 @@ if test -n "${module_ram}"; then
fi
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -90,7 +90,7 @@ if test "${board_version}" -lt "3"; then
setenv overlays _ov_board_v1-v2_ccimx8mn-dvk.dtbo,${overlays}
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -93,7 +93,7 @@ if test "${soc_type}" = "imx8qxp"; then
setenv overlays _ov_som_quad_ccimx8x.dtbo,${overlays}
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -98,7 +98,7 @@ if test "${board_version}" -le "3"; then
setenv overlays _ov_board_v1-v3_ccimx8x-sbc-pro.dtbo,${overlays}
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
setenv extra_bootargs fbcon=logo-pos:center fbcon=logo-count:1 ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}

View File

@ -49,48 +49,38 @@ else
fi
fi
# Back up environment variables
setenv ORIG_overlays ${overlays}
setenv ORIG_extra_bootargs ${extra_bootargs}
# Set SOC type to "imx8mp" if not already defined by U-Boot
if test ! -n "${soc_type}"; then
setenv soc_type "imx8mp"
fi
#
# Determine overlays to apply depending on the hardware capabilities
# described by the HWID, SOM version, and carrier board version.
#
if test -n "${module_ram}"; then
setexpr module_has_wifi ${hwid_2} \& 10000
setexpr module_has_wifi ${module_has_wifi} / 10000
setexpr module_has_bt ${hwid_2} \& 20000
setexpr module_has_bt ${module_has_bt} / 20000
setexpr module_has_mca ${hwid_2} \& 10000
setexpr module_has_mca ${module_has_mca} / 10000
setexpr module_has_wifi ${hwid_2} \& 20000
setexpr module_has_wifi ${module_has_wifi} / 20000
setexpr module_has_bt ${hwid_2} \& 40000
setexpr module_has_bt ${module_has_bt} / 40000
##
## @TODO: THE OVERLAYS NEED TO BE ADJUSTED ONCE THE MURATA SUPPORT
## IS IN PLACE.
##
if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then
setenv overlays _ov_som_bt_ccimx8m.dtbo,${overlays}
fi
if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then
setenv overlays _ov_som_wifi_ccimx8m.dtbo,${overlays}
fi
if test "${module_has_bt}" = "1" && test -z "${disable_bt}"; then
setenv overlays _ov_som_bt_ccimx93.dtbo,${overlays}
fi
if test "${module_has_wifi}" = "1" && test -z "${disable_wifi}"; then
setenv overlays _ov_som_wifi_ccimx93.dtbo,${overlays}
fi
if test "${module_has_mca}" = "1" && test -z "${disable_mca}"; then
setenv overlays _ov_som_mca_ccimx93.dtbo,${overlays}
fi
setenv extra_bootargs fbcon=logo-pos:center ${extra_bootargs}
dboot linux mmc ${mmcbootdev}:${mmcpart}
# We only get here in case of an error on the dboot command.
#
# Undo changes to environment variables
#
# (we only get here in case of an error on the dboot command)
#
setenv overlays ${ORIG_overlays}
setenv ORIG_overlays
setenv extra_bootargs ${ORIG_extra_bootargs}
setenv ORIG_extra_bootargs

View File

@ -0,0 +1,37 @@
#
# U-Boot bootscript for altbootcmd (dual boot fallback after retries)
#
# After an upgrade, active_system has changed. U-Boot tries to boot this system
# for a number of tries. If the limit is reached, altbootcmd is run instead.
# This is the script that it will run. It has to:
# * switch back to previous system
# * reset the firmware update flag
# * run the regular boot command
if test "${dualboot}" = "yes" && test "${upgrade_available}" = "1"; then
echo "## Update failed; Rolling back to previous version."
if test "${active_system}" = "linux_a"; then
setenv active_system linux_b
part number mmc ${mmcbootdev} linux_b linux_b_index
setexpr mmcpart ${linux_b_index}
# Save the partition index on variable rootfs_b_index
part number mmc ${mmcbootdev} rootfs_b rootfs_b_index
# Save the rootfs_b UUID into mmcroot_b
part uuid mmc ${mmcbootdev}:${rootfs_b_index} mmcroot_b
setenv mmcroot PARTUUID=${mmcroot_b}
else
setenv active_system linux_a
part number mmc ${mmcbootdev} linux_a linux_a_index
setexpr mmcpart ${linux_a_index}
# Save the partition index on variable rootfs_a_index
part number mmc ${mmcbootdev} rootfs_a rootfs_a_index
# Save the rootfs_a UUID into mmcroot_a
part uuid mmc ${mmcbootdev}:${rootfs_a_index} mmcroot_a
setenv mmcroot PARTUUID=${mmcroot_a}
fi
setenv upgrade_available
setenv bootcount 0
saveenv
fi
run bootcmd

View File

@ -0,0 +1,234 @@
#
# U-Boot script for installing Linux images created by Yocto from the SD
# card into the eMMC
#
# Reset temp variables
install_abort=0
BASEFILENAME=0
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin;
setenv INSTALL_MMCDEV 1
if test -z "${image-name}"; then
setenv image-name ##DEFAULT_IMAGE_NAME##
fi
GRAPHICAL_IMAGES="##GRAPHICAL_IMAGES##"
for g in ${GRAPHICAL_IMAGES}; do
if test "${image-name}" = "${g}"; then
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi
done
if test "${BASEFILENAME}" = "0"; then
BASEFILENAME="${image-name}"
fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
# Check for presence of firmware files on the SD card
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
echo "ERROR: Could not find file ${install_f}";
install_abort=1;
fi;
done
if test "${install_abort}" = "1"; then
echo "Aborted.";
exit;
fi
echo "############################################################"
echo "# Linux firmware install from micro SD #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update
setenv forced_update 1
# Set bootdelay to zero so that firmware update is run immediately after
# the first reset.
setenv bootdelay 0
# Set target MMC device index to eMMC
setenv mmcdev 0
# Update U-Boot
echo ""
echo ""
echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo ""
echo ""
update uboot mmc ${INSTALL_MMCDEV} ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
# Use old-style update with source file system argument
update uboot mmc ${INSTALL_MMCDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!";
echo "";
echo "Aborted.";
exit;
fi
fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
echo \"\";
echo \">> Creating Linux partition table on the eMMC\";
echo \"\";
echo \"\";
run partition_mmc_linux;
if test \$? -eq 1; then
echo \"[ERROR] Failed to create Linux partition table!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux_a mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery mmc ${INSTALL_MMCDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete.\";
if test \"\$\{dualboot\}\" != yes; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;
reset;
"
saveenv
reset

View File

@ -0,0 +1,235 @@
#
# U-Boot script for installing Linux images created by Yocto from a USB stick
# into the eMMC
#
# Reset temp variables
install_abort=0
BASEFILENAME=0
setenv INSTALL_UBOOT_FILENAME imx-boot-##MACHINE##.bin;
setenv INSTALL_USBDEV 0
if test -z "${image-name}"; then
setenv image-name ##DEFAULT_IMAGE_NAME##
fi
GRAPHICAL_IMAGES="##GRAPHICAL_IMAGES##"
for g in ${GRAPHICAL_IMAGES}; do
if test "${image-name}" = "${g}"; then
BASEFILENAME="${image-name}-##GRAPHICAL_BACKEND##"
fi
done
if test "${BASEFILENAME}" = "0"; then
BASEFILENAME="${image-name}"
fi
setenv INSTALL_LINUX_FILENAME ${BASEFILENAME}-##MACHINE##.boot.vfat
setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
# Check for presence of firmware files on the USB
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
echo "ERROR: Could not find file ${install_f}";
install_abort=1;
fi;
done
if test "${install_abort}" = "1"; then
echo "Aborted.";
exit;
fi
echo "############################################################"
echo "# Linux firmware install from USB #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
fi
echo ""
echo " Press CTRL+C now if you wish to abort or wait 10 seconds"
echo " to continue."
sleep 10
if test $? -eq 1; then
echo "Aborted by user.";
exit;
fi
# Skip user confirmation for U-Boot update
setenv forced_update 1
# Set bootdelay to zero so that firmware update is run immediately after
# the first reset.
setenv bootdelay 0
# Set target MMC device index to eMMC
setenv mmcdev 0
# Update U-Boot
echo ""
echo ""
echo ">> Installing U-Boot boot loader image ${INSTALL_UBOOT_FILENAME} (target will reset)"
echo ""
echo ""
update uboot usb ${INSTALL_USBDEV} ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
# Use old-style update with source file system argument
update uboot usb ${INSTALL_USBDEV} fat ${INSTALL_UBOOT_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update U-Boot boot loader!";
echo "";
echo "Aborted.";
exit;
fi
fi
# Set 'bootcmd' to the second part of the script that will
# - Reset environment to defaults
# - Restore 'dualboot' if previously set
# - Save the environment
# - Force on-the-fly updates to avoid possible verification errors
# - Partition the eMMC user data area for Linux
# - If Dual Boot
# - Update the system partitions: linux_a, linux_b, rootfs_a, rootfs_b
# - If Normal Boot:
# - Update the system partitions: linux, recovery, rootfs
# - Erase the 'update' partition
# - Configure recovery to wipe 'update' partition
# - Run 'recovery' and let the system boot after
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
echo \"\";
echo \">> Creating Linux partition table on the eMMC\";
echo \"\";
echo \"\";
run partition_mmc_linux;
if test \$? -eq 1; then
echo \"[ERROR] Failed to create Linux partition table!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
usb start;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_a\";
echo \"\";
echo \"\";
update linux_a usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_a!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
echo \"\";
echo \"\";
update rootfs_a usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_a partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
else
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux\";
echo \"\";
echo \"\";
update linux usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_RECOVERY_FILENAME} on recovery\";
echo \"\";
echo \"\";
update recovery usb ${INSTALL_USBDEV} ${INSTALL_RECOVERY_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update recovery partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs\";
echo \"\";
echo \"\";
update rootfs usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
setenv boot_recovery yes;
setenv recovery_command wipe_update;
fi;
setenv otf-update;
saveenv;
echo \"\";
echo \"\";
echo \">> Firmware installation complete.\";
if test \"\$\{dualboot\}\" != yes; then
echo \"Rebooting into recovery mode for final deployment.\";
fi;
echo \"\";
echo \"\";
sleep 1;
reset;
"
saveenv
reset

View File

@ -0,0 +1,277 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2020-2021 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
#
# Description:
# Script to flash Yocto build artifacts over USB to the target.
#===============================================================================
# set -x
#
# U-Boot script for installing Linux images created by Yocto
#
# Exit on any error
set -e
# Parse uuu cmd output
getenv()
{
uuu -v fb: ucmd printenv "${1}" | sed -ne "s,^${1}=,,g;T;p"
}
show_usage()
{
echo "Usage: $0 [options]"
echo ""
echo " Options:"
echo " -h Show this help."
echo " -i <dey-image-name> Image name that prefixes the image filenames, such as 'dey-image-qt', "
echo " 'dey-image-webkit', 'core-image-base'..."
echo " Defaults to '##DEFAULT_IMAGE_NAME##' if not provided."
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
exit 2
}
# Update a partition
# Params:
# 1. partition
# 2. file
part_update()
{
echo "\033[36m"
echo "====================================================================================="
echo "Updating '${1}' partition with file: ${2}"
echo "====================================================================================="
echo "\033[0m"
if [ "${1}" = "bootloader" ]; then
uuu fb: flash "${1}" "${2}"
else
uuu fb: flash -raw2sparse "${1}" "${2}"
fi
}
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
do
case $c in
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
u) INSTALL_UBOOT_FILENAME=${OPTARG} ;;
esac
done
# Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot
# Check if dualboot variable is active
dualboot=$(getenv "dualboot")
if [ "${dualboot}" = "yes" ]; then
DUALBOOT=true;
fi
# remove redirect
uuu fb: ucmd setenv stdout serial
echo ""
echo "Determining image files to use..."
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
INSTALL_UBOOT_FILENAME="imx-boot-##MACHINE##.bin"
fi
# Determine linux, recovery, and rootfs image filenames to update
if [ -z "${IMAGE_NAME}" ]; then
IMAGE_NAME="##DEFAULT_IMAGE_NAME##"
fi
GRAPHICAL_IMAGES="##GRAPHICAL_IMAGES##"
for g in ${GRAPHICAL_IMAGES}; do
if [ "${IMAGE_NAME}" = "${g}" ]; then
BASEFILENAME="${IMAGE_NAME}-##GRAPHICAL_BACKEND##"
fi
done
if [ -z "${BASEFILENAME}" ]; then
BASEFILENAME="${IMAGE_NAME}"
fi
INSTALL_LINUX_FILENAME="${BASEFILENAME}-##MACHINE##.boot.vfat"
INSTALL_RECOVERY_FILENAME="${BASEFILENAME}-##MACHINE##.recovery.vfat"
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.ext4"
COMPRESSED_ROOTFS_IMAGE="${INSTALL_ROOTFS_FILENAME}.gz"
# If the rootfs image is compressed, make sure to decompress it before the update
if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
echo "\033[36m"
echo "====================================================================================="
echo "Decompressing rootfs image '${COMPRESSED_ROOTFS_IMAGE}'"
echo "====================================================================================="
echo "\033[0m"
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
fi
# Verify existance of files before starting the update
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
for f in ${FILES}; do
if [ ! -f ${f} ]; then
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
ABORT=true
fi
done;
[ "${ABORT}" = true ] && exit 1
# parts names
LINUX_NAME="linux"
RECOVERY_NAME="recovery"
ROOTFS_NAME="rootfs"
# Print warning about storage media being deleted
if [ "${NOWAIT}" != true ]; then
WAIT=10
printf "\n"
printf " ====================\n"
printf " = IMPORTANT! =\n"
printf " ====================\n"
printf " This process will erase your eMMC and will install the following files\n"
printf " on the partitions of the eMMC.\n"
printf "\n"
printf " PARTITION\tFILENAME\n"
printf " ---------\t--------\n"
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
printf " ${ROOTFS_NAME}\t${INSTALL_ROOTFS_FILENAME}\n"
fi
printf "\n"
printf " Press CTRL+C now if you wish to abort.\n"
printf "\n"
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
printf " Starting update process\n"
fi
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Skip user confirmation for U-Boot update
uuu fb: ucmd setenv forced_update 1
# Update U-Boot
part_update "bootloader" "${INSTALL_UBOOT_FILENAME}"
# Set MMC to boot from BOOT1 partition
uuu fb: ucmd mmc partconf 0 1 1 1
# Set 'bootcmd' for the second part of the script that will
# - Reset environment to defaults
# - Save the environment
# - Partition the eMMC user data area for Linux
# - Update the 'linux' partition
# - Update the 'recovery' partition
# - Update the 'rootfs' partition
uuu fb: ucmd setenv bootcmd "
env default -a;
setenv dualboot \${dualboot};
saveenv;
echo \"\";
echo \"\";
echo \">> Creating Linux partition table on the eMMC\";
echo \"\";
echo \"\";
run partition_mmc_linux;
if test \$? -eq 1; then
echo \"[ERROR] Failed to create Linux partition table!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Start installation Linux firmware files\";
echo \"\";
echo \"\";
saveenv;
fastboot 0;
"
uuu fb: ucmd saveenv
uuu fb: acmd reset
# Wait for the target to reset
sleep 3
# Restart fastboot with the latest MMC partition configuration
uuu fb: ucmd setenv fastboot_dev sata
uuu fb: ucmd setenv fastboot_dev mmc
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"
# Update Recovery
part_update "${RECOVERY_NAME}" "${INSTALL_RECOVERY_FILENAME}"
# Update Rootfs
part_update "${ROOTFS_NAME}" "${INSTALL_ROOTFS_FILENAME}"
fi
# If the rootfs image was originally compressed, remove the uncompressed image
if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ -f ${INSTALL_ROOTFS_FILENAME} ]; then
rm -f "${INSTALL_ROOTFS_FILENAME}"
fi
if [ "${DUALBOOT}" != true ]; then
# Configure u-boot to boot into recovery mode
uuu fb: ucmd setenv boot_recovery yes
uuu fb: ucmd setenv recovery_command wipe_update
fi
uuu fb: ucmd saveenv
# Reset the target
uuu fb: acmd reset
echo "\033[32m"
echo "============================================================="
echo "Done! Wait for the target to complete first boot process."
echo "============================================================="
echo "\033[0m"
exit

View File

@ -51,12 +51,18 @@ echo " --------- --------"
echo " fsbl1 ${INSTALL_ATF_FILENAME}"
echo " fsbl2 ${INSTALL_ATF_FILENAME}"
echo " fip-a ${INSTALL_FIP_FILENAME}"
echo " fip-b ${INSTALL_FIP_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " fip-b ${INSTALL_FIP_FILENAME}"
fi
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -111,12 +117,14 @@ if test $? -eq 1; then
echo "Aborted.";
exit;
fi
update fip-b mmc ${INSTALL_MMCDEV} ${INSTALL_FIP_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update fip-b!";
echo "";
echo "Aborted.";
exit;
if test "${install_dualboot}" = "yes"; then
update fip-b mmc ${INSTALL_MMCDEV} ${INSTALL_FIP_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update fip-b!";
echo "";
echo "Aborted.";
exit;
fi
fi
# Check if uboot_config volume exists (U-Boot env)
@ -141,6 +149,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
run ubivolscript;
if test \"\$\{dualboot\}\" = yes; then
echo \"\";
@ -155,17 +164,19 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"Aborted.\";
exit;
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b mmc ${INSTALL_MMCDEV} ${INSTALL_LINUX_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
@ -179,17 +190,19 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"Aborted.\";
exit;
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";

View File

@ -51,12 +51,18 @@ echo " --------- --------"
echo " fsbl1 ${INSTALL_ATF_FILENAME}"
echo " fsbl2 ${INSTALL_ATF_FILENAME}"
echo " fip-a ${INSTALL_FIP_FILENAME}"
echo " fip-b ${INSTALL_FIP_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " fip-b ${INSTALL_FIP_FILENAME}"
fi
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
echo " linux_b ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -111,12 +117,14 @@ if test $? -eq 1; then
echo "Aborted.";
exit;
fi
update fip-b usb ${INSTALL_USBDEV} ${INSTALL_FIP_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update fip-b!";
echo "";
echo "Aborted.";
exit;
if test "${install_dualboot}" = "yes"; then
update fip-b usb ${INSTALL_USBDEV} ${INSTALL_FIP_FILENAME}
if test $? -eq 1; then
echo "[ERROR] Failed to update fip-b!";
echo "";
echo "Aborted.";
exit;
fi
fi
# Check if uboot_config volume exists (U-Boot env)
@ -141,6 +149,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
run ubivolscript;
usb start;
if test \"\$\{dualboot\}\" = yes; then
@ -156,17 +165,19 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"Aborted.\";
exit;
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
echo \"\";
echo \"\";
update linux_b usb ${INSTALL_USBDEV} ${INSTALL_LINUX_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update linux_b!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
@ -180,17 +191,19 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"Aborted.\";
exit;
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
echo \"\";
echo \"\";
update rootfs_b usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME} ${force_erase};
if test \$? -eq 1; then
echo \"[ERROR] Failed to update rootfs_b partition!\";
echo \"\";
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";

Some files were not shown because too many files have changed in this diff Show More