Performed a fresh Yocto build on a new PC. It appears that Yocto build environment is using a minimal shell, such as dash or a strict POSIX-compliant /bin/sh, which does not support the [[ … ]] test construct. This results in a syntax error during the MACHINE condition check, preventing the mkimage command from executing and generating the boot.scr.uimg file.
To resolve this issue, please modify the do_compile() function in the u-boot-socfpga-iwg43-scr.bb file as follows:
Original:
do_compile() {
if [[ “${MACHINE}” == “agilex7_iwg43m” ]]; then
mkimage -f “${WORKDIR}/uboot_script.its” ${WORKDIR}/boot.scr.uimg
fi
}
Corrected:
do_compile() {
if [ “${MACHINE}” = “agilex7_iwg43m” ]; then
mkimage -f “${WORKDIR}/uboot_script.its” ${WORKDIR}/boot.scr.uimg
fi
}
The [ “${MACHINE}” = “agilex7_iwg43m” ] syntax is POSIX-compliant and compatible with all shells, including /bin/sh. This ensures that the mkimage command executes when MACHINE is set to agilex7_iwg43m, generating the boot.scr.uimg file successfully.
Alternatively, if [[ … ]] is preferred to use, then configure BitBake to use Bash by adding the following line to your recipe (.bb) file:
SHELL = “/bin/bash”
To verify the shell environment, you can run echo $SHELL in your build environment or check the shell linked to /bin/sh using ls -l /bin/sh.
For further product inquiries, please get in touch with our sales team at mktg@iwave-global.com
Please find the detailed product information here:
Agilex™ 7 (R31A/R31B/R31C) SoC FPGA System on Module