device: bpi.conf and cross-build docs #113

This commit is contained in:
Franco Fichtner 2019-02-13 21:39:48 +01:00
parent f27651d114
commit a999844f36
6 changed files with 25 additions and 10 deletions

View File

@ -133,25 +133,25 @@ Cross-building for other architecures
This feature is currently experimental and tailored
for use with the Banana Pi. It requires installation
of the qemu package for user mode emulation:
of packages for cross building / user mode emulation:
# pkg install qemu-user-static
# pkg install arm-gnueabi-binutils qemu-user-static
A cross-build on the operating system sources is
executed by specifying the target architecture and
custom kernel:
# make base kernel ARCH=arm:armv6 KERNEL=SMP-BPI
# make base kernel ARCH=arm:armv6 DEVICE=bpi
In order to speed up building of using an emulated
packages build, the xtools set can be created like so:
# make xtools ARCH=arm:armv6
# make xtools ARCH=arm:armv6 DEVICE=bpi
The xtools set is then used during the packages build
similar to the distfiles set.
# make packages ARCH=arm:armv6
# make packages ARCH=arm:armv6 DEVICE=bpi
The image will also require a matching u-boot package:
@ -159,7 +159,7 @@ The image will also require a matching u-boot package:
The final image is built using:
# make arm-<size> ARCH=arm:armv6
# make arm-<size> ARCH=arm:armv6 DEVICE=bpi
About other scripts and tweaks
==============================

View File

@ -46,11 +46,9 @@ TARGET_ARCH=${PRODUCT_ARCH}
TARGET=${PRODUCT_TARGET}
SRCCONF=${CONFIGDIR}/src.conf
__MAKE_CONF=
${MAKE_ARGS_DEV}
"
# XXX for our BPI builds, needs a better place in the long run
MAKE_ARGS="${MAKE_ARGS} UBLDR_LOADADDR=0x42000000"
${ENV_FILTER} make -s -C${SRCDIR} -j${CPUS} buildworld ${MAKE_ARGS} NO_CLEAN=yes
${ENV_FILTER} make -s -C${SRCDIR}/release obj ${MAKE_ARGS}

View File

@ -242,6 +242,11 @@ export PRODUCT_CORE="${PRODUCT_TYPE}${PRODUCT_SUFFIX}"
export PRODUCT_PLUGINS="os-*"
export PRODUCT_PLUGIN="os-*${PRODUCT_SUFFIX}"
# load device-specific environment
if [ -f ${DEVICEDIR}/${PRODUCT_DEVICE}.conf ]; then
. ${DEVICEDIR}/${PRODUCT_DEVICE}.conf
fi
case "${SELF}" in
confirm|info|print)
;;

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2018 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2019 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -55,6 +55,7 @@ TARGET=${PRODUCT_TARGET}
KERNCONF=${PRODUCT_KERNEL}
SRCCONF=${CONFIGDIR}/src.conf
__MAKE_CONF=
${MAKE_ARGS_DEV}
"
${ENV_FILTER} make -s -C${SRCDIR} -j${CPUS} buildkernel ${MAKE_ARGS} NO_KERNELCLEAN=yes

View File

@ -21,6 +21,9 @@ options TCP_SIGNATURE
device wlan_acl
device wlan_xauth
# XXX build error
nodevice re
# Not all architectures have a consistent GENERIC
device netmap

8
device/bpi.conf Normal file
View File

@ -0,0 +1,8 @@
# http://www.banana-pi.org/
export MAKE_ARGS_DEV="
CROSS_BINUTILS_PREFIX=/usr/local/arm-gnueabi-freebsd11.2/bin
UBLDR_LOADADDR=0x42000000
"
export PRODUCT_KERNEL=SMP-BPI