Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils Add a u-boot package for the Firefly / Libre ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ca31b00cb088
branches:  trunk
changeset: 435086:ca31b00cb088
user:      thorpej <thorpej%pkgsrc.org@localhost>
date:      Tue Jun 30 14:40:05 2020 +0000

description:
Add a u-boot package for the Firefly / Libre Computer ROC-RK3328-CC.

diffstat:

 sysutils/Makefile                                           |   3 +-
 sysutils/u-boot-roc-rk3328-cc/DESCR                         |   5 +
 sysutils/u-boot-roc-rk3328-cc/Makefile                      |  26 +++++++
 sysutils/u-boot-roc-rk3328-cc/PLIST                         |   3 +
 sysutils/u-boot-roc-rk3328-cc/distinfo                      |   7 +
 sysutils/u-boot-roc-rk3328-cc/files/installboot.plist       |  47 +++++++++++++
 sysutils/u-boot-roc-rk3328-cc/patches/patch-include_image.h |  37 ++++++++++
 7 files changed, 127 insertions(+), 1 deletions(-)

diffs (166 lines):

diff -r c4f7e694a0f9 -r ca31b00cb088 sysutils/Makefile
--- a/sysutils/Makefile Tue Jun 30 14:35:21 2020 +0000
+++ b/sysutils/Makefile Tue Jun 30 14:40:05 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.889 2020/06/26 23:27:24 gutteridge Exp $
+# $NetBSD: Makefile,v 1.890 2020/06/30 14:40:05 thorpej Exp $
 #
 
 COMMENT=       System utilities
@@ -678,6 +678,7 @@
 SUBDIR+=       u-boot-pinebook
 SUBDIR+=       u-boot-pinebook-pro
 SUBDIR+=       u-boot-pocketchip
+SUBDIR+=       u-boot-roc-rk3328-cc
 SUBDIR+=       u-boot-rock64
 SUBDIR+=       u-boot-rockpro64
 SUBDIR+=       u-boot-rockpro64-ayufan
diff -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/DESCR       Tue Jun 30 14:40:05 2020 +0000
@@ -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 Firefly ROC-RK3328-CC.
diff -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/Makefile    Tue Jun 30 14:40:05 2020 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+
+UBOOT_TARGET=          roc-rk3328-cc
+UBOOT_CONFIG=          roc-cc-rk3328_defconfig
+UBOOT_BIN=             u-boot-rockchip.bin
+
+UBOOT_INSTALLBOOT_PLIST=       installboot.plist
+
+UBOOT_VERSION=         2020.07-rc4
+
+DISTINFO_FILE=         ${.CURDIR}/../../sysutils/u-boot-roc-rk3328-cc/distinfo
+PATCHDIR=              ${.CURDIR}/../../sysutils/u-boot-roc-rk3328-cc/patches
+DISTFILES=             ${DEFAULT_DISTFILES}
+
+# 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 -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/PLIST       Tue Jun 30 14:40:05 2020 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+share/u-boot/roc-rk3328-cc/installboot.plist
+share/u-boot/roc-rk3328-cc/u-boot-rockchip.bin
diff -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/distinfo    Tue Jun 30 14:40:05 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/06/30 14:40:05 thorpej Exp $
+
+SHA1 (u-boot-2020.07-rc4.tar.bz2) = 6bd6aaf18c580e0e24221b45de45958b94580df0
+RMD160 (u-boot-2020.07-rc4.tar.bz2) = 21df7e0cff66843e963d07d22c508d81305af35a
+SHA512 (u-boot-2020.07-rc4.tar.bz2) = 81fb2cfaabe2e20addc174798fa7f6506d51bd32aafac6698758417575bd85bb95d476b619e8d78480c0ccef6424f8b6de59c76bc48a555b7b4105acf194f3f8
+Size (u-boot-2020.07-rc4.tar.bz2) = 15333666 bytes
+SHA1 (patch-include_image.h) = 46f9efc0b9bbeea407e18f2b7e02b265dc0b58e1
diff -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/files/installboot.plist
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/files/installboot.plist     Tue Jun 30 14:40:05 2020 +0000
@@ -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>firefly,roc-rk3328-cc</key>
+       <dict>
+               <key>description</key>
+               <string>Firefly roc-rk3328-cc</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 -r c4f7e694a0f9 -r ca31b00cb088 sysutils/u-boot-roc-rk3328-cc/patches/patch-include_image.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-roc-rk3328-cc/patches/patch-include_image.h       Tue Jun 30 14:40:05 2020 +0000
@@ -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