diff options
| author | thorpej <thorpej@NetBSD.org> | 2019-05-07 05:02:41 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2019-05-07 05:02:41 +0000 |
| commit | 3ca18896e1f3416437fa3a0cf6cd9bdf44f68dbd (patch) | |
| tree | d118731ac1485b8595f6889a1309ca3134c17a2c /tools | |
| parent | 6dd44c41b93ea31a18ab6960bedb9786e85c2224 (diff) | |
Add installboot(8) support for evbarm (and, in the future, other evb*)
boards that use u-boot. A known board database lists boards and their
respective u-boot packages. u-boot packages are discovered at run-time
(in /usr/pkg/share/u-boot, by default). These packages contain board
database overlays that describe u-boot installation procedure that's
specific for that board.
Support this as a native tool and as a host tool. The native tool
will attempt to determine the running board type using OpenFirmware
calls. Host tool and native tool alike may also specify a board type
directly using the "-o board=xxx option" or have installboot(8) determine
the board type from a device tree blob using "-o dtb=/path/to/board.dtb".
A "-o media=xxx" option is provided for boards that have different u-boot
binaries and/or installation procedures for different media types (e.g.
SDMMC, eMMC, or USB).
This is trivial to extend to other evb* platforms that use u-boot, even if
they don't use FDT for autoconfiguration.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/installboot/Makefile | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/tools/installboot/Makefile b/tools/installboot/Makefile index dd0e97ca389..d9be1d2f3c2 100644 --- a/tools/installboot/Makefile +++ b/tools/installboot/Makefile @@ -1,11 +1,40 @@ -# $NetBSD: Makefile,v 1.11 2011/03/06 18:15:30 bouyer Exp $ +# $NetBSD: Makefile,v 1.12 2019/05/07 05:02:42 thorpej Exp $ + +.include <bsd.hostinit.mk> HOSTPROGNAME= ${_TOOL_PREFIX}installboot HOST_SRCDIR= usr.sbin/installboot +LIBPROP_INC= ${.CURDIR}/../../common/include +HOST_CPPFLAGS+= -I${LIBPROP_INC} + HOST_CPPFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../mips-elf2ecoff HOST_CPPFLAGS+= -I${TOOLDIR}/include/nbinclude +HOST_CPPFLAGS+= -DEVBOARDS_PLIST_BASE=\"${TOOLDIR}\" + +LIBPROP_OBJ!= cd ${.CURDIR}/../libprop && ${PRINTOBJDIR} +LDADD+= -L${LIBPROP_OBJ} -lprop + +SHARE_SRCDIR= ${.CURDIR}/../../share +HOST_SHAREDIR= ${TOOLDIR}/share + +BOARDDB_SRCDIR= ${SHARE_SRCDIR}/installboot +BOARDDB_DSTDIR= ${HOST_SHAREDIR}/installboot + +BOARDDBS= evbarm + +.for _d in ${BOARDDBS} +install: .PHONY install.${_d}.boards.plist +install.${_d}.boards.plist: .PHONY ${BOARDDB_DSTDIR}/${_d}/boards.plist +${BOARDDB_DSTDIR}/${_d}/boards.plist: ${BOARDDB_SRCDIR}/${_d}/boards.plist + ${_MKTARGET_INSTALL} + ${HOST_INSTALL_DIR} ${HOST_SHAREDIR} + ${HOST_INSTALL_DIR} ${BOARDDB_DSTDIR} + ${HOST_INSTALL_DIR} ${BOARDDB_DSTDIR}/${_d} + ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET} +.endfor + .include "${.CURDIR}/../Makefile.nbincludes" .include "${.CURDIR}/../Makefile.host" |
