summaryrefslogtreecommitdiff
path: root/sysutils/u-boot-sopine-baseboard/Makefile
blob: 9ffe816a237f3472102fec7d103783403681eaa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $NetBSD: Makefile,v 1.4 2019/04/12 07:08:18 skrll Exp $

UBOOT_TARGET=		sopine-baseboard
UBOOT_CONFIG=		sopine_baseboard_defconfig
UBOOT_BIN=		u-boot-sunxi-with-spl.bin
UBOOT_ENV+=		DEVICE_TREE=sun50i-a64-sopine-baseboard

PKGREVISION=		3

# Switch to EL1 before booting kernel (required for 32-bit support)
PKG_DEFAULT_OPTIONS+=	el1

post-extract:
	${CP} ${PREFIX}/share/arm-trusted-firmware/sun50i_a64/bl31.bin ${WRKSRC}
	${CP} ${WRKSRC}/arch/arm/dts/sun50i-a64-pine64-plus.dts \
	    ${WRKSRC}/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
	${CAT} ${WRKSRC}/configs/${UBOOT_CONFIG} | \
	    ${SED} "s/sun50i-a64-pine64-plus/sun50i-a64-sopine-baseboard/" \
	    > ${WRKSRC}/configs/${UBOOT_CONFIG}.tmp && \
	    ${MV} ${WRKSRC}/configs/${UBOOT_CONFIG}.tmp ${WRKSRC}/configs/${UBOOT_CONFIG}

post-build:
	${CAT} ${WRKSRC}/spl/sunxi-spl.bin ${WRKSRC}/u-boot.itb > ${WRKSRC}/u-boot-sunxi-with-spl.bin

.include "../../sysutils/arm-trusted-firmware-sun50i_a64/buildlink3.mk"
.include "../../sysutils/u-boot/u-boot-arm64.mk"