Hello Subrata Banik, Lean Sheng Tan, Jeremy Soller, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37391
to look at the new patch set (#6).
Change subject: add transforms ......................................................................
add transforms
Transforms transform coreboot ROM images to add or remove capabilities. They let us test out new ideas for coreboot while not impacting the coreboot source in any way.
So, for example, should we want an image with a rampayload, we can run the normal build process and then transform the resulting rom image as needed.
We can implement a postcar stage which loads a ram payload directly, and do so in a way which has no impact on the coreboot source.
This not only lets us change the output of the build process, it can be implemented without changing the coreboot source. Further, since the transform Makefile depends on the presence of a coreboot.rom in the directory, we can avoid the build step if we're just trying to transform a ROM we read from a FLASH part. Just flashrom -r the image, drop it into coreboot.rom in this directory, and no build will be attempted.
This example represents the first steps of building a rampayload transform.
Transforms should have zero impact on the $(top)/src tree, since they are intended to be able to be used on prebuilt images. I did have to make one thing user selectable, namely, NO_RELOCATABLE_RAMSTAGE.
If you do not select NO_RELOCATABLE_RAMSTAGE, the payloader works as a payload but fails as a stage with the cryptic message: CBFS: Locating 'fallback/postcar' CBFS: Found @ offset 14bc0 size 1008c Decompressing stage fallback/postcar @ 0x07f85fc0 (349968 bytes) Failed to load after CAR program.
There is a bit more work to figuring out how to make it an rmod.
To test this: build a qemu-q35 image, select the payloader payload, select NO_RELOCATABLE_RAMSTAGE in whatever manner you prefer. Make. To test: /usr/bin/qemu-system-x86_64 -M q35 -bios build/coreboot.rom -serial /dev/tty -nographic
when this runs you will see . . . BS: BS_PAYLOAD_LOAD times (ms): entry 0 run 12 exit 0 Jumping to boot code at 00100000(07fcb000) payload loaded at 0x111830 Greetings from the payloader, which loads payloads. Now we will halt. Bye
now cd transforms/rampayload, and make run
You should see the same output.
Change-Id: I27c5686000f79e287adce3f0fa7b608683a9bfce Signed-off-by: Ronald G. Minnich rminnich@gmail.com --- M payloads/Kconfig M payloads/Makefile.inc A payloads/payloader/Makefile A payloads/payloader/i386.c A payloads/payloader/payloader.c A payloads/payloader/payloader.h M src/Kconfig A transforms/README A transforms/rampayload/Makefile 9 files changed, 210 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/37391/6