mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 17:12:46 +00:00
f7dfda583b
In addition to the ubldr file, also copy ubldr.bin to the MS-DOS partition. This will help with transitioning to a single arm/armv6 userland build which could be used for all FreeBSD/armv6 images without UBLDR_LOADADDR being set for each board (ultimately requiring a separate buildworld for each currently). Sponsored by: The FreeBSD Foundation
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
SRCBRANCH="base/stable/10@rHEAD"
|
|
EMBEDDEDBUILD=1
|
|
EMBEDDED_TARGET="arm"
|
|
EMBEDDED_TARGET_ARCH="armv6"
|
|
EMBEDDEDPORTS="sysutils/u-boot-rpi"
|
|
KERNEL="RPI-B"
|
|
WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000"
|
|
IMAGE_SIZE="480M"
|
|
PART_SCHEME="MBR"
|
|
FAT_SIZE="17m"
|
|
FAT_TYPE="16"
|
|
MD_ARGS="-x 63 -y 255"
|
|
NODOC=1
|
|
|
|
arm_install_uboot() {
|
|
UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi"
|
|
UBOOT_FILES="bootcode.bin config.txt fixup.dat fixup_cd.dat \
|
|
start.elf start_cd.elf u-boot.img"
|
|
FATMOUNT="${DESTDIR%${KERNEL}}/fat"
|
|
UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
|
|
chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
|
|
chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
|
|
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
|
|
for _UF in ${UBOOT_FILES}; do
|
|
chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \
|
|
${FATMOUNT}/${_UF}
|
|
done
|
|
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
|
|
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
|
|
${FATMOUNT}/ubldr.bin
|
|
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi.dtb \
|
|
${FATMOUNT}/rpi.dtb
|
|
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
|
|
sync
|
|
umount_loop ${CHROOTDIR}/${FATMOUNT}
|
|
umount_loop ${CHROOTDIR}/${UFSMOUNT}
|
|
chroot ${CHROOTDIR} rmdir ${FATMOUNT}
|
|
chroot ${CHROOTDIR} rmdir ${UFSMOUNT}
|
|
|
|
return 0
|
|
}
|