Thank Willie! On Tue, Apr 29, 2008 at 9:59 PM, Willie Wong <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 11:05:07AM +0800, Penguin Lover Chuanwen Wu squawked: > > > 1, Why I got a new kernel image(2.6.24-gentoo-r4-gb921d0de-dirty) > > instead of using the old one (2.6.24-gentoo-r4-g506ab20b-dirty) ? As I > > know if I add/change something as modules, all I need to do is "make > > && make modules_install", and I don't need to install the kernel image > > again and reboot my OS because all the changes are in modules and the > > kernel image is all the same - fixed me please if I'm wrong. > > 2, Why the kernel image including my codes have a very strange name > > - 2.6.24-gentoo-r4-g506ab20b-dirty. > > > > If you are coding for the kernel, I certainly hope you read the docs! I have tried more than two hours. In fact, at last I fixed this problem by READ Makefile in the root of the kernel tree(/usr/src/linux). >From this Makefile, I find this section: /*******************************************************************************/ # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called # and if the SCM is know a tag from the SCM is appended. # The appended tag is determined by the SCM used. # # Currently, only git is supported. # Other SCMs can edit scripts/setlocalversion and add the appropriate # checks as needed. ifdef CONFIG_LOCALVERSION_AUTO _localver-auto = $(shell $(CONFIG_SHELL) \ $(srctree)/scripts/setlocalversion $(srctree)) localver-auto = $(LOCALVERSION)$(_localver-auto) endif
localver-full = $(localver)$(localver-auto) /************************************************************************/ I thought the "localver-auto" may be something like "-gb921d0de-dirty". Then I checked out the file "scripts/setlocalversion", and commend all the git thing. Now my scripts/setlocalversion is: $ cat scripts/setlocalversion #!/bin/sh # Print additional version information for non-release trees. usage() { echo "Usage: $0 [srctree]" >&2 exit 1 } cd "${1:-.}" || usage # Check for git and a git repo. #if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? # if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then # printf '%s%s' -g `echo "$head" | cut -c1-8` # fi # Are there uncommitted changes? # if git diff-index HEAD | read dummy; then # printf '%s' -dirty # fi #fi I am not familiar with Shell script, so maybe my solution is not very good, but it fixed the problem :) > > Here's something from the help menu that pops up when you go to > make menuconfig > > General Setup > Automatically append version information to the version > string > and hit help for that entry > > "This will try to automatically determine if the current tree is a > release tree by looking for git tags that belong to the current top > of tree revision. > > "A string of the format -gxxxxxxxx will be added to the localversion > if a git based tree is found. The string generated by this will be > appended after any matching localversion files, and after the value > set in CONFIG_LOCALVERSION" > > If you are maintainig a git repository, you'd be dealing with a tree > always in flux (with the same versioning number I think), so it helps > tremendously if there's some way of differentiating between different > kernel images. > > This also means that if you don't want this behaviour, just uncheck > that option in the configs. > > W > -- > When a clock is hungry it goes back four seconds. > Sortir en Pantoufles: up 508 days, 12:29 > -- > gentoo-user@lists.gentoo.org mailing list > > -- wcw -- gentoo-user@lists.gentoo.org mailing list