It appears that whenever we build an image, the builder's system time when the image was built is "baked in" the image somewhere. If we attempt to change the system time (while running the image) to some time before this, the system acts strangely. For instance, if our image was built at 3:00PM on Nov 2, and we attempt to change the date while running the image to Oct 20, we see this issue. Is there a way to change the system time used by the image when the image is built? We're using the 3.10.17 kernel with yocto 1.6.1.
Solved! Go to Solution.
Assuming with "image," you mean the kernel. Here's what Documentation/kbuild/kbuild.txt says:
KBUILD_BUILD_TIMESTAMP
--------------------------------------------------
Setting this to a date string overrides the timestamp used in the
UTS_VERSION definition (uname -v in the running kernel). The value has to
be a string that can be passed to date -d. The default value
is the output of the date command at one point during build.
For example you can run:
export KBUILD_BUILD_TIMESTAMP='Sun May 1 12:00:00 CEST 2011'
Assuming with "image," you mean the kernel. Here's what Documentation/kbuild/kbuild.txt says:
KBUILD_BUILD_TIMESTAMP
--------------------------------------------------
Setting this to a date string overrides the timestamp used in the
UTS_VERSION definition (uname -v in the running kernel). The value has to
be a string that can be passed to date -d. The default value
is the output of the date command at one point during build.
For example you can run:
export KBUILD_BUILD_TIMESTAMP='Sun May 1 12:00:00 CEST 2011'