Re: is building kernel in /sys/amd64/conf depreciated in 11 ?

2015-10-21 Thread John-Mark Gurney
John wrote this message on Tue, Oct 20, 2015 at 17:40 +0100:
> as subject - is building kernel in /sys/amd64/conf depreciated?
> 
> I can get a modified kernel to build and install in /usr/src but not
> in /sys/amd64/conf. I always used to be able to do this in there, then
> again I either used -RELEASE or -STABLE. I used to do it like this:
> 
> 1. cd /sys/amd64/conf
> 2. cp GENERIC MYKERNEL
> 3. [make changes to MYKERNEL and save]
> 4. config MYKERNEL
> 5. cd ../compile/MYKERNEL
> 6. make cleandepend && make depend && make
> 
> This fails *every time* during make. It fails at this point:
> 
> Make[1]: "/storage/usr/ports/Mk/bsd.port.mk" line 1204: UNAME_r
> (11.0-CURRENT) and OSVERSION () do not agree on major version number.
  

You're trying to build a 11-CURRENT kernel on a 10-something userland
from the looks of it, and that has never been supported, it may work,
but when it doesn't, FreeBSD won't fix it...

If you do like building kernels the above way, you can do:
cd /usr/src
make kernel-toolchain
make buildenv   # which launches a shell
cd /amd64/conf
... traditional build method ...

The kernel-toolchain/buildenv builds the tools and sets up the
environment just like buildkernel does for the kernel compiles...

Or you need to update your compile box's userland to match the kernel
version that you're building...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: is building kernel in /sys/amd64/conf depreciated in 11 ?

2015-10-21 Thread John

On Tue, Oct 20, 2015 at 11:55:04PM -0400, Benjamin Kaduk wrote:


Why is your kernel build pulling in bsd.port.mk?  Please post src.conf and
make.conf.


[make.conf]
MALLOC_PRODUCTION=yes
WITH_CCACHE_BUILD=yes
MAKE_JOBS_NUMBER=16

[src.conf]
PORTS_MODULES=x11/nvidia-driver


This is not exactly an answer to your question, but buildkernel has been
the preferred way to build a kernel for at least four major releases.  The
manual-config method has limped along because enough of the old-guard of
committers has it in finger memory, but manual-config has been excised
from the handbook for quite some time.


It answers my question ;)
Though never a commiter, I have been using FreeBSD as a server OS
since 2.0.5 and as a desktop since 2.1.7 so your comment about
old-guard applies to me for sure ;)

I'll recompile the newer way in future. Thanks for the info.
--
John 
___

freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: is building kernel in /sys/amd64/conf depreciated in 11 ?

2015-10-20 Thread Manfred Antar

> On Oct 20, 2015, at 8:55 PM, Benjamin Kaduk  wrote:
> 
> On Tue, 20 Oct 2015, John wrote:
> 
>> Hi,
>> 
>> as subject - is building kernel in /sys/amd64/conf depreciated?
>> 
>> I can get a modified kernel to build and install in /usr/src but not
>> in /sys/amd64/conf. I always used to be able to do this in there, then
>> again I either used -RELEASE or -STABLE. I used to do it like this:
>> 
>> 1. cd /sys/amd64/conf
>> 2. cp GENERIC MYKERNEL
>> 3. [make changes to MYKERNEL and save]
>> 4. config MYKERNEL
>> 5. cd ../compile/MYKERNEL
>> 6. make cleandepend && make depend && make
>> 
>> This fails *every time* during make. It fails at this point:
>> 
>> Make[1]: "/storage/usr/ports/Mk/bsd.port.mk" line 1204: UNAME_r
> 
> Why is your kernel build pulling in bsd.port.mk?  Please post src.conf and
> make.conf.
> 
>> (11.0-CURRENT) and OSVERSION () do not agree on major version number.
>>  *** [all] Error code 1
>> make: stopped in /storage/usr/src/sys/amd64/compile/PUMPKIN
>> The error still happens if I refresh all my sources, build a new world
>> with a generic kernel and reboot and then try the old method again.
>> 
>> I *can* build a custom kernel if I cd into /usr/src and do
>> 
>> 1. make buildkernel KERNCONF=MYKERNEL
>> 2. make installkernel KERNCONF=MYKERNEL
>> 
>> Basically I'm asking is this change of behaviour documented and/or am
>> I doing it wrong?
> 
> This is not exactly an answer to your question, but buildkernel has been
> the preferred way to build a kernel for at least four major releases.  The
> manual-config method has limped along because enough of the old-guard of
> committers has it in finger memory, but manual-config has been excised
> from the handbook for quite some time.

I Still do it the old way on current amd64:

1. cd /sys/amd64/conf
2. cp GENERIC MYKERNEL
3. [make changes to MYKERNEL and save]
4. config MYKERNEL
5. cd ../compile/MYKERNEL
6. make cleandepend && make depend && make

Although i have a script that does all of the above.
Works fine here. Must be something in you src.conf, make.conf or MYKERNEL

Here is the script that works for me:

#!/bin/sh
cd /usr/src/usr.sbin/config
make obj
make clean cleandepend
make obj
make depend all install
date > /tmp/date.txt
doclean=true
autoinstall=true
kernelname=pozo
for arg; do
case $arg in
-n*)doclean=false;;
-i*)autoinstall=true;;
-*) usage;;
*)  kernelname=$arg;;
esac
done

if [ -z "$kernelname" ]; then
kernelname=`hostname -s | tr a-z A-Z`
fi

cd /sys/`uname -m`/conf
if [ ! -e $kernelname ]; then
echo "$0: kernel configuration file $kernelname does not exist"
echo -n 'Create one from GENERIC [n]?'
if read ans && expr $ans : 'y*' >/dev/null; then
sed '/^#SED0/,$d' < GENERIC > $kernelname
lsdev -c >> $kernelname
echo '#SED0' >> $kernelname
sed '1,/^#SED0/d' < GENERIC >> $kernelname
else
exit 1
fi
fi

set -e
rm -rf /sys/amd64/compile/pozo
config  $kernelname

cd /sys/amd64/compile/$kernelname
if $doclean; then
make clean
fi

make depend
make -j8 all

if $autoinstall; then
make install
fi

date >> /tmp/date.txt
cat /tmp/date.txt
rm /tmp/date.txt

exit 0


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: is building kernel in /sys/amd64/conf depreciated in 11 ?

2015-10-20 Thread Benjamin Kaduk
On Tue, 20 Oct 2015, John wrote:

> Hi,
>
> as subject - is building kernel in /sys/amd64/conf depreciated?
>
> I can get a modified kernel to build and install in /usr/src but not
> in /sys/amd64/conf. I always used to be able to do this in there, then
> again I either used -RELEASE or -STABLE. I used to do it like this:
>
> 1. cd /sys/amd64/conf
> 2. cp GENERIC MYKERNEL
> 3. [make changes to MYKERNEL and save]
> 4. config MYKERNEL
> 5. cd ../compile/MYKERNEL
> 6. make cleandepend && make depend && make
>
> This fails *every time* during make. It fails at this point:
>
> Make[1]: "/storage/usr/ports/Mk/bsd.port.mk" line 1204: UNAME_r

Why is your kernel build pulling in bsd.port.mk?  Please post src.conf and
make.conf.

> (11.0-CURRENT) and OSVERSION () do not agree on major version number.
>   *** [all] Error code 1
>  make: stopped in /storage/usr/src/sys/amd64/compile/PUMPKIN
> The error still happens if I refresh all my sources, build a new world
> with a generic kernel and reboot and then try the old method again.
>
> I *can* build a custom kernel if I cd into /usr/src and do
>
> 1. make buildkernel KERNCONF=MYKERNEL
> 2. make installkernel KERNCONF=MYKERNEL
>
> Basically I'm asking is this change of behaviour documented and/or am
> I doing it wrong?

This is not exactly an answer to your question, but buildkernel has been
the preferred way to build a kernel for at least four major releases.  The
manual-config method has limped along because enough of the old-guard of
committers has it in finger memory, but manual-config has been excised
from the handbook for quite some time.

-Ben
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


is building kernel in /sys/amd64/conf depreciated in 11 ?

2015-10-20 Thread John

Hi,

as subject - is building kernel in /sys/amd64/conf depreciated?

I can get a modified kernel to build and install in /usr/src but not
in /sys/amd64/conf. I always used to be able to do this in there, then
again I either used -RELEASE or -STABLE. I used to do it like this:

1. cd /sys/amd64/conf
2. cp GENERIC MYKERNEL
3. [make changes to MYKERNEL and save]
4. config MYKERNEL
5. cd ../compile/MYKERNEL
6. make cleandepend && make depend && make

This fails *every time* during make. It fails at this point:

Make[1]: "/storage/usr/ports/Mk/bsd.port.mk" line 1204: UNAME_r
(11.0-CURRENT) and OSVERSION () do not agree on major version number.
  
*** [all] Error code 1
 
make: stopped in /storage/usr/src/sys/amd64/compile/PUMPKIN 


The error still happens if I refresh all my sources, build a new world
with a generic kernel and reboot and then try the old method again.

I *can* build a custom kernel if I cd into /usr/src and do

1. make buildkernel KERNCONF=MYKERNEL
2. make installkernel KERNCONF=MYKERNEL

Basically I'm asking is this change of behaviour documented and/or am
I doing it wrong?

thanks,
--
John
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"