From owner-svn-ports-head@FreeBSD.ORG Fri Jan 2 02:18:39 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 736CAC84; Fri, 2 Jan 2015 02:18:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EAB21887; Fri, 2 Jan 2015 02:18:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t022IdKd000832; Fri, 2 Jan 2015 02:18:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t022IcnD000828; Fri, 2 Jan 2015 02:18:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501020218.t022IcnD000828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 2 Jan 2015 02:18:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r376038 - in head/sysutils/u-boot-rpi: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 02:18:39 -0000 Author: ian (src committer) Date: Fri Jan 2 02:18:37 2015 New Revision: 376038 URL: https://svnweb.freebsd.org/changeset/ports/376038 QAT: https://qat.redports.org/buildarchive/r376038/ Log: Add all the files required to boot a Raspberry Pi to the port. Also, change the default environment variables to be similar to wandboard and beaglebone. Approved by: imp Modified: head/sysutils/u-boot-rpi/Makefile head/sysutils/u-boot-rpi/distinfo head/sysutils/u-boot-rpi/files/patch-include_configs_rpi__b.h head/sysutils/u-boot-rpi/pkg-descr Modified: head/sysutils/u-boot-rpi/Makefile ============================================================================== --- head/sysutils/u-boot-rpi/Makefile Fri Jan 2 02:13:49 2015 (r376037) +++ head/sysutils/u-boot-rpi/Makefile Fri Jan 2 02:18:37 2015 (r376038) @@ -2,9 +2,16 @@ PORTNAME= u-boot PORTVERSION= 2013.01 +PORTREVISION= 1 CATEGORIES= sysutils +MASTER_SITES= GH:uboot \ + http://distcache.FreeBSD.org/local-distfiles/ian/:bootfiles \ + http://distcache.us-east.FreeBSD.org/local-distfiles/ian/:bootfiles \ + http://distcache.eu.FreeBSD.org/local-distfiles/ian/:bootfiles \ + http://distcache.us-west.FreeBSD.org/local-distfiles/ian/:bootfiles PKGNAMESUFFIX= -rpi -DISTNAME= u-boot-${PORTVERSION}-${GH_ACCOUNT}-${GH_PROJECT} +DISTFILES= u-boot-${PORTVERSION}-${GH_ACCOUNT}-${GH_PROJECT}.tar.gz:uboot \ + rpi-boot-files-2014.10_1.tar.bz2:bootfiles MAINTAINER= ian@FreeBSD.org COMMENT= Cross-build U-Boot loader for Raspberry Pi @@ -26,9 +33,18 @@ WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PR USES= gmake SSP_UNSAFE= yes # cross-build static linking dies with -fstack-protector +WRK_BOOTFILES= ${WRKDIR}/rpi-boot-files + U_BOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} -PLIST_FILES= ${U_BOOT_DIR}/uboot.img \ - ${U_BOOT_DIR}/README +PLIST_FILES= ${U_BOOT_DIR}/u-boot.img \ + ${U_BOOT_DIR}/LICENCE.broadcom \ + ${U_BOOT_DIR}/README \ + ${U_BOOT_DIR}/bootcode.bin \ + ${U_BOOT_DIR}/config.txt \ + ${U_BOOT_DIR}/fixup.dat \ + ${U_BOOT_DIR}/fixup_cd.dat \ + ${U_BOOT_DIR}/start.elf \ + ${U_BOOT_DIR}/start_cd.elf MAKE_ARGS+= ARCH=arm \ CROSS_COMPILE=arm-none-eabi- \ @@ -40,12 +56,13 @@ do-configure: # The output of the u-boot build process is u-boot.bin. We have to put a # standard (for the RPi) image header on the front of it, and the resulting -# file is named uboot.img (without a dash for historical reasons). -IMGFILE=${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/uboot.img +# file is named u-boot.img. Also copy the entire contents of the bootfiles +# distribution (these are proprietary binary files required to boot). +IMGFILE=${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/u-boot.img do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR} ${GZCAT} ${FILESDIR}/imgprefix.bin.gz >${IMGFILE} ${CAT} ${WRKSRC}/u-boot.bin >>${IMGFILE} - ${CP} ${.CURDIR}/pkg-descr ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/README + ${CP} ${WRK_BOOTFILES}/* ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/ .include Modified: head/sysutils/u-boot-rpi/distinfo ============================================================================== --- head/sysutils/u-boot-rpi/distinfo Fri Jan 2 02:13:49 2015 (r376037) +++ head/sysutils/u-boot-rpi/distinfo Fri Jan 2 02:18:37 2015 (r376038) @@ -1,2 +1,4 @@ SHA256 (u-boot-2013.01-gonzoua-u-boot-pi.tar.gz) = 29a0d6ffa952483adf37d066bc1823f5f0d62e6534829d6190e9880ef9354f42 SIZE (u-boot-2013.01-gonzoua-u-boot-pi.tar.gz) = 13850640 +SHA256 (rpi-boot-files-2014.10_1.tar.bz2) = 1c9aaefe6c9558f7e60844b3cb00538eb42d5c45937f3da464cad65fcae4a70b +SIZE (rpi-boot-files-2014.10_1.tar.bz2) = 1784837 Modified: head/sysutils/u-boot-rpi/files/patch-include_configs_rpi__b.h ============================================================================== --- head/sysutils/u-boot-rpi/files/patch-include_configs_rpi__b.h Fri Jan 2 02:13:49 2015 (r376037) +++ head/sysutils/u-boot-rpi/files/patch-include_configs_rpi__b.h Fri Jan 2 02:18:37 2015 (r376038) @@ -1,6 +1,6 @@ --- include/configs/rpi_b.h.orig 2012-11-28 01:28:06 UTC +++ include/configs/rpi_b.h -@@ -183,4 +183,57 @@ +@@ -183,4 +183,64 @@ #define CONFIG_INITRD_TAG #define CONFIG_CMD_BMP @@ -21,40 +21,47 @@ +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE 0 +#define FAT_ENV_PART 1 -+#define FAT_ENV_FILE "uboot.env" ++#define FAT_ENV_FILE "u-boot.env" +#define CONFIG_CMD_SAVEENV + +/* Create a small(ish) boot environment for FreeBSD. */ +#undef CONFIG_EXTRA_ENV_SETTINGS +#define CONFIG_EXTRA_ENV_SETTINGS \ -+ "bootfile=ubldr\0" \ -+ "fatdev=mmc 0:1\0" \ -+ "loaderdev=disk\0" \ ++ "loadaddr=0x00200000\0" \ + "stdin=serial\0" \ + "stderr=serial,lcd\0" \ + "stdout=serial,lcd\0" \ -+ "uenv_file=uEnv.txt\0" \ -+ \ -+ "fatboot=" \ -+ "env exists user_fatboot && run user_fatboot; " \ ++ "Fatboot=" \ ++ "env exists loaderdev || env set loaderdev ${fatdev}; " \ ++ "env exists UserFatboot && run UserFatboot; " \ ++ "echo Booting from: ${fatdev} ${bootfile}; " \ + "fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf; " \ + "\0" \ -+ "netboot=" \ ++ "Netboot=" \ + "env exists ethact || usb start; " \ -+ "env exists user_netboot && run user_netboot; " \ ++ "env exists loaderdev || env set loaderdev net; " \ ++ "env exists UserNetboot && run UserNetboot; " \ + "dhcp ${loadaddr} ${bootfile} && bootelf; " \ + "\0" \ -+ "preboot=" \ ++ "Preboot=" \ + "fdt addr 0x100; " \ -+ "env exists uenv_import && run uenv_import; " \ -+ "env exists user_preboot && run user_preboot; " \ ++ "env exists bootfile || bootfile=ubldr; " \ ++ "env exists uenv_file || uenv_file=uEnv.txt; " \ ++ "env exists SetupFatdev && run SetupFatdev; " \ ++ "env exists SetupUenv && run SetupUenv; " \ ++ "env exists UserPreboot && run UserPreboot; " \ + "\0" \ -+ "uenv_import=" \ ++ "SetupFatdev=" \ ++ "env exists fatdev || fatdev='mmc 0'; " \ ++ "\0" \ ++ "SetupUenv=" \ + "fatload ${fatdev} ${loadaddr} ${uenv_file} && " \ + "env import -t ${loadaddr} ${filesize}; " \ + "\0" + +#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run fatboot" ++#define CONFIG_BOOTCOMMAND "run Fatboot" ++#undef CONFIG_PREBOOT ++#define CONFIG_PREBOOT "run Preboot" + #endif Modified: head/sysutils/u-boot-rpi/pkg-descr ============================================================================== --- head/sysutils/u-boot-rpi/pkg-descr Fri Jan 2 02:13:49 2015 (r376037) +++ head/sysutils/u-boot-rpi/pkg-descr Fri Jan 2 02:18:37 2015 (r376038) @@ -1,7 +1,7 @@ -U-Boot loader for Raspberry Pi +U-Boot loader and related files for Raspberry Pi -To install this bootloader, copy the file uboot.img to the FAT parition -on an SD card. Other files (not part of this package) are also required. +To install this bootloader, copy ALL the files in the share/u-boot/u-boot-rpi +directory to the first partition, formatted as FAT16 or FAT32, on an SD card. This version is patched so that: * ELF and API features are enabled.