# kernel compile



## ericbsd (Dec 30, 2008)

Where can I find the kernels compiled folders once I have done a make buildkernel KERNCONF=GENERIC.
thank you


----------



## wsw1wsw2 (Dec 30, 2008)

You can find the object files in /usr/obj/$(arch)/ .


----------



## ericbsd (Dec 30, 2008)

i just find usr/obj/usr.


----------



## graudeejs (Dec 30, 2008)

ericturgeon said:
			
		

> Where can I find the kernels compiled folders once I have done a make buildkernel KERNCONF=GENERIC.
> thank you



what do you want to do?


----------



## ericbsd (Dec 30, 2008)

juste  know all the system if i do somting like that or buildworl were i can find all file. I work in a project call GhostBSD like PCBSD. But whit gnome I wont make a system like ubuntu with BSD.


----------



## Lowell (Dec 30, 2008)

/usr/src/sys/${arch}/compile/GENERIC


----------



## ericbsd (Dec 30, 2008)

server# cd /usr/src/sys/${arch}/compile/
arch: Undefined variable.
server#


----------



## ericbsd (Dec 30, 2008)

server# cd /usr/src/sys/${arch}/compile/GENERIC
arch: Undefined variable.
server# cd /usr/src/sys/${arch}/compile/
arch: Undefined variable.
server#


----------



## ale (Dec 30, 2008)

replace $arch with the output of uname -m


----------



## Darwin (Dec 30, 2008)

try 
cd /usr/src/sys/`uname -m`/compile/GENERIC


----------



## ericbsd (Dec 31, 2008)

server# cd /usr/src/sys/`uname -m`/compile/GENERIC
/usr/src/sys/i386/compile/GENERIC: No such file or directory.


----------



## ericbsd (Dec 31, 2008)

server# cd /usr/src/sys
server# ls
Makefile	ddb		libkern		netncp		powerpc
amd64		dev		modules		netsmb		rpc
arm		fs		net		nfs		security
boot		gdb		net80211	nfs4client	sparc64
bsm		geom		netatalk	nfsclient	sun4v
cam		gnu		netgraph	nfsserver	sys
cddl		i386		netinet		nlm		tools
compat		i4b		netinet6	opencrypto	ufs
conf		ia64		netipsec	pc98		vm
contrib		isa		netipx		pccard		xdr
crypto		kern		netnatm		pci
server#


----------



## anemos (Dec 31, 2008)

ericturgeon said:
			
		

> Where can I find the kernels compiled folders once I have done a make buildkernel KERNCONF=GENERIC.
> thank you



Once you do 

```
make buildkernel KERNCONF=MYKERNEL
```

you can find the object files in /usr/obj/usr/src/sys/MYKERNEL/

Then, after 
	
	



```
make installkernel KERNCONF=MYKERNEL
```
as the Handbook says:


> The new kernel will be copied to the /boot/kernel directory as /boot/kernel/kernel and the old kernel will be moved to /boot/kernel.old/kernel. Now, shutdown the system and reboot ...


----------



## ericbsd (Dec 31, 2008)

ok thanks very use full.ï¿½e


----------



## Martyn (Feb 9, 2009)

Hello!

Please give an advice on the following problem - when building my customized kernel, this operation interrupts because of an error:


> MAKE=make sh /usr/src/sys/conf/newvers.sh MARKER
> cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -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  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror  vers.c
> linking kernel.debug
> nlm_advlock.o(.text+0x11d8): In function `nlm_advlock_internal':
> ...



What is wrong? I've done everything according to the Handbook.

My kernel congiguration file is in attachment.


----------



## DutchDaemon (Feb 9, 2009)

You have NFSLOCKD in your kernel. I guess it needs the other NFS options (client and/or server) as well. Either add those, or remove NFSLOCKD.


----------



## Martyn (Feb 9, 2009)

Thanx, that helped.


----------



## Martyn (Feb 9, 2009)

Have just installed my kernel, but after reboot there appears a problem with mounting:



> Trying to mount root from ufs:/dev/ad0s2a


(The slice with OS is ad0s2)

and then:


> mountroot>


A tried to type:
ufs:ad0s2a
ufs:ad0s2
da4s2
but useless.


Please help.


----------



## richardpl (Feb 9, 2009)

Why is *eisa* commented out?

When booting, is ad0 or something similar displayed by kernel?


----------



## Martyn (Feb 9, 2009)

Is it so necessary? It was written in handbook, that this option is for eisa motherboards, mine one isn't of that kind (at least i think so  ) - that is why i commented that string.

OK, i found smth. When booting with old kernel (working one) my HD was *ad0*, that's why it says 


> Trying to mount root from ufs:/dev/ad0s2a


And when booting with customized kernel HD is *ad4*.
Yes, i tried to type 


> ufs:ad4s2a


 And it seemed to continue loading, *but* several errors showed up:


> No suitable dump device was found





> swapon: ad0s2b: No such file or directory





> Mounting /etc/fstab dilesystems failed, startup aborted





> ERROR: ABORTING BOOT (sending SINGTERM to parent)!


Then the only i can do is to logon from shell. 
Can anybody explain me, what's wrong? Why did HD became ad4 instead of ad0 (CD-ROM was and is cd0).
What should i do to make it work?


----------



## Djn (Feb 10, 2009)

These things happen now and then - it's not completely given which order your IDE channels are numbered in when you start swapping kernels.

When you get to the "mount /etc/fstab failed" etc, you should be able to boot a singleuser shell.
If you do _mount -u -w /_ you'll get write-access to your root partition. You can then use an editor to fix /etc/fstab - I'd suggest mounting /usr so you can use ee or vim or whatever you prefer.

Alternatively, boot with the working kernel, edit the fstab, and reboot to the new kernel.


----------



## Martyn (Feb 10, 2009)

*Djn*, thank you, i'll try that.


----------

