2010-11-02 08:27:06

by trapDoor

[permalink] [raw]
Subject: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

,Hello,
When I run 'make kernelrelease' on freshly cloned Linus' git tree it
shows kernel version as: '2.6.37-rc1-00001-ge99d11d' - and that's
correct.
But after compilation it turned up '2.6.37-rc1-00001-ge99d11d-dirty'.

I didn't apply any custom patches to my local tree between 'make
kernelrelease' and compilation. What I only added - and before running
'make kernelrelease' - were the following Radeon firmware blobs for my
graphic card, which I placed in <kernel-source>/firmware/radeon/, in
order to compile them in:
REDWOOD_me.bin
REDWOOD_pfp.bin
REDWOOD_rlc.bin

That's how I always did and none of the git-kernels I compiled before
was referred to as '-dirty' due to the firmware blobs added manually.
Also, the kernel version shown by 'make kernelrelease' never differed
from the final kernel version after compilation. Of course assuming
that no patches were applied in the meantime and no extra string was
appended manually to the kernel version.

So, what's this '-dirty' about?

--
Thanks,
Tomasz


2010-11-03 16:45:57

by Cong Wang

[permalink] [raw]
Subject: Re: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

On Tue, Nov 02, 2010 at 08:26:59AM +0000, trapDoor wrote:
>,Hello,
>When I run 'make kernelrelease' on freshly cloned Linus' git tree it
>shows kernel version as: '2.6.37-rc1-00001-ge99d11d' - and that's
>correct.
>But after compilation it turned up '2.6.37-rc1-00001-ge99d11d-dirty'.
>
>I didn't apply any custom patches to my local tree between 'make
>kernelrelease' and compilation. What I only added - and before running
>'make kernelrelease' - were the following Radeon firmware blobs for my
>graphic card, which I placed in <kernel-source>/firmware/radeon/, in
>order to compile them in:
>REDWOOD_me.bin
>REDWOOD_pfp.bin
>REDWOOD_rlc.bin
>
>That's how I always did and none of the git-kernels I compiled before
>was referred to as '-dirty' due to the firmware blobs added manually.
>Also, the kernel version shown by 'make kernelrelease' never differed
>from the final kernel version after compilation. Of course assuming
>that no patches were applied in the meantime and no extra string was
>appended manually to the kernel version.
>
>So, what's this '-dirty' about?
>

That means your git tree is not clean, since you placed new firmwares
into the source tree.

--
Live like a child, think like the god.

2010-11-03 17:07:05

by trapDoor

[permalink] [raw]
Subject: Re: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

On Wed, Nov 3, 2010 at 4:48 PM, Am?rico Wang <[email protected]> wrote:
> On Tue, Nov 02, 2010 at 08:26:59AM +0000, trapDoor wrote:
>>,Hello,
>>When I run 'make kernelrelease' on freshly cloned Linus' git tree it
>>shows kernel version as: '2.6.37-rc1-00001-ge99d11d' - and that's
>>correct.
>>But after compilation it turned up '2.6.37-rc1-00001-ge99d11d-dirty'.
>>
>>I didn't apply any custom patches to my local tree between 'make
>>kernelrelease' and compilation. What I only added - and before running
>>'make kernelrelease' - were the following Radeon firmware blobs for my
>>graphic card, which I placed in <kernel-source>/firmware/radeon/, in
>>order to compile them in:
>>REDWOOD_me.bin
>>REDWOOD_pfp.bin
>>REDWOOD_rlc.bin
>>
>>That's how I always did and none of the git-kernels I compiled before
>>was referred to as '-dirty' due to the firmware blobs added manually.
>>Also, the kernel version shown by 'make kernelrelease' never differed
>>from the final kernel version after compilation. Of course assuming
>>that no patches were applied in the meantime and no extra string was
>>appended manually to the kernel version.
>>
>>So, what's this '-dirty' about?
>>
>
> That means your git tree is not clean, since you placed new firmwares
> into the source tree.
>
> --
> Live like a child, think like the god.
>

OK, but then 'make kernelrelease' should produce the same '..-dirty'
version, not just '2.6.37-rc1-00001-ge99d11d', shouldn't it?

I always do the following steps in the same order:
1) first I place the firmware files in <kernel-src>/firmware/radeon
2) then I choose appropriate config file and copy it into kernel
source directory
3) then I run 'make oldconfig' and at the end - just before compiling
and installing - 'make kernelrelease'

As I mentioned, for none of the kernels I compiled prior to this
version (either from git or from tarball) 'make kernelrelease'
produced different version name than it came up after compilation.


--
Thanks,
Tomasz

2010-11-03 18:35:53

by trapDoor

[permalink] [raw]
Subject: Re: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

On Wed, Nov 3, 2010 at 5:07 PM, trapDoor <[email protected]> wrote:
> On Wed, Nov 3, 2010 at 4:48 PM, Am?rico Wang <[email protected]> wrote:
>> On Tue, Nov 02, 2010 at 08:26:59AM +0000, trapDoor wrote:
>>>,Hello,
>>>When I run 'make kernelrelease' on freshly cloned Linus' git tree it
>>>shows kernel version as: '2.6.37-rc1-00001-ge99d11d' - and that's
>>>correct.
>>>But after compilation it turned up '2.6.37-rc1-00001-ge99d11d-dirty'.
>>>
>>>I didn't apply any custom patches to my local tree between 'make
>>>kernelrelease' and compilation. What I only added - and before running
>>>'make kernelrelease' - were the following Radeon firmware blobs for my
>>>graphic card, which I placed in <kernel-source>/firmware/radeon/, in
>>>order to compile them in:
>>>REDWOOD_me.bin
>>>REDWOOD_pfp.bin
>>>REDWOOD_rlc.bin
>>>
>>>That's how I always did and none of the git-kernels I compiled before
>>>was referred to as '-dirty' due to the firmware blobs added manually.
>>>Also, the kernel version shown by 'make kernelrelease' never differed
>>>from the final kernel version after compilation. Of course assuming
>>>that no patches were applied in the meantime and no extra string was
>>>appended manually to the kernel version.
>>>
>>>So, what's this '-dirty' about?
>>>
>>
>> That means your git tree is not clean, since you placed new firmwares
>> into the source tree.
>>
>> --
>> Live like a child, think like the god.
>>
>
> OK, but then 'make kernelrelease' should produce the same '..-dirty'
> version, not just '2.6.37-rc1-00001-ge99d11d', shouldn't it?
>
> I always do the following steps in the same order:
> 1) first I place the firmware files in <kernel-src>/firmware/radeon
Obviously I do that only on freshly cloned git tree or on a kernel
unpacked from tarball. If I just update my git tree, the firmware
files will be already in place after previous configuration. And here
is interesting thing: neither of these commands ..
make mrproper
make distclean
.. will remove the firmware files I had put in place manually. After
doing 'make mrproper && make distclean' my tree should be clean. But
those firmwares still remain there (I always check as I need to built
them in and hence my .config refers to them). And if I run 'make
oldonfig && make kernelrelease' afterwards, it will come up with a
'non-dirty' version string. And this seems consistent: 'make mrproper
&& make distclean' tell me that my tree is clean despite the FW files
so 'make kernelrelease' gives me a clean version string as well - and
exactly the same version should be propagated after compilation (in
vmlinuz, initrd-img, grub entry, etc.). And that how it always worked
for me before

It's not that I think that a kernel with (only) firmware file(s) added
manually should be considered as clean because 'make kernelrelease'
tells me so - actually I always thought it wasis wrong. I just want to
have 'make kernelrelease' coming up with the same version name as I'll
get after compilation.


--
Thanks,
Tomasz

2010-11-04 08:56:10

by Cong Wang

[permalink] [raw]
Subject: Re: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

On Wed, Nov 03, 2010 at 05:07:00PM +0000, trapDoor wrote:
>>>
>>>So, what's this '-dirty' about?
>>>
>>
>> That means your git tree is not clean, since you placed new firmwares
>> into the source tree.
>>
>
>OK, but then 'make kernelrelease' should produce the same '..-dirty'
>version, not just '2.6.37-rc1-00001-ge99d11d', shouldn't it?
>

Yes, it should.

>I always do the following steps in the same order:
>1) first I place the firmware files in <kernel-src>/firmware/radeon
>2) then I choose appropriate config file and copy it into kernel
>source directory
>3) then I run 'make oldconfig' and at the end - just before compiling
>and installing - 'make kernelrelease'
>
>As I mentioned, for none of the kernels I compiled prior to this
>version (either from git or from tarball) 'make kernelrelease'
>produced different version name than it came up after compilation.
>

Note, there are few generated files not listed in gitignore, thus
could cause your tree not to clean. For those files, we should
add them into .gitignore.

Thanks.

2010-11-04 09:02:40

by Cong Wang

[permalink] [raw]
Subject: Re: Pure kernel '2.6.37-rc1-00001-ge99d11d' shown as ~-dirty after compilation

On Wed, Nov 03, 2010 at 06:35:46PM +0000, trapDoor wrote:
>Obviously I do that only on freshly cloned git tree or on a kernel
>unpacked from tarball. If I just update my git tree, the firmware
>files will be already in place after previous configuration. And here
>is interesting thing: neither of these commands ..
> make mrproper
> make distclean
>.. will remove the firmware files I had put in place manually. After
>doing 'make mrproper && make distclean' my tree should be clean. But
>those firmwares still remain there (I always check as I need to built
>them in and hence my .config refers to them).

They even don't know your firmwares files exist, how can
you suppose them to remove those files for you?


> And if I run 'make
>oldonfig && make kernelrelease' afterwards, it will come up with a
>'non-dirty' version string. And this seems consistent: 'make mrproper
>&& make distclean' tell me that my tree is clean despite the FW files
>so 'make kernelrelease' gives me a clean version string as well - and
>exactly the same version should be propagated after compilation (in
>vmlinuz, initrd-img, grub entry, etc.). And that how it always worked
>for me before
>

Check the output of 'git status', if it says your tree is clean,
then you should not have '-dirty'.


>It's not that I think that a kernel with (only) firmware file(s) added
>manually should be considered as clean because 'make kernelrelease'
>tells me so - actually I always thought it wasis wrong. I just want to
>have 'make kernelrelease' coming up with the same version name as I'll
>get after compilation.
>

If so, you need to disable CONFIG_LOCALVERSION_AUTO *and*
append "LOCALVERSION=" to your 'make' command.