Re: Timestamp error between zImage & uname-a [ Yocto-2.6.1 + Qemux86 ]

Ralph Siemsen

Hi Ashish,

On Mon, May 13, 2019 at 5:57 AM AshishKumar Mishra <ashish.emailaddress@...> wrote:
So , time shown by "uname -a" is retains older value even though
i had compiled the linux multiple times .

This is normal behaviour, even when building the kernel directly (eg. not using Yocto). It is a bit surprising at first, but it all comes down to dependencies in the Makefile for the kernel.

The version string displayed by "uname -a" comes from init/version.c in the kernel source tree. Specifically the symbol UTS_VERSION, which is defined in include/generated/compile.h. This file is produced when you first build, and remains thereafter, unless you do "make clean" or equivalent.

Currently , only way i am able to bypass this behavior is to do bitbake -c cleanall linux-yocto
before every compilation.

You can delete the include/generated/compile.h file in your kernel build directory. Upon rebuild of kernel, the file will be re-created with the current date/time.


Join to automatically receive all group messages.