Changeset View
Standalone View
sysutils/u-boot-master/Makefile
- This file was added.
# $FreeBSD$ | |||||
# | |||||
# Common infrastructure for u-boot ports | |||||
# | |||||
NO_ARCH= yes | |||||
# Sanity checks | |||||
.if !defined(MODEL) | |||||
IGNORE+= "MODEL is not defined" | |||||
.endif | |||||
.if !defined(BOARD_CONFIG) | |||||
IGNORE+= "BOARD_CONFIG is not defined" | |||||
.endif | |||||
.if !defined(FAMILY) | |||||
IGNORE+= "FAMILY is not defined" | |||||
.endif | |||||
mat: You could remove the UBOOT_ prefix now. | |||||
# Family overrides | |||||
# Defines for OMAP family | |||||
UBOOT_PLIST_OMAP=u-boot.img MLO | |||||
UBOOT_VERSION_OMAP=2016.05 | |||||
# Uboot variables | |||||
.if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu}) | |||||
UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}} | |||||
.endif | |||||
UBOOT_VERSION?= 2016.05 | |||||
.if !defined(UBOOT_PLIST) && defined(UBOOT_PLIST_${FAMILY:tu}) | |||||
UBOOT_PLIST=${UBOOT_PLIST_${FAMILY:tu}} | |||||
.endif | |||||
UBOOT_PLIST?=u-boot.img | |||||
.if !defined(UBOOT_ARCH) && defined(UBOOT_ARCH_${FAMILY:tu}) | |||||
UBOOT_ARCH=${UBOOT_ARCH_${FAMILY:tu}} | |||||
.endif | |||||
UBOOT_ARCH?= arm | |||||
matUnsubmitted Not Done Inline ActionsAll this should go below, say, the MAKE_ARGS line. mat: All this should go below, say, the MAKE_ARGS line. | |||||
impAuthorUnsubmitted Not Done Inline ActionsOK, but we use these variables in the next few lines... Is that kosher? imp: OK, but we use these variables in the next few lines... Is that kosher? | |||||
matUnsubmitted Not Done Inline Actionsmake(1) does lazy evaluation, that is, if you do FOO=${BAR} it won't care about BAR until FOO needs to be evaluated. mat: make(1) does lazy evaluation, that is, if you do `FOO=${BAR}` it won't care about BAR until FOO… | |||||
# More conventional stuff | |||||
PORTNAME= u-boot | |||||
PORTVERSION= ${UBOOT_VERSION} | |||||
DISTVERSIONPREFIX= ports-v | |||||
CATEGORIES= sysutils | |||||
PKGNAMESUFFIX?= -${MODEL} | |||||
MAINTAINER= imp@FreeBSD.org | |||||
COMMENT= Cross-build das u-boot for ${MODEL} | |||||
LICENSE= GPLv2 | |||||
Not Done Inline ActionsThis should go just below the PORTVERSION line. mat: This should go just below the PORTVERSION line. | |||||
USES= gmake | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= bsdimp | |||||
Not Done Inline ActionsPlease, move that at the top of the file, also move the COMMENT paragraph between PKGNAMESUFFIX and USES, and add a MAINTAINER line just above the comment :-) mat: Please, move that at the top of the file, also move the COMMENT paragraph between PKGNAMESUFFIX… | |||||
GH_PROJECT= u-boot | |||||
SSP_UNSAFE= yes | |||||
UBOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} | |||||
Not Done Inline ActionsThis feels wrong, it's going to mess up some calculations, you should remove ${STAGEDIR}/ from it. mat: This feels wrong, it's going to mess up some calculations, you should remove ${STAGEDIR}/ from… | |||||
Not Done Inline ActionsMostly I'm looking for a shorthand for where to install stuff, but there's only one or two places so being explicit about STAGEDIR is fine there. imp: Mostly I'm looking for a shorthand for where to install stuff, but there's only one or two… | |||||
Not Done Inline ActionsI have no problem with shorthands, just don't call it DATADIR, it is a special variable name that the ports framework uses for "things" :-) mat: I have no problem with shorthands, just don't call it DATADIR, it is a special variable name… | |||||
DATADIR= ${PREFIX}/${UBOOT_DIR} | |||||
DESCR?= ${.CURDIR}/pkg-descr | |||||
MAKE_ARGS+= ARCH=${UBOOT_ARCH} CROSS_COMPILE=${UBOOT_ARCH}-none-eabi- | |||||
Not Done Inline ActionsThis block should go after the maintainer/comment block mat: This block should go after the maintainer/comment block | |||||
# Each u-boot family has different files to include, bring them in. | |||||
.for i in ${UBOOT_PLIST} | |||||
PLIST_FILES+= ${UBOOT_DIR}/${i} | |||||
.endfor | |||||
PLIST_FILES+= ${UBOOT_DIR}/README | |||||
do-configure: | |||||
(cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_CMD} ${BOARD_CONFIG}) | |||||
do-install: | |||||
${MKDIR} ${STAGEDIR}/${DATADIR} | |||||
.for i in ${UBOOT_PLIST} | |||||
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}/${DATADIR} | |||||
.endfor | |||||
${INSTALL_DATA} ${DESCR} ${STAGEDIR}/${DATADIR}/README | |||||
Not Done Inline ActionsIf those can be overridden in slave ports, I think they should be wrapped in .ifs mat: If those can be overridden in slave ports, I think they should be wrapped in .ifs | |||||
Not Done Inline ActionsThe goal is for them not to be overridden by the slave ports, so I'm starting out w/o the ifs. imp: The goal is for them not to be overridden by the slave ports, so I'm starting out w/o the ifs. | |||||
.include <bsd.port.mk> |
You could remove the UBOOT_ prefix now.