CPIO image date problem

Fisherss fisherssml at gmail.com
Tue Oct 7 16:15:17 EST 2008

Hi all

I have a weird problem on MPC8548E with Linux Kernel 2.6.24:

I use a CPIO image as my embedded system's root file system, but after
booting, all files and directories' "date" attribute are set to "Jan
1, 1970".

Now what I have got is:
U-boot and the cpio image are cleared. The roofs(cpio image) is loaded
by Linux Kernel, not U-boot, and the image itself has successfully
passed test, so we suppose the problem is in Linux Kernel.

The Kernel loading sequence is : time_init() -> cpio image loading ->
RTC driver loading

That means, at the cpio image loading time, we don't have the RTC
driver. In fact, Kernel uses the time_base register instead of RTC(at
least at this time). All standard cpio images contain the "date" file
attribute, but seems like Kernel just ignores it and uses its own
"clock source"(and this clock source should be binded to time_base

I have located the cpio image unpacking code in Kernel, but can not
find anything about date attribute. This part of code is

Anyone any idea ??


fisherss at gmail.com

More information about the Linuxppc-embedded mailing list