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:   skrll
Date:           Fri Apr 12 07:08:18 UTC 2019

Modified Files:
        pkgsrc/sysutils/u-boot: distinfo u-boot.mk
        pkgsrc/sysutils/u-boot-a10-olinuxino-lime: Makefile
        pkgsrc/sysutils/u-boot-bananapi: Makefile
        pkgsrc/sysutils/u-boot-bananapi-m3: Makefile
        pkgsrc/sysutils/u-boot-beagleboard: Makefile
        pkgsrc/sysutils/u-boot-beagleboneblack: Makefile
        pkgsrc/sysutils/u-boot-beaglebonewhite: Makefile
        pkgsrc/sysutils/u-boot-chip: Makefile
        pkgsrc/sysutils/u-boot-chip-pro: Makefile
        pkgsrc/sysutils/u-boot-cubieboard2: Makefile
        pkgsrc/sysutils/u-boot-cubieboard4: Makefile
        pkgsrc/sysutils/u-boot-cubietruck: Makefile
        pkgsrc/sysutils/u-boot-de0-nanosoc: Makefile
        pkgsrc/sysutils/u-boot-hummingbird-a31: Makefile
        pkgsrc/sysutils/u-boot-jetson-tk1: Makefile
        pkgsrc/sysutils/u-boot-jetson-tx1: Makefile
        pkgsrc/sysutils/u-boot-jetson-tx2: Makefile
        pkgsrc/sysutils/u-boot-nanopi-m1: Makefile
        pkgsrc/sysutils/u-boot-nanopi-neo: Makefile
        pkgsrc/sysutils/u-boot-nanopi-neo-plus2: Makefile
        pkgsrc/sysutils/u-boot-nanopi-neo2: Makefile
        pkgsrc/sysutils/u-boot-odroid-c2: Makefile
        pkgsrc/sysutils/u-boot-odroid-xu3: Makefile
        pkgsrc/sysutils/u-boot-orangepi-2: Makefile
        pkgsrc/sysutils/u-boot-orangepi-one: Makefile
        pkgsrc/sysutils/u-boot-orangepi-plus2e: Makefile
        pkgsrc/sysutils/u-boot-orangepi-zero: Makefile
        pkgsrc/sysutils/u-boot-orangepi-zero-plus: Makefile
        pkgsrc/sysutils/u-boot-pine-h64: Makefile
        pkgsrc/sysutils/u-boot-pine64: Makefile
        pkgsrc/sysutils/u-boot-pocketchip: Makefile
        pkgsrc/sysutils/u-boot-sopine-baseboard: Makefile
Added Files:
        pkgsrc/sysutils/u-boot/patches: patch-Makefile
            patch-lib_efi__loader_efi__variable.c

Log Message:
Backport a patch from u-boot mainline to support EFI GetVariable.

Add PKGREVISION to the UBOOT_VERSTION output

Bump PKGREVISION for all 2018.11 packages


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/sysutils/u-boot/distinfo
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/u-boot/u-boot.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-bananapi/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-bananapi-m3/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-beagleboard/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/u-boot-beagleboneblack/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-chip/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-chip-pro/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-cubieboard2/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-cubieboard4/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-cubietruck/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/u-boot-jetson-tk1/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/u-boot-jetson-tx1/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-jetson-tx2/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-nanopi-m1/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/u-boot-nanopi-neo/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/u-boot-odroid-c2/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-odroid-xu3/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/u-boot-orangepi-2/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-orangepi-one/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot-orangepi-zero/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/sysutils/u-boot-pine-h64/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/u-boot-pine64/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/u-boot-pocketchip/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/u-boot/patches/patch-Makefile \
    pkgsrc/sysutils/u-boot/patches/patch-lib_efi__loader_efi__variable.c

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/distinfo
diff -u pkgsrc/sysutils/u-boot/distinfo:1.20 pkgsrc/sysutils/u-boot/distinfo:1.21
--- pkgsrc/sysutils/u-boot/distinfo:1.20        Thu Jan  3 04:07:18 2019
+++ pkgsrc/sysutils/u-boot/distinfo     Fri Apr 12 07:08:15 2019
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.20 2019/01/03 04:07:18 thorpej Exp $
+$NetBSD: distinfo,v 1.21 2019/04/12 07:08:15 skrll Exp $
 
 SHA1 (u-boot-2018.11.tar.bz2) = e58e86c633ad3e2613196e0c0b0a7760ae5966d6
 RMD160 (u-boot-2018.11.tar.bz2) = f63c67750951d0e2883935a5d4cc3252f51a5453
 SHA512 (u-boot-2018.11.tar.bz2) = 1ea0bbb5f5e6d4c60b3a6bd345d1fa6e9da025daf36f47e8392bab34cb432c2e3633d903efb260f71fff87dffd6f2bf09ac900e96b3d4247073958d83b89ceff
 Size (u-boot-2018.11.tar.bz2) = 13045125 bytes
+SHA1 (patch-Makefile) = 45f505041a586b75953c34c1ab6fffaa56b43601
 SHA1 (patch-arch_arm_cpu_armv8_Kconfig) = 63cbbf2e3cebd46793fc03cc8e62297f6dc01aa9
 SHA1 (patch-configs_jetson-tk1_defconfig) = e25d89b9440f9bb4486ac22fc47083ed24abdd95
 SHA1 (patch-configs_p2371-2180_defconfig) = 2a3f1ad4f9963af403c2c9f2f01b892bbe55188c
@@ -12,4 +13,5 @@ SHA1 (patch-include_configs_tegra-common
 SHA1 (patch-include_configs_tegra-common.h) = 4cda8f9df2c7fc2b9cd9d4139ec679a42648e4f8
 SHA1 (patch-include_image.h) = c9b134b2b5624a1e6c9f091a2192185b8d0f85fe
 SHA1 (patch-lib_bch.c) = b1f1c7418f1004c151b9e5e06ab7047a1736ae47
+SHA1 (patch-lib_efi__loader_efi__variable.c) = 1955870b22e358a4bded9e85fd89c74419aeed0d
 SHA1 (patch-tools_imx__cntr__image.sh) = 715647e3b77b505513ae79b4fe673f4f7f9bf042

Index: pkgsrc/sysutils/u-boot/u-boot.mk
diff -u pkgsrc/sysutils/u-boot/u-boot.mk:1.13 pkgsrc/sysutils/u-boot/u-boot.mk:1.14
--- pkgsrc/sysutils/u-boot/u-boot.mk:1.13       Sun Mar 24 14:57:47 2019
+++ pkgsrc/sysutils/u-boot/u-boot.mk    Fri Apr 12 07:08:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: u-boot.mk,v 1.13 2019/03/24 14:57:47 tnn Exp $
+# $NetBSD: u-boot.mk,v 1.14 2019/04/12 07:08:15 skrll Exp $
 
 .include "../../sysutils/u-boot/u-boot-version.mk"
 
@@ -31,6 +31,10 @@ REPLACE_FILES.python2=       scripts/fill_scra
                        tools/genboardscfg.py \
                        tools/moveconfig.py
 
+.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
+UBOOT_ENV+=    UBOOT_PKGREVISION=nb${PKGREVISION}
+.endif
+
 MAKE_ENV+=     ${UBOOT_ENV}
 
 post-patch:

Index: pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile
diff -u pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile:1.4 pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile:1.5
--- pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile:1.4      Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-a10-olinuxino-lime/Makefile  Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          a10-olinuxino-lime
 UBOOT_CONFIG=          A10-OLinuXino-Lime_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-bananapi/Makefile
diff -u pkgsrc/sysutils/u-boot-bananapi/Makefile:1.4 pkgsrc/sysutils/u-boot-bananapi/Makefile:1.5
--- pkgsrc/sysutils/u-boot-bananapi/Makefile:1.4        Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-bananapi/Makefile    Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          bananapi
 UBOOT_CONFIG=          Bananapi_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-bananapi-m3/Makefile
diff -u pkgsrc/sysutils/u-boot-bananapi-m3/Makefile:1.4 pkgsrc/sysutils/u-boot-bananapi-m3/Makefile:1.5
--- pkgsrc/sysutils/u-boot-bananapi-m3/Makefile:1.4     Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-bananapi-m3/Makefile Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          bananapi-m3
 UBOOT_CONFIG=          Sinovoip_BPI_M3_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-beagleboard/Makefile
diff -u pkgsrc/sysutils/u-boot-beagleboard/Makefile:1.2 pkgsrc/sysutils/u-boot-beagleboard/Makefile:1.3
--- pkgsrc/sysutils/u-boot-beagleboard/Makefile:1.2     Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-beagleboard/Makefile Fri Apr 12 07:08:16 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          beagleboard
 UBOOT_CONFIG=          omap3_beagle_defconfig
 UBOOT_BIN=             u-boot.img
 UBOOT_BIN+=            MLO
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-beagleboneblack/Makefile
diff -u pkgsrc/sysutils/u-boot-beagleboneblack/Makefile:1.3 pkgsrc/sysutils/u-boot-beagleboneblack/Makefile:1.4
--- pkgsrc/sysutils/u-boot-beagleboneblack/Makefile:1.3 Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-beagleboneblack/Makefile     Fri Apr 12 07:08:16 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.4 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          beagleboneblack
 UBOOT_CONFIG=          am335x_boneblack_defconfig
 UBOOT_BIN=             u-boot.img
 UBOOT_BIN+=            MLO
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile
diff -u pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile:1.2 pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile:1.3
--- pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile:1.2 Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-beaglebonewhite/Makefile     Fri Apr 12 07:08:16 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          beaglebonewhite
 UBOOT_CONFIG=          am335x_evm_defconfig
 UBOOT_BIN=             u-boot.img
 UBOOT_BIN+=            MLO
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-chip/Makefile
diff -u pkgsrc/sysutils/u-boot-chip/Makefile:1.4 pkgsrc/sysutils/u-boot-chip/Makefile:1.5
--- pkgsrc/sysutils/u-boot-chip/Makefile:1.4    Mon Dec 31 15:06:44 2018
+++ pkgsrc/sysutils/u-boot-chip/Makefile        Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:44 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          chip
 UBOOT_CONFIG=          CHIP_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-chip-pro/Makefile
diff -u pkgsrc/sysutils/u-boot-chip-pro/Makefile:1.4 pkgsrc/sysutils/u-boot-chip-pro/Makefile:1.5
--- pkgsrc/sysutils/u-boot-chip-pro/Makefile:1.4        Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-chip-pro/Makefile    Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          chip-pro
 UBOOT_CONFIG=          CHIP_pro_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-cubieboard2/Makefile
diff -u pkgsrc/sysutils/u-boot-cubieboard2/Makefile:1.4 pkgsrc/sysutils/u-boot-cubieboard2/Makefile:1.5
--- pkgsrc/sysutils/u-boot-cubieboard2/Makefile:1.4     Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-cubieboard2/Makefile Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          cubieboard2
 UBOOT_CONFIG=          Cubieboard2_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-cubieboard4/Makefile
diff -u pkgsrc/sysutils/u-boot-cubieboard4/Makefile:1.4 pkgsrc/sysutils/u-boot-cubieboard4/Makefile:1.5
--- pkgsrc/sysutils/u-boot-cubieboard4/Makefile:1.4     Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-cubieboard4/Makefile Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          cubieboard4
 UBOOT_CONFIG=          Cubieboard4_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-cubietruck/Makefile
diff -u pkgsrc/sysutils/u-boot-cubietruck/Makefile:1.4 pkgsrc/sysutils/u-boot-cubietruck/Makefile:1.5
--- pkgsrc/sysutils/u-boot-cubietruck/Makefile:1.4      Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-cubietruck/Makefile  Fri Apr 12 07:08:16 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:16 skrll Exp $
 
 UBOOT_TARGET=          cubietruck
 UBOOT_CONFIG=          Cubietruck_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile
diff -u pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile:1.2 pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile:1.3
--- pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile:1.2     Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-de0-nanosoc/Makefile Fri Apr 12 07:08:17 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          de0-nanosoc
 UBOOT_CONFIG=          socfpga_de0_nano_soc_defconfig
 UBOOT_BIN=             u-boot-with-spl.sfp
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile
diff -u pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile:1.4 pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile:1.5
--- pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile:1.4 Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-hummingbird-a31/Makefile     Fri Apr 12 07:08:17 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          hummingbird-a31
 UBOOT_CONFIG=          Hummingbird_A31_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-jetson-tk1/Makefile
diff -u pkgsrc/sysutils/u-boot-jetson-tk1/Makefile:1.5 pkgsrc/sysutils/u-boot-jetson-tk1/Makefile:1.6
--- pkgsrc/sysutils/u-boot-jetson-tk1/Makefile:1.5      Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-jetson-tk1/Makefile  Fri Apr 12 07:08:17 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.5 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.6 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          jetson-tk1
 UBOOT_CONFIG=          jetson-tk1_defconfig
 UBOOT_BIN=             u-boot u-boot-dtb.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-jetson-tx1/Makefile
diff -u pkgsrc/sysutils/u-boot-jetson-tx1/Makefile:1.6 pkgsrc/sysutils/u-boot-jetson-tx1/Makefile:1.7
--- pkgsrc/sysutils/u-boot-jetson-tx1/Makefile:1.6      Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-jetson-tx1/Makefile  Fri Apr 12 07:08:17 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.6 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.7 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          jetson-tx1
 UBOOT_CONFIG=          p2371-2180_defconfig
 UBOOT_BIN=             u-boot u-boot-dtb.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=  el1

Index: pkgsrc/sysutils/u-boot-jetson-tx2/Makefile
diff -u pkgsrc/sysutils/u-boot-jetson-tx2/Makefile:1.4 pkgsrc/sysutils/u-boot-jetson-tx2/Makefile:1.5
--- pkgsrc/sysutils/u-boot-jetson-tx2/Makefile:1.4      Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-jetson-tx2/Makefile  Fri Apr 12 07:08:17 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          jetson-tx2
 UBOOT_CONFIG=          p2771-0000-500_defconfig
 UBOOT_BIN=             u-boot u-boot-dtb.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=  el1

Index: pkgsrc/sysutils/u-boot-nanopi-m1/Makefile
diff -u pkgsrc/sysutils/u-boot-nanopi-m1/Makefile:1.2 pkgsrc/sysutils/u-boot-nanopi-m1/Makefile:1.3
--- pkgsrc/sysutils/u-boot-nanopi-m1/Makefile:1.2       Mon Dec 31 15:06:45 2018
+++ pkgsrc/sysutils/u-boot-nanopi-m1/Makefile   Fri Apr 12 07:08:17 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:45 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          nanopi-m1
 UBOOT_CONFIG=          nanopi_m1_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-nanopi-neo/Makefile
diff -u pkgsrc/sysutils/u-boot-nanopi-neo/Makefile:1.5 pkgsrc/sysutils/u-boot-nanopi-neo/Makefile:1.6
--- pkgsrc/sysutils/u-boot-nanopi-neo/Makefile:1.5      Mon Dec 31 15:06:47 2018
+++ pkgsrc/sysutils/u-boot-nanopi-neo/Makefile  Fri Apr 12 07:08:17 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.5 2018/12/31 15:06:47 jmcneill Exp $
+# $NetBSD: Makefile,v 1.6 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          nanopi-neo
 UBOOT_CONFIG=          nanopi_neo_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile
diff -u pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile:1.7 pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile:1.8
--- pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile:1.7        Fri Mar 15 13:58:59 2019
+++ pkgsrc/sysutils/u-boot-nanopi-neo-plus2/Makefile    Fri Apr 12 07:08:17 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.7 2019/03/15 13:58:59 martin Exp $
+# $NetBSD: Makefile,v 1.8 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          nanopi-neo-plus2
 UBOOT_CONFIG=          nanopi_neo_plus2_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           2
+PKGREVISION=           3
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 #PKG_DEFAULT_OPTIONS+= el1

Index: pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile
diff -u pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile:1.6 pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile:1.7
--- pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile:1.6     Fri Mar 15 13:59:38 2019
+++ pkgsrc/sysutils/u-boot-nanopi-neo2/Makefile Fri Apr 12 07:08:17 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.6 2019/03/15 13:59:38 martin Exp $
+# $NetBSD: Makefile,v 1.7 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          nanopi-neo2
 UBOOT_CONFIG=          nanopi_neo2_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           2
+PKGREVISION=           3
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=  el1

Index: pkgsrc/sysutils/u-boot-odroid-c2/Makefile
diff -u pkgsrc/sysutils/u-boot-odroid-c2/Makefile:1.1 pkgsrc/sysutils/u-boot-odroid-c2/Makefile:1.2
--- pkgsrc/sysutils/u-boot-odroid-c2/Makefile:1.1       Tue Jan 22 17:17:55 2019
+++ pkgsrc/sysutils/u-boot-odroid-c2/Makefile   Fri Apr 12 07:08:17 2019
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2019/01/22 17:17:55 martin Exp $
+# $NetBSD: Makefile,v 1.2 2019/04/12 07:08:17 skrll Exp $
 
 UBOOT_TARGET=          odroid-c2
 UBOOT_CONFIG=          odroid-c2_defconfig
 UBOOT_BIN=             u-boot u-boot-dtb.bin
 
+PKGREVISION=           1
+
 .include "../../sysutils/u-boot/u-boot-arm64.mk"

Index: pkgsrc/sysutils/u-boot-odroid-xu3/Makefile
diff -u pkgsrc/sysutils/u-boot-odroid-xu3/Makefile:1.2 pkgsrc/sysutils/u-boot-odroid-xu3/Makefile:1.3
--- pkgsrc/sysutils/u-boot-odroid-xu3/Makefile:1.2      Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-odroid-xu3/Makefile  Fri Apr 12 07:08:18 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          odroid-xu3
 UBOOT_CONFIG=          odroid-xu3_defconfig
 UBOOT_BIN=             u-boot u-boot-dtb.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-orangepi-2/Makefile
diff -u pkgsrc/sysutils/u-boot-orangepi-2/Makefile:1.6 pkgsrc/sysutils/u-boot-orangepi-2/Makefile:1.7
--- pkgsrc/sysutils/u-boot-orangepi-2/Makefile:1.6      Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-orangepi-2/Makefile  Fri Apr 12 07:08:18 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.6 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.7 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          orangepi-2
 UBOOT_CONFIG=          orangepi_2_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-orangepi-one/Makefile
diff -u pkgsrc/sysutils/u-boot-orangepi-one/Makefile:1.4 pkgsrc/sysutils/u-boot-orangepi-one/Makefile:1.5
--- pkgsrc/sysutils/u-boot-orangepi-one/Makefile:1.4    Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-orangepi-one/Makefile        Fri Apr 12 07:08:18 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          orangepi-one
 UBOOT_CONFIG=          orangepi_one_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile
diff -u pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile:1.6 pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile:1.7
--- pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile:1.6 Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-orangepi-plus2e/Makefile     Fri Apr 12 07:08:18 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.6 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.7 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          orangepi-plus2e
 UBOOT_CONFIG=          orangepi_plus2e_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-orangepi-zero/Makefile
diff -u pkgsrc/sysutils/u-boot-orangepi-zero/Makefile:1.2 pkgsrc/sysutils/u-boot-orangepi-zero/Makefile:1.3
--- pkgsrc/sysutils/u-boot-orangepi-zero/Makefile:1.2   Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-orangepi-zero/Makefile       Fri Apr 12 07:08:18 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.3 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          orangepi-zero
 UBOOT_CONFIG=          orangepi_zero_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 .include "../../sysutils/u-boot/u-boot-arm.mk"

Index: pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile
diff -u pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile:1.3 pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile:1.4
--- pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile:1.3      Fri Mar 15 13:59:58 2019
+++ pkgsrc/sysutils/u-boot-orangepi-zero-plus/Makefile  Fri Apr 12 07:08:18 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2019/03/15 13:59:58 martin Exp $
+# $NetBSD: Makefile,v 1.4 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          orangepi-zero-plus
 UBOOT_CONFIG=          orangepi_zero_plus_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           2
+PKGREVISION=           3
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=   el1

Index: pkgsrc/sysutils/u-boot-pine-h64/Makefile
diff -u pkgsrc/sysutils/u-boot-pine-h64/Makefile:1.4 pkgsrc/sysutils/u-boot-pine-h64/Makefile:1.5
--- pkgsrc/sysutils/u-boot-pine-h64/Makefile:1.4        Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-pine-h64/Makefile    Fri Apr 12 07:08:18 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.5 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          pine-h64
 UBOOT_CONFIG=          pine_h64_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 post-extract:
        ${CP} ${PREFIX}/share/arm-trusted-firmware/sun50i-h6/bl31.bin ${WRKSRC}

Index: pkgsrc/sysutils/u-boot-pine64/Makefile
diff -u pkgsrc/sysutils/u-boot-pine64/Makefile:1.7 pkgsrc/sysutils/u-boot-pine64/Makefile:1.8
--- pkgsrc/sysutils/u-boot-pine64/Makefile:1.7  Fri Mar 15 14:00:36 2019
+++ pkgsrc/sysutils/u-boot-pine64/Makefile      Fri Apr 12 07:08:18 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.7 2019/03/15 14:00:36 martin Exp $
+# $NetBSD: Makefile,v 1.8 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          pine64
 UBOOT_CONFIG=          pine64_plus_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           2
+PKGREVISION=           3
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=  el1

Index: pkgsrc/sysutils/u-boot-pocketchip/Makefile
diff -u pkgsrc/sysutils/u-boot-pocketchip/Makefile:1.5 pkgsrc/sysutils/u-boot-pocketchip/Makefile:1.6
--- pkgsrc/sysutils/u-boot-pocketchip/Makefile:1.5      Mon Dec 31 15:06:46 2018
+++ pkgsrc/sysutils/u-boot-pocketchip/Makefile  Fri Apr 12 07:08:18 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2018/12/31 15:06:46 jmcneill Exp $
+# $NetBSD: Makefile,v 1.6 2019/04/12 07:08:18 skrll Exp $
 
 UBOOT_TARGET=          pocketchip
 UBOOT_CONFIG=          CHIP_defconfig
 UBOOT_BIN=             u-boot-sunxi-with-spl.bin
 
-PKGREVISION=           1
+PKGREVISION=           2
 
 UBOOT_OPTIONS+=                CONFIG_I2C1_ENABLE=y
 UBOOT_OPTIONS+=                CONFIG_AXP_GPIO=y

Index: pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile
diff -u pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile:1.3 pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile:1.4
--- pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile:1.3        Fri Mar 15 14:01:00 2019
+++ pkgsrc/sysutils/u-boot-sopine-baseboard/Makefile    Fri Apr 12 07:08:18 2019
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2019/03/15 14:01:00 martin Exp $
+# $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=           2
+PKGREVISION=           3
 
 # Switch to EL1 before booting kernel (required for 32-bit support)
 PKG_DEFAULT_OPTIONS+=  el1

Added files:

Index: pkgsrc/sysutils/u-boot/patches/patch-Makefile
diff -u /dev/null pkgsrc/sysutils/u-boot/patches/patch-Makefile:1.1
--- /dev/null   Fri Apr 12 07:08:19 2019
+++ pkgsrc/sysutils/u-boot/patches/patch-Makefile       Fri Apr 12 07:08:15 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-Makefile,v 1.1 2019/04/12 07:08:15 skrll Exp $
+
+--- Makefile.orig      2018-11-14 16:10:06.000000000 +0000
++++ Makefile
+@@ -1472,7 +1472,7 @@ prepare: prepare0
+ 
+ define filechk_version.h
+       (echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \
+-      echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \
++      echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION \"$(UBOOT_PKGREVISION)\"; \
+       echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
+       echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
+ endef
Index: pkgsrc/sysutils/u-boot/patches/patch-lib_efi__loader_efi__variable.c
diff -u /dev/null pkgsrc/sysutils/u-boot/patches/patch-lib_efi__loader_efi__variable.c:1.1
--- /dev/null   Fri Apr 12 07:08:19 2019
+++ pkgsrc/sysutils/u-boot/patches/patch-lib_efi__loader_efi__variable.c        Fri Apr 12 07:08:15 2019
@@ -0,0 +1,277 @@
+$NetBSD: patch-lib_efi__loader_efi__variable.c,v 1.1 2019/04/12 07:08:15 skrll Exp $
+
+--- lib/efi_loader/efi_variable.c.orig 2019-04-06 16:01:44.521947778 +0000
++++ lib/efi_loader/efi_variable.c
+@@ -8,6 +8,10 @@
+ #include <malloc.h>
+ #include <charset.h>
+ #include <efi_loader.h>
++#include <hexdump.h>
++#include <environment.h>
++#include <search.h>
++#include <uuid.h>
+ 
+ #define READ_ONLY BIT(31)
+ 
+@@ -98,6 +102,19 @@ static char *mem2hex(char *hexstr, const
+       return hexstr;
+ }
+ 
++/**
++ * efi_to_native() - convert the UEFI variable name and vendor GUID to U-Boot
++ *                 variable name
++ *
++ * The U-Boot variable name is a concatenation of prefix 'efi', the hexstring
++ * encoded vendor GUID, and the UTF-8 encoded UEFI variable name separated by
++ * underscores, e.g. 'efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder'.
++ *
++ * @native:           pointer to pointer to U-Boot variable name
++ * @variable_name:    UEFI variable name
++ * @vendor:           vendor GUID
++ * Return:            status code
++ */
+ static efi_status_t efi_to_native(char **native, const u16 *variable_name,
+                                 efi_guid_t *vendor)
+ {
+@@ -116,6 +133,15 @@ static efi_status_t efi_to_native(char *
+       return EFI_SUCCESS;
+ }
+ 
++/**
++ * prefix() - skip over prefix
++ *
++ * Skip over a prefix string.
++ *
++ * @str:      string with prefix
++ * @prefix:   prefix string
++ * Return:    string without prefix, or NULL if prefix not found
++ */
+ static const char *prefix(const char *str, const char *prefix)
+ {
+       size_t n = strlen(prefix);
+@@ -124,7 +150,16 @@ static const char *prefix(const char *st
+       return NULL;
+ }
+ 
+-/* parse attributes part of variable value, if present: */
++/**
++ * parse_attr() - decode attributes part of variable value
++ *
++ * Convert the string encoded attributes of a UEFI variable to a bit mask.
++ * TODO: Several attributes are not supported.
++ *
++ * @str:      value of U-Boot variable
++ * @attrp:    pointer to UEFI attributes
++ * Return:    pointer to remainder of U-Boot variable value
++ */
+ static const char *parse_attr(const char *str, u32 *attrp)
+ {
+       u32 attr = 0;
+@@ -162,7 +197,21 @@ static const char *parse_attr(const char
+       return str;
+ }
+ 
+-/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetVariable.28.29 */
++/**
++ * efi_efi_get_variable() - retrieve value of a UEFI variable
++ *
++ * This function implements the GetVariable runtime service.
++ *
++ * See the Unified Extensible Firmware Interface (UEFI) specification for
++ * details.
++ *
++ * @variable_name:    name of the variable
++ * @vendor:           vendor GUID
++ * @attributes:               attributes of the variable
++ * @data_size:                size of the buffer to which the variable value is copied
++ * @data:             buffer to which the variable value is copied
++ * Return:            status code
++ */
+ efi_status_t EFIAPI efi_get_variable(u16 *variable_name, efi_guid_t *vendor,
+                                    u32 *attributes, efi_uintn_t *data_size,
+                                    void *data)
+@@ -241,17 +290,179 @@ efi_status_t EFIAPI efi_get_variable(u16
+       return EFI_EXIT(EFI_SUCCESS);
+ }
+ 
+-/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetNextVariableName.28.29 */
++static char *efi_variables_list;
++static char *efi_cur_variable;
++
++/**
++ * parse_uboot_variable() - parse a u-boot variable and get uefi-related
++ *                        information
++ * @variable:         whole data of u-boot variable (ie. name=value)
++ * @variable_name_size: size of variable_name buffer in byte
++ * @variable_name:    name of uefi variable in u16, null-terminated
++ * @vendor:           vendor's guid
++ * @attributes:               attributes
++ *
++ * A uefi variable is encoded into a u-boot variable as described above.
++ * This function parses such a u-boot variable and retrieve uefi-related
++ * information into respective parameters. In return, variable_name_size
++ * is the size of variable name including NULL.
++ *
++ * Return:            EFI_SUCCESS if parsing is OK, EFI_NOT_FOUND when
++                      the entire variable list has been returned,
++                      otherwise non-zero status code
++ */
++static efi_status_t parse_uboot_variable(char *variable,
++                                       efi_uintn_t *variable_name_size,
++                                       u16 *variable_name,
++                                       const efi_guid_t *vendor,
++                                       u32 *attributes)
++{
++      char *guid, *name, *end, c;
++      unsigned long name_len;
++      u16 *p;
++
++      guid = strchr(variable, '_');
++      if (!guid)
++              return EFI_INVALID_PARAMETER;
++      guid++;
++      name = strchr(guid, '_');
++      if (!name)
++              return EFI_INVALID_PARAMETER;
++      name++;
++      end = strchr(name, '=');
++      if (!end)
++              return EFI_INVALID_PARAMETER;
++
++      name_len = end - name;
++      if (*variable_name_size < (name_len + 1)) {
++              *variable_name_size = name_len + 1;
++              return EFI_BUFFER_TOO_SMALL;
++      }
++      end++; /* point to value */
++
++      /* variable name */
++      p = variable_name;
++      utf8_utf16_strncpy(&p, name, name_len);
++      variable_name[name_len] = 0;
++      *variable_name_size = name_len + 1;
++
++      /* guid */
++      c = *(name - 1);
++      *(name - 1) = '\0'; /* guid need be null-terminated here */
++      uuid_str_to_bin(guid, (unsigned char *)vendor, UUID_STR_FORMAT_GUID);
++      *(name - 1) = c;
++
++      /* attributes */
++      parse_attr(end, attributes);
++
++      return EFI_SUCCESS;
++}
++
++/**
++ * efi_get_next_variable_name() - enumerate the current variable names
++ * @variable_name_size:       size of variable_name buffer in byte
++ * @variable_name:    name of uefi variable's name in u16
++ * @vendor:           vendor's guid
++ *
++ * This function implements the GetNextVariableName service.
++ *
++ * See the Unified Extensible Firmware Interface (UEFI) specification for
++ * details: http://wiki.phoenix.com/wiki/index.php/
++ *            EFI_RUNTIME_SERVICES#GetNextVariableName.28.29
++ *
++ * Return: status code
++ */
+ efi_status_t EFIAPI efi_get_next_variable_name(efi_uintn_t *variable_name_size,
+-                                             u16 *variable_name,
+-                                             efi_guid_t *vendor)
++                                               u16 *variable_name,
++                                               efi_guid_t *vendor)
+ {
++      char *native_name, *variable;
++      ssize_t name_len, list_len;
++      char regex[256];
++      char * const regexlist[] = {regex};
++      u32 attributes;
++      int i;
++      efi_status_t ret;
++
+       EFI_ENTRY("%p \"%ls\" %pUl", variable_name_size, variable_name, vendor);
+ 
+-      return EFI_EXIT(EFI_DEVICE_ERROR);
++      if (!variable_name_size || !variable_name || !vendor)
++              return EFI_EXIT(EFI_INVALID_PARAMETER);
++
++      if (variable_name[0]) {
++              /* check null-terminated string */
++              for (i = 0; i < *variable_name_size; i++)
++                      if (!variable_name[i])
++                              break;
++              if (i >= *variable_name_size)
++                      return EFI_EXIT(EFI_INVALID_PARAMETER);
++
++              /* search for the last-returned variable */
++              ret = efi_to_native(&native_name, variable_name, vendor);
++              if (ret)
++                      return EFI_EXIT(ret);
++
++              name_len = strlen(native_name);
++              for (variable = efi_variables_list; variable && *variable;) {
++                      if (!strncmp(variable, native_name, name_len) &&
++                          variable[name_len] == '=')
++                              break;
++
++                      variable = strchr(variable, '\n');
++                      if (variable)
++                              variable++;
++              }
++
++              free(native_name);
++              if (!(variable && *variable))
++                      return EFI_EXIT(EFI_INVALID_PARAMETER);
++
++              /* next variable */
++              variable = strchr(variable, '\n');
++              if (variable)
++                      variable++;
++              if (!(variable && *variable))
++                      return EFI_EXIT(EFI_NOT_FOUND);
++      } else {
++              /*
++               *new search: free a list used in the previous search
++               */
++              free(efi_variables_list);
++              efi_variables_list = NULL;
++              efi_cur_variable = NULL;
++
++              snprintf(regex, 256, "efi_.*-.*-.*-.*-.*_.*");
++              list_len = hexport_r(&env_htab, '\n',
++                                   H_MATCH_REGEX | H_MATCH_KEY,
++                                   &efi_variables_list, 0, 1, regexlist);
++              /* 1 indicates that no match was found */
++              if (list_len <= 1)
++                      return EFI_EXIT(EFI_NOT_FOUND);
++
++              variable = efi_variables_list;
++      }
++
++      ret = parse_uboot_variable(variable, variable_name_size, variable_name,
++                                 vendor, &attributes);
++
++      return EFI_EXIT(ret);
+ }
+ 
+-/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#SetVariable.28.29 */
++/**
++ * efi_efi_set_variable() - set value of a UEFI variable
++ *
++ * This function implements the SetVariable runtime service.
++ *
++ * See the Unified Extensible Firmware Interface (UEFI) specification for
++ * details.
++ *
++ * @variable_name:    name of the variable
++ * @vendor:           vendor GUID
++ * @attributes:               attributes of the variable
++ * @data_size:                size of the buffer with the variable value
++ * @data:             buffer with the variable value
++ * Return:            status code
++ */
+ efi_status_t EFIAPI efi_set_variable(u16 *variable_name, efi_guid_t *vendor,
+                                    u32 attributes, efi_uintn_t data_size,
+                                    void *data)



Home | Main Index | Thread Index | Old Index