Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Feb 2017 20:09:25 +0000 (UTC)
From:      Diane Bruce <db@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r433336 - in head/sysutils/u-boot-rpi3: . files
Message-ID:  <201702042009.v14K9P5k058090@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: db
Date: Sat Feb  4 20:09:25 2017
New Revision: 433336
URL: https://svnweb.freebsd.org/changeset/ports/433336

Log:
  Use github for psci monitor  [brd]
  Chase upstream
  Redo save_boot_params in lowlevel__init.S to add reserve_memory remove
  save_boot_params from rpi.c
  Note network code diffs are now upstreamed already
  
  PR:		ports/216757
  Submitted by:	brd

Added:
  head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_lowlevel__init.S   (contents, props changed)
Deleted:
  head/sysutils/u-boot-rpi3/files/patch-include_efi__api.h
  head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__console.c
  head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__net.c
Modified:
  head/sysutils/u-boot-rpi3/Makefile
  head/sysutils/u-boot-rpi3/distinfo
  head/sysutils/u-boot-rpi3/files/patch-arch_arm_include_asm_system.h
  head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c
  head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h
  head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__disk.c

Modified: head/sysutils/u-boot-rpi3/Makefile
==============================================================================
--- head/sysutils/u-boot-rpi3/Makefile	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/Makefile	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,15 +1,14 @@
 # $FreeBSD$
 
 PORTNAME=	u-boot
-PORTVERSION=	2016.11
-PORTREVISION=	1
+PORTVERSION=	2017.01
 CATEGORIES=	sysutils
 MASTER_SITES=	ftp://ftp.denx.de/pub/u-boot/ \
 		LOCAL/db:bootfiles
 PKGNAMESUFFIX=	-rpi3
-DISTFILES=	u-boot-${PORTVERSION}.tar.bz2 \
+DISTFILES=	u-boot-${PORTVERSION}.tar.bz2:uboot \
 		rpi3-boot-files-2016.05.tar.bz2:bootfiles \
-		rpi3-psci-monitor-master.tgz:bootfiles
+		rpi3-psci-monitor-master.tgz:pscimon
 
 MAINTAINER=	db@FreeBSD.org
 COMMENT=	Cross-build U-Boot loader for RPi3
@@ -18,6 +17,12 @@ LICENSE=	GPLv2
 
 BUILD_DEPENDS=	aarch64-none-elf-gcc:devel/aarch64-none-elf-gcc
 
+USE_GITHUB=	nodefault
+GH_ACCOUNT=	gonzoua:pscimon
+GH_PROJECT=	rpi3-psci-monitor:pscimon
+GIT_TAG=	5782052
+GH_TAGNAME=	${GIT_TAG}:pscimon
+
 NO_ARCH=	yes
 
 WRKSRC=		${WRKDIR}/u-boot-${DISTVERSION}
@@ -25,7 +30,7 @@ USES=		gmake tar:bzip2
 SSP_UNSAFE=	yes # cross-LD does not support -fstack-protector
 
 WRK_BOOTFILES=	${WRKDIR}/rpi3-boot-files-2016.05
-PSCI_MONITOR=	rpi3-psci-monitor-master
+PSCI_MONITOR=	rpi3-psci-monitor-${GIT_TAG}
 PSCI_DIR=	${WRKDIR}/${PSCI_MONITOR}
 
 U_BOOT_DIR=	share/u-boot/${PORTNAME}${PKGNAMESUFFIX}
@@ -48,7 +53,6 @@ MAKE_ARGS+=	ARCH=arm \
 		CONFIG_EFI=y
 
 do-configure:
-	(cd ${WRKDIR}; tar xvf ${DISTDIR}/${PSCI_MONITOR}.tgz)
 	(cd ${WRKSRC}; ${GMAKE} rpi_3_defconfig)
 
 do-build:
@@ -60,6 +64,7 @@ do-build:
 # are capable of booting u-boot.bin directly.  Also copy the entire
 # contents of the bootfiles distribution (these are proprietary binary
 # files required to boot).
+# Also include the armstub8.bin needed to go SMP on RPI3
 do-install:
 	${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}
 	${INSTALL_DATA} ${WRKSRC}/u-boot.bin ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/

Modified: head/sysutils/u-boot-rpi3/distinfo
==============================================================================
--- head/sysutils/u-boot-rpi3/distinfo	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/distinfo	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,7 +1,9 @@
-TIMESTAMP = 1486071382
-SHA256 (u-boot-2016.11.tar.bz2) = 45813e6565dcc0436abe6752624324cdbf5f3ac106570d76d32b46ec529bcdc8
-SIZE (u-boot-2016.11.tar.bz2) = 12019669
+TIMESTAMP = 1486166232
+SHA256 (u-boot-2017.01.tar.bz2) = 6c425175f93a4bcf2ec9faf5658ef279633dbd7856a293d95bd1ff516528ecf2
+SIZE (u-boot-2017.01.tar.bz2) = 12224884
 SHA256 (rpi3-boot-files-2016.05.tar.bz2) = 8d5a2e453c9140d989133bc7cd991456138f4eb6c9722cd9eee4af4c1722e216
 SIZE (rpi3-boot-files-2016.05.tar.bz2) = 6905733
 SHA256 (rpi3-psci-monitor-master.tgz) = 47bbda7baede4e0a018869e9a7a9a05e37de5f8255ce6b5939c90bbd4f42f5a2
 SIZE (rpi3-psci-monitor-master.tgz) = 5033
+SHA256 (gonzoua-rpi3-psci-monitor-5782052_GH0.tar.gz) = 0d1095492a31a6bcb726b688a75769959099bc4d1701c888e46711b1d528c3ae
+SIZE (gonzoua-rpi3-psci-monitor-5782052_GH0.tar.gz) = 5110

Modified: head/sysutils/u-boot-rpi3/files/patch-arch_arm_include_asm_system.h
==============================================================================
--- head/sysutils/u-boot-rpi3/files/patch-arch_arm_include_asm_system.h	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/files/patch-arch_arm_include_asm_system.h	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,6 +1,6 @@
---- arch/arm/include/asm/system.h.orig	2016-11-14 16:27:11 UTC
+--- arch/arm/include/asm/system.h.orig	2017-01-09 16:57:05 UTC
 +++ arch/arm/include/asm/system.h
-@@ -201,22 +201,6 @@ void __noreturn psci_system_off(void);
+@@ -329,22 +329,6 @@ void psci_arch_init(void);
   * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3);
   */
  
@@ -23,7 +23,7 @@
  #ifdef CONFIG_ARMV7_LPAE
  void switch_to_hypervisor_ret(void);
  #endif
-@@ -410,6 +394,22 @@ void mmu_page_table_flush(unsigned long 
+@@ -538,6 +522,22 @@ void mmu_page_table_flush(unsigned long 
  
  #ifndef __ASSEMBLY__
  /**

Added: head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_lowlevel__init.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_lowlevel__init.S	Sat Feb  4 20:09:25 2017	(r433336)
@@ -0,0 +1,28 @@
+--- board/raspberrypi/rpi/lowlevel_init.S.orig	2017-01-09 16:57:05 UTC
++++ board/raspberrypi/rpi/lowlevel_init.S
+@@ -9,10 +9,15 @@
+ 
+ .align 8
+ .global fw_dtb_pointer
+-fw_dtb_pointer:
++
+ #ifdef CONFIG_ARM64
++fw_dtb_pointer:
++	.dword 0x0
++.global reserve_memory
++reserve_memory:	
+ 	.dword 0x0
+ #else
++fw_dtb_pointer:
+ 	.word 0x0
+ #endif
+ 
+@@ -28,6 +33,8 @@ save_boot_params:
+ #ifdef CONFIG_ARM64
+ 	adr	x8, fw_dtb_pointer
+ 	str	x0, [x8]
++	adr	x8, reserve_memory
++	str	x1, [x8]
+ #else
+ 	str	r2, fw_dtb_pointer
+ #endif

Modified: head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c
==============================================================================
--- head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,6 +1,6 @@
---- board/raspberrypi/rpi/rpi.c.orig	2016-11-14 16:27:11 UTC
+--- board/raspberrypi/rpi/rpi.c.orig	2017-01-09 16:57:05 UTC
 +++ board/raspberrypi/rpi/rpi.c
-@@ -13,6 +13,7 @@
+@@ -14,6 +14,7 @@
  #include <lcd.h>
  #include <memalign.h>
  #include <mmc.h>
@@ -8,21 +8,20 @@
  #include <asm/gpio.h>
  #include <asm/arch/mbox.h>
  #include <asm/arch/sdhci.h>
-@@ -253,6 +254,22 @@ static struct mm_region bcm2837_mem_map[
+@@ -27,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;
+ 
+ /* From lowlevel_init.S */
+ extern unsigned long fw_dtb_pointer;
+-
++extern unsigned long reserve_memory;
+ 
+ struct msg_get_arm_mem {
+ 	struct bcm2835_mbox_hdr hdr;
+@@ -220,6 +221,12 @@ static struct mm_region bcm2837_mem_map[
  };
  
  struct mm_region *mem_map = bcm2837_mem_map;
 +
-+static u64 fw_fdt_address  __attribute__ ((section(".data")));
-+static u64 reserve_memory  __attribute__ ((section(".data")));
-+
-+void save_boot_params(u64 x0, u64 x1, u64 x2, u64 x3)
-+{
-+	fw_fdt_address = x0;
-+	reserve_memory = x1;
-+	save_boot_params_ret();
-+}
-+
 +void dram_init_banksize(void)
 +{
 +	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + reserve_memory;
@@ -31,13 +30,13 @@
  #endif
  
  int dram_init(void)
-@@ -362,6 +379,10 @@ int misc_init_r(void)
+@@ -355,6 +362,10 @@ int misc_init_r(void)
  	set_board_info();
  #endif
  	set_serial_number();
 +#ifdef CONFIG_ARM64
-+	if (fw_fdt_address)
-+		setenv_hex("fdt_addr_r", (ulong)fw_fdt_address);
++	if (fw_dtb_pointer)
++		setenv_hex("fdt_addr_r", (ulong)fw_dtb_pointer);
 +#endif
  
  	return 0;

Modified: head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h
==============================================================================
--- head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,6 +1,6 @@
---- include/configs/rpi.h.orig	2016-11-14 16:27:11 UTC
+--- include/configs/rpi.h.orig	2017-01-09 16:57:05 UTC
 +++ include/configs/rpi.h
-@@ -104,11 +104,13 @@
+@@ -99,11 +99,13 @@
  #endif
  
  /* Console UART */

Modified: head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__disk.c
==============================================================================
--- head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__disk.c	Sat Feb  4 18:28:40 2017	(r433335)
+++ head/sysutils/u-boot-rpi3/files/patch-lib_efi__loader_efi__disk.c	Sat Feb  4 20:09:25 2017	(r433336)
@@ -1,4 +1,4 @@
---- lib/efi_loader/efi_disk.c.orig	2016-11-14 16:27:11 UTC
+--- lib/efi_loader/efi_disk.c.orig	2017-01-09 16:57:05 UTC
 +++ lib/efi_loader/efi_disk.c
 @@ -197,11 +197,13 @@ static void efi_disk_add_dev(const char 
  			     const char *if_typename,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702042009.v14K9P5k058090>