Note:
When you build a BSP from the source code, you may occasionally observe
warnings from some of the tools used to generate the BSP, such as:
- objcopy: Warning: Output file cannot represent architecture UNKNOWN!
- ntosh-ld: Warning: could not find any targets that match endian ness requirement
These warnings result when information that's contained in one particular
file format (endian ness, CPU architecture, etc.) can't be retained when
converting that file to a different format, or when the originating file
format doesn't contain information that the tool doing the conversion
expects.
These warnings are normal and expected, and are no cause for concern.
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:
- all
- Invokes the install, links, and images
targets.
- prebuilt
- This recursively copies the prebuilt directory's contents
to the install directory.
- install
- 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 board.build.
- links
- Creates a symbolic link (a copy on Windows) from
install/cpu/boot/build/board.build
to images/board.build.
- 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.