pkgsrc-WIP-changes archive

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

u-boot-nanopi-r2s: Import u-boot-nanopi-r2s-2020.07 as wip/u-boot-nanopi-r2s



Module Name:	pkgsrc-wip
Committed By:	snow flurry <snow%datagirl.xyz@localhost>
Pushed By:	flurry
Date:		Mon Sep 14 21:36:43 2020 -0700
Changeset:	e7bc8c39bf6aa0319042c178914403cc8aa4927f

Modified Files:
	Makefile
Added Files:
	u-boot-nanopi-r2s/DESCR
	u-boot-nanopi-r2s/Makefile
	u-boot-nanopi-r2s/PLIST
	u-boot-nanopi-r2s/TODO
	u-boot-nanopi-r2s/distinfo
	u-boot-nanopi-r2s/files/installboot.plist
	u-boot-nanopi-r2s/patches/patch-include_image.h

Log Message:
u-boot-nanopi-r2s: Import u-boot-nanopi-r2s-2020.07 as wip/u-boot-nanopi-r2s

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 FriendlyElec NanoPi R2S.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e7bc8c39bf6aa0319042c178914403cc8aa4927f

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

diffstat:
 Makefile                                        |  1 +
 u-boot-nanopi-r2s/DESCR                         |  5 +++
 u-boot-nanopi-r2s/Makefile                      | 30 ++++++++++++++++
 u-boot-nanopi-r2s/PLIST                         |  3 ++
 u-boot-nanopi-r2s/TODO                          |  6 ++++
 u-boot-nanopi-r2s/distinfo                      |  7 ++++
 u-boot-nanopi-r2s/files/installboot.plist       | 47 +++++++++++++++++++++++++
 u-boot-nanopi-r2s/patches/patch-include_image.h | 37 +++++++++++++++++++
 8 files changed, 136 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 348d936b2b..0851f384b4 100644
--- a/Makefile
+++ b/Makefile
@@ -4824,6 +4824,7 @@ SUBDIR+=	typespeed
 SUBDIR+=	typhoon
 SUBDIR+=	u-boot
 SUBDIR+=	u-boot-full
+SUBDIR+=	u-boot-nanopi-r2s
 SUBDIR+=	u-boot-orangepi-pc
 SUBDIR+=	u-boot-pinebook-crust
 SUBDIR+=	uTox-git
diff --git a/u-boot-nanopi-r2s/DESCR b/u-boot-nanopi-r2s/DESCR
new file mode 100644
index 0000000000..3a7ba4e9ee
--- /dev/null
+++ b/u-boot-nanopi-r2s/DESCR
@@ -0,0 +1,5 @@
+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 FriendlyElec NanoPi R2S.
diff --git a/u-boot-nanopi-r2s/Makefile b/u-boot-nanopi-r2s/Makefile
new file mode 100644
index 0000000000..810d4ae214
--- /dev/null
+++ b/u-boot-nanopi-r2s/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+
+UBOOT_TARGET=		nanopi-r2s
+UBOOT_CONFIG=		nanopi-r2s-rk3328_defconfig
+UBOOT_BIN=		u-boot-rockchip.bin
+
+UBOOT_INSTALLBOOT_PLIST=	installboot.plist
+
+UBOOT_VERSION=		2020.07
+MASTER_SITES=		${MASTER_SITE_GITHUB:=blocktrron/}
+GITHUB_PROJECT=		uboot-nanopi-r2s
+GITHUB_TAG=		b8c2aded187e23779a9f565d3577cd46027f0946
+
+DISTINFO_FILE=		${.CURDIR}/../../wip/u-boot-nanopi-r2s/distinfo
+PATCHDIR=		${.CURDIR}/../../wip/u-boot-nanopi-r2s/patches
+DISTFILES=		${DEFAULT_DISTFILES}
+EXTRACT_SUFX=		.tar.gz # keep
+
+# This could be moved to u-boot.mk as long as we don't have support for
+# any imx8 boards.
+CHECK_PORTABILITY_SKIP+=        tools/imx8m_image.sh
+
+# Switch to EL1 before booting kernel (required for 32-bit support)
+PKG_DEFAULT_OPTIONS+=	el1
+
+post-extract:
+	${CP} ${PREFIX}/share/arm-trusted-firmware/rk3328/bl31.elf ${WRKSRC}
+
+.include "../../sysutils/arm-trusted-firmware-rk3328/buildlink3.mk"
+.include "../../sysutils/u-boot/u-boot-arm64.mk"
diff --git a/u-boot-nanopi-r2s/PLIST b/u-boot-nanopi-r2s/PLIST
new file mode 100644
index 0000000000..b70b6f7ab6
--- /dev/null
+++ b/u-boot-nanopi-r2s/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+share/u-boot/nanopi-r2s/installboot.plist
+share/u-boot/nanopi-r2s/u-boot-rockchip.bin
diff --git a/u-boot-nanopi-r2s/TODO b/u-boot-nanopi-r2s/TODO
new file mode 100644
index 0000000000..92ebe44c83
--- /dev/null
+++ b/u-boot-nanopi-r2s/TODO
@@ -0,0 +1,6 @@
+* There's a Linux dts patch to add support for the USB3.0 bus required for the
+  RTL8153, not sure if it would be worth adding the patch to U-Boot
+  (patch url: https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/raw/3e1568437d566bc49c49e68062c7b8bd75fa6e73/0002-arm64-dts-rockchip-add-usb3-controller-node-for-RK33.patch)
+* There was some effort to get this device upstreamed in U-Boot
+  (https://lists.denx.de/pipermail/u-boot/2020-July/420889.html), if/when
+  that happens this package should use upstream instead
diff --git a/u-boot-nanopi-r2s/distinfo b/u-boot-nanopi-r2s/distinfo
new file mode 100644
index 0000000000..232d9ef2b8
--- /dev/null
+++ b/u-boot-nanopi-r2s/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+
+SHA1 (u-boot-2020.07-b8c2aded187e23779a9f565d3577cd46027f0946.tar.gz) = bfb3012d6a9c8f3f4c607966c928bed707e2f339
+RMD160 (u-boot-2020.07-b8c2aded187e23779a9f565d3577cd46027f0946.tar.gz) = ace45cd6c0eed70675690ae22456b6da32fca30f
+SHA512 (u-boot-2020.07-b8c2aded187e23779a9f565d3577cd46027f0946.tar.gz) = 6c45cb274132b3b4acb8c17e00b29e7c9106b57b05d861a408abdee083ab499ee67ecc9eaafc9082e1c07b4f431e790ad810abae7574b0a82043a7830a56dc96
+Size (u-boot-2020.07-b8c2aded187e23779a9f565d3577cd46027f0946.tar.gz) = 19693336 bytes
+SHA1 (patch-include_image.h) = 46f9efc0b9bbeea407e18f2b7e02b265dc0b58e1
diff --git a/u-boot-nanopi-r2s/files/installboot.plist b/u-boot-nanopi-r2s/files/installboot.plist
new file mode 100644
index 0000000000..0bd04f3b15
--- /dev/null
+++ b/u-boot-nanopi-r2s/files/installboot.plist
@@ -0,0 +1,47 @@
+<!-- $NetBSD: installboot.plist,v 1.1 2020/06/30 14:40:05 thorpej Exp $ -->
+<!--
+  Copyright (c) 2020 The NetBSD Foundation, Inc.
+  All rights reserved.
+ 
+  This code is derived from software contributed to The NetBSD Foundation
+  by Jason R. Thorpe.
+ 
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ 
+  THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+-->
+<plist>
+<dict>
+	<key>friendlyarm,nanopi-r2s</key>
+	<dict>
+		<key>description</key>
+		<string>FriendlyElec NanoPi R2S</string>
+		<key>u-boot-install</key>
+		<array>
+			<dict>
+				<key>file-name</key>
+				<string>u-boot-rockchip.bin</string>
+				<key>image-offset</key>
+				<integer>32768</integer>
+			</dict>
+		</array>
+	</dict>
+</dict>
+</plist>
diff --git a/u-boot-nanopi-r2s/patches/patch-include_image.h b/u-boot-nanopi-r2s/patches/patch-include_image.h
new file mode 100644
index 0000000000..c204f67dc2
--- /dev/null
+++ b/u-boot-nanopi-r2s/patches/patch-include_image.h
@@ -0,0 +1,37 @@
+$NetBSD: patch-include_image.h,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+
+Ensure the correct byte order macros are used when image.h is included
+in a host tool.
+
+--- include/image.h.orig	2020-06-20 13:48:00.000000000 +0000
++++ include/image.h	2020-06-20 13:51:12.000000000 +0000
+@@ -16,7 +16,6 @@
+ #define __IMAGE_H__
+ 
+ #include "compiler.h"
+-#include <asm/byteorder.h>
+ #include <stdbool.h>
+ 
+ /* Define this to avoid #ifdefs later on */
+@@ -26,6 +25,13 @@ struct fdt_region;
+ #ifdef USE_HOSTCC
+ #include <sys/types.h>
+ 
++#include <endian.h>
++#if _BYTE_ORDER == _BIG_ENDIAN
++#  include <linux/byteorder/big_endian.h>
++#else
++#  include <linux/byteorder/little_endian.h>
++#endif
++
+ /* new uImage format support enabled on host */
+ #define IMAGE_ENABLE_FIT	1
+ #define IMAGE_ENABLE_OF_LIBFDT	1
+@@ -40,6 +46,7 @@ struct fdt_region;
+ 
+ #else
+ 
++#include <asm/byteorder.h>
+ #include <lmb.h>
+ #include <asm/u-boot.h>
+ #include <command.h>


Home | Main Index | Thread Index | Old Index