Obtaining NetBSD source code

grab-binary | grab-source | kernel | cross | world | tweak

release

check for latest release

rel=9.2
cd /var/tmp/

kernel sources

wget http://cdn.netbsd.org/pub/NetBSD/NetBSD-$rel/source/sets/syssrc.tgz
# http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/source/sets/syssrc.tgz

all the rest

wget http://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/source/sets/gnusrc.tgz
wget http://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/source/sets/sharesrc.tgz
wget http://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/source/sets/src.tgz

extract on netbsd

progress -zf src.tgz tar xf - -C /
progress -zf sharesrc.tgz tar xf - -C /
progress -zf gnusrc.tgz tar xf - -C /

or on linux

slackpkg search libarchive
bsdtar xzf syssrc.tgz -C /var/tmp/
bsdtar xzf gnusrc.tgz -C /var/tmp/
bsdtar xzf sharesrc.tgz -C /var/tmp/
bsdtar xzf src.tgz -C /var/tmp/
rm -f syssrc.tgz gnusrc.tgz sharesrc.tgz src.tgz

current

cd /var/tmp/
mirror=https://...

wget $mirror/pub/NetBSD/NetBSD-current/tar_files/src.tar.gz

extract on netbsd

progress -zf src.tar.gz xf -

extract on slackware

time bsdtar xzf src.tar.gz

–or–

export CVSROOT="anoncvs@anoncvs.fr.NetBSD.org:/cvsroot"
export CVS_RSH="ssh"
cvs -q -z9 checkout src

cd /usr/src/
cvs -q -z9 up -dP

Resources

https://www.netbsd.org/docs/pkgsrc/tools.html

https://www.netbsd.org/docs/guide/en/chap-build.html

https://www.netbsd.org/docs/guide/en/chap-kernel.html


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2022 Pierre-Philipp Braun