Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2013 08:29:49 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        george@ceetonetechnology.com, freebsd-arm@FreeBSD.org
Subject:   Re: Some ideas on Tim's script
Message-ID:  <1359646189.93359.323.camel@revolution.hippie.lan>
In-Reply-To: <E583F0D6-084A-4FF3-89F0-966897F15D09@kientzle.com>
References:  <51092D3A.4060608@ceetonetechnology.com> <E583F0D6-084A-4FF3-89F0-966897F15D09@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-2T4AvHBEPDaCwLWN6ERc
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

On Wed, 2013-01-30 at 21:14 -0800, Tim Kientzle wrote:
> On Jan 30, 2013, at 6:24 AM, George Rosamond wrote:
> > 
> > But first, with 8G images, I had to adjust the config.sh's SD_SIZE below 7900 for Kingston SD Cards to fit.  I can give more specifics if desired.  Anyone else experience that?
> 
> I have a bunch of different SD cards around here -- different
> sizes, different manufacturers -- and I think every one is
> 50MB-100MB smaller than the advertised size.
> 
> > In terms of /etc/fstab, I think adding tmpfs to the kernel would be useful.  Without it, using md(4) for /var/log, /tmp and /var/tmp is certainly a nice way to minimize disk writes.
> 
> How well does this work on a machine with only 256MB RAM?

At work we use an md disk for /tmp (and often for /var with /tmp linked
to /var/tmp) on units with only 64mb of ram.  We typically use 4mb for
combined /var and /tmp, but the kind of stuff we run isn't hungry for
temp space.

> > It might also make sense to add rc_debug="YES" and rc_info="YES" to the default /etc/rc.conf.  Most users are testing right now, and it's only logical for the pool of people hacking on them.
> 
> I wasn't aware of those options; I'll add them.
> 
> One of my wish-list items is to figure out how to buildkernel
> with a config file stored outside of /usr/src.  Then it would
> be possible to have a kernel config as part of the
> beaglebsd setup files, separate from the config in /usr/src
> that seems to be optimized for kernel debugging.
> 

Symlink the config into the arm/conf dir.  When I create a sandbox for
playing with a given unit (RPi, BeagleBone, etc) the hierarchy is:

  bsdstaging/
    bbone/
      ...
    dplug/
      ...
    rpi/
      mk
      config/
        RPI-B-SERIAL
        make.conf
        src.conf
      nfsroot/
      obj/
      patches/
      src/

'mk' is a script that sets up environment stuff, does a cd into src/ and
runs make.  The script symlinks $(pwd)/config/RPI-B-SERIAL into
src/sys/arm/conf, sets MAKEOBJDIR to $(pwd)/obj, DESTDIR to
$(pwd)/nfsroot, and launches make with a command line so that
config/make.conf and config/src.conf and KERNCONF= are all set up to use
the items in config/.

The nfsroot dir is nullfs-mounted at the nfs export mountpoint that's
configured as the dhcp-served root dir for that unit.

Right now I've got lots of almost-identical copies of this script, one
per project I'm working on.  Soon enough the commonalities will become
clear and I'll standardize it into my ~/bin directory.  It's not a big
complicated script at all, I'll attach it.

> > And maybe to add the relevant ntpdate(8) settings to /etc/rc.conf.
> 
> Has anyone tried running ntpdate from devd?  So that when/if
> the network interface initializes, ntpdate gets run at that point.
> That would avoid the tedious delay if there's no network at
> boot time.
> 

I think ntpd may be a better solution.  If you set ntpd_enable and
ntpd_sync_on_start to YES, ntpd will background itself immediately and
set the clock as soon as it reaches a server.  The downsides are a bit
of syslog spam as it whines periodically about not finding its peers
until the network shows up, and of course at some point a minute or two
after the network is connected, the clock is going to make a big jump
forward, and some apps don't react well to that.

-- Ian


--=-2T4AvHBEPDaCwLWN6ERc--




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