Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Jan 2014 12:55:16 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>
Cc:        freebsd-arm@FreeBSD.org
Subject:   Re: FreeBSD 10 on Dockstar (Marvell Kirkwood)
Message-ID:  <1388951716.1158.319.camel@revolution.hippie.lan>
In-Reply-To: <1388951492.1158.317.camel@revolution.hippie.lan>
References:  <20131231211054.GA90299@moore.morphism.de> <1388770603.1158.273.camel@revolution.hippie.lan> <20140103175914.GC98342@moore.morphism.de> <20140105144044.4fe6b8e063a664e4010c4cc4@getmail.no> <1388951492.1158.317.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2014-01-05 at 12:51 -0700, Ian Lepore wrote:
> On Sun, 2014-01-05 at 14:40 +0100, Torfinn Ingolfsen wrote:
> > On Fri, 3 Jan 2014 17:59:14 +0000
> > Markus Pfeiffer <markus.pfeiffer@morphism.de> wrote:
> > 
> > > It does indeed work. I am a bit surprised that noone seems to be running
> > > FreeBSD on a dockstar seriously enough to run into these problems.
> > 
> > FWIW, my Dockstar still runs FreeBSD 8.2-stable from 2011, due to problems getting anything newer working on it[1].
> > 
> > Another thing, how does one set up a build environment that doesn't clobber source builds on the host?
> > The last time I did this, I just let the Kirkwood build clobber the files on the host and fixed it afterwards.
> > Having a permanent build environment for Kirkwood would be much nicer.
> 
> A lot of folks use the freebsd-crochet script to create images for arm
> systems.  I've never learned to use it myself (and I usualy don't want a
> ready-to-flash image).
> 
> I generally have a dozen or so active development "sandboxes" for
> different boards.  For each board/project I'm working on I create a
> directory, and within it I have a script named "mk" and these
> subdirectories:
> 
>   config/   nfsroot/  obj/  src/
> 
> In config I put a make.conf and src.conf (even if they're empty), and a
> custom kernel config file if I'm not using one of the stock files.  The
> src directory is a straight svn checkout of head or a stable branch or
> whatever.  nfsroot is my default DESTDIR for installs; for development I
> tend to use nfs root.  
> 
> The mk script is attached.  It basically sets up the usual defaults for
> whatever the sandbox is (kernel config name and such), then does a cd
> into the src directory and fires up make with whatever args I put on the
> command line.  I can just type "mk buildworld" or "mk installkernel" or
> whatever and the mk script supplies the env vars and make options that
> never change.  If I want to install to an sdcard or usb thumb drive
> instead of nfsroot/ I can just format and mount it and "mk installworld
> DESTDIR=/mnt".
> 

Hrm, the attachment got scrubbed, I'll just paste the mk script here:

#!/bin/sh
# Build beaglebone from source.

case "$*" in
  *DESTDIR* )  insdir="$DESTDIR" ;;
  * )          insdir="$(pwd)/nfsroot"
esac

case "$*" in
  *installworld* | *installkernel* | *distribution* ) SUDO=sudo;;
esac

set -x

kernel="BB"

if [ -r "config/${kernel}" ] ; then
    ln -fs "../../../../config/${kernel}"   "src/sys/arm/conf/${kernel}"
fi

srcconf="$(pwd)/config/src.conf"
makeconf="$(pwd)/config/make.conf"

objdir="$(pwd)/obj"
tobjdir="${objdir}/arm.armv6/$(pwd)/src"
kobjdir="${tobjdir}/sys/${kernel}"

export MAKEOBJDIRPREFIX="${objdir}"

cd ./src && time nice -15 ${SUDO} make -j ${MAX_JOBS:-1} \
    "-DNO_CLEAN" \
    "TARGET_ARCH=armv6" \
    "DESTDIR=${insdir}" \
     "__MAKE_CONF=${makeconf}" \
	 "SRCCONF=${srcconf}" \
	 "KERNCONF=${kernel}" \
    "$@"



-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1388951716.1158.319.camel>