1#!/bin/sh
2#
3# $FreeBSD: projects/release-arm-redux/release/arm/WANDBOARD.conf 282656 2015-05-08 18:55:09Z 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="${CHROOTDIR}/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##${CHROOTDIR}}/${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 cp -p ${CHROOTDIR}/${UFSMOUNT}/boot/ubldr \
30 ${CHROOTDIR}/${FATMOUNT}/ubldr
31 chroot ${CHROOTDIR} echo \
32 'setenv fdt_file wandboard-quad.dtb; fatload mmc 0:1 11000000 ubldr; bootelf 11000000;' \
33 > ${FATMOUNT}/boot.txt
34 touch ${CHROOTDIR}/${UFSMOUNT}/firstboot
35 sync
36 umount_loop ${CHROOTDIR}/${FATMOUNT}
37 umount_loop ${CHROOTDIR}/${UFSMOUNT}
38 rmdir ${CHROOTDIR}/${FATMOUNT}
39 rmdir ${CHROOTDIR}/${UFSMOUNT}
40
41 return 0
42}
2#
3# $FreeBSD: projects/release-arm-redux/release/arm/WANDBOARD.conf 282656 2015-05-08 18:55:09Z 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="${CHROOTDIR}/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##${CHROOTDIR}}/${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 cp -p ${CHROOTDIR}/${UFSMOUNT}/boot/ubldr \
30 ${CHROOTDIR}/${FATMOUNT}/ubldr
31 chroot ${CHROOTDIR} echo \
32 'setenv fdt_file wandboard-quad.dtb; fatload mmc 0:1 11000000 ubldr; bootelf 11000000;' \
33 > ${FATMOUNT}/boot.txt
34 touch ${CHROOTDIR}/${UFSMOUNT}/firstboot
35 sync
36 umount_loop ${CHROOTDIR}/${FATMOUNT}
37 umount_loop ${CHROOTDIR}/${UFSMOUNT}
38 rmdir ${CHROOTDIR}/${FATMOUNT}
39 rmdir ${CHROOTDIR}/${UFSMOUNT}
40
41 return 0
42}