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>
index | next in thread | previous in thread | raw e-mail
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 \
bin/chflags \
bin/chmod \
bin/cp \
bin/csh \
bin/date \
bin/dd \
bin/df \
bin/echo \
bin/expr \
bin/hostname \
bin/kenv \
bin/kill \
bin/ln \
bin/ls \
bin/mkdir \
bin/mv \
bin/pkill \
bin/ps \
bin/pwait \
bin/pwd \
bin/rcp \
bin/realpath \
bin/rm \
bin/rmdir \
bin/sh \
bin/sleep \
bin/stty \
bin/sync \
bin/test \
gnu/lib/libgcc \
gnu/lib/libstdc++ \
lib/libarchive \
lib/libbsm \
lib/libbz2 \
lib/libc \
lib/libcrypt \
lib/libdevstat \
lib/libedit \
lib/libelf \
lib/libexpat \
lib/libgeom \
lib/libipsec \
lib/libipx \
lib/libjail \
lib/libkvm \
lib/liblzma \
lib/libmd \
lib/libmemstat \
lib/libmp \
lib/libnetgraph \
lib/libpam \
lib/libpam/modules \
lib/libpcap \
lib/libradius \
lib/librt \
lib/libsbuf \
lib/libtacplus \
lib/libthr \
lib/libthread_db \
lib/libufs \
lib/libusb \
lib/libutil \
lib/libwrap \
lib/libypclnt \
lib/libz \
lib/libopie \
lib/msun \
lib/ncurses/ncurses \
libexec/ftpd \
libexec/getty \
libexec/rlogind \
libexec/rshd \
libexec/rtld-elf \
libexec/telnetd \
sbin/adjkerntz \
sbin/devd \
sbin/devfs \
sbin/dhclient \
sbin/dmesg \
sbin/dumpon \
sbin/fsck \
sbin/fsck_ffs \
sbin/geom \
sbin/ifconfig \
sbin/init \
sbin/ipfw \
sbin/kldload \
sbin/kldstat \
sbin/kldunload \
sbin/ldconfig \
sbin/md5 \
sbin/mdconfig \
sbin/mdmfs \
sbin/mknod \
sbin/mount \
sbin/mount_nullfs \
sbin/mount_nfs \
sbin/newfs \
sbin/ping \
sbin/rcorder \
sbin/reboot \
sbin/route \
sbin/savecore \
sbin/swapon \
sbin/sysctl \
sbin/umount \
secure/lib/libcrypto \
secure/lib/libssh \
secure/libexec/sftp-server \
secure/usr.bin/scp \
secure/usr.bin/ssh-add \
secure/usr.bin/ssh-agent \
secure/usr.bin/ssh-keygen \
secure/usr.bin/ssh \
secure/usr.sbin/sshd \
share/termcap \
sys/boot \
usr.bin/awk \
usr.bin/basename \
usr.bin/bzip2 \
usr.bin/dirname \
usr.bin/du \
usr.bin/env \
usr.bin/ftp \
usr.bin/find \
usr.bin/fstat \
usr.bin/grep \
usr.bin/gzip \
usr.bin/head \
usr.bin/hexdump \
usr.bin/id \
usr.bin/jot \
usr.bin/killall \
usr.bin/ldd \
usr.bin/less \
usr.bin/logger \
usr.bin/login \
usr.bin/mktemp \
usr.bin/nc \
usr.bin/nice \
usr.bin/netstat \
usr.bin/procstat \
usr.bin/rsh \
usr.bin/rlogin \
usr.bin/script \
usr.bin/sed \
usr.bin/sort \
usr.bin/sockstat \
usr.bin/stat \
usr.bin/su \
usr.bin/tail \
usr.bin/tar \
usr.bin/telnet \
usr.bin/tip \
usr.bin/top \
usr.bin/touch \
usr.bin/tr \
usr.bin/tty \
usr.bin/uname \
usr.bin/vi \
usr.bin/wc \
usr.bin/xargs \
usr.bin/xz \
usr.bin/xzdec \
usr.sbin/arp \
usr.sbin/chown \
usr.sbin/cron \
usr.sbin/daemon \
usr.sbin/gstat \
usr.sbin/inetd \
usr.sbin/mtree \
usr.sbin/newsyslog \
usr.sbin/nologin \
usr.sbin/ntp/ntpd \
usr.sbin/ntp/ntpdate \
usr.sbin/ntp/ntpq \
usr.sbin/kbdcontrol \
usr.sbin/pciconf \
usr.sbin/pstat \
usr.sbin/pwd_mkdb \
usr.sbin/service \
usr.sbin/syslogd \
usr.sbin/tcpdump \
usr.sbin/traceroute \
usr.sbin/usbconfig \
usr.sbin/vidcontrol \
usr.sbin/vipw \
usr.sbin/watchdogd
-- Ian
========================================================================================
Thank you friends ...
how can use 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1350975937.86285.YahooMailNeo>
