There are two errors when compiling u-boot in Chapter 13 of Lu Jiahua’s Practical Guide for software and hardware co design of embedded system (2nd Edition). The reason is very simple, start with the initial error prompt: fatal error: OpenSSL/EVP. H: there is no such file or directory. Of course, you can also find relevant solutions on the Internet. For record only: if you encounter this error during compilation, this may be due to the following reasons: the program you are trying to compile uses OpenSSL, but the files (Libraries and header files) that need to be linked to OpenSSL are missing on your Linux platform. Because the original book seems to use Ubuntu 12.04 and I use 14.04. So I have to install the relevant files myself
To install OpenSSL on Debian, Ubuntu, or other spin offs:
$sudoapt-getinstall libssl-dev
To install OpenSSL development kit on Fedora, CentOS, or RHEL:
$sudoyuminstall openssl-devel
After the installation, try to recompile the program.
After compiling, it appears
MKIMAGE u-boot.img
./tools/zynq-boot-bin.py -o boot.bin -u spl/u-boot-spl.bin
Input file is: spl/u-boot-spl.bin
Output file is: boot.bin
Using /root/build/u-boot-xlnx/spl/u-boot-spl.bin to get image length – it is 49136 (0xbff0) bytes
After checksum waddr= 0x13 byte addr= 0x4c
Number of registers to initialize 0
Generating binary output /root/build/u-boot-xlnx/boot.bin
OK!