# Distribution(src/sys) not available for 9.0?



## bsus (Jan 14, 2012)

Hi,

I just upgraded successfully from 8.2-RELEASE to 9.0-RELEASE next I wanted to create a new custom kernel. So switched to /usr/src and there weren't any source files. Then I wanted to install the src/sys files over sysinstall but I am getting a retrieve error by downloading from ftp1.freebsd.org and other ftp servers.

I tried many server but sysinstall always doesn't retrieve source files or 9.0 isn't available. Is this a server issue and will it be fixed in the next days or is this an issue with my installation?

Regards


----------



## SNK (Jan 14, 2012)

See phoenix's post for a better method: http://forums.freebsd.org/showpost.php?p=161392&postcount=9


----------



## bsus (Jan 14, 2012)

Hello,

I don't have any /usr/src/share/examples/cvsup/stable-supfile
I installed cvsup-without-gui from ports but this didn't helped


----------



## SNK (Jan 14, 2012)

Then just create the file with the specified content.


----------



## ondra_knezour (Jan 14, 2012)

bsus said:
			
		

> /usr/src/share/examples/cvsup/stable-supfile


/usr/share/examples/cvsup/stable-supfile


			
				bsus said:
			
		

> I installed cvsup-without-gui from ports but this didn't helped


csup() is in base, note missing letter V. It is different program, no need to install cvsup port.

Section about synchronizing sources in FreeBSD Handbook may give you more info.


----------



## bsus (Jan 14, 2012)

Ok this worked, thank you!


----------



## wblock@ (Jan 14, 2012)

SNK said:
			
		

> 3. Ignore documentation for languages you do not care about.
> `# vi /var/db/sup/refuse`
> 
> ```
> ...



These are for ports and don't really apply in a src supfile.

[Refusing part of the ports tree can break other things.  To avoid all these, deinstall misc/freebsd-doc-all and just install the language-specific one desired, like misc/freebsd-doc-en.  If you have a reasonable net connection, none are really necessary because the latest version can be read on the web site.]


----------



## ondra_knezour (Jan 14, 2012)

We probably should fill PR to Handbook with more actual info. Is somebody here less lazy than me?


----------



## phoenix (Jan 14, 2012)

And for those looking to the future, using Subversion is even "simpler":

install devel/subversion
`# cd /usr/src`
`# svn checkout [url=svn://svn.freebsd.org/base/releng/9.0/]svn://svn.freebsd.org/base/releng/9.0/[/url] .` (Note the period at the end, telling it which directory to store the source files in; you can replace that with /usr/src to make it more explicit)
Then, updating the source tree is as simple as:

`# cd /usr/src`
`# svn update`

All branches are under base/ on the SVN server.  Release branches are under releng/X.Y/.  Stable branches are under stable/X.

Switching source trees between releases is as simple as:

`# cd /usr/src`
`# svn switch [url=svn://svn.freebsd.org/base/stable/9]svn://svn.freebsd.org/base/stable/9[/url]`


----------



## bsus (Jan 15, 2012)

Hi phoenix,

thank you for your method, I will remember this for keeping my sources up to date 

Now I am getting an error while compiling:

```
make buildkernel KERNCONF=SANDYBRIDGE
...
MAKE=make sh /usr/src/sys/conf/newvers.sh SANDYBRIDGE
/usr/local/bin/svnversion
cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  vers.c
linking kernel.debug
ld:/usr/src/sys/conf/ldscript.amd64:9: syntax error
*** Error code 1

Stop in /usr/obj/usr/src/sys/SANDYBRIDGE.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```


----------



## bsus (Jan 15, 2012)

The config:

```
server src # cat sys/amd64/conf/SANDYBRIDGE

cpu		HAMMER
ident		SANDYBRIDGE

makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols

options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
#options 	MD_ROOT			# MD is a potential root device
options 	NFSCL			# New Network Filesystem Client
options 	NFSD			# New Network Filesystem Server
options 	NFSLOCKD		# Network Lock Manager
options 	NFS_ROOT		# NFS usable as /, requires NFSCL
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
#options 	PROCFS			# Process filesystem (requires PSEUDOFS)
#options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
#options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
#options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
#options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
#options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
#options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
#options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
options 	AUDIT			# Security event auditing
options 	MAC			# TrustedBSD MAC Framework
#options 	KDTRACE_FRAME		# Ensure frames are compiled in
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
options 	KDB			# Kernel debugger related code
options 	KDB_TRACE		# Print a stack trace for a panic

# Make an SMP-capable kernel by default
options 	SMP			# Symmetric MultiProcessor Kernel

# CPU frequency control
device		cpufreq

# Bus support.
device		acpi
device		pci

# Floppy drives
#device		fdc

# ATA controllers
device		ahci		# AHCI-compatible SATA controllers
device		ata		# Legacy ATA/SATA controllers
options 	ATA_CAM		# Handle legacy controllers with CAM
options 	ATA_STATIC_ID	# Static device numbering
#device		mvs		# Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
#device		siis		# SiliconImage SiI3124/SiI3132/SiI3531 SATA

# SCSI Controllers
#device		ahc		# AHA2940 and onboard AIC7xxx devices
#options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~128k to driver.
#device		ahd		# AHA39320/29320 and onboard AIC79xx devices
#options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~215k to driver.
#device		esp		# AMD Am53C974 (Tekram DC-390(T))
#device		hptiop		# Highpoint RocketRaid 3xxx series
#device		isp		# Qlogic family
#device		ispfw		# Firmware for QLogic HBAs- normally a module
#device		mpt		# LSI-Logic MPT-Fusion
#device		mps		# LSI-Logic MPT-Fusion 2
#device		ncr		# NCR/Symbios Logic
#device		sym		# NCR/Symbios Logic (newer chipsets + those of `ncr')
#device		trm		# Tekram DC395U/UW/F DC315U adapters

#device		adv		# Advansys SCSI adapters
#device		adw		# Advansys wide SCSI adapters
#device		aic		# Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
#device		bt		# Buslogic/Mylex MultiMaster SCSI adapters

# ATA/SCSI peripherals
device		scbus		# SCSI bus (required for ATA/SCSI)
device		ch		# SCSI media changers
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct ATA/SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)

# RAID controllers interfaced to the SCSI subsystem
#device		amr		# AMI MegaRAID
#device		arcmsr		# Areca SATA II RAID
#XXX it is not 64-bit clean, -scottl
#device		asr		# DPT SmartRAID V, VI and Adaptec SCSI RAID
#device		ciss		# Compaq Smart RAID 5*
#device		dpt		# DPT Smartcache III, IV - See NOTES for options
#device		hptmv		# Highpoint RocketRAID 182x
#device		hptrr		# Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
#device		iir		# Intel Integrated RAID
#device		ips		# IBM (Adaptec) ServeRAID
#device		mly		# Mylex AcceleRAID/eXtremeRAID
#device		twa		# 3ware 9000 series PATA/SATA RAID

# RAID controllers
#device		aac		# Adaptec FSA RAID
#device		aacp		# SCSI passthrough for aac (requires CAM)
#device		ida		# Compaq Smart RAID
#device		mfi		# LSI MegaRAID SAS
#device		mlx		# Mylex DAC960 family
#XXX pointer/int warnings
#device		pst		# Promise Supertrak SX6000
#device		twe		# 3ware ATA RAID
#device		tws		# LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

#device		kbdmux		# keyboard multiplexer

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc
options 	SC_PIXEL_MODE	# add support for the raster text mode

#device		agp		# support several AGP chipsets

# PCI Ethernet NICs.
#device		bxe		# Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet
#device		de		# DEC/Intel DC21x4x (``Tulip'')
device		em		# Intel PRO/1000 Gigabit Ethernet Family
#device		igb		# Intel PRO/1000 PCIE Server Gigabit Family
#device		ixgbe		# Intel PRO/10GbE PCIE Ethernet Family
#device		le		# AMD Am7900 LANCE and Am79C9xx PCnet
#device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
#device		txp		# 3Com 3cR990 (``Typhoon'')
#device		vx		# 3Com 3c590, 3c595 (``Vortex'')

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
#device		miibus		# MII bus support
#device		ae		# Attansic/Atheros L2 FastEthernet
#device		age		# Attansic/Atheros L1 Gigabit Ethernet
#device		alc		# Atheros AR8131/AR8132 Ethernet
#device		ale		# Atheros AR8121/AR8113/AR8114 Ethernet
#device		bce		# Broadcom BCM5706/BCM5708 Gigabit Ethernet
#device		bfe		# Broadcom BCM440x 10/100 Ethernet
#device		bge		# Broadcom BCM570xx Gigabit Ethernet
#device		dc		# DEC/Intel 21143 and various workalikes
#device		et		# Agere ET1310 10/100/Gigabit Ethernet
#device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
#device		jme		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
#device		lge		# Level 1 LXT1001 gigabit Ethernet
#device		msk		# Marvell/SysKonnect Yukon II Gigabit Ethernet
#device		nfe		# nVidia nForce MCP on-board Ethernet
#device		nge		# NatSemi DP83820 gigabit Ethernet
#device		nve		# nVidia nForce MCP on-board Ethernet Networking
#device		pcn		# AMD Am79C97x PCI 10/100 (precedence over 'le')
device		re		# RealTek 8139C+/8169/8169S/8110S
#device		rl		# RealTek 8129/8139
#device		sf		# Adaptec AIC-6915 (``Starfire'')
#device		sge		# Silicon Integrated Systems SiS190/191
#device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
#device		sk		# SysKonnect SK-984x & SK-982x gigabit Ethernet
#device		ste		# Sundance ST201 (D-Link DFE-550TX)
#device		stge		# Sundance/Tamarack TC9021 gigabit Ethernet
#device		tl		# Texas Instruments ThunderLAN
#device		tx		# SMC EtherPower II (83c170 ``EPIC'')
#device		vge		# VIA VT612x gigabit Ethernet
#device		vr		# VIA Rhine, Rhine II
#device		wb		# Winbond W89C840F
#device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')

# ISA Ethernet NICs.  pccard NICs included.
#device		cs		# Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
#device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
#device		ex		# Intel EtherExpress Pro/10 and Pro/10+
#device		ep		# Etherlink III based cards
#device		fe		# Fujitsu MB8696x based cards
#device		sn		# SMC's 9000 series of Ethernet chips
#device		xe		# Xircom pccard Ethernet

# Wireless NIC cards
# all disabled

# FireWire support
#device		firewire	# FireWire bus code
# sbp(4) works for some systems but causes boot failure on others
#device		sbp		# SCSI over FireWire (Requires scbus and da)
#device		fwe		# Ethernet over FireWire (non-standard!)
#device		fwip		# IP over FireWire (RFC 2734,3146)
#device		dcons		# Dumb console driver
#device		dcons_crom	# Configuration ROM for dcons

# Sound support
device		sound		# Generic sound driver (required)
#device		snd_es137x	# Ensoniq AudioPCI ES137x
device		snd_hda		# Intel High Definition Audio
device		snd_ich		# Intel, NVidia and other ICH AC'97 Audio
#device		snd_uaudio	# USB Audio
#device		snd_via8233	# VIA VT8233x Audio
```


----------



## wblock@ (Jan 15, 2012)

See Simplifying FreeBSD Kernel Config Files.  It shows how to make the new kernel config be just a diff from GENERIC.  These are much shorter and easier to read.


----------



## bsus (Jan 15, 2012)

Hi,

for me I it is much easier to have all option in one file with one view.

Also I would have to fill out the config file with nodevice and because I disable a high grade of devices it becomes much more difficult.

Is there a way to get more informations about what went wrong building the kernel?


----------



## ondra_knezour (Jan 15, 2012)

Did you build world before kernel?

http://freebsd.1045724.n5.nabble.com/Possible-to-build-9-stable-kernel-on-8-2-td4995576.html


----------



## wblock@ (Jan 15, 2012)

bsus said:
			
		

> for me I it is much easier to have all option in one file with one view.



That one view doesn't tell whether the config file has been updated to match all the default settings and devices in GENERIC.  If/when GENERIC changes (as it probably did for FreeBSD 9.0), you have to copy the changes into the custom config.  If you follow -STABLE, GENERIC can change at any time.



> Also I would have to fill out the config file with nodevice and because I disable a high grade of devices it becomes much more difficult.



Or just change what you have (untested):

```
s/^#device/nodevice/g
s/^#options/nooptions/g
```

It takes a little more than that, but not much.


----------



## bsus (Jan 15, 2012)

> when GENERIC changes..


This is a good reason, however I first want to make it work 

So I tried compiling the GENERIC kernel... it breaks down with the same error, so there has to be something wrong with the binutils or something else.

The errors happens by using 'ld', but this should be uptodate.


What DESTDIR should I use for build work (is this recommand)?


----------



## kpa (Jan 15, 2012)

Are you sure you have RELEASE 9.0 sources and not 9-STABLE? If you're using csup(1) the correct tag is RELENG_9_0 and if you're using devel/subversion then the correct path for the repository is base/releng/9.0.


----------



## wblock@ (Jan 16, 2012)

One note about using svn instead of cvs: svn has a larger history.  For 8-STABLE, /usr/src checked out with csup(1) is about 546M.  With svn, it is 1.1G.


----------



## bsus (Jan 18, 2012)

When using buildworld to build kernel and all there no complains. But an only *make buildkernel KERNCONF=CONF* doesn't work since 9.0

However now it works


----------

