How to do it...

Once we have the source locally available, we will build it using the Yocto SDK we have just built and installed:

  1. Before setting up the environment, we will configure U-Boot for the Wandboard:
$ make wandboard_config  
  1. To bring up a graphical configuration interface, we can do the following:
$ make xconfig  
This version of U-Boot is configured using the same Kconfig framework that is used by the Linux kernel. Unfortunately the kbuild configuration tools cannot be built once the Yocto build environment has been set up, so we do the configuration before sourcing the setup environmental script.
Note that we haven't yet used the environment setup script. This is because it's enough with the standard make package on the host to build the different configuration tools.
  1. Now we set up the environment using the script provided with the SDK:
$ source /opt/poky/2.4/environment-setup-cortexa9hf-neon-poky-linux-gnueabi  
  1. Next you can start the build with the following:
$ make -jN
You can optionally pass a -jN argument for multithreaded compilation. Here, N is the number of CPU cores.

Both the SPL image and u-boot.img, which we will program next, are now located on the current directory.

This version of U-Boot builds without problems. Previous versions would fail unless we adapted the default Yocto environment. If you hit build problems, take a quick look at the U-Boot recipe, which clears some flags before building:
$ unset LDFLAGS CFLAGS CPPFLAGS
And it also passes CC to the make utility in the EXTRA_OEMAKE flags as older U-Boot versions do not read it from the environment:
$ make CC="${CC}"
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset