Hi,
I am doing stand alone build for the different images for a imx8mp project but I get an error when I build my u-boot. Some details of my build is below
Repo - origin https://github.com/nxp-imx/uboot-imx.git (fetch)
Branch - lf_v2022.04
Compiler - aarch64-unknown-linux-gnu-
The error message is below:
HOSTCC tools/dumpimage.o
HOSTLD tools/dumpimage
HOSTCC tools/mkimage.o
HOSTLD tools/mkimage
HOSTCC tools/fit_info.o
HOSTLD tools/fit_info
HOSTCC tools/fit_check_sign.o
HOSTLD tools/fit_check_sign
HOSTCC tools/proftool
HOSTCC tools/relocate-rela
HOSTCC tools/fdtgrep.o
HOSTLD tools/fdtgrep
HOSTCC tools/spl_size_limit
HOSTCC tools/asn1_compiler
HOSTCC tools/mkeficapsule
tools/mkeficapsule.c:18:10: fatal error: uuid/uuid.h: No such file or directory
18 | #include <uuid/uuid.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:95: tools/mkeficapsule] Error 1
make: *** [Makefile:1895: tools] Error 2
I have looked online but I did not get a solution to it.
What can be the problem and the possible solution.
Thanks
已解决! 转到解答。
Hi @brian14
Thanks for the quick reply. I am not buidling with Yocto but rather building the images separately and then I would later join them together.
Must I build with Yocto to be able to build the U-Boot or there is a way round about this.
Thanks
Just to explain, what the problem is:
This particular problem could be solved with a installation of the uuid package:
$ sudo apt install uuid-dev
There was a follow-up issue, I also had to install gnutls-dev.
But in general, I also recommend to do the compilation of the repositories from NXP with the toolchain generated by Yocto. The build tools which we use in our Makefiles are included in this toolchain, so it is a one-stop-shop.
On the other hand, if you take u-boot from https://github.com/u-boot/u-boot, then you should work with the generic GNU toolchain from the Arm website, because the Makefile in this repository is written for this toolchain.
If you exactly know what you're doing, then of course you can always adapt things to each other, but if you want to work out of the box, then don't mix up things.
Regards,
Bernhard.
Hi @ababatola,
I just compiled this imx-uboot branch "lf_v2022.04" with success.
It seems there is an error in SDK environment, please try using the following steps:
1. First compile our BSP (Embedded Linux for i.MX Applications Processors | NXP Semiconductors) using i.MX Yocto Project Users Guide.
2. For bitbake step in i.MX Yocto Project Users Guide you can use "bitbake core-imageminimal -c populate_sdk".
3. Then use the i.MX Porting Guide located in the same documentation as i.MX Yocto Project User Guide and BSP. In this file use the section "How to build U-Boot in standalone environment and follow the steps described in this section.
4. To complement with this guide follow this steps to correctly build U-Boot for the iMX8M Plus:
a. Set environment for build
$ . /opt/fsl-imx-xwayland/5.15-kirkstone/environment-setup-armv8a-poky-linux (This part may change based on your BSP version)
$ export ARCH=arm64
b. Build Uboot
$ mkdir uboot_build
$ cd uboot_build
$ git clone https://github.com/nxp-imx/uboot-imx -b lf_v2022.04
$ cd uboot-imx
$ make clean
$ make imx8mm_evk_defconfig
$ make
c. Build ARM Trusted Firmware (ATF)
$ cd ..
$ git clone https://github.com/nxp-imx/imx-atf -b lf_v2.6
$ cd imx-atf/
$ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE LD
$ make PLAT=imx8mp bl31
d. Download the DDR training bin
$ cd ..
$ mkdir firmware-imx
$ cd firmware-imx
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.16.bin
$ chmod a+x firmware-imx-8.16.bin
$ ./firmware-imx-8.16.bin
e. Download imx-mkimage and build the boot image
$ cd ~
$ git clone https://github.com/nxp-imx/imx-mkimage -b lf-5.15.32_2.0.0
$ cd imx-mkimage
d. Now you may copy all the files needed to build boot image (flash.bin) (Change ../ with your own path)
$ cp ../uboot-imx/spl/u-boot-spl.bin iMX8M/
$ cp ../uboot-imx/u-boot-nodtb.bin iMX8M/
$ cp ../uboot-imx/arch/arm/dts/imx8mp-evk.dtb iMX8M/
$ cp ../imx-atf/build/imx8mp/release/bl31.bin iMX8M/
$ cp ../firmware-imx/firmware-imx-8.16/firmware/ddr/synopsys/lpddr4_pmu_train_* iMX8M/
$ cp ../uboot-imx/tools/mkimage iMX8M/mkimage_uboot
$ make SOC=iMX8MP flash_evk
The boot image will be found at the path iMX8M with its default name flash.bin,
you may copy to an SD/eMMC using either DD command or UUU to try it.
I hope this information will be helpful.
Have a great day!
Hi @brian14
Thanks for the quick reply. I am not buidling with Yocto but rather building the images separately and then I would later join them together.
Must I build with Yocto to be able to build the U-Boot or there is a way round about this.
Thanks