NetBSD Build World

enough disk space, eventually give your guest an additional vdisk,

dd if=/dev/zero of=bsdbuild.data.ffs bs=1G count=0 seek=10000
...
disklabel xbd1
newfs -O2 /dev/xbd1a
dumpfs /dev/rxbd1a | head -3
vi /etc/fstab

/dev/xbd1a /data ffs rw 0 2

mount /data

enough processing power,

egrep 'memory|^[v]?cpu' /var/run/dmesg.boot

run the build inside a tmux or screen session,

export PKG_PATH="http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All/"
pkg_add screen
cp /usr/pkg/share/examples/screen/etcscreenrc /usr/pkg/etc/screenrc
ln -s /usr/pkg/etc/screenrc /root/screenrc
cat >> /root/screenrc <<-EOF
caption always "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
bindkey ^[, prev
bindkey ^[. next
defscrollback 100000
EOF
screen -S build

now proceed,

cd /data
ls -l *src* #nothing yet
ftp -a ftp://ftp.ee.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/src.tar.gz
ftp -a ftp://ftp.ee.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/src.tar.gz.SHA1
cat src.tar.gz.SHA1
sha1 src.tar.gz
progress -zf src.tar.gz tar xf -
cd ~/
ln -s /data/src

get a clean and up-to-date source tree,

cd ~/src
rm -rf ../tooldir ../destdir ../releasedir ../objdir
mkdir ../tooldir ../destdir ../releasedir ../objdir
time ./build.sh -T ../tooldir -D ../destdir -R ../releasedir -O ../objdir -j24 cleandir >/dev/null && print cleandir done #207.62s
rm -f *.log
rm -rf obj tools/obj
rm -rf dist/bind/bin/tests/system/dnssec/ns1
time cvs -q -z9 up -dP #183.44s

prepare the toolchain,

time ./build.sh -T ../tooldir -D ../destdir -R ../releasedir -O ../objdir -j24 tools \
    > make.tools.log && print tools done #1103.07s

without X11, no -x,

time ./build.sh -T ../tooldir -D ../destdir -R ../releasedir -O ../objdir -j24 release \
    > make.release.log && print release done #8247.83s

and eventually look at the cpu usage,

pkg_add htop
mkdir /proc
echo "procfs /proc procfs ro,linux" >> /etc/fstab
mount /proc

grep cpu /var/run/dmesg.boot | tail -2
htop

todo

references


Last update: 2018-09-16 | home | html | css