I am trying to boot a custom linux-2.6.37 port, but I am stuck at the point where the kernel launches /init executable (since the initial filesystem was mounted with initramfs support).
After investigations, it appears that a problem occurs during prepare_binprm() function.
This function is responsible for copying the 128 bytes header of the executable to bprm->buf.
However in my case, bprm->buf is filled with zeroes after this step.
The kernel_read() function receives bprm->buf and bprm->file as operand.
So the address in memory (in the initramfs) of the executable should be accessible from bprm->file (file object of /init).
My question is:
How can I manually (e.g. in the debugger) access the contents of the /init file (stored in memory, in the initramfs), from the bprm->file structure?
(I'd like to check the data structures are in good shape and correctly point to the /init contents).
Thanks in advance for your help.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies