Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 00:05:37 -0700 (PDT)
From:      Jack Mc Lauren <jack.mclauren@yahoo.com>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>, Paul Schenkeveld <freebsd@psconsult.nl>
Cc:        "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>
Subject:   help me use this script ...
Message-ID:  <1350975937.86285.YahooMailNeo@web126002.mail.ne1.yahoo.com>
In-Reply-To: <1350487191.1123.216.camel@revolution.hippie.lan>
References:  <1350471464.96400.YahooMailNeo@web126006.mail.ne1.yahoo.com> <507E9077.6000207@farrokhi.net> <1350474085.65221.YahooMailNeo@web126004.mail.ne1.yahoo.com> <1350474956.88226.YahooMailNeo@web126001.mail.ne1.yahoo.com> <1350484097.1123.207.camel@revolution.hippie.lan> <20121017144719.GA94848@psconsult.nl> <1350487191.1123.216.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm on dangerous ground here... if I demonstrate too much knowledge of=0Aou=
r crazy-complex build system, suddenly I'm going to find that I'm the=0Anew=
 buildmeister.=A0 :)=A0 But, it didn't take me too long to find where we=0A=
do this stuff...=0A=0AWe have a variable that contains a list of dirs under=
=0Abuild-chroot/usr/src and in our script that populates the image we have=
=0Athis loop:=0A=0A=A0 =A0 =A0 =A0 for i in ${FreeBSDProgramDirs}; do=0A=A0=
 =A0 =A0 =A0 =A0 =A0 echo "=3D=3D> $i"=0A=A0 =A0 =A0 =A0 =A0 =A0 (cd $i && =
eval env ${mkenv} ${mkcmd} INSTALL=3Dinstall \=0A=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 NOINSTALLLIB=3Dyes NO_INSTALLLIB=3Dyes install)=0A=A0 =A0 =A0 =A0 d=
one=0A=0ASo I gather we never do a full installworld at all, we just run th=
at=0Aloop instead.=A0 Here's our basic list; we add to this list for some=
=0Aproducts, others need just this stuff.=0A=0AFREEBSDMIN+=3D \=0A=A0=A0=A0=
 bin/cat \=0A=A0=A0=A0 bin/chflags \=0A=A0=A0=A0 bin/chmod \=0A=A0=A0=A0 bi=
n/cp \=0A=A0=A0=A0 bin/csh \=0A=A0=A0=A0 bin/date \=0A=A0=A0=A0 bin/dd \=0A=
=A0=A0=A0 bin/df \=0A=A0=A0=A0 bin/echo \=0A=A0=A0=A0 bin/expr \=0A=A0=A0=
=A0 bin/hostname \=0A=A0=A0=A0 bin/kenv \=0A=A0=A0=A0 bin/kill \=0A=A0=A0=
=A0 bin/ln \=0A=A0=A0=A0 bin/ls \=0A=A0=A0=A0 bin/mkdir \=0A=A0=A0=A0 bin/m=
v \=0A=A0=A0=A0 bin/pkill \=0A=A0=A0=A0 bin/ps \=0A=A0=A0=A0 bin/pwait \=0A=
=A0=A0=A0 bin/pwd \=0A=A0=A0=A0 bin/rcp \=0A=A0=A0=A0 bin/realpath \=0A=A0=
=A0=A0 bin/rm \=0A=A0=A0=A0 bin/rmdir \=0A=A0=A0=A0 bin/sh \=0A=A0=A0=A0 bi=
n/sleep \=0A=A0=A0=A0 bin/stty \=0A=A0=A0=A0 bin/sync \=0A=A0=A0=A0 bin/tes=
t \=0A=A0=A0=A0 gnu/lib/libgcc \=0A=A0=A0=A0 gnu/lib/libstdc++ \=0A=A0=A0=
=A0 lib/libarchive \=0A=A0=A0=A0 lib/libbsm \=0A=A0=A0=A0 lib/libbz2 \=0A=
=A0=A0=A0 lib/libc \=0A=A0=A0=A0 lib/libcrypt \=0A=A0=A0=A0 lib/libdevstat =
\=0A=A0=A0=A0 lib/libedit \=0A=A0=A0=A0 lib/libelf \=0A=A0=A0=A0 lib/libexp=
at \=0A=A0=A0=A0 lib/libgeom \=0A=A0=A0=A0 lib/libipsec \=0A=A0=A0=A0 lib/l=
ibipx \=0A=A0=A0=A0 lib/libjail \=0A=A0=A0=A0 lib/libkvm \=0A=A0=A0=A0 lib/=
liblzma \=0A=A0=A0=A0 lib/libmd \=0A=A0=A0=A0 lib/libmemstat \=0A=A0=A0=A0 =
lib/libmp \=0A=A0=A0=A0 lib/libnetgraph \=0A=A0=A0=A0 lib/libpam \=0A=A0=A0=
=A0 lib/libpam/modules \=0A=A0=A0=A0 lib/libpcap \=0A=A0=A0=A0 lib/libradiu=
s \=0A=A0=A0=A0 lib/librt \=0A=A0=A0=A0 lib/libsbuf \=0A=A0=A0=A0 lib/libta=
cplus \=0A=A0=A0=A0 lib/libthr \=0A=A0=A0=A0 lib/libthread_db \=0A=A0=A0=A0=
 lib/libufs \=0A=A0=A0=A0 lib/libusb \=0A=A0=A0=A0 lib/libutil \=0A=A0=A0=
=A0 lib/libwrap \=0A=A0=A0=A0 lib/libypclnt \=0A=A0=A0=A0 lib/libz \=0A=A0=
=A0=A0 lib/libopie \=0A=A0=A0=A0 lib/msun \=0A=A0=A0=A0 lib/ncurses/ncurses=
 \=0A=A0=A0=A0 libexec/ftpd \=0A=A0=A0=A0 libexec/getty \=0A=A0=A0=A0 libex=
ec/rlogind \=0A=A0=A0=A0 libexec/rshd \=0A=A0=A0=A0 libexec/rtld-elf \=0A=
=A0=A0=A0 libexec/telnetd \=0A=A0=A0=A0 sbin/adjkerntz \=0A=A0=A0=A0 sbin/d=
evd \=0A=A0=A0=A0 sbin/devfs \=0A=A0=A0=A0 sbin/dhclient \=0A=A0=A0=A0 sbin=
/dmesg \=0A=A0=A0=A0 sbin/dumpon \=0A=A0=A0=A0 sbin/fsck \=0A=A0=A0=A0 sbin=
/fsck_ffs \=0A=A0=A0=A0 sbin/geom \=0A=A0=A0=A0 sbin/ifconfig \=0A=A0=A0=A0=
 sbin/init \=0A=A0=A0=A0 sbin/ipfw \=0A=A0=A0=A0 sbin/kldload \=0A=A0=A0=A0=
 sbin/kldstat \=0A=A0=A0=A0 sbin/kldunload \=0A=A0=A0=A0 sbin/ldconfig \=0A=
=A0=A0=A0 sbin/md5 \=0A=A0=A0=A0 sbin/mdconfig \=0A=A0=A0=A0 sbin/mdmfs \=
=0A=A0=A0=A0 sbin/mknod \=0A=A0=A0=A0 sbin/mount \=0A=A0=A0=A0 sbin/mount_n=
ullfs \=0A=A0=A0=A0 sbin/mount_nfs \=0A=A0=A0=A0 sbin/newfs \=0A=A0=A0=A0 s=
bin/ping \=0A=A0=A0=A0 sbin/rcorder \=0A=A0=A0=A0 sbin/reboot \=0A=A0=A0=A0=
 sbin/route \=0A=A0=A0=A0 sbin/savecore \=0A=A0=A0=A0 sbin/swapon \=0A=A0=
=A0=A0 sbin/sysctl \=0A=A0=A0=A0 sbin/umount \=0A=A0=A0=A0 secure/lib/libcr=
ypto \=0A=A0=A0=A0 secure/lib/libssh \=0A=A0=A0=A0 secure/libexec/sftp-serv=
er \=0A=A0=A0=A0 secure/usr.bin/scp \=0A=A0=A0=A0 secure/usr.bin/ssh-add \=
=0A=A0=A0=A0 secure/usr.bin/ssh-agent \=0A=A0=A0=A0 secure/usr.bin/ssh-keyg=
en \=0A=A0=A0=A0 secure/usr.bin/ssh \=0A=A0=A0=A0 secure/usr.sbin/sshd \=0A=
=A0=A0=A0 share/termcap \=0A=A0=A0=A0 sys/boot \=0A=A0=A0=A0 usr.bin/awk \=
=0A=A0=A0=A0 usr.bin/basename \=0A=A0=A0=A0 usr.bin/bzip2 \=0A=A0=A0=A0 usr=
.bin/dirname \=0A=A0=A0=A0 usr.bin/du \=0A=A0=A0=A0 usr.bin/env \=0A=A0=A0=
=A0 usr.bin/ftp \=0A=A0=A0=A0 usr.bin/find \=0A=A0=A0=A0 usr.bin/fstat \=0A=
=A0=A0=A0 usr.bin/grep \=0A=A0=A0=A0 usr.bin/gzip \=0A=A0=A0=A0 usr.bin/hea=
d \=0A=A0=A0=A0 usr.bin/hexdump \=0A=A0=A0=A0 usr.bin/id \=0A=A0=A0=A0 usr.=
bin/jot \=0A=A0=A0=A0 usr.bin/killall \=0A=A0=A0=A0 usr.bin/ldd \=0A=A0=A0=
=A0 usr.bin/less \=0A=A0=A0=A0 usr.bin/logger \=0A=A0=A0=A0 usr.bin/login \=
=0A=A0=A0=A0 usr.bin/mktemp \=0A=A0=A0=A0 usr.bin/nc \=0A=A0=A0=A0 usr.bin/=
nice \=0A=A0=A0=A0 usr.bin/netstat \=0A=A0=A0=A0 usr.bin/procstat \=0A=A0=
=A0=A0 usr.bin/rsh \=0A=A0=A0=A0 usr.bin/rlogin \=0A=A0=A0=A0 usr.bin/scrip=
t \=0A=A0=A0=A0 usr.bin/sed \=0A=A0=A0=A0 usr.bin/sort \=0A=A0=A0=A0 usr.bi=
n/sockstat \=0A=A0=A0=A0 usr.bin/stat \=0A=A0=A0=A0 usr.bin/su \=0A=A0=A0=
=A0 usr.bin/tail \=0A=A0=A0=A0 usr.bin/tar \=0A=A0=A0=A0 usr.bin/telnet \=
=0A=A0=A0=A0 usr.bin/tip \=0A=A0=A0=A0 usr.bin/top \=0A=A0=A0=A0 usr.bin/to=
uch \=0A=A0=A0=A0 usr.bin/tr \=0A=A0=A0=A0 usr.bin/tty \=0A=A0=A0=A0 usr.bi=
n/uname \=0A=A0=A0=A0 usr.bin/vi \=0A=A0=A0=A0 usr.bin/wc \=0A=A0=A0=A0 usr=
.bin/xargs \=0A=A0=A0=A0 usr.bin/xz \=0A=A0=A0=A0 usr.bin/xzdec \=0A=A0=A0=
=A0 usr.sbin/arp \=0A=A0=A0=A0 usr.sbin/chown \=0A=A0=A0=A0 usr.sbin/cron \=
=0A=A0=A0=A0 usr.sbin/daemon \=0A=A0=A0=A0 usr.sbin/gstat \=0A=A0=A0=A0 usr=
.sbin/inetd \=0A=A0=A0=A0 usr.sbin/mtree \=0A=A0=A0=A0 usr.sbin/newsyslog \=
=0A=A0=A0=A0 usr.sbin/nologin \=0A=A0=A0=A0 usr.sbin/ntp/ntpd \=0A=A0=A0=A0=
 usr.sbin/ntp/ntpdate \=0A=A0=A0=A0 usr.sbin/ntp/ntpq \=0A=A0=A0=A0 usr.sbi=
n/kbdcontrol \=0A=A0=A0=A0 usr.sbin/pciconf \=0A=A0=A0=A0 usr.sbin/pstat \=
=0A=A0=A0=A0 usr.sbin/pwd_mkdb \=0A=A0=A0=A0 usr.sbin/service \=0A=A0=A0=A0=
 usr.sbin/syslogd \=0A=A0=A0=A0 usr.sbin/tcpdump \=0A=A0=A0=A0 usr.sbin/tra=
ceroute \=0A=A0=A0=A0 usr.sbin/usbconfig \=0A=A0=A0=A0 usr.sbin/vidcontrol =
\=0A=A0=A0=A0 usr.sbin/vipw \=0A=A0=A0=A0 usr.sbin/watchdogd=0A=0A-- Ian=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0AThank you friends ...=0Ahow can u=
se this loop ? could explain it in a nanobsd.sh file please ??
From owner-freebsd-embedded@FreeBSD.ORG  Tue Oct 23 14:24:17 2012
Return-Path: <owner-freebsd-embedded@FreeBSD.ORG>
Delivered-To: freebsd-embedded@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
 by hub.freebsd.org (Postfix) with ESMTP id EFCE02BF
 for <freebsd-embedded@freebsd.org>; Tue, 23 Oct 2012 14:24:17 +0000 (UTC)
 (envelope-from freebsd@damnhippie.dyndns.org)
Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214])
 by mx1.freebsd.org (Postfix) with ESMTP id B4CB68FC12
 for <freebsd-embedded@freebsd.org>; Tue, 23 Oct 2012 14:23:58 +0000 (UTC)
Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218])
 by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q9NENqcu071948
 for <freebsd-embedded@freebsd.org>; Tue, 23 Oct 2012 08:23:52 -0600 (MDT)
 (envelope-from freebsd@damnhippie.dyndns.org)
Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240])
 by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q9NENTv3097067;
 Tue, 23 Oct 2012 08:23:29 -0600 (MDT)
 (envelope-from freebsd@damnhippie.dyndns.org)
Subject: Re: help me use this script ...
From: Ian Lepore <freebsd@damnhippie.dyndns.org>
To: Jack Mc Lauren <jack.mclauren@yahoo.com>
In-Reply-To: <1350975937.86285.YahooMailNeo@web126002.mail.ne1.yahoo.com>
References: <1350471464.96400.YahooMailNeo@web126006.mail.ne1.yahoo.com>
 <507E9077.6000207@farrokhi.net>
 <1350474085.65221.YahooMailNeo@web126004.mail.ne1.yahoo.com>
 <1350474956.88226.YahooMailNeo@web126001.mail.ne1.yahoo.com>
 <1350484097.1123.207.camel@revolution.hippie.lan>
 <20121017144719.GA94848@psconsult.nl>
 <1350487191.1123.216.camel@revolution.hippie.lan>
 <1350975937.86285.YahooMailNeo@web126002.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 23 Oct 2012 08:23:28 -0600
Message-ID: <1351002208.1123.267.camel@revolution.hippie.lan>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 
Content-Transfer-Encoding: 7bit
Cc: "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>
X-BeenThere: freebsd-embedded@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Dedicated and Embedded Systems <freebsd-embedded.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-embedded>, 
 <mailto:freebsd-embedded-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-embedded>;
List-Post: <mailto:freebsd-embedded@freebsd.org>
List-Help: <mailto:freebsd-embedded-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-embedded>, 
 <mailto:freebsd-embedded-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Oct 2012 14:24:18 -0000

On Tue, 2012-10-23 at 00:05 -0700, Jack Mc Lauren wrote:

[Note: missing original quotation context here, the quote below is
mostly something I said/posted...]

> I'm on dangerous ground here... if I demonstrate too much knowledge of
> our crazy-complex build system, suddenly I'm going to find that I'm the
> new buildmeister.  :)  But, it didn't take me too long to find where we
> do this stuff...
> 
> We have a variable that contains a list of dirs under
> build-chroot/usr/src and in our script that populates the image we have
> this loop:
> 
>         for i in ${FreeBSDProgramDirs}; do
>             echo "==> $i"
>             (cd $i && eval env ${mkenv} ${mkcmd} INSTALL=install \
>                 NOINSTALLLIB=yes NO_INSTALLLIB=yes install)
>         done
> 
> So I gather we never do a full installworld at all, we just run that
> loop instead.  Here's our basic list; we add to this list for some
> products, others need just this stuff.
> 
> FREEBSDMIN+= \
>     bin/cat \

> [snip large dir list here]
> -- Ian
> ========================================================================================
> Thank you friends ...
> how can use this loop ? could explain it in a nanobsd.sh file please ??

I can't really help any further... I've never used nanobsd.  The only
thing I know about it is a vague sense that it does cross-building
within a chroot, and that's basically the same concept as our build
system at work uses, but with a completely different implementation.

The snippet of script I posted is run from within our chroot
environment, after having copied parms such as that list of dirs into
chroot/tmp/whatever (so that it's accessible to the script inside the
chroot as /tmp/whatever), and then the name of the file holding the
parms is passed to the in-chroot install script via an env var.  The
install script itself is also copied into chroot/tmp from the outside
build script.

-- Ian





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