Hi all
We received an iMX95 Dart evalkit board from Variscite and I am preparing our
bsp layer for the machine that will be derived from that board. Now I wanted to
integrate u-boot and imx-boot into our image and went ahead and took a look at
Variscites layers - they already provide some setup for a Yocto build so I
though I will just grab the u-boot from their repository and build that the
same way they do it. Now it turns out my build does not boot, the u-boot
binaries and the imx-boot binary are different from the Variscites build - I
cannot figure out what I am missing since I went up and down the recipes and
bitbakes environment and cannot find any difference.

I am using the following setup in the machine configuration:

    TUNE_FEATURES = "aarch64 armv8a-2a crc crypto cortexa55"
    require conf/machine/include/imx95-evk.inc
    INHERIT += "image-buildinfo"

    IMX_DEFAULT_BSP = "nxp"
    IMX_DEFAULT_BOOTLOADER = "u-boot-cf200"
    IMX_DEFAULT_BOOTLOADER:use-nxp-bsp = "u-boot-cf200"

    MACHINE_FEATURES = "pci usbhost vfat alsa touchscreen screen pci bluetooth 
wifi screen nxpiw612-sdio"
    MACHINE_FEATURES:remove = "xen jailhouse dpdk nxpwifi-all-sdio 
nxpwifi-all-pcie"

    UBOOT_CONFIG_BASENAME = "imx95_var_dart"
    UBOOT_CONFIG = "sd"
    UBOOT_CONFIG[sd]    = "${UBOOT_CONFIG_BASENAME}_defconfig"
    UBOOT_CONFIG[fspi]  = "${UBOOT_CONFIG_BASENAME}_fspi_defconfig"
    UBOOT_DTB_NAME = "imx95-var-dart-dt8mcustomboard.dtb"
    SPL_BINARY = "spl/u-boot-spl.bin"
    LOADADDR = ""
    UBOOT_SUFFIX = "bin"
    UBOOT_MAKE_TARGET = ""

    IMXBOOT_TARGETS = "flash_a55"
    IMX_BOOT_SOC_TARGET = "iMX95"
    IMX_BOOT_SEEK = "32"
    IMXBOOT_VARIANT = ""

    OEI_BOARD  = "mx95lp5"
    DDR_TYPE   = "lpddr5"

    DDR_FIRMWARE_NAME = " \
        lpddr5_dmem_v202311.bin \
        lpddr5_dmem_qb_v202311.bin \
        lpddr5_imem_v202311.bin \
        lpddr5_imem_qb_v202311.bin \
    "
    SYSTEM_MANAGER_FIRMWARE_BASENAME = "m33_image"
    SYSTEM_MANAGER_FIRMWARE_NAME     = "m33_image-mx95evk"

With the following recipe for u-boot - I am using the same version with the
same configuration and the same device tree binary that Variscite is using:

    require recipes-bsp/u-boot/u-boot.inc

    PROVIDES += "u-boot"
    DEPENDS += "bison-native bc-native dtc-native gnutls-native"

    LICENSE = "GPL-2.0-or-later"
    LIC_FILES_CHKSUM = 
"file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"

    UBOOT_SRC ?= "git://github.com/varigit/uboot-imx;protocol=https"

    SRCBRANCH = "lf_v2024.04_6.6.23-2.0.0_var01"
    SRCREV = "235d259e8c4362e725567791728a74bc2d4441e2"
    UBOOT_INITIAL_ENV_DEVICE = "sd"

    SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH} \
        file://fw_env.config \
    "

    S = "${WORKDIR}/git"

    LOCALVERSION ?= "-cf200"
    PV = "1"

    BOOT_TOOLS = "imx-boot-tools"

    UBOOT_INITIAL_ENV = "u-boot-initial-env"
    UBOOT_INITIAL_ENV_DEVICE = "sd"
    UBOOT_CONFIG = "sd"

    do_install:append() {
        ln -sf ${UBOOT_INITIAL_ENV}-${UBOOT_INITIAL_ENV_DEVICE} 
${D}/${sysconfdir}/${UBOOT_INITIAL_ENV}
    }

    PACKAGE_ARCH = "${MACHINE_ARCH}"

The resulting spl and u-boot binaries are one to two kb smaller than the ones
that are created by the vendor of the board. We do not need any binary on the
M7 yet and I thought this would be optional, so I thought this would be fine as
long as I only speficy `flash_a55` and not `flash_all`.

That way I get the following in the deploy directory of imx-boot-tools:

    .rw-r--r-- david david  64 KB Tue Feb  4 14:07:54 2025 
lpddr5_dmem_qb_v202311.bin
    .rw-r--r-- david david  64 KB Tue Feb  4 14:07:54 2025 
lpddr5_dmem_v202311.bin
    .rw-r--r-- david david  25 KB Tue Feb  4 14:07:54 2025 
lpddr5_imem_qb_v202311.bin
    .rw-r--r-- david david  63 KB Tue Feb  4 14:07:54 2025 
lpddr5_imem_v202311.bin
    .rw-r--r-- david david 154 KB Tue Feb  4 14:07:54 2025 m33_image-mx95evk.bin
    .rwxr-xr-x david david  56 KB Tue Feb  4 14:07:54 2025 mkimage_imx8
    .rw-r--r-- david david 212 KB Tue Feb  4 14:07:54 2025 
mx95a0-ahab-container.img
    .rw-r--r-- david david  92 KB Tue Feb  4 14:07:54 2025 oei-m33-ddr.bin
    .rw-r--r-- david david 3.6 KB Tue Feb  4 14:07:54 2025 oei-m33-tcm.bin
    .rw-r--r-- david david  19 KB Tue Feb  4 14:07:54 2025 soc.mak
    .rw-r--r-- david david 932 KB Tue Feb  4 14:07:54 2025 u-boot-cf200.bin-sd
    .rw-r--r-- david david 138 KB Tue Feb  4 14:07:54 2025 
u-boot-spl.bin-cf200-sd

Whereas the corresponding directory from Variscite looks like the following:

    .rw-r--r-- david david  33 KB Mon Feb  3 11:25:07 2025 bl31-imx95.bin
    .rw-r--r-- david david  35 KB Mon Feb  3 16:25:05 2025 
imx95-19x19-evk_m7_TCM_power_mode_switch_rtos_imx95_sm_cm7.bin
    .rw-r--r-- david david  64 KB Mon Feb  3 16:25:05 2025 
lpddr5_dmem_qb_v202311.bin
    .rw-r--r-- david david  64 KB Mon Feb  3 16:25:05 2025 
lpddr5_dmem_v202311.bin
    .rw-r--r-- david david  25 KB Mon Feb  3 16:25:05 2025 
lpddr5_imem_qb_v202311.bin
    .rw-r--r-- david david  63 KB Mon Feb  3 16:25:05 2025 
lpddr5_imem_v202311.bin
    .rw-r--r-- david david 143 KB Mon Feb  3 16:25:05 2025 m33_image-mx95evk.bin
    .rwxr-xr-x david david  56 KB Mon Feb  3 16:25:05 2025 mkimage_imx8
    .rw-r--r-- david david 192 KB Mon Feb  3 16:25:05 2025 
mx95a0-ahab-container.img
    .rw-r--r-- david david  90 KB Mon Feb  3 16:25:05 2025 oei-m33-ddr.bin
    .rw-r--r-- david david 2.4 KB Mon Feb  3 16:25:05 2025 oei-m33-tcm.bin
    .rw-r--r-- david david  19 KB Mon Feb  3 16:25:05 2025 soc.mak
    .rw-r--r-- david david 935 KB Mon Feb  3 16:25:05 2025 
u-boot-imx95-var-dart.bin-sd
    .rw-r--r-- david david 139 KB Mon Feb  3 16:25:05 2025 
u-boot-spl.bin-imx95-var-dart-sd

I don't understand why the bl31-imx95.bin is present in the vendors deployment
folder since optee is not enabled. I only get this binary deployed when optee
is enabled in my build. I also don't understand how it is possible that the
same u-boot package with the same configuration and the same device tree binary
results in a different u-boot executable.

Thanks for any hints!

Dave
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64711): https://lists.yoctoproject.org/g/yocto/message/64711
Mute This Topic: https://lists.yoctoproject.org/mt/111009769/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to