On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
:----- Forwarded message from Peter Hessler <[email protected]> -----
:taken from Icenowy Zheng's repository,
:commit bd656cab0c3e0669e977641c15095f32d7b0731f
:
:This gives us basic support for the Pine64 Pinebook
:
:OK?
:
:$ sysctl hw
:hw.machine=arm64
:hw.model=ARM Cortex-A53 r0p4
:hw.ncpu=1
:hw.byteorder=1234
:hw.pagesize=4096
:hw.disknames=sd0:d76c5b9369f79257
:hw.diskcount=1
:hw.product=Pinebook
:hw.physmem=2021924864
:hw.usermem=2021912576
:hw.ncpufound=1
:hw.allowpowerdown=1
:
:
Updated to chase rc3, move new files to file/, slight simplification to
the defconfig.
OK?
Index: sysutils/u-boot/Makefile
===================================================================
RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 Makefile
--- sysutils/u-boot/Makefile 29 Aug 2017 07:14:50 -0000 1.26
+++ sysutils/u-boot/Makefile 31 Aug 2017 08:37:57 -0000
@@ -7,6 +7,7 @@ FLAVOR?= arm
COMMENT= U-Boot firmware
VERSION= 2017.09-rc3
+REVISION= 0
DISTNAME= u-boot-${VERSION}
PKGNAME= u-boot-${FLAVOR}-${VERSION:S/-//}
FULLPKGNAME= ${PKGNAME}
@@ -57,6 +58,7 @@ SUNXI64=\
orangepi_prime \
orangepi_win \
pine64_plus \
+ pinebook \
sopine_baseboard
BOARDS=\
mvebu_espressobin-88f3720 \
@@ -140,6 +142,9 @@ pre-build:
.for f in ${MODPY_ADJ_FILES}
${MODPY_BIN_ADJ} ${WRKSRC}/${f}
.endfor
+ cp ${FILESDIR}/pinebook_defconfig ${WRKSRC}/configs/
+ cp ${FILESDIR}/sun50i-a64-pinebook.dts ${WRKSRC}/arch/arm/dts/
+ cp ${FILESDIR}/sun50i-a64-pine64-common.dtsi ${WRKSRC}/arch/arm/dts/
do-build:
.for BOARD in ${BOARDS}
Index: sysutils/u-boot/files/pinebook_defconfig
===================================================================
RCS file: sysutils/u-boot/files/pinebook_defconfig
diff -N sysutils/u-boot/files/pinebook_defconfig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sysutils/u-boot/files/pinebook_defconfig 30 Aug 2017 17:40:34 -0000
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN=""
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
Index: sysutils/u-boot/files/sun50i-a64-pinebook.dts
===================================================================
RCS file: sysutils/u-boot/files/sun50i-a64-pinebook.dts
diff -N sysutils/u-boot/files/sun50i-a64-pinebook.dts
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sysutils/u-boot/files/sun50i-a64-pinebook.dts 30 Aug 2017 17:42:18
-0000
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "sun50i-a64-pine64.dts"
+
+/ {
+ model = "Pinebook";
+ compatible = "pine64,pinebook", "allwinner,sun50i-a64";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory {
+ reg = <0x40000000 0x40000000>;
+ };
+};
+
+&mmc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
+ vmmc-supply = <®_vcc3v3>;
+ cd-gpios = <&pio 5 6 0>;
+ cd-inverted;
+ disable-wp;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
Index: sysutils/u-boot/patches/patch-arch_arm_dts_Makefile
===================================================================
RCS file: sysutils/u-boot/patches/patch-arch_arm_dts_Makefile
diff -N sysutils/u-boot/patches/patch-arch_arm_dts_Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sysutils/u-boot/patches/patch-arch_arm_dts_Makefile 27 Aug 2017 19:16:11
-0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: arch/arm/dts/Makefile
+--- arch/arm/dts/Makefile.orig
++++ arch/arm/dts/Makefile
+@@ -338,7 +338,8 @@ dtb-$(CONFIG_MACH_SUN50I) += \
+ sun50i-a64-bananapi-m64.dtb \
+ sun50i-a64-orangepi-win.dtb \
+ sun50i-a64-pine64-plus.dtb \
+- sun50i-a64-pine64.dtb
++ sun50i-a64-pine64.dtb \
++ sun50i-a64-pinebook.dtb
+ dtb-$(CONFIG_MACH_SUN9I) += \
+ sun9i-a80-optimus.dtb \
+ sun9i-a80-cubieboard4.dtb \
Index: sysutils/u-boot/pkg/PFRAG.aarch64
===================================================================
RCS file: /cvs/openbsd/ports/sysutils/u-boot/pkg/PFRAG.aarch64,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 PFRAG.aarch64
--- sysutils/u-boot/pkg/PFRAG.aarch64 29 Aug 2017 07:14:50 -0000 1.6
+++ sysutils/u-boot/pkg/PFRAG.aarch64 30 Aug 2017 10:28:37 -0000
@@ -62,6 +62,13 @@ share/u-boot/pine64_plus/u-boot-sunxi-wi
share/u-boot/pine64_plus/u-boot.bin
share/u-boot/pine64_plus/u-boot.img
share/u-boot/pine64_plus/u-boot.itb
+share/u-boot/pinebook/
+share/u-boot/pinebook/sunxi-spl.bin
+share/u-boot/pinebook/u-boot
+share/u-boot/pinebook/u-boot-sunxi-with-spl.bin
+share/u-boot/pinebook/u-boot.bin
+share/u-boot/pinebook/u-boot.img
+share/u-boot/pinebook/u-boot.itb
share/u-boot/rpi_3/
share/u-boot/rpi_3/u-boot
share/u-boot/rpi_3/u-boot.bin
--
While money can't buy happiness, it certainly lets you choose your own
form of misery.