pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/u-boot-bananapi-r2 - Update to u-boot-2019.04...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1e8d66c2581b
branches: trunk
changeset: 321546:1e8d66c2581b
user: thorpej <thorpej%pkgsrc.org@localhost>
date: Sun Mar 24 20:50:10 2019 +0000
description:
- Update to u-boot-2019.04-rc4, which works much better on the
MediaTek mt7623 SoC than the previous 2019.01-rc2.
- Pull down the necessary SDMMC binary headers and preloader from BPI's
Github repository, and use them to assemble an image that can be written
directly to an SD card before adding an MBR partition table.
diffstat:
sysutils/u-boot-bananapi-r2/Makefile | 46 +++++++++++++++++++-
sysutils/u-boot-bananapi-r2/PLIST | 4 +-
sysutils/u-boot-bananapi-r2/distinfo | 23 ++++++++--
sysutils/u-boot-bananapi-r2/patches/patch-Makefile | 15 ++++++
sysutils/u-boot-bananapi-r2/patches/patch-lib_bch.c | 39 +++++++++++++++++
5 files changed, 118 insertions(+), 9 deletions(-)
diffs (160 lines):
diff -r d99882e72074 -r 1e8d66c2581b sysutils/u-boot-bananapi-r2/Makefile
--- a/sysutils/u-boot-bananapi-r2/Makefile Sun Mar 24 20:38:25 2019 +0000
+++ b/sysutils/u-boot-bananapi-r2/Makefile Sun Mar 24 20:50:10 2019 +0000
@@ -1,13 +1,53 @@
-# $NetBSD: Makefile,v 1.1 2019/01/03 05:12:49 thorpej Exp $
+# $NetBSD: Makefile,v 1.2 2019/03/24 20:50:10 thorpej Exp $
UBOOT_TARGET= bananapi-r2
UBOOT_CONFIG= mt7623n_bpir2_defconfig
-UBOOT_BIN= u-boot-mtk.bin
+UBOOT_BIN= bpi-r2-sdmmc.img u-boot.bin u-boot-mtk.bin
-UBOOT_VERSION= 2019.01-rc2
+PKGREVISION= 1
+
+UBOOT_VERSION= 2019.04-rc4
DISTINFO_FILE= ${.CURDIR}/../../sysutils/u-boot-bananapi-r2/distinfo
PATCHDIR= ${.CURDIR}/../../sysutils/u-boot-bananapi-r2/patches
DISTFILES= ${DEFAULT_DISTFILES}
+# SDMMC_BOOT-signature
+SDMMC_BOOT_IMG= BPI-R2-HEAD440-0k.img
+DISTFILES+= ${SDMMC_BOOT_IMG}
+SITES.${SDMMC_BOOT_IMG}=${MASTER_SITE_GITHUB:=BPI-SINOVOIP/BPI-R2-bsp/raw/v1.2.1/mt-pack/mtk/bpi-r2/bin/}
+
+# BRLYT-signature
+BRLYT_IMG= BPI-R2-HEAD1-512b.img
+DISTFILES+= ${BRLYT_IMG}
+SITES.${BRLYT_IMG}= ${MASTER_SITE_GITHUB:=BPI-SINOVOIP/BPI-R2-bsp/raw/v1.2.1/mt-pack/mtk/bpi-r2/bin/}
+
+# Preloader
+PRELOADER_BIN= preloader_iotg7623Np1_sd_1600M.bin
+DISTFILES+= ${PRELOADER_BIN}
+SITES.${PRELOADER_BIN}= ${MASTER_SITE_GITHUB:=BPI-SINOVOIP/BPI-R2-bsp/raw/v1.2.1/mt-pack/mtk/bpi-r2/bin/}
+
+# pkgsrc tries to run distfiles that end in .bin; handle manually
+EXTRACT_ONLY= ${DISTFILES:N*.bin}
+
+post-extract:
+ cp ${DISTDIR}/${SDMMC_BOOT_IMG} ${DISTDIR}/${BRLYT_IMG} \
+ ${DISTDIR}/${PRELOADER_BIN} ${WRKDIR}
+
+post-build:
+# Prepare an image that can be written to an SD card. First is the
+# SDMMC_BOOT signature + address of second header (offset 0x200).
+ dd if=${WRKDIR}/${SDMMC_BOOT_IMG} of=${WRKSRC}/bpi-r2-sdmmc.img \
+ bs=512 seek=0
+# Append the second header (BRLTY signature) + address of preloader
+# (offset 0x800).
+ dd if=${WRKDIR}/${BRLYT_IMG} of=${WRKSRC}/bpi-r2-sdmmc.img \
+ bs=512 seek=1
+# Append preloader.
+ dd if=${WRKDIR}/${PRELOADER_BIN} of=${WRKSRC}/bpi-r2-sdmmc.img \
+ bs=1024 seek=2
+# Append U-boot image (offset 320KiB)
+ dd if=${WRKSRC}/u-boot.bin of=${WRKSRC}/bpi-r2-sdmmc.img \
+ bs=1024 seek=320 conv=sync
+
.include "../../sysutils/u-boot/u-boot-arm.mk"
diff -r d99882e72074 -r 1e8d66c2581b sysutils/u-boot-bananapi-r2/PLIST
--- a/sysutils/u-boot-bananapi-r2/PLIST Sun Mar 24 20:38:25 2019 +0000
+++ b/sysutils/u-boot-bananapi-r2/PLIST Sun Mar 24 20:50:10 2019 +0000
@@ -1,2 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2019/01/03 05:12:49 thorpej Exp $
+@comment $NetBSD: PLIST,v 1.2 2019/03/24 20:50:10 thorpej Exp $
+share/u-boot/bananapi-r2/bpi-r2-sdmmc.img
+share/u-boot/bananapi-r2/u-boot.bin
share/u-boot/bananapi-r2/u-boot-mtk.bin
diff -r d99882e72074 -r 1e8d66c2581b sysutils/u-boot-bananapi-r2/distinfo
--- a/sysutils/u-boot-bananapi-r2/distinfo Sun Mar 24 20:38:25 2019 +0000
+++ b/sysutils/u-boot-bananapi-r2/distinfo Sun Mar 24 20:50:10 2019 +0000
@@ -1,7 +1,20 @@
-$NetBSD: distinfo,v 1.1 2019/01/03 05:12:49 thorpej Exp $
+$NetBSD: distinfo,v 1.2 2019/03/24 20:50:10 thorpej Exp $
-SHA1 (u-boot-2019.01-rc2.tar.bz2) = 4dd28d21a8bef3103301e4c15c7d4c88cf992a8b
-RMD160 (u-boot-2019.01-rc2.tar.bz2) = 7ae3ff0a892188665f51595e9fe65b53fd2ef8be
-SHA512 (u-boot-2019.01-rc2.tar.bz2) = d1c76fba9935c3bb7bee67219106af3a05f020cbad6ea2bf4865877d2c67d5ef76ba2d5d49ac623fe8db72fd5adfa5f13894ca80a22d1b0bdbc2549ffdab0815
-Size (u-boot-2019.01-rc2.tar.bz2) = 13253583 bytes
+SHA1 (BPI-R2-HEAD1-512b.img) = ef5ae9707d39654b8d931a0bd8c0825318591e69
+RMD160 (BPI-R2-HEAD1-512b.img) = 098f7c260353034a3d286d2113698c16605cd4b4
+SHA512 (BPI-R2-HEAD1-512b.img) = cd37dd2c3e12033fbc9a4601ef6be54be70a3f6f19fedc79acbc246fc58e66bd1d1e492611632d3a5bb7bc3b8ed0f9900c7e218d4a15252eb7381d4da28af012
+Size (BPI-R2-HEAD1-512b.img) = 1536 bytes
+SHA1 (BPI-R2-HEAD440-0k.img) = a597caa991bcd9693e2f2223f9c247657a89187b
+RMD160 (BPI-R2-HEAD440-0k.img) = a26ecd89e81aad4274fcf784c5fdcb214168273a
+SHA512 (BPI-R2-HEAD440-0k.img) = 1d194649c21fb922f2b0e2f59edbf41dc22c260580a8f25aee0fa1d4ec1cbb7b3a9bf8dc56c9743ec8676b408d4109c2026001b105b1d3caef819b95ca360451
+Size (BPI-R2-HEAD440-0k.img) = 440 bytes
+SHA1 (preloader_iotg7623Np1_sd_1600M.bin) = 51f2d73d6e1e47f9b961ec86b1cd624c8bc5e5d9
+RMD160 (preloader_iotg7623Np1_sd_1600M.bin) = bd13434a35e35ef334fb713ea5d2caec7ca0f663
+SHA512 (preloader_iotg7623Np1_sd_1600M.bin) = 5a5f580956ed9cc558c4b8b75f9dbeba6299d9950bbdbae8f5064d1d60ae7cb42ff89c9dd7f1bddebb955183780f88a731d8c2b71d61970c07e8356a9cc093a5
+Size (preloader_iotg7623Np1_sd_1600M.bin) = 91996 bytes
+SHA1 (u-boot-2019.04-rc4.tar.bz2) = 40bd6eb58ae0048da4221e28ec5fe98d6f4987f9
+RMD160 (u-boot-2019.04-rc4.tar.bz2) = 67c1b0effa8eb18872ed3608dd99c9ed521dc2b2
+SHA512 (u-boot-2019.04-rc4.tar.bz2) = 33a57e4acb51dbe04123055b159a5b3a933ea8340aa81a4148572ee5fc12288413a6c6c0b80b6fe099ac79ea6359be2d9034ead1edfcc0403895f3f8eb56746e
+Size (u-boot-2019.04-rc4.tar.bz2) = 13616834 bytes
+SHA1 (patch-Makefile) = b64ed7e0eac7299e9c621e32b4afb976c8dfda5a
SHA1 (patch-lib_bch.c) = 151e5f311742a7da919359950ccac2521bcfaaff
diff -r d99882e72074 -r 1e8d66c2581b sysutils/u-boot-bananapi-r2/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-bananapi-r2/patches/patch-Makefile Sun Mar 24 20:50:10 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2019/03/24 20:50:10 thorpej Exp $
+
+u-boot: Fix name of python2 interpreter when built in pkgsrc environment
+
+--- Makefile.orig 2019-03-24 19:18:59.903169960 +0000
++++ Makefile
+@@ -359,7 +359,7 @@ YACC = bison
+ AWK = awk
+ PERL = perl
+ PYTHON ?= python
+-PYTHON2 = python2
++PYTHON2 = python2.7
+ PYTHON3 = python3
+ DTC ?= $(objtree)/scripts/dtc/dtc
+ CHECK = sparse
diff -r d99882e72074 -r 1e8d66c2581b sysutils/u-boot-bananapi-r2/patches/patch-lib_bch.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-bananapi-r2/patches/patch-lib_bch.c Sun Mar 24 20:50:10 2019 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-lib_bch.c,v 1.1 2019/03/24 20:50:10 thorpej Exp $
+
+u-boot: fix build on macos
+
+--- lib/bch.c.orig 2018-08-06 22:28:00.000000000 +0000
++++ lib/bch.c
+@@ -61,8 +61,10 @@
+ #include <linux/bitops.h>
+ #else
+ #include <errno.h>
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/endian.h>
++#elif defined(__APPLE__)
++#include <machine/endian.h>
+ #else
+ #include <endian.h>
+ #endif
+@@ -71,7 +73,11 @@
+ #include <string.h>
+
+ #undef cpu_to_be32
++#if defined(__APPLE__)
++#define cpu_to_be32 htonl
++#else
+ #define cpu_to_be32 htobe32
++#endif
+ #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+ #define kmalloc(size, flags) malloc(size)
+ #define kzalloc(size, flags) calloc(1, size)
+@@ -117,7 +123,7 @@ struct gf_poly_deg1 {
+ };
+
+ #ifdef USE_HOSTCC
+-#if !defined(__DragonFly__) && !defined(__FreeBSD__)
++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
+ static int fls(int x)
+ {
+ int r = 32;
Home |
Main Index |
Thread Index |
Old Index