Building a New Kernel on a 4.x System

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Sun, 11 Feb 2001 01:04:36



Having built my kernel more than a few times on my 3.x systems, I decided
to do the same on my laptop, in order to get a smaller kernel, and to get
sound.

I change to /usr/src/sys/i386/conf and then ...

# cp GENERIC GATEWAY

I edit the new kernel file, whip out all the devices that I know my machine
doesn't have, and leave some in, that I'm not sure about, as ten to one it
will go pear-shaped on me.  

Then, following the directions in usr/share/doc/handbook/kernelconfig-
building.html, I run ...

gateway# cd /usr/src/
gateway# make buildkernel KERNEL=GATEWAY

I get the usual messages, followed by :

/usr/src/sys/dev/usb/if_aue.c:96: miibus_if.h: No such file or directory
mkdep: compile failed
*** Error code 1

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

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

Stop in /usr/src.

Hmm ... so back to the handbook, and I see that it mentions 'build world'.

Thing is ... I have (at present) no means to perform a backup, before doing
this.  Is it really necessary to build world before recompiling the kernel,
or are the error messages above, due to something else, which can be resolved
without build world ?

Thanks in advance.

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by JoeChe » Sun, 11 Feb 2001 01:43:10


Please try this, unmark the
device miibus
in you configuration file.

Joe


> Having built my kernel more than a few times on my 3.x systems, I decided
> to do the same on my laptop, in order to get a smaller kernel, and to get
> sound.

> I change to /usr/src/sys/i386/conf and then ...

> # cp GENERIC GATEWAY

> I edit the new kernel file, whip out all the devices that I know my
machine
> doesn't have, and leave some in, that I'm not sure about, as ten to one it
> will go pear-shaped on me.

> Then, following the directions in usr/share/doc/handbook/kernelconfig-
> building.html, I run ...

> gateway# cd /usr/src/
> gateway# make buildkernel KERNEL=GATEWAY

> I get the usual messages, followed by :

> /usr/src/sys/dev/usb/if_aue.c:96: miibus_if.h: No such file or directory
> mkdep: compile failed
> *** Error code 1

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

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

> Stop in /usr/src.

> Hmm ... so back to the handbook, and I see that it mentions 'build world'.

> Thing is ... I have (at present) no means to perform a backup, before
doing
> this.  Is it really necessary to build world before recompiling the
kernel,
> or are the error messages above, due to something else, which can be
resolved
> without build world ?

> Thanks in advance.

> --

> Death Penalty Discussion Group :

http://www.egroups.com/group/death-penalty

- Show quoted text -

Quote:> ********
> PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
> Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93


 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Sun, 11 Feb 2001 02:02:48



> Please try this, unmark the
> device miibus
> in you configuration file.

I did so; it goes further, and then stops with ...

/tmp/ccu12420.s:2406: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1266.
/tmp/ccu12420.s:2411: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1308.
/tmp/ccu12420.s:2414: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1331.
/tmp/ccu12420.s:2416: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1350.
/tmp/ccu12420.s:2422: Error: Subtraction of two symbols in different sections "vm86pa" {.data section} - "KERNBASE" {*UND* section} at file address 1392.
/tmp/ccu12420.s:2428: Error: Subtraction of two symbols in different sections "vm86pa" {.data section} - "KERNBASE" {*UND* section} at file address 1434.
/tmp/ccu12420.s:2434: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1457.
/tmp/ccu12420.s:2437: Error: Subtraction of two symbols in different sections "IdlePTD" {.data section} - "KERNBASE" {*UND* section} at file address 1473.
/tmp/ccu12420.s:2440: Error: Subtraction of two symbols in different sections ".data" {.data section} - "KERNBASE" {*UND* section} at file address 1496.
/tmp/ccu12420.s:2443: Error: Subtraction of two symbols in different sections "IdlePTD" {.data section} - "KERNBASE" {*UND* section} at file address 1515.
/tmp/ccu12420.s:2446: Error: Subtraction of two symbols in different sections "IdlePTD" {.data section} - "KERNBASE" {*UND* section} at file address 1538.
/tmp/ccu12420.s:2449: Error: Subtraction of two symbols in different sections "IdlePTD" {.data section} - "KERNBASE" {*UND* section} at file address 1557.
*** Error code 1

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

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

Stop in /usr/src.

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by timcm-nos.. » Sun, 11 Feb 2001 02:33:28


If you haven't updated your source and run make world, you should use the config, make
depend...  method of kernel compile as it says in the handbook section on kernel
configuration.  Yes the buildkernel target should work anyway, but it doesn't.

                                                        Tim


> Having built my kernel more than a few times on my 3.x systems, I decided
> to do the same on my laptop, in order to get a smaller kernel, and to get
> sound.
> I change to /usr/src/sys/i386/conf and then ...
> # cp GENERIC GATEWAY
> I edit the new kernel file, whip out all the devices that I know my machine
> doesn't have, and leave some in, that I'm not sure about, as ten to one it
> will go pear-shaped on me.  
> Then, following the directions in usr/share/doc/handbook/kernelconfig-
> building.html, I run ...
> gateway# cd /usr/src/
> gateway# make buildkernel KERNEL=GATEWAY
> I get the usual messages, followed by :
> /usr/src/sys/dev/usb/if_aue.c:96: miibus_if.h: No such file or directory
> mkdep: compile failed
> *** Error code 1
> Stop in /usr/obj/usr/src/sys/GATEWAY.
> *** Error code 1
> Stop in /usr/src.
> *** Error code 1
> Stop in /usr/src.
> Hmm ... so back to the handbook, and I see that it mentions 'build world'.
> Thing is ... I have (at present) no means to perform a backup, before doing
> this.  Is it really necessary to build world before recompiling the kernel,
> or are the error messages above, due to something else, which can be resolved
> without build world ?
> Thanks in advance.
> --

> Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
> ********
> PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
> Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Sun, 11 Feb 2001 02:57:23



> If you haven't updated your source and run make world, you should use the config, make
> depend...  method of kernel compile as it says in the handbook section on kernel
> configuration.  Yes the buildkernel target should work anyway, but it doesn't.

That's not what it says in the handbook.  I quote :

For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 4.x or higher), use the following commands (be sure you have built world
before!):

    # cd /usr/src
    # make buildkernel KERNEL=MYKERNEL
    # make installkernel KERNEL=MYKERNEL

That's what I have: 4.x ...

# uname -a

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Sebastian Benne » Sun, 11 Feb 2001 04:32:23



<snip>

> That's not what it says in the handbook.  I quote :

> For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 4.x or higher), use the following commands (be sure you have built world
> before!):

>     # cd /usr/src
>     # make buildkernel KERNEL=MYKERNEL
>     # make installkernel KERNEL=MYKERNEL

> That's what I have: 4.x ...

> # uname -a


Hi Desmond Coughlan,

I am sorry, that I have to correct you. The FreeBSD handbook says:

http://www.freebsd.org/handbook/kernelconfig-building.html

...
If you have just upgraded to a newer version of 4.X or higher (ie from 3.X
to 4-STABLE, or even from 4-STABLE to a later version of 4-STABLE), make
sure you have built the world, and then run the following commands:

    # cd /usr/src
    # make buildkernel KERNEL=MYKERNEL
    # make installkernel KERNEL=MYKERNEL

Note: In FreeBSD-CURRENT, you must replace KERNEL= with KERNCONF=.

If you have not upgraded your source tree in any way (you have not run
             ^     ^
CVSup, CTM, or used anoncvs), then you should use the config, make depend,
make, make install sequence.
...

Especially note the last part.

# cd /usr/src/sys/i386/conf
# cp GENERIC MYKERNEL

# /usr/sbin/config MYKERNEL
# cd ../../compile/MYKERNEL
# make depend
# make
# make install

This worked flawlessly for me with FreeBSD 4.0, 4.1.1 and 4.2.
Also make sure that you have got a securitylevel < 1, otherwise you have
to decrease it and reboot your machine, before installing the kernel.
Another way is to boot into single-user mode and install the kernel then.

Ciao,

Sebastian Benner

--
Sebastian Benner        Universit?tsrechenzentrum
                        FernUniversit?t Hagen
                        Feithstra?e 140 / AVZ I
Tel. +49 2331 987-2868  D - 58084 Hagen
--

http://BeZip.de             shareware-archiv for BeOS
                        more than 750 entries

 
 
 

Building a New Kernel on a 4.x System

Post by Lee Ha » Sun, 11 Feb 2001 10:37:14


I hit a similar problem recently, building a new kernel for 4.2-RELEASE
on a Compaq Celeron

Long story short:
I ended up pulling things out of the kernel config file a few at a time
until I found the one that was causing the trouble. I think it turned out
to be a SCSI controller (even though I have no SCSI in the machine).

Whatever works.

 
 
 

Building a New Kernel on a 4.x System

Post by Michel Talo » Sun, 11 Feb 2001 09:48:02




>> If you haven't updated your source and run make world, you should use the config, make
>> depend...  method of kernel compile as it says in the handbook section on kernel
>> configuration.  Yes the buildkernel target should work anyway, but it doesn't.
> That's not what it says in the handbook.  I quote :
> For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 4.x or higher), use the following commands (be sure you have built world
> before!):
>     # cd /usr/src
>     # make buildkernel KERNEL=MYKERNEL
>     # make installkernel KERNEL=MYKERNEL
> That's what I have: 4.x ...
> # uname -a


How do you succeed being always and everywhere the guy whos has problems with
everything! You should learn to read before running computers.

First the USB ethernet devices (kue etc.) require miibus, so if you put them
in your kernel you need device miibus. Second you don't need to put them in
your kernel because they can be loaded as modules. See the list of modules in
/modules. For reference i have built world yesterday for my laptop and all
went out fine doing exactly what you mention above.

--
Michel Talon

 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Sun, 11 Feb 2001 18:56:20


{snip}

Quote:> > That's not what it says in the handbook.  I quote :

{snip}

Quote:> How do you succeed being always and everywhere the guy whos has problems with
> everything! You should learn to read before running computers.

Si la seule rponse dont vous tes capable, est d'insulter, je vous
saurais gr de vous abstenir.  L'anglais est ma langue maternelle, et si
je vous dis que c'est indiqu ainsi dans le Handbook, vous pouvez tre
s?r que c'est le cas.  

I quote, and this is taken directly from the file 'kernelconfig-building.html'
on my system, in the directory /usr/share/doc/handbook/ ...

'For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 4.x or higher), use the following commands (be sure you have built world
before!):

    # cd /usr/src
    # make buildkernel KERNEL=MYKERNEL
    # make installkernel KERNEL=MYKERNEL'

Note, 'For FreeBSD 4.x or later'.  This is what I have: FreeBSD 4.x or later.

This is why I tried the commands noted above.

There is enough abuse (not all of it without justification) thrown at those
who come in here and pose questions without having read the documentation.  
Please refrain from abusing those who _do_ read documentation, especially
when said documentation is unclear.

{snip}

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Sun, 11 Feb 2001 19:02:04


{snip}

Quote:> I am sorry, that I have to correct you. The FreeBSD handbook says:

> http://www.freebsd.org/handbook/kernelconfig-building.html

Then there is obviously a discrepancy between the handbook as available on
the FreeBSD site, and the handbook that I have on my hard drive, and which
I tend to use, to save bandwidth.  I have placed a copy of the page on
the following site, unaltered except for the <BLINK> tab, to draw attention
to the offending paragraph :

http://www.coughlan.net/desmond/unix/kernelconfig-building.html

{snip}

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Jimmy Campbel » Mon, 12 Feb 2001 04:30:14


Still... the handbook on freebsd.org is updated more frequently than the one
sitting dormant on your hard drive : )
Have you at least _tried_ the config, make, make depend method?

-Jimmy Campbell


> On Fri, 9 Feb 2001 20:32:23 +0100, Sebastian Benner

> {snip}

> > I am sorry, that I have to correct you. The FreeBSD handbook says:

> > http://www.freebsd.org/handbook/kernelconfig-building.html

> Then there is obviously a discrepancy between the handbook as available on
> the FreeBSD site, and the handbook that I have on my hard drive, and which
> I tend to use, to save bandwidth.  I have placed a copy of the page on
> the following site, unaltered except for the <BLINK> tab, to draw
attention
> to the offending paragraph :

> http://www.coughlan.net/desmond/unix/kernelconfig-building.html

> {snip}

> --

> Death Penalty Discussion Group :

http://www.egroups.com/group/death-penalty

- Show quoted text -

Quote:> ********
> PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
> Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Mon, 12 Feb 2001 08:17:35



> Still... the handbook on freebsd.org is updated more frequently than the one
> sitting dormant on your hard drive : )
> Have you at least _tried_ the config, make, make depend method?

:-)  Of course I have, and it worked.  What irritated me was the patronising,
'can you read' type of response, when I _had_ read the doc !

Thanks.  :-)

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Michel Talo » Mon, 12 Feb 2001 07:22:17




> {snip}
>> > That's not what it says in the handbook.  I quote :
> {snip}
>> How do you succeed being always and everywhere the guy whos has problems with
>> everything! You should learn to read before running computers.
> Si la seule rponse dont vous tes capable, est d'insulter, je vous
> saurais gr de vous abstenir.  L'anglais est ma langue maternelle, et si
> je vous dis que c'est indiqu ainsi dans le Handbook, vous pouvez tre
> s?r que c'est le cas.  
> I quote, and this is taken directly from the file 'kernelconfig-building.html'
> on my system, in the directory /usr/share/doc/handbook/ ...

You are once more proving that you are unable to READ. I have precisely said
that the procedure you mention is the correct one as preconized by the
FreeBSD staff and moreover that it worked for me. But you did not read the
kernel config documentation which states clearly that device miibus is
required if you want to include device kue. Moreover the error you got
is so explicit that only the completely illiterate one cannot understand
the cause of the error. I begin to understand why D. Kool is so pleased
playing with you. Advertising you are a computer professionnal (which i am
not) and doing permanently the most obvious errors is at least paradoxal.
This being said i agree with you that newsgroups are here to help
users and that i have been rude out of exasperation.

> 'For FreeBSD 4.x or later (or upgrading from FreeBSD 3.x to FreeBSD 4.x or higher), use the following commands (be sure you have built world
> before!):
>     # cd /usr/src
>     # make buildkernel KERNEL=MYKERNEL
>     # make installkernel KERNEL=MYKERNEL'
> Note, 'For FreeBSD 4.x or later'.  This is what I have: FreeBSD 4.x or later.
> This is why I tried the commands noted above.
> There is enough abuse (not all of it without justification) thrown at those
> who come in here and pose questions without having read the documentation.  
> Please refrain from abusing those who _do_ read documentation, especially
> when said documentation is unclear.
> {snip}
> --

> Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
> ********
> PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
> Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

--
Michel Talon
 
 
 

Building a New Kernel on a 4.x System

Post by Desmond Coughl » Tue, 13 Feb 2001 17:13:48


{snip}

Quote:> > I quote, and this is taken directly from the file 'kernelconfig-building.html'
> > on my system, in the directory /usr/share/doc/handbook/ ...
> You are once more proving that you are unable to READ. I have precisely said
> that the procedure you mention is the correct one as preconized by the
> FreeBSD staff and moreover that it worked for me. But you did not read the
> kernel config documentation which states clearly that device miibus is
> required if you want to include device kue. Moreover the error you got
> is so explicit that only the completely illiterate one cannot understand
> the cause of the error.

Of course.  Errors such as ...

/tmp/ccu12420.s:2406: Error: Subtraction of two symbols in different sections ".
data" {.data section} - "KERNBASE" {*UND* section} at file address 1266.
/tmp/ccu12420.s:2411: Error: Subtraction of two symbols in different sections ".
data" {.data section} - "KERNBASE" {*UND* section} at file address 1308.
/tmp/ccu12420.s:2414: Error: Subtraction of two symbols in different sections ".

are just _so_ obvious, aren't they ?  Damn, I'm surprised that everyone doesn't
understand what that means.  'Subtraction of two symbols in different sections',
how could _anyone_ not know what that means ..?  Only yesterday, my friend's
ten-year-old daughter mentioned what it meant, but you know, I'm so illiterate
that I didn't understand what she was saying ...

Quote:> I begin to understand why D. Kool is so pleased
> playing with you.

Don Kool was a troll.  He is now facing criminal charges, not because of
trolling, but because he broke the law.  

Quote:> Advertising you are a computer professionnal (which i am
> not) and doing permanently the most obvious errors is at least paradoxal.

It would not take too long to count the number of 'professionals' on this
newsgroup, who ask questions.  As far as I was aware (correct me if I'm
wrong), that is the purpose the newsgroup.  Or perhaps it's just to flatter
your ego, that it exists ...

Quote:> This being said i agree with you that newsgroups are here to help
> users and that i have been rude out of exasperation.

Indeed.  Calling an error 'obvious' because you understand it, is the height
of arrogance.

--

Death Penalty Discussion Group : http://www.egroups.com/group/death-penalty
********
PGP Public Key: http://www.coughlan.net/desmond/pgp/pubring.pkr
Fingerprint: 3F1F C838 88D5 2659 B00A  6DF6 6883 FB9C E34A AC93

 
 
 

Building a New Kernel on a 4.x System

Post by Nick Hilliar » Tue, 13 Feb 2001 20:46:14



> Don Kool was a troll.  He is now facing criminal charges, not because of
> trolling, but because he broke the law.

Just out of curiousity, what for, and how do you know?

Nick

 
 
 

1. Building a new kernel, my system go asleep !!

Hello all,
I have a question about how to compile the kernel and I don't know if
post this request in the good forum. Accept my apologies if its not
the case.

My system go to sleep when I build a new kernel or do some long tasks
when I don't do any action on the keybord. So if i'm not striking some
keybord keys or move the mice while I'm compiling a new kernel, which
basically may take some time, my system go to in a wait state until I
do something.... and it takes some more time again !!

I tried to unvalidate APM daemons without any success. I guess this is a
built in procedure within the kernel but I would like to know if I can
disable it for some time and then re-enable it again when I finish.

Thank you in advance for any idea on the subject.

--
----------------------------------------------------------------------

             |                                                |  /\\
----------------------------------------------------------------_\_V--

2. FreeBSD 2.1.6 vs 2.2.X

3. How to build and programming a new interface for system call in kernel?

4. printing frustration with Solaris 7 (Intel)

5. RH Linux 7.2 iptables

6. Kernel Panic: Can't mount root - after building new kernel

7. Ultra2 + A1000

8. How to increase the kernel vs user memory when building a new kernel

9. Problem in upgrading kernel -- can't boot the system with new 2.4.1 kernel

10. new kernel OK but what about system.map, kernel.h and module-info

11. advice to build a new system, please

12. Building a new system (was: Can anyone give me some help with this? )