aboutsummaryrefslogtreecommitdiff
path: root/release/arm/RPI2.conf
blob: 5cf31ffc9276f7b4e1f403fcb8a15fd9934d7b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#
# $FreeBSD$
#

# Global variables.
export SVNROOT="svn://svn.FreeBSD.org/"
export SRCBRANCH="base/head@rHEAD"
export DOCBRANCH="doc/head@rHEAD"
export PORTBRANCH="ports/head@rHEAD"
export NODOC=yes
export WORLD_FLAGS="-j $(sysctl -n hw.ncpu)"
export KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
export CHROOTDIR="/scratch"
export EMBEDDEDBUILD=1
export UBOOT_PORT="sysutils/u-boot-rpi2"

# Build chroot configuration
load_chroot_env() {
	# Avoid collision with TARGET and XDEV.
	unset XDEV XDEV_ARCH KERNEL
	export TARGET="amd64"
	export TARGET_ARCH="amd64"
}

# Build target configuration
load_target_env() {
	# Avoid collision with TARGET and XDEV.
	unset TARGET TARGET_ARCH
	export XDEV="arm"
	export XDEV_ARCH="armv6"
	export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1"
	export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no"
	export KERNEL="RPI2"
	export CROCHETSRC="https://github.com/freebsd/crochet"
	export CROCHETBRANCH="trunk@rHEAD"
}

# Build environment setup
buildenv_setup() {
	if [ ! -d ${CHROOTDIR}/usr/ports/${UBOOT_PORT} ]; then
		chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
			/usr/sbin/pkg bootstrap -y
		chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
			/usr/sbin/pkg install -y ${UBOOT_PORT}
	else
		chroot ${CHROOTDIR} env BATCH=1 \
			make -C /usr/ports/${UBOOT_PORT} \
			all install clean
	fi
	return 0
}