pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/u-boot-pinebook Initial import of u-boot-pine...
details: https://anonhg.NetBSD.org/pkgsrc/rev/82c5b1d97a37
branches: trunk
changeset: 368102:82c5b1d97a37
user: jmcneill <jmcneill%pkgsrc.org@localhost>
date: Sun Sep 10 17:00:41 2017 +0000
description:
Initial import of u-boot-pinebook version 2017.09rc2.
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 Pine64 Pinebook.
diffstat:
sysutils/u-boot-pinebook/DESCR | 5 +
sysutils/u-boot-pinebook/Makefile | 30 +++
sysutils/u-boot-pinebook/PLIST | 2 +
sysutils/u-boot-pinebook/distinfo | 10 +
sysutils/u-boot-pinebook/patches/patch-arch_arm_cpu_armv8_Kconfig | 15 +
sysutils/u-boot-pinebook/patches/patch-drivers_video_sunxi_sunxi__de2.c | 100 ++++++++++
sysutils/u-boot-pinebook/patches/patch-include_configs_sunxi-common.h | 19 +
sysutils/u-boot-pinebook/patches/patch-lib_bch.c | 13 +
8 files changed, 194 insertions(+), 0 deletions(-)
diffs (226 lines):
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/DESCR Sun Sep 10 17:00:41 2017 +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 Pine64 Pinebook.
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/Makefile Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+UBOOT_VERSION= 2017.09rc2
+UBOOT_TARGET= pinebook
+UBOOT_CONFIG= pinebook_defconfig
+UBOOT_BIN= u-boot-sunxi-with-spl.bin
+
+# Use anarsoul's fork of mainline U-Boot with Pinebook support patched in
+MASTER_SITES= ${MASTER_SITE_GITHUB:=anarsoul/}
+GITHUB_PROJECT= u-boot-pine64
+GITHUB_TAG= ccba9fb2248b6206cb55452b7623b964b0e02cf4
+DISTNAME= u-boot-${UBOOT_TARGET}-${UBOOT_VERSION}
+EXTRACT_SUFX= .tar.gz
+
+# Switch to EL1 before booting kernel (required for 32-bit support)
+PKG_DEFAULT_OPTIONS+= el1
+
+post-extract:
+ ${CP} ${PREFIX}/share/arm-trusted-firmware/sun50iw1p1/bl31.bin ${WRKSRC}
+
+BUILD_DEPENDS+= arm-trusted-firmware-sun50iw1p1-[0-9]*:../../sysutils/arm-trusted-firmware-sun50iw1p1
+
+post-build:
+ ${CAT} ${WRKSRC}/spl/sunxi-spl.bin ${WRKSRC}/u-boot.itb > ${WRKSRC}/u-boot-sunxi-with-spl.bin
+
+.include "../../sysutils/u-boot/u-boot-arm64.mk"
+
+# Override U-Boot defaults
+DISTINFO_FILE= ${.CURDIR}/distinfo
+PATCHDIR= ${.CURDIR}/patches
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/PLIST Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+share/u-boot/pinebook/u-boot-sunxi-with-spl.bin
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/distinfo Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+SHA1 (u-boot-pinebook-2017.09rc2-ccba9fb2248b6206cb55452b7623b964b0e02cf4.tar.gz) = 7739ac071f86cd2ef61afe89390956dc05ca2ff4
+RMD160 (u-boot-pinebook-2017.09rc2-ccba9fb2248b6206cb55452b7623b964b0e02cf4.tar.gz) = b3fa5901238ac78b90c7b911f1c8a8068f57b921
+SHA512 (u-boot-pinebook-2017.09rc2-ccba9fb2248b6206cb55452b7623b964b0e02cf4.tar.gz) =
0c0c3f45b8c390c8d1e2af4db89085a0eaf6a10cda2cecdabc23db0ca4ff813229ab787f06615d89abcb8dacf5131af5d3740c26ca47e287b38f4e14411758c8
+Size (u-boot-pinebook-2017.09rc2-ccba9fb2248b6206cb55452b7623b964b0e02cf4.tar.gz) = 14440630 bytes
+SHA1 (patch-arch_arm_cpu_armv8_Kconfig) = 63cbbf2e3cebd46793fc03cc8e62297f6dc01aa9
+SHA1 (patch-drivers_video_sunxi_sunxi__de2.c) = a64bd9d6fbe075d9d01d196cfca8658d9ecd4bd2
+SHA1 (patch-include_configs_sunxi-common.h) = b71c28480cc084860d63e95af33bc7eead8ac6ac
+SHA1 (patch-lib_bch.c) = e346680a94696713f6d0e71e965283b9bdfbbdbf
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/patches/patch-arch_arm_cpu_armv8_Kconfig
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/patches/patch-arch_arm_cpu_armv8_Kconfig Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-arch_arm_cpu_armv8_Kconfig,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+--- arch/arm/cpu/armv8/Kconfig.orig 2017-07-10 17:07:38.000000000 +0000
++++ arch/arm/cpu/armv8/Kconfig
+@@ -130,6 +130,10 @@ config ARMV8_PSCI_CPUS_PER_CLUSTER
+ A value 0 or no definition of it works for single cluster system.
+ System with multi-cluster should difine their own exact value.
+
++config ARMV8_SWITCH_TO_EL1
++ bool "Switch to EL1 before booting kernel"
++ default n
++
+ if SYS_HAS_ARMV8_SECURE_BASE
+
+ config ARMV8_SECURE_BASE
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/patches/patch-drivers_video_sunxi_sunxi__de2.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/patches/patch-drivers_video_sunxi_sunxi__de2.c Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,100 @@
+$NetBSD: patch-drivers_video_sunxi_sunxi__de2.c,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+sunxi: setup simplefb for Allwinner DE2
+
+Obtained from https://patchwork.ozlabs.org/patch/759922/
+
+--- drivers/video/sunxi/sunxi_de2.c.orig 2017-09-01 04:53:54.000000000 +0000
++++ drivers/video/sunxi/sunxi_de2.c
+@@ -11,6 +11,8 @@
+ #include <display.h>
+ #include <dm.h>
+ #include <edid.h>
++#include <fdtdec.h>
++#include <fdt_support.h>
+ #include <video.h>
+ #include <asm/global_data.h>
+ #include <asm/io.h>
+@@ -310,3 +312,82 @@ U_BOOT_DRIVER(sunxi_de2) = {
+ U_BOOT_DEVICE(sunxi_de2) = {
+ .name = "sunxi_de2"
+ };
++
++/*
++ * Simplefb support.
++ */
++#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_VIDEO_DT_SIMPLEFB)
++int sunxi_simplefb_setup(void *blob)
++{
++ struct udevice *de2, *hdmi;
++ struct video_priv *de2_priv;
++ struct video_uc_platdata *de2_plat;
++ int mux;
++ int offset, ret;
++ u64 start, size;
++ const char *pipeline = NULL;
++
++ debug("Setting up simplefb\n");
++
++ if (IS_ENABLED(CONFIG_MACH_SUNXI_H3_H5))
++ mux = 0;
++ else
++ mux = 1;
++
++ /* Skip simplefb setting if DE2 / HDMI is not present */
++ ret = uclass_find_device_by_name(UCLASS_VIDEO,
++ "sunxi_de2", &de2);
++ if (ret) {
++ debug("DE2 not present\n");
++ return 0;
++ }
++
++ ret = uclass_find_device_by_name(UCLASS_DISPLAY,
++ "sunxi_lcd", &hdmi);
++ if (ret) {
++ debug("HDMI not present\n");
++ return 0;
++ }
++
++ if (mux == 0)
++ pipeline = "mixer0-lcd0-hdmi";
++ else
++ pipeline = "mixer1-lcd1-hdmi";
++
++ de2_priv = dev_get_uclass_priv(de2);
++ de2_plat = dev_get_uclass_platdata(de2);
++
++ /* Find a prefilled simpefb node, matching out pipeline config */
++ offset = fdt_node_offset_by_compatible(blob, -1,
++ "allwinner,simple-framebuffer");
++ while (offset >= 0) {
++ ret = fdt_stringlist_search(blob, offset, "allwinner,pipeline",
++ pipeline);
++ if (ret == 0)
++ break;
++ offset = fdt_node_offset_by_compatible(blob, offset,
++ "allwinner,simple-framebuffer");
++ }
++ if (offset < 0) {
++ eprintf("Cannot setup simplefb: node not found\n");
++ return 0; /* Keep older kernels working */
++ }
++
++ start = gd->bd->bi_dram[0].start;
++ size = de2_plat->base - start;
++ ret = fdt_fixup_memory_banks(blob, &start, &size, 1);
++ if (ret) {
++ eprintf("Cannot setup simplefb: Error reserving memory\n");
++ return ret;
++ }
++
++ ret = fdt_setup_simplefb_node(blob, offset, de2_plat->base,
++ de2_priv->xsize, de2_priv->ysize,
++ (1 << de2_priv->bpix) / 8 * de2_priv->xsize,
++ "x8r8g8b8");
++ if (ret)
++ eprintf("Cannot setup simplefb: Error setting properties\n");
++
++ return ret;
++}
++#endif /* CONFIG_OF_BOARD_SETUP && CONFIG_VIDEO_DT_SIMPLEFB */
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/patches/patch-include_configs_sunxi-common.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/patches/patch-include_configs_sunxi-common.h Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-include_configs_sunxi-common.h,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+sunxi: setup simplefb for Allwinner DE2
+
+Obtained from https://patchwork.ozlabs.org/patch/759922/
+
+--- include/configs/sunxi-common.h.orig 2017-07-10 17:07:38.000000000 +0000
++++ include/configs/sunxi-common.h
+@@ -293,6 +293,10 @@ extern int soft_i2c_gpio_scl;
+
+ #endif /* CONFIG_VIDEO */
+
++#ifdef CONFIG_VIDEO_DE2
++#define CONFIG_VIDEO_DT_SIMPLEFB
++#endif
++
+ /* Ethernet support */
+ #ifdef CONFIG_SUNXI_EMAC
+ #define CONFIG_PHY_ADDR 1
diff -r 4cc7d44a31d0 -r 82c5b1d97a37 sysutils/u-boot-pinebook/patches/patch-lib_bch.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/u-boot-pinebook/patches/patch-lib_bch.c Sun Sep 10 17:00:41 2017 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-lib_bch.c,v 1.1 2017/09/10 17:00:41 jmcneill Exp $
+
+--- lib/bch.c.orig 2017-07-10 17:07:38.000000000 +0000
++++ lib/bch.c
+@@ -61,7 +61,7 @@
+ #include <linux/bitops.h>
+ #else
+ #include <errno.h>
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/endian.h>
+ #else
+ #include <endian.h>
Home |
Main Index |
Thread Index |
Old Index