This post marks the completion of the payload re-structuring that I did as a second part of the project. The following summarizes the major highlights of the work:
- We change the ‘struct payload’ ( in the src/include/payload_loader.h) to have a ‘struct cbfs_media’ and cbfs_file_handle. That way we have the two thing we need to read the contents of the file.
- In the build_self_segment_lists() we use the above data structures to media->read() the payload metadata.
- We use the metadata to segregate segments on the basis of their types and form a linked list of segments for reference later.
- Then we do mapping and then decompression for the compressed segments and direct reading for the uncompressed segments.
Some of the major issues were: playing with the data_offset and segment offsets; to get src_address to read to.
I was able to get past all the issues and finally got a successful working boot This completes the revamp of stage and payload loading
During the past week I also worked with gerrit; wherein I submitted my patches and received feedback. I am more involved with the development process of coreboot now and leaving aside some minor glitches; the process was very smooth.