02d67d1066
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.
41 lines
1.2 KiB
Makefile
41 lines
1.2 KiB
Makefile
# $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"
|
|
|