One of the first steps I took with the code from the SDK was to put it into Git, such that changes I made were traceable. I recently tried to "reset" myself by removing the old board-support/linux-3.12.10-ti2013.12.01 and replacing it with my version from Git.
Once I did that, the build started changing. I found that the uname -r command now returned:
3.12.10-g8e4a6e5-dirty
So I started looking into how I could change that string. I found references to it in a few files:
include/generated/utsrelease.h:#define UTS_RELEASE "3.12.10-g8e4a6e5-dirty"<br>
include/config/kernel.release:3.12.10-g8e4a6e5-dirty
But it seems that utsrelease.h was created from kernel.release's content, and that is set in the kernel makefile via a call out to scripts/setlocalversion
I found the following lines in there:
# Check for git and a git repo. if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore # it, because this version is defined in the top level Makefile. if [ -z "`git describe --exact-match 2>/dev/null`" ]; then # If only the short version is requested, don't bother # running further git commands if $short; then echo "+" return fi # If we are past a tagged commit (like # "v2.6.30-rc5-302-g72357d5"), we pretty print it. if atag="`git describe 2>/dev/null`"; then echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' # If we don't have a tag at all we print -g{commitish}. else printf '%s%s' -g $head fi fi # Is this git on svn? if git config --get svn-remote.svn.url >/dev/null; then printf -- '-svn%s' "`git svn find-rev $head`" fi # Check for uncommitted changes if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then printf '%s' -dirty fi # All done with git return fi
This is clearly how it's being set. I removed everything internal to the "if" check for git and replaced it with a print of:
printf '%s' "3.12.10-ti2013.12.01"
That worked... but when the kernel booted it was looking for /lib/modules/3.12.103.12.10-ti2013.12.01 and when I tried to remove the initial 3.12.10 from my string then the kernel refused to boot getting stuck at about 3 seconds in.
So my question is: Can the string, which generates uname -r, be updated somehow manually? If so what changes would be required to do this?