U-Boot has excellent documentation, and it is worth your time to study first the README file that should be found in the top level of the sources you are working with. There is also a "doc" directory which contains a big collection of README files on various special topics and specific board targets.
The U-Boot makefile is the heart of the build process. It is a monster, 1647 lines in the current release. However you don't need to study it intensely unless you want to.
I am currently working with the Orange Pi PC plus, so what I do to build U-Boot for this board is this:
export CROSS_COMPILE=arm-linux-gnu- make distclearn make orangepi_pc_plus_defconfig make allNote that the prefix for your compiler may be different.
If you are wondering what configuration files are available for the "defconfig" line, look in the config directory. You must choose a name that corresponds to a file in this directory.
Normally the build is quiet with an abbreviated console output. If you want to see more details, you can specify verbosity by placing "V=1" on the make invocation, like so:
make V=1 allThis will show the gcc commands issued with all their switches and options. In general this is not such a good idea as any errors tend to get lost in the flood of output, but it can be useful and informative.
Tom's electronics pages / email@example.com