Building source from the command line

In order to build a BSP from the command line, you must go to the root directory for the BSP.

Use the make command to build the source code. The Makefile defines the following targets:

Invokes the install, links, and images targets.
This recursively copies the prebuilt directory's contents to the install directory.
Invokes the prebuilt target, and then performs the following in the src directory:
  • make hinstall to copy all public headers from src into the install directory.
  • make install to build all binaries in src and copy the results into the install directory. This target also copies the buildfile from src/hardware/startup/boards/board/build and renames it
Creates a symbolic link (a copy on Windows) from install/cpu/boot/build/ to images/
Changes to the images directory and runs the Makefile there. This Makefile creates an IFS file based on the buildfile linked in during the make links target. Any extra work required (e.g. IPL padding, conversion to an alternate format) is also handled from within this Makefile.

If you don't specify a target, make invokes the all target.

Note: We recommend that you use make to build the OS image. If you use mkifs directly, you need to use the -r option to specify where to find the binaries. For more information, see the entry for mkifs in the Utilities Reference.