pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils



Module Name:    pkgsrc
Committed By:   mrg
Date:           Fri Feb 11 22:06:23 UTC 2022

Modified Files:
        pkgsrc/sysutils/u-boot: u-boot-rockchip.mk
        pkgsrc/sysutils/u-boot-pinebook-pro: MESSAGE Makefile
        pkgsrc/sysutils/u-boot-rockpro64: MESSAGE Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/sysutils/u-boot/u-boot-rockchip.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/u-boot-pinebook-pro/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/u-boot-rockpro64/MESSAGE
cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/u-boot-rockpro64/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/u-boot/u-boot-rockchip.mk
diff -u pkgsrc/sysutils/u-boot/u-boot-rockchip.mk:1.11 pkgsrc/sysutils/u-boot/u-boot-rockchip.mk:1.12
--- pkgsrc/sysutils/u-boot/u-boot-rockchip.mk:1.11      Fri Jun 25 08:28:57 2021
+++ pkgsrc/sysutils/u-boot/u-boot-rockchip.mk   Fri Feb 11 22:06:22 2022
@@ -1,7 +1,8 @@
-# $NetBSD: u-boot-rockchip.mk,v 1.11 2021/06/25 08:28:57 mrg Exp $
+# $NetBSD: u-boot-rockchip.mk,v 1.12 2022/02/11 22:06:22 mrg Exp $
 #
 # should be used by sysutils/u-boot-rock64/Makefile
 # used by sysutils/u-boot-rockpro64/Makefile
+# used by sysutils/u-boot-rockpro64-ayufan/Makefile
 # used by sysutils/u-boot-pinebook-pro/Makefile
 
 # Common makefile fragment for rockchip based u-boot targets.
@@ -13,19 +14,42 @@
 
 UBOOT_VERSION?=                2020.01-rc5
 
-MAKE_ENV+=             BL31=${PREFIX}/share/arm-trusted-firmware/${UBOOT_IMAGE_TYPE}/bl31.elf
+.if ${UBOOT_IMAGE_TYPE} == "rk3399"
+TFA=                   trusted-firmware-a
+.else
+TFA=                   arm-trusted-firmware
+.endif
+
+# Earlier SPIs were at sector 1024, but newer u-boot has a DT that
+# loads them from 768.  Until all are converted, leave the default
+# at 1024.
+UBOOT_RK_SPI_OFF?=     1024
+
+MAKE_ENV+=             BL31=${PREFIX}/share/${TFA}/${UBOOT_IMAGE_TYPE}/bl31.elf
 
 post-build:
-# wrap everything up into a single file that can be written to an SD card
+# wrap everything up into a single file that can be written to an SD card.
+# note that the SD image starts at sector 64, and 64 + 448 = 512, so the
+# u-boot.itb is loaded at 256KiB on the card iteslf.
        cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img
        dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img
+.if defined(UBOOT_MKIMAGE_RKSPI)
+        ${WRKSRC}/tools/mkimage \
+               -n rk3399 \
+               -T rkspi \
+               -d ${WRKSRC}/tpl/u-boot-tpl.bin:${WRKSRC}/spl/u-boot-spl.bin \
+               ${WRKSRC}/rkspi_loader.img
+.else
 # build SPI NOR flash image. See dev-ayufan/build.mk.
        set -e; b=0; while [ "$$b" != 128 ]; do \
                dd bs=2k count=1; \
                dd if=/dev/zero bs=2k count=1; \
                b=$$(expr $$b + 1); \
        done < ${WRKSRC}/idbloader.img > ${WRKSRC}/rkspi_loader.img 2> /dev/null
-       dd if=${WRKSRC}/u-boot.itb seek=1024 conv=notrunc of=${WRKSRC}/rkspi_loader.img
+.endif
+       dd if=${WRKSRC}/u-boot.itb seek=${UBOOT_RK_SPI_OFF} conv=notrunc of=${WRKSRC}/rkspi_loader.img
+
+BUILD_TARGET+= V=1
 
-.include "../../sysutils/arm-trusted-firmware-${UBOOT_IMAGE_TYPE}/buildlink3.mk"
+.include "../../sysutils/${TFA}-${UBOOT_IMAGE_TYPE}/buildlink3.mk"
 .include "../../sysutils/u-boot/u-boot-arm64.mk"

Index: pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.4 pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.5
--- pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE:1.4     Sat Feb 22 11:55:36 2020
+++ pkgsrc/sysutils/u-boot-pinebook-pro/MESSAGE Fri Feb 11 22:06:22 2022
@@ -1,17 +1,18 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.4 2020/02/22 11:55:36 mrg Exp $
+$NetBSD: MESSAGE,v 1.5 2022/02/11 22:06:22 mrg Exp $
 
 Examples command to install U-Boot to an empty SD card:
 
-# dd if=${LOCALBASE}/share/u-boot/pinebook-pro/rksd_loader.img seek=64 of=/dev/rld0d
+# dd if=${LOCALBASE}/share/u-boot/pinebook-pro/rksd_loader.img seek=64 of=/dev/rld0d conv=sync
 
 Alternatively, to install to SPI flash:
 
-dd if=${LOCALBASE}/share/u-boot/pinebook-pro/rkspi_loader.img bs=64k of=/dev/spiflash0
+dd if=${LOCALBASE}/share/u-boot/pinebook-pro/rkspi_loader.img bs=64k of=/dev/spiflash0 conv=sync
 
 You should make sure that the space is otherwise cleared of data, as old
 images may fool the boot loader paths.
 
-See also http://opensource.rock-chips.com/wiki_Boot_option
+See also NetBSD installboot(8) and
+http://opensource.rock-chips.com/wiki_Boot_option
 
 ===========================================================================

Index: pkgsrc/sysutils/u-boot-pinebook-pro/Makefile
diff -u pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.13 pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.14
--- pkgsrc/sysutils/u-boot-pinebook-pro/Makefile:1.13   Thu Aug 12 07:30:23 2021
+++ pkgsrc/sysutils/u-boot-pinebook-pro/Makefile        Fri Feb 11 22:06:22 2022
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.13 2021/08/12 07:30:23 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2022/02/11 22:06:22 mrg Exp $
 
 UBOOT_TARGET=          pinebook-pro
 UBOOT_CONFIG=          pinebook-pro-rk3399_defconfig
 UBOOT_BIN=             idbloader.img rksd_loader.img rkspi_loader.img u-boot.itb
 UBOOT_IMAGE_TYPE=      rk3399
-UBOOT_VERSION?=                2021.07
+UBOOT_VERSION?=                2022.01
+UBOOT_MKIMAGE_RKSPI=   1
+UBOOT_RK_SPI_OFF=      768
 
 UBOOT_INSTALLBOOT_PLIST=       installboot.plist
 

Index: pkgsrc/sysutils/u-boot-rockpro64/MESSAGE
diff -u pkgsrc/sysutils/u-boot-rockpro64/MESSAGE:1.3 pkgsrc/sysutils/u-boot-rockpro64/MESSAGE:1.4
--- pkgsrc/sysutils/u-boot-rockpro64/MESSAGE:1.3        Tue Aug 13 21:28:47 2019
+++ pkgsrc/sysutils/u-boot-rockpro64/MESSAGE    Fri Feb 11 22:06:23 2022
@@ -1,14 +1,18 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.3 2019/08/13 21:28:47 tnn Exp $
+$NetBSD: MESSAGE,v 1.4 2022/02/11 22:06:23 mrg Exp $
 
-Example command to install U-Boot to an empty SD card:
+Example command to install U-Boot to an empty eMMC or SD card:
 
-# dd if=${LOCALBASE}/share/u-boot/rockpro64/rksd_loader.img seek=64 of=/dev/rld0d
+# dd if=${LOCALBASE}/share/u-boot/rockpro64/rksd_loader.img seek=64 of=/dev/rld0d conv=sync
 
 Alternatively, to install to SPI flash:
 
-dd if=${LOCALBASE}/share/u-boot/rockpro64/rkspi_loader.img bs=64k of=/dev/spiflash0
+dd if=${LOCALBASE}/share/u-boot/rockpro64/rkspi_loader.img bs=64k of=/dev/spiflash0 conv=sync
 
-See also http://opensource.rock-chips.com/wiki_Boot_option
+You should make sure that the space is otherwise cleared of data, as old
+images may fool the boot loader paths.
+
+See also NetBSD installboot(8) and
+http://opensource.rock-chips.com/wiki_Boot_option
 
 ===========================================================================

Index: pkgsrc/sysutils/u-boot-rockpro64/Makefile
diff -u pkgsrc/sysutils/u-boot-rockpro64/Makefile:1.15 pkgsrc/sysutils/u-boot-rockpro64/Makefile:1.16
--- pkgsrc/sysutils/u-boot-rockpro64/Makefile:1.15      Thu Aug 12 07:30:23 2021
+++ pkgsrc/sysutils/u-boot-rockpro64/Makefile   Fri Feb 11 22:06:23 2022
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.15 2021/08/12 07:30:23 wiz Exp $
+# $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_VERSION?=                2021.07
-PKGREVISION=           1
+UBOOT_VERSION?=                2022.01
+UBOOT_MKIMAGE_RKSPI=   1
+UBOOT_RK_SPI_OFF=      768
 
 UBOOT_INSTALLBOOT_PLIST=       installboot.plist
 



Home | Main Index | Thread Index | Old Index