head	1.17;
access;
symbols
	pkgsrc-2026Q1:1.17.0.34
	pkgsrc-2026Q1-base:1.17
	pkgsrc-2025Q4:1.17.0.32
	pkgsrc-2025Q4-base:1.17
	pkgsrc-2025Q3:1.17.0.30
	pkgsrc-2025Q3-base:1.17
	pkgsrc-2025Q2:1.17.0.28
	pkgsrc-2025Q2-base:1.17
	pkgsrc-2025Q1:1.17.0.26
	pkgsrc-2025Q1-base:1.17
	pkgsrc-2024Q4:1.17.0.24
	pkgsrc-2024Q4-base:1.17
	pkgsrc-2024Q3:1.17.0.22
	pkgsrc-2024Q3-base:1.17
	pkgsrc-2024Q2:1.17.0.20
	pkgsrc-2024Q2-base:1.17
	pkgsrc-2024Q1:1.17.0.18
	pkgsrc-2024Q1-base:1.17
	pkgsrc-2023Q4:1.17.0.16
	pkgsrc-2023Q4-base:1.17
	pkgsrc-2023Q3:1.17.0.14
	pkgsrc-2023Q3-base:1.17
	pkgsrc-2023Q2:1.17.0.12
	pkgsrc-2023Q2-base:1.17
	pkgsrc-2023Q1:1.17.0.10
	pkgsrc-2023Q1-base:1.17
	pkgsrc-2022Q4:1.17.0.8
	pkgsrc-2022Q4-base:1.17
	pkgsrc-2022Q3:1.17.0.6
	pkgsrc-2022Q3-base:1.17
	pkgsrc-2022Q2:1.17.0.4
	pkgsrc-2022Q2-base:1.17
	pkgsrc-2022Q1:1.17.0.2
	pkgsrc-2022Q1-base:1.17
	pkgsrc-2021Q4:1.15.0.4
	pkgsrc-2021Q4-base:1.15
	pkgsrc-2021Q3:1.15.0.2
	pkgsrc-2021Q3-base:1.15
	pkgsrc-2021Q2:1.11.0.2
	pkgsrc-2021Q2-base:1.11
	pkgsrc-2021Q1:1.10.0.8
	pkgsrc-2021Q1-base:1.10
	pkgsrc-2020Q4:1.10.0.6
	pkgsrc-2020Q4-base:1.10
	pkgsrc-2020Q3:1.10.0.4
	pkgsrc-2020Q3-base:1.10
	pkgsrc-2020Q2:1.10.0.2
	pkgsrc-2020Q2-base:1.10
	pkgsrc-2020Q1:1.8.0.2
	pkgsrc-2020Q1-base:1.8
	pkgsrc-2019Q4:1.7.0.6
	pkgsrc-2019Q4-base:1.7
	pkgsrc-2019Q3:1.7.0.2
	pkgsrc-2019Q3-base:1.7
	pkgsrc-2019Q2:1.3.0.2
	pkgsrc-2019Q2-base:1.3
	pkgsrc-2019Q1:1.2.0.6
	pkgsrc-2019Q1-base:1.2
	pkgsrc-2018Q4:1.2.0.4
	pkgsrc-2018Q4-base:1.2
	pkgsrc-2018Q3:1.2.0.2
	pkgsrc-2018Q3-base:1.2;
locks; strict;
comment	@# @;


1.17
date	2022.02.11.23.03.50;	author mrg;	state Exp;
branches;
next	1.16;
commitid	cm1224WhLqbJPfsD;

1.16
date	2022.02.11.22.06.23;	author mrg;	state Exp;
branches;
next	1.15;
commitid	gLw80im6eMtjtfsD;

1.15
date	2021.08.12.07.30.23;	author wiz;	state Exp;
branches;
next	1.14;
commitid	JmCE6U69x1GjyE4D;

1.14
date	2021.07.27.19.23.43;	author tnn;	state Exp;
branches;
next	1.13;
commitid	FOj5tHUTI6vL0F2D;

1.13
date	2021.07.26.06.36.41;	author mrg;	state Exp;
branches;
next	1.12;
commitid	bVC29iQ0esz8ws2D;

1.12
date	2021.06.25.08.28.57;	author mrg;	state Exp;
branches;
next	1.11;
commitid	7IavYzijI6YIpuYC;

1.11
date	2021.04.18.07.30.28;	author mrg;	state Exp;
branches;
next	1.10;
commitid	AZwnCzfFCTR5hKPC;

1.10
date	2020.04.02.09.12.54;	author tnn;	state Exp;
branches;
next	1.9;
commitid	GSWj1llZ8TqJ5N2C;

1.9
date	2020.04.02.09.06.28;	author tnn;	state Exp;
branches;
next	1.8;
commitid	UtJySgP71hF73N2C;

1.8
date	2020.01.27.08.02.30;	author thorpej;	state Exp;
branches;
next	1.7;
commitid	Wie6o5eTcAe2PiUB;

1.7
date	2019.09.15.20.13.31;	author tnn;	state Exp;
branches;
next	1.6;
commitid	40mcY8ptAaIo99DB;

1.6
date	2019.09.15.15.50.22;	author tnn;	state Exp;
branches;
next	1.5;
commitid	gZni4HKAtuGxI7DB;

1.5
date	2019.08.13.21.28.47;	author tnn;	state Exp;
branches;
next	1.4;
commitid	gt6AelWnF7JzEUyB;

1.4
date	2019.07.21.15.17.13;	author tnn;	state Exp;
branches;
next	1.3;
commitid	g0fZJ5HNoAMZkVvB;

1.3
date	2019.06.08.12.25.05;	author mrg;	state Exp;
branches;
next	1.2;
commitid	HKezTuT5G3vfJnqB;

1.2
date	2018.09.01.12.04.56;	author tnn;	state Exp;
branches;
next	1.1;
commitid	kHv58BqC7QcMDoQA;

1.1
date	2018.09.01.10.38.19;	author tnn;	state Exp;
branches;
next	;
commitid	XC7XrTkuzaAbboQA;


desc
@@


1.17
log
@update u-boot-rock64 to 2022.01 and tf-a 2.6.

change the u-boot-rockchip.mk to default to 2022.01 as only the
(probably) obsolete ayufan package uses anything else.
@
text
@# $NetBSD: Makefile,v 1.16 2022/02/11 22:06:23 mrg Exp $

UBOOT_TARGET=		rockpro64
UBOOT_CONFIG=		rockpro64-rk3399_defconfig
UBOOT_BIN=		idbloader.img rksd_loader.img rkspi_loader.img u-boot.itb
UBOOT_IMAGE_TYPE=	rk3399
UBOOT_MKIMAGE_RKSPI=	1
UBOOT_RK_SPI_OFF=	768

UBOOT_INSTALLBOOT_PLIST=	installboot.plist

.include "../../sysutils/u-boot/u-boot-rockchip.mk"
.include "../../mk/bsd.pkg.mk"
@


1.16
log
@update u-boot-rockpro64 and u-boot-pinebook-pro to u-boot 2022.01.

tested in sd, emmc, and spi on rockpro64, and on emmc on pbp.

should not affect u-boot-rockpro64-ayufan, but should finally
make it obsolete as the SPI version works again.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2021/08/12 07:30:23 wiz Exp $
a6 1
UBOOT_VERSION?=		2022.01
@


1.15
log
@u-boot*: fix more pkglint
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2021/07/27 19:23:43 tnn Exp $
d7 3
a9 2
UBOOT_VERSION?=		2021.07
PKGREVISION=		1
@


1.14
log
@u-boot-rockpro64: fix broken PCI config space handling:

- Program bus number into the ECAM decoder for each access
- Use type 1 PCI config cycles for config spaces behind bridge
- Add a platform specific hack to the synchronous exception handler
  to deal with PCI-e subsystem triggering data aborts when probing
  nonexistent PCI devices.
- properly delay after deasserting reset for downstream devices to
  have time to initialize.

Allows booting from PCI devices behind bridges and probing
devices other than 0:0:0 and 1:0:0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2021/07/26 06:36:41 mrg Exp $
d13 1
@


1.13
log
@update u-boot for rockpro64 and pinebook-pro to u-boot 2021.07.

- adds support for panel on pinebook-pro (needs rk_anxdp.c r1.4)
- enable ahci/sata for rockpro64
- workaround usb_stop() bug in u-boot.  see eg:
  https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@@aosc.io/
- remove long obsolete files

tested on original iso pbp that was upgraded to ansi key, and a
first generation ansi pbp, as well as two rockpro64 v2.1s.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2021/06/25 08:28:57 mrg Exp $
d8 1
@


1.12
log
@minor u-boot rockchip package cleanup.

rename U_BOOT_IMAGE_TYPE to UBOOT_IMAGE_TYPE -- matching the rest of pkgsrc.
remove not used (or needed) DISTINFO_FILE and PATCHDIR.

NFC.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2021/04/18 07:30:28 mrg Exp $
d6 2
a10 2
UBOOT_IMAGE_TYPE=	rk3399

@


1.11
log
@add some distinfo files and ensure a consistent DISTINFO_FILE and
PATCHDIR are setup.

at least u-boot-pinebook and u-boot-rock*64* are fixed now.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2020/04/02 09:12:54 tnn Exp $
d9 1
a9 5
U_BOOT_IMAGE_TYPE=	rk3399

# Patches kept in pinebook-pro; first worked there.
DISTINFO_FILE=		${.CURDIR}/../../sysutils/u-boot-pinebook-pro/distinfo
PATCHDIR=		${.CURDIR}/../../sysutils/u-boot-pinebook-pro/patches
@


1.10
log
@move u-boot-pinebook-pro/u-boot-rockchip.mk to u-boot/u-boot-rockchip.mk
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2020/04/02 09:06:28 tnn Exp $
d11 4
@


1.9
log
@u-boot-rockpro64: switch to mainline U-Boot

Reach over to the pinebook pro package for patches and build glue.
XXX boot from SPI is currently broken, but SD-card works.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2020/01/27 08:02:30 thorpej Exp $
d11 1
a11 20
# Boot Loader stage 3-1 (BL31) EL3 Runtime Firmware
# XXX LICENSE?
#BL31=		rk3399_bl31_v1.29.elf	# if you bump this, adjust pre-build target!
#DISTFILES+=	${BL31}
#SITES.${BL31}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/0b8a4e66958b5d3d87fc61fc4bd8e069c79e931a/bin/rk33/}

# DDR init binary
#DDR_BIN=		rk3399_ddr_800MHz_v1.23.bin
#SITES.${DDR_BIN}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/016471bcfb1a0b1e1269895cb7b6f534813edfdc/bin/rk33/}
#DISTFILES+=		${DDR_BIN}

#pre-build:
# patch the first instruction of cortex_a72_reset_func, replacing:
# mrs     x0, s3_1_c15_c2_0
# with:
# orr     x0, xzr, #0x100000000
# This enables workaround for A72 errata #859971.
#	${AWK} 'BEGIN {printf("%c%c%c%c",224,3,96,178);exit;}' | dd conv=notrunc bs=1 seek=145568 of=${WRKDIR}/${BL31}

.include "../../sysutils/u-boot-pinebook-pro/u-boot-rockchip.mk"
@


1.8
log
@Add installboot(8) configurations for Rock64, RockPro64 and Pinebook Pro.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2019/09/15 20:13:31 tnn Exp $
a2 1
PKGREVISION=		7
a8 2
DISTINFO_FILE=	${.CURDIR}/../../sysutils/u-boot-rockpro64/distinfo

a9 1
.include "../../sysutils/u-boot/u-boot-rockchip.mk"
d13 3
a15 3
BL31=		rk3399_bl31_v1.29.elf	# if you bump this, adjust pre-build target!
DISTFILES+=	${BL31}
SITES.${BL31}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/0b8a4e66958b5d3d87fc61fc4bd8e069c79e931a/bin/rk33/}
d18 3
a20 3
DDR_BIN=		rk3399_ddr_800MHz_v1.23.bin
SITES.${DDR_BIN}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/016471bcfb1a0b1e1269895cb7b6f534813edfdc/bin/rk33/}
DISTFILES+=		${DDR_BIN}
d22 1
a22 1
pre-build:
d28 1
a28 1
	${AWK} 'BEGIN {printf("%c%c%c%c",224,3,96,178);exit;}' | dd conv=notrunc bs=1 seek=145568 of=${WRKDIR}/${BL31}
d30 1
a30 1
.include "../../sysutils/u-boot/u-boot-arm64.mk"
@


1.7
log
@u-boot-rockpro64: implement workaround for A72 errata #859971

This disables i-cache prefetch, which can otherwise cause deadlocks on the
processor revision that ROCKPro64 uses.
Done via binary patch of the Rockchip TF-A EL3 firmware.

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2019/09/15 15:50:22 tnn Exp $
d3 1
a3 1
PKGREVISION=		6
d8 2
@


1.6
log
@u-boot-rock{,pro}64: move PKGREVISION from common Makefile to per-package
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2019/08/13 21:28:47 tnn Exp $
d3 1
a3 1
PKGREVISION=		5
d15 1
a15 1
BL31=		rk3399_bl31_v1.29.elf
d24 8
@


1.5
log
@u-boot-rock{,pro}64: install the SPI boot loader. Bump.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2019/07/21 15:17:13 tnn Exp $
d3 1
@


1.4
log
@u-boot-rock*: update to latest ayufan release & rockchip DDR firmware

No convenient changelog available.

Note: due to upstream changes in EFI device enumeration, implicit boot device
selection no longer works from the NetBSD EFI boot loader. e.g. "boot netbsd"
doesn't work. Specify the device explicitly, e.g. "boot hd0a:netbsd".
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2019/06/08 12:25:05 mrg Exp $
d5 1
a5 1
UBOOT_BIN=		idbloader.img rksd_loader.img u-boot.itb
@


1.3
log
@update pine64's rockpro64 to latest version from ayufan.

add u-boot package for rock64.  originally this was the same
as the old rockpro64 and works fine on that the rev2.0 board,
but didn't on rev3.0.  the updated version is still has a
problem, but at least gets further and has partition issues
instead of failing to talk to the sd at all.  share a bunch
of the makefile with rockpro64.

for all u-boot, properly fix the subst for tools/dtoc/dtoc.

add both rock64 and rockpro64 to the u-boot meta package and
bump the pkg revision.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2018/09/01 12:04:56 tnn Exp $
d14 1
a14 1
BL31=		rk3399_bl31_v1.18.elf
d16 1
a16 1
SITES.${BL31}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/9e6625e7551ffa591f0ac4c271f12a7ab5cedcf4/bin/rk33/}
d19 2
a20 2
DDR_BIN=		rk3399_ddr_800MHz_v1.14.bin
SITES.${DDR_BIN}=	${MASTER_SITE_GITHUB:=rockchip-linux/rkbin/raw/dbc8710a93406669fb2df2d57dc086228bf1979f/bin/rk33/}
@


1.2
log
@u-boot-rockpro64: drop el1 option and create single bundle for SD card

suggested by jmcneill@@
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2018/09/01 10:38:19 tnn Exp $
a6 6
PKGREVISION=	1
UBOOT_VERSION=	${GITHUB_TAG:C/-.*$//}
MASTER_SITES=	${MASTER_SITE_GITHUB:=ayufan-rock64/}
GITHUB_PROJECT=	linux-u-boot
GITHUB_TAG=	2017.09-rockchip-ayufan-1033-gdf02018479
DISTNAME=	${GITHUB_TAG}
d8 3
a10 3
PATCHDIR=	${.CURDIR}/../../sysutils/u-boot-rockpro64/patches
DISTFILES=	${DEFAULT_DISTFILES}
EXTRACT_SUFX=	.tar.gz
a22 20
# pkgsrc tries to run distfiles that end in .bin; handle manually
EXTRACT_ONLY=	${DISTFILES:N*.bin}

USE_TOOLS+=	gawk
MAKE_ENV+=	BL31=${WRKDIR}/${BL31}

post-extract:
	cp ${DISTDIR}/${DDR_BIN} ${WRKDIR}

post-build:
# build stage 3 package
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} u-boot.itb
# build stage 1 loader
	${WRKSRC}/tools/mkimage -n rk3399 -T rksd -d ${WRKDIR}/${DDR_BIN} ${WRKSRC}/idbloader.img
# append stage2 loader
	cat ${WRKSRC}/spl/u-boot-spl.bin >> ${WRKSRC}/idbloader.img
# wrap everything up into a single file that can be written to an SD card
	cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img
	dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img

@


1.1
log
@sysutils/u-boot-rockpro64: import u-boot-rockpro64-2017.09

U-Boot is a bootloader for embedded boards based on PowerPC, ARM, MIPS and
several other processors, which can be installed in a boot ROM and used to
initialize and test the hardware or to download and run application code.

This package provides U-Boot for the rk3389-based RockPRO64 from PINE64.
@
text
@d1 1
a1 1
# $NetBSD$
d5 1
a5 4
UBOOT_BIN=		sdloader.img u-boot.itb

# Switch to EL1 before booting kernel (required for 32-bit support)
PKG_DEFAULT_OPTIONS+=	el1
d7 1
d42 1
a42 1
	cd ${WRKSRC} && tools/mkimage -n rk3399 -T rksd -d ${WRKDIR}/${DDR_BIN} sdloader.img
d44 4
a47 1
	cd ${WRKSRC} && cat spl/u-boot-spl.bin >> sdloader.img
@

