On Wed, Jul 20, 2011 at 1:19 AM, Marc Jones marcj303@gmail.com wrote:
Hamo, Can you describe the problem further? When you add an elf file cbfs handles the elf header removal and adding the cbfs header information. Are you using the cbfs functions to locate and run the binary? What is the failure?
As far as I know, the parse_elf_to_stage function reads an elf file, compute the entry and load of a stage according to the ELF header and then copy the binary code of an elf file to the ROM file according to the program headers. As I know, p_paddr in an program header is unspecified but we use it to compute the address of the binary code. That's one of the points I don't understand. Yes. I am using the cbfstool's locate function and using cbfs code to find the romstage and jump to it. On ARM, if I use parse_elf_to_stage function, all the romstage elf file from the beginning including the elf header will be copied to the rom not only the binary code. The other information this function generated including the cbfs_stage header, the cbfs_file header and where this cbfs file is located are all right. Only the binary code is wrong.