1#!/bin/sh
2#
3# $FreeBSD: head/release/arm/WANDBOARD.conf 282693 2015-05-09 21:08:12Z gjb $
4#
5
6EMBEDDEDBUILD=1
7EMBEDDED_TARGET="arm"
8EMBEDDED_TARGET_ARCH="armv6"
9EMBEDDEDPORTS="sysutils/u-boot-wandboard"
10KERNEL="IMX6"
11WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x11000000"
12IMAGE_SIZE="1G"
13PART_SCHEME="MBR"
14FAT_SIZE="50m -b 16384"
15FAT_TYPE="16"
16MD_ARGS="-x 63 -y 255"
17NODOC=1
18
19arm_install_uboot() {
20 UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard"
21 UBOOT_FILES="u-boot.imx"
22 FATMOUNT="${DESTDIR%${KERNEL}}/fat"
23 UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
24 chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \
25 of=/dev/${mddev} bs=512 seek=2
26 chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
27 chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
28 chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
29 chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
30 chroot ${CHROOTDIR} /bin/sh -c 'echo \
31 setenv fdt_file wandboard-quad.dtb\; fatload mmc 0:1 11000000 ubldr\; bootelf 11000000\; \
32 > ${FATMOUNT}/boot.txt'
33 chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
34 sync
35 umount_loop ${CHROOTDIR}/${FATMOUNT}
36 umount_loop ${CHROOTDIR}/${UFSMOUNT}
37 chroot ${CHROOTDIR} rmdir ${FATMOUNT}
38 chroot ${CHROOTDIR} rmdir ${UFSMOUNT}
39
40 return 0
41}
2#
3# $FreeBSD: head/release/arm/WANDBOARD.conf 282693 2015-05-09 21:08:12Z gjb $
4#
5
6EMBEDDEDBUILD=1
7EMBEDDED_TARGET="arm"
8EMBEDDED_TARGET_ARCH="armv6"
9EMBEDDEDPORTS="sysutils/u-boot-wandboard"
10KERNEL="IMX6"
11WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x11000000"
12IMAGE_SIZE="1G"
13PART_SCHEME="MBR"
14FAT_SIZE="50m -b 16384"
15FAT_TYPE="16"
16MD_ARGS="-x 63 -y 255"
17NODOC=1
18
19arm_install_uboot() {
20 UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard"
21 UBOOT_FILES="u-boot.imx"
22 FATMOUNT="${DESTDIR%${KERNEL}}/fat"
23 UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
24 chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \
25 of=/dev/${mddev} bs=512 seek=2
26 chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
27 chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
28 chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
29 chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr
30 chroot ${CHROOTDIR} /bin/sh -c 'echo \
31 setenv fdt_file wandboard-quad.dtb\; fatload mmc 0:1 11000000 ubldr\; bootelf 11000000\; \
32 > ${FATMOUNT}/boot.txt'
33 chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
34 sync
35 umount_loop ${CHROOTDIR}/${FATMOUNT}
36 umount_loop ${CHROOTDIR}/${UFSMOUNT}
37 chroot ${CHROOTDIR} rmdir ${FATMOUNT}
38 chroot ${CHROOTDIR} rmdir ${UFSMOUNT}
39
40 return 0
41}