How to get freeBSD/NetBSD Source Code

 

1. Download ISO:

FreeBSD: ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/8.0/8.0-RELEASE-i386-dvd1.iso.gz

 

2. mount ISO to local, e.g. /mnt/bsd, you can found the *-RELEASE (here is 8.0-RELEASE) folder

sudo mount -t iso9660 -o loop 8.0-RELEASE-i386-dvd1.iso /mnt/bsd/

 

3. cp all files under /mnt/bsd/8.0-RELEASE/src/ to your workspace, say /home/jack/bsd/pkg

cp /mnt/bsd/8.0-RELEASE/src/ ~/bsd/pkg

 

4. change mode of install.sh to be writable

chmod +wx install.sh

 5. modify the line in install.sh 

       cat s${i}.?? | tar --unlink -xpzf - -C ${DISTDIR}/usr/src

to be 

cat s${i}.?? | tar --unlink -xpzf - -C ../src

 

6. run ./install.sh all 

note: all - extracting all source code, of course, you can select some 

 

 

For NetBSD, mount ISO locally and browse the folders, you will find some *.tgz file, just copy and tar 

你可能感兴趣的:(File,FreeBSD,download)