On Monday 03 November 2014 11:21:03, Dave Reisner Wrote:
On Mon, Nov 03, 2014 at 10:00:41AM -0500, Weng Xuetian wrote:
Nope, early_cpio can be also used in some other way. Though currently we only support microcode, but we might also want to add acpi override: http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/dracut.sh#n1562
That's fine, but then you need to structure your patch to not add a hook called "microcode", but to actually implement proper support for an early CPIO image prepended to the image. Otherwise, any restrictions which I'm pointing out are purely self-inflicted due to the expressed intent of your patch.
The point is the early image file doesn't exist anyway but need to be built from scratch. The firmware might not be installed, might not be even needed if there is an automatic detection in the procedure of build image. Using a hook (name might be other than "microcode") can keep enough flexibilty to do this.