6bd844ae0d
in the empty DESTDIR, and update path names. Copy the ubldr to the FAT partition. [1] Spotted by: andrew [1] Sponsored by: The FreeBSD Foundation
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
EMBEDDEDBUILD=1
|
|
EMBEDDED_TARGET="arm"
|
|
EMBEDDED_TARGET_ARCH="armv6"
|
|
EMBEDDEDPORTS="sysutils/u-boot-beaglebone"
|
|
KERNEL="BEAGLEBONE"
|
|
WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000"
|
|
IMAGE_SIZE="1G"
|
|
PART_SCHEME="MBR"
|
|
FAT_SIZE="2m"
|
|
FAT_TYPE="12"
|
|
MD_ARGS="-x 63 -y 255"
|
|
|
|
arm_install_uboot() {
|
|
UBOOT_DIR="${CHROOTDIR}/usr/local/share/u-boot/u-boot-beaglebone"
|
|
FDT_DIR="${CHROOTDIR}/${WORLDIR}/sys/boot/fdt/dts/arm"
|
|
FATMOUNT="${DESTDIR}/fat"
|
|
UFSMOUNT="${DESTDIR}/ufs"
|
|
mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
|
|
chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
|
|
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
|
|
cp -p ${UBOOT_DIR}/MLO ${CHROOTDIR}/${FATMOUNT}/MLO
|
|
cp -p ${UBOOT_DIR}/u-boot.img ${CHROOTDIR}/${FATMOUNT}/u-boot.img
|
|
cp -p ${FDT_DIR}/beaglebone.dts ${CHROOTDIR}/${FATMOUNT}/bbone.dts
|
|
cp -p ${FDT_DIR}/beaglebone.dts ${CHROOTDIR}/${FATMOUNT}/bbone.dtb
|
|
cp -p ${FDT_DIR}/beaglebone-black.dts ${CHROOTDIR}/${FATMOUNT}/bboneblk.dts
|
|
cp -p ${FDT_DIR}/beaglebone-black.dts ${CHROOTDIR}/${FATMOUNT}/bboneblk.dtb
|
|
touch ${CHROOTDIR}/${FATMOUNT}/bb-uEnv.txt
|
|
cp -p ${CHROOTDIR}/${UFSMOUNT}/boot/ubldr \
|
|
${CHROOTDIR}/${FATMOUNT}/ubldr
|
|
sync
|
|
umount_loop ${CHROOTDIR}/${FATMOUNT}
|
|
umount_loop ${CHROOTDIR}/${UFSMOUNT}
|
|
rmdir ${CHROOTDIR}/${FATMOUNT}
|
|
rmdir ${CHROOTDIR}/${UFSMOUNT}
|
|
|
|
return 0
|
|
}
|