cpio initrd booting failed on powerpc p4080

wilbur.chan wilbur512 at gmail.com
Sat Jun 26 04:23:35 EST 2010


Hi All!


We are planning to port linux 2.6.21.7 to powerpc p4080  using ramdisk
file system,   but to find it failed at :

run_init_process(ramdisk_execute_command)

The exact failing place is at  run_init_process--->
do_execve--->search_binary_handler ---> load_elf_binary --->   if
(memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0)


which means that, 'init'  is not of  'ELF' format .

And we ad some codes before execute  'init' ,  to sys_read content
from  'init' file , but to find it having  many 'zero'   value in it.



Then we add some test codes , before calling
run_init_process(ramdisk_execute_command) ,     which take the
following steps:

1) create a file  A  ,   using sys_open(CREATE)
2) write values into A   , using  sys_write
3) close A
4)open A again , and read content from it,using sys_read

We found in step 4 that , we read in some 'zero' value from the file ,
that is to say,  sys_write failed at some points.



To avoid cache affect , we use sys_sync after step 3 (close A) but to
find it no use.


So, why sys_write failed to update the file content?

Thx


More information about the Linuxppc-dev mailing list