File:  [NetBSD Developer Wiki] / wikisrc / projects / project / u-boot-pkgsrc.mdwn
Revision 1.3: download - view: text, annotated - select for diffs
Thu Feb 9 15:43:39 2017 UTC (2 years, 9 months ago) by riastradh
Branches: MAIN
CVS tags: HEAD
This was basically done for GSoC last year.

[[!template id=project

title="Make u-boot compilable on NetBSD"


[Martin Husemann](

duration="3 months"
done_by="Joe Davis"

The U-Boot bootloader is being used by an increasing number of devices, including lots which run NetBSD.
The NetBSD ${TOOLDIR} infrastructure even includes the mkubootimage program, which is used to wrap
binaries (e.g. a kernel) into a packet understood by U-Boot.

While the ${TOOLDIR} provides all toolchain bits needed (cross-compiler, assembler, linker, ...) and can
be created by the script automatically for any supported architecture, U-Boot itself needs
to be compiled natively on a Linux machine.

The purpose of this project is to fix this, and feed as much as possible of the resulting
changes upstream to the U-Boot developers.

If possible, the result should be a pkgsrc package, that only needs to be pointed at a
pre-populated tooldir for building. But a simple bsd style makefile would be good enough as well.

An optional extension (but unlikely to be doable within the GSoC timescale): add support
for loading from FFS file system to U-Boot. This would allow devices with SATA or USB disks to
load the kernel directly from the root file system (while currently a wrappd .ub copy of the kernel
has to be put into flash or on SD card).

Deliverables of this project:

1. Make U-Boot build on NetBSD, using a bsd style makefile and environment variables pointing at ${TOOLDIR}
2. Discuss the changes needed for [1] with U-Boot upstream developers, follow their advice and try to upstream the changes
3. Create a pkgsrc entry for the native U-Boot
4. Add a FFS module to U-Boot, using NetBSD system headers

Items [2] and [4] will not be required for GSoC success.

[[!tag gsoc]]

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb