1#!/bin/sh 2# 3# $FreeBSD$ 4# 5 6EMBEDDED_TARGET_ARCH="armv7" 7EMBEDDED_TARGET="arm" 8EMBEDDEDBUILD=1 9EMBEDDEDPORTS="sysutils/u-boot-rpi2 sysutils/rpi-firmware" 10FAT_SIZE="50m -b 1m" 11FAT_TYPE="16" 12IMAGE_SIZE="5120M" 13KERNEL="GENERIC" 14MD_ARGS="-x 63 -y 255" 15RPI_UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" 16RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" 17RPI_OL_DIR="${RPI_FIRMWARE_DIR}/overlays" 18OVERLAYS="mmc.dtbo" 19PART_SCHEME="MBR" 20export BOARDNAME="GENERICSD" 21 22arm_install_uboot_rpi2() { 23 UBOOT_FILES="u-boot.bin" 24 RPI_FIRMWARE_FILES="bootcode.bin config.txt \ 25 fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ 26 start.elf start_cd.elf start_db.elf start_x.elf \ 27 bcm2709-rpi-2-b.dtb" 28 FATMOUNT="${DESTDIR%${KERNEL}}/fat" 29 chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" 30 chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} 31 for _UF in ${UBOOT_FILES}; do 32 chroot ${CHROOTDIR} cp -p ${RPI_UBOOT_DIR}/${_UF} \ 33 ${FATMOUNT}/${_UF} 34 done 35 for _UF in ${RPI_FIRMWARE_FILES}; do 36 chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ 37 ${FATMOUNT}/${_UF} 38 done 39 chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays 40 for _OL in ${OVERLAYS}; do 41 chroot ${CHROOTDIR} cp -p ${RPI_OL_DIR}/${_OL} \ 42 ${FATMOUNT}/overlays/${_OL} 43 done 44 sync 45 umount_loop ${CHROOTDIR}/${FATMOUNT} 46 chroot ${CHROOTDIR} rmdir ${FATMOUNT} 47 48 return 0 49} 50 51arm_install_uboot() { 52 arm_install_uboot_rpi2 53} 54