From: Angus Hedger on
On Fri, Aug 13, 2010 at 7:46 PM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
> On Fri, 13 Aug 2010 13:27:50 -0400 (EDT), Arthur Machlas wrote:
>> Stephen Powell wrote:
>>> The latest version of my kernel building web page, revised yesterday
>>> (http://www.wowway.com/~zlinuxman/Kernel.htm), recommends unpacking,
>>> configuring, and compiling the kernel from its default location
>>> as a non-root user which is a member of group src.  It can be the
>>> system administrator's non-superuser self or an id created
>>> specifically for kernel building that is enrolled in group src,
>>> at the administrator's discretion.  I have tested the procedure,
>>> and it works.  That's my current recommendation.  Obviously, you
>>> are entitled to disagree if you like.
>>
>> It's a pretty great document Stephen, and I don't think I mentioned
>> earlier that it was my first and authoritative reference when first
>> starting to build kernels, for exactly the reason you noted, much
>> documentation is out-of-date or not debian specific. So thanks for
>> that, belatedly.
>>
>> One thing I think is missing, that I had to discover myself, and
>> perhaps is related to the OPs question, is that sometimes you need the
>> headers and even the source for the custom kernels, e.g., Virtualbox
>> from upstream. In which case, adding kernel_headers and/or
>> kernel_source to the make-kpkg build line is a noteworthy item, since
>> it will build debs' and take care of installing them correctly without
>> linking back to the build directory when searching for source.
>
> That is valuable real-world feedback from a real-world user, Arthur.
> I will see what I can do to improve the document in this respect.
> I haven't done anything like that myself; so if you have some suggested
> wording that you would like to see added, tell me what and where, and
> we'll go from there.
>
> I would also like to add an out-of-kernel-source-tree modules example.
> It has been a long time since I did anything with
> out-of-kernel-source-tree stuff.  The last time I did something like
> that was back in the days when the pcmcia drivers and the alsa drivers
> were not yet integrated into the main kernel source tree.  And that
> was about ten years ago, I think.  Much has changed in the world of
> kernel building since then.  But we now have things like the proprietary
> nvidia kernel module and proprietary kernel modules for win-modems
> that can be used as examples.  I have occasion to use both of those
> examples with my current hardware.
>
> --
>  .''`.     Stephen Powell
>  : :'  :
>  `. `'`
>   `-

Hey,

The two things that i use k-headers for myself are the nvidia blob,
and the virtual-box km's

The only issues I ran into when building headers via make-kpkg where as follows,

Make sure you use the same "-append-to-version -stuff-here" line as
you do when building your kernel, or they wont match up and it wont
find the k-headers.

And, I have found that the packages made by make-kpkg are setting the
wrong "/lib/modules/<kernel version>/build" symlink, pointing it to my
the dir where i build the kernel rather than the correct
/usr/src/<kernel headers> dir.

(I think i need to bug report the 2nd, but I don't know if its
something I am doing wrong).

This is the line i used to build my last load of headers,

# make-kpkg kernel_headers --append-to-version -2.6.35amd64-bfq-iowait -j3

Cheers for all your work on that very useful document,

Regards,

Angus


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTiki4EKVdm1ap6e2?krVy7mLC10qaNqUhox9MD(a)mail.gmail.com
From: Arthur Machlas on
On Fri, Aug 13, 2010 at 2:12 PM, Angus Hedger <demidevil(a)gmail.com> wrote:
> On Fri, Aug 13, 2010 at 7:46 PM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
>> On Fri, 13 Aug 2010 13:27:50 -0400 (EDT), Arthur Machlas wrote:
> The only issues I ran into when building headers via make-kpkg where as follows,
>
> Make sure you use the same "-append-to-version -stuff-here" line as
> you do when building your kernel, or they wont match up and it wont
> find the k-headers.
>
> And, I have found that the packages made by make-kpkg are setting the
> wrong "/lib/modules/<kernel version>/build" symlink, pointing it to my
> the dir where i build the kernel rather than the correct
> /usr/src/<kernel headers> dir.
>
> (I think i need to bug report the 2nd, but I don't know if its
> something I am doing wrong).
>
> This is the line i used to build my last load of headers,
>
> # make-kpkg kernel_headers --append-to-version -2.6.35amd64-bfq-iowait -j3
>

You can just put them all on the same line, i.e.,

make-kpkg --append-to-version -2.635amd64_custom kernel_image
kernel_headers kernel_source

I don't use the -j3 switch, and I don't think that -j3 switch works
like you think it does when using make-kpkg, at least, not if that's
meant to utilize multiple processors when building. I'm at work right
so this is all from memory, but I think the correct way to do it is to
do

export CONCURRENCY_LEVEL=3

where the number you provide is 1 + the number of processors you have.
So if you have a duo-core, it's 3. If a single processor it would be
two. And so forth. I seem to recall something in the make-kpkg
documentation saying not to use the -j switch.

Hopefully someone will correct me or provide more authoritative
sources than this sorry excuse for a memory I have.

As for your sources bug being symlinked incorrectly, I think I can
confirm, however it hasn't negatively affected anything. Things still
build properly against the headers / sources on custom kernels even
when the build directory in my home dir is removed. But yes, I'm
pretty sure I've seen warnings about it not being able to find sources
in /home/arthur/linux/kernel/2.6.35/, though they are just strange
warnings and I haven't bothered looking into it further since
everything seems to still work fine.

Best,
AM


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTi=rbhqn7uSkda3Lf1g67yQpQs2cqUvwUMGw8zz2(a)mail.gmail.com
From: Angus Hedger on
Hey!

>>> On Fri, 13 Aug 2010 13:27:50 -0400 (EDT), Arthur Machlas wrote:
>> The only issues I ran into when building headers via make-kpkg where as follows,
>>
>> Make sure you use the same "-append-to-version -stuff-here" line as
>> you do when building your kernel, or they wont match up and it wont
>> find the k-headers.
>>
>> And, I have found that the packages made by make-kpkg are setting the
>> wrong "/lib/modules/<kernel version>/build" symlink, pointing it to my
>> the dir where i build the kernel rather than the correct
>> /usr/src/<kernel headers> dir.
>>
>> (I think i need to bug report the 2nd, but I don't know if its
>> something I am doing wrong).
>>
>> This is the line i used to build my last load of headers,
>>
>> # make-kpkg kernel_headers --append-to-version -2.6.35amd64-bfq-iowait -j3
>>
>
> You can just put them all on the same line, i.e.,
>
> make-kpkg --append-to-version -2.635amd64_custom kernel_image
> kernel_headers kernel_source

Thanks for that! Will save me quite a bit of time.

> I don't use the -j3 switch, and I don't think that -j3 switch works
> like you think it does when using make-kpkg, at least, not if that's
> meant to utilize multiple processors when building. I'm at work right
> so this is all from memory, but I think the correct way to do it is to
> do
>
> export CONCURRENCY_LEVEL=3
>
> where the number you provide is 1 + the number of processors you have.
> So if you have a duo-core, it's 3. If a single processor it would be
> two. And so forth. I seem to recall something in the make-kpkg
> documentation saying not to use the -j switch.

As far as i know, -j3 sets that option just for this instance of
make-kpkg, I think i got it off the man page!

Oh here we go:

man kpkg

--jobs number
-j number Set the environment variable CONCURRENCY_LEVEL to
"number".

I have a quad but use -j3 as I have to run other cpu heavy tasks while
compiling and that stops my whole computer from slowing right down!

> Hopefully someone will correct me or provide more authoritative
> sources than this sorry excuse for a memory I have.
>
> As for your sources bug being symlinked incorrectly, I think I can
> confirm, however it hasn't negatively affected anything. Things still
> build properly against the headers / sources on custom kernels even
> when the build directory in my home dir is removed. But yes, I'm
> pretty sure I've seen warnings about it not being able to find sources
> in /home/arthur/linux/kernel/2.6.35/, though they are just strange
> warnings and I haven't bothered looking into it further since
> everything seems to still work fine.

I had problems building both the nvidia blob and the vbox kernel
modules unless i fixed the symlink.

> Best,
> AM

Cheers!

Angus.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTikT_VbiUK=CAfA6MYu-OZGJPv6ZpX9Nwkwe+roo(a)mail.gmail.com
From: Arthur Machlas on
On Fri, Aug 13, 2010 at 4:28 PM, Angus Hedger <demidevil(a)gmail.com> wrote:
> Hey!
>
>> I don't use the -j3 switch, and I don't think that -j3 switch works
>> like you think it does when using make-kpkg, at least, not if that's
>> meant to utilize multiple processors when building. I'm at work right
>> so this is all from memory, but I think the correct way to do it is to
>> do
>>
>> export CONCURRENCY_LEVEL=3
>>
>> where the number you provide is 1 + the number of processors you have.
>> So if you have a duo-core, it's 3. If a single processor it would be
>> two. And so forth. I seem to recall something in the make-kpkg
>> documentation saying not to use the -j switch.
>
> As far as i know, -j3 sets that option just for this instance of
> make-kpkg, I think i got it off the man page!
>
> Oh here we go:
>
> man kpkg
>
>  --jobs  number
>              -j  number Set the  environment  variable  CONCURRENCY_LEVEL  to
>              "number".
>
> I have a quad but use -j3 as I have to run other cpu heavy tasks while
> compiling and that stops my whole computer from slowing right down!
>

And thanks for that authoritative clarification!

Best,
AM


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTik+oBJypzH2EuuuTKBK1stxoGCONu70vQ+F9doP(a)mail.gmail.com