Date: Fri, 2 Jan 2015 02:18:38 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> 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 Message-ID: <201501020218.t022IcnD000828@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.port.mk> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501020218.t022IcnD000828>