Have qemu boards support writeable pflash and internal flashing
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 1.6k
- Forks
- 211
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 6
Description
Seems like both qemu and flashrom will need to be patched. Meanwhile, injecting key is made from separate qemu board build statement, and "reflashing" is rebooting qemu/kvm with newer built rom.
------
Current limitations stated under OP under #1188, where the following traces are what needs to be resolved:
> @JonathonHall-Purism : would like to know what is the issue with nvram you were talking about earlier, and also what avenues possible with pflash since from what I've read from libvirt XML and qemu doc, the flash is not writable. Any input you have there would be useful in other open issues
Looks like the size limit is just a matter of changing this default for max_fw_size: https://gitlab.com/qemu-project/qemu/-/blob/master/hw/i386/pc.c#L1833
Re: writable flash, it seems to exist but the only discussion I can find is about people using it incorrectly: https://bugs.launchpad.net/qemu/+bug/1818367/comments/4
>The element, with @type='pflash', no other attributes, and then
>no sibling element either, happens to be valid, but it is an
>extremely niche use case. It is used when you have a unified, writeable,
>OVMF.fd file that contains both the firmware executable and the live
>variable store.
This does sound like what we want, I have no idea right now how this works with plain qemu, whether flashrom supports it, or what it would take to add.
_Originally posted by @JonathonHall-Purism in https://github.com/osresearch/heads/issues/1188#issuecomment-1218004671_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the QEMU limit in hw/i386/pc.c, the libvirt pflash and nvram behavior, and the separate QEMU board build and reflashing flow described here. Check how flashrom handles writable pflash and document the required changes across QEMU and flashrom; done means QEMU boards can use writable pflash and flash internally.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100