Compare commits
2 Commits
f81190fdd1
...
34a4eff47c
Author | SHA1 | Date |
---|---|---|
Ani Sinha | 34a4eff47c | |
Ani Sinha | 9f026bfd96 |
|
@ -75,6 +75,9 @@
|
||||||
<listitem><para>An optional <literal>.ucode</literal> section with an initrd containing microcode, to
|
<listitem><para>An optional <literal>.ucode</literal> section with an initrd containing microcode, to
|
||||||
be handed to the kernel before any other initrd. This initrd must not be compressed.</para></listitem>
|
be handed to the kernel before any other initrd. This initrd must not be compressed.</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>An optional <literal>.fmw</literal> section with the firmware image.
|
||||||
|
</para></listitem>
|
||||||
|
|
||||||
<listitem><para>An optional <literal>.splash</literal> section with an image (in the Windows
|
<listitem><para>An optional <literal>.splash</literal> section with an image (in the Windows
|
||||||
<filename>.BMP</filename> format) to show on screen before invoking the kernel.</para></listitem>
|
<filename>.BMP</filename> format) to show on screen before invoking the kernel.</para></listitem>
|
||||||
|
|
||||||
|
|
|
@ -23,5 +23,6 @@ const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = {
|
||||||
[UNIFIED_SECTION_PROFILE] = ".profile",
|
[UNIFIED_SECTION_PROFILE] = ".profile",
|
||||||
[UNIFIED_SECTION_DTBAUTO] = ".dtbauto",
|
[UNIFIED_SECTION_DTBAUTO] = ".dtbauto",
|
||||||
[UNIFIED_SECTION_HWIDS] = ".hwids",
|
[UNIFIED_SECTION_HWIDS] = ".hwids",
|
||||||
|
[UNIFIED_SECTION_FIRMWARE] = ".fmw",
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,7 @@ typedef enum UnifiedSection {
|
||||||
UNIFIED_SECTION_PROFILE,
|
UNIFIED_SECTION_PROFILE,
|
||||||
UNIFIED_SECTION_DTBAUTO,
|
UNIFIED_SECTION_DTBAUTO,
|
||||||
UNIFIED_SECTION_HWIDS,
|
UNIFIED_SECTION_HWIDS,
|
||||||
|
UNIFIED_SECTION_FIRMWARE,
|
||||||
_UNIFIED_SECTION_MAX,
|
_UNIFIED_SECTION_MAX,
|
||||||
} UnifiedSection;
|
} UnifiedSection;
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ static int help(int argc, char *argv[], void *userdata) {
|
||||||
" --linux=PATH Path to Linux kernel image file %7$s .linux\n"
|
" --linux=PATH Path to Linux kernel image file %7$s .linux\n"
|
||||||
" --osrel=PATH Path to os-release file %7$s .osrel\n"
|
" --osrel=PATH Path to os-release file %7$s .osrel\n"
|
||||||
" --cmdline=PATH Path to file with kernel command line %7$s .cmdline\n"
|
" --cmdline=PATH Path to file with kernel command line %7$s .cmdline\n"
|
||||||
|
" --firmware=PATH Path to firmware image file %7$s .fmw\n"
|
||||||
" --initrd=PATH Path to initrd image file %7$s .initrd\n"
|
" --initrd=PATH Path to initrd image file %7$s .initrd\n"
|
||||||
" --ucode=PATH Path to microcode image file %7$s .ucode\n"
|
" --ucode=PATH Path to microcode image file %7$s .ucode\n"
|
||||||
" --splash=PATH Path to splash bitmap file %7$s .splash\n"
|
" --splash=PATH Path to splash bitmap file %7$s .splash\n"
|
||||||
|
@ -158,8 +159,9 @@ static int parse_argv(int argc, char *argv[]) {
|
||||||
ARG_PCRPKEY,
|
ARG_PCRPKEY,
|
||||||
ARG_PROFILE,
|
ARG_PROFILE,
|
||||||
ARG_HWIDS,
|
ARG_HWIDS,
|
||||||
|
ARG_DTBAUTO,
|
||||||
_ARG_SECTION_LAST,
|
_ARG_SECTION_LAST,
|
||||||
ARG_DTBAUTO = _ARG_SECTION_LAST,
|
ARG_FIRMWARE = _ARG_SECTION_LAST,
|
||||||
ARG_BANK,
|
ARG_BANK,
|
||||||
ARG_PRIVATE_KEY,
|
ARG_PRIVATE_KEY,
|
||||||
ARG_PRIVATE_KEY_SOURCE,
|
ARG_PRIVATE_KEY_SOURCE,
|
||||||
|
@ -180,6 +182,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||||
{ "osrel", required_argument, NULL, ARG_OSREL },
|
{ "osrel", required_argument, NULL, ARG_OSREL },
|
||||||
{ "cmdline", required_argument, NULL, ARG_CMDLINE },
|
{ "cmdline", required_argument, NULL, ARG_CMDLINE },
|
||||||
{ "initrd", required_argument, NULL, ARG_INITRD },
|
{ "initrd", required_argument, NULL, ARG_INITRD },
|
||||||
|
{ "firmware", required_argument, NULL, ARG_FIRMWARE },
|
||||||
{ "ucode", required_argument, NULL, ARG_UCODE },
|
{ "ucode", required_argument, NULL, ARG_UCODE },
|
||||||
{ "splash", required_argument, NULL, ARG_SPLASH },
|
{ "splash", required_argument, NULL, ARG_SPLASH },
|
||||||
{ "dtb", required_argument, NULL, ARG_DTB },
|
{ "dtb", required_argument, NULL, ARG_DTB },
|
||||||
|
|
|
@ -242,6 +242,7 @@ class UkifyConfig:
|
||||||
efi_arch: str
|
efi_arch: str
|
||||||
hwids: Path
|
hwids: Path
|
||||||
initrd: list[Path]
|
initrd: list[Path]
|
||||||
|
firmware: Path
|
||||||
join_profiles: list[Path]
|
join_profiles: list[Path]
|
||||||
json: Union[Literal['pretty'], Literal['short'], Literal['off']]
|
json: Union[Literal['pretty'], Literal['short'], Literal['off']]
|
||||||
linux: Optional[Path]
|
linux: Optional[Path]
|
||||||
|
@ -364,6 +365,7 @@ class Uname:
|
||||||
DEFAULT_SECTIONS_TO_SHOW = {
|
DEFAULT_SECTIONS_TO_SHOW = {
|
||||||
'.linux': 'binary',
|
'.linux': 'binary',
|
||||||
'.initrd': 'binary',
|
'.initrd': 'binary',
|
||||||
|
'.fmw': 'binary',
|
||||||
'.ucode': 'binary',
|
'.ucode': 'binary',
|
||||||
'.splash': 'binary',
|
'.splash': 'binary',
|
||||||
'.dtb': 'binary',
|
'.dtb': 'binary',
|
||||||
|
@ -1213,6 +1215,7 @@ def make_uki(opts: UkifyConfig) -> None:
|
||||||
('.splash', opts.splash, True),
|
('.splash', opts.splash, True),
|
||||||
('.pcrpkey', pcrpkey, True),
|
('.pcrpkey', pcrpkey, True),
|
||||||
('.initrd', initrd, True),
|
('.initrd', initrd, True),
|
||||||
|
('.fmw', opts.firmware, True),
|
||||||
('.ucode', opts.microcode, True),
|
('.ucode', opts.microcode, True),
|
||||||
] # fmt: skip
|
] # fmt: skip
|
||||||
|
|
||||||
|
@ -1269,6 +1272,7 @@ def make_uki(opts: UkifyConfig) -> None:
|
||||||
'.osrel',
|
'.osrel',
|
||||||
'.cmdline',
|
'.cmdline',
|
||||||
'.initrd',
|
'.initrd',
|
||||||
|
'.fmw',
|
||||||
'.ucode',
|
'.ucode',
|
||||||
'.splash',
|
'.splash',
|
||||||
'.dtb',
|
'.dtb',
|
||||||
|
@ -1729,6 +1733,12 @@ CONFIG_ITEMS = [
|
||||||
config_key='UKI/Initrd',
|
config_key='UKI/Initrd',
|
||||||
config_push=ConfigItem.config_list_prepend,
|
config_push=ConfigItem.config_list_prepend,
|
||||||
),
|
),
|
||||||
|
ConfigItem(
|
||||||
|
'--firmware',
|
||||||
|
type=Path,
|
||||||
|
help='firmware file [.fmw section]',
|
||||||
|
config_key='UKI/Firmware',
|
||||||
|
),
|
||||||
ConfigItem(
|
ConfigItem(
|
||||||
'--microcode',
|
'--microcode',
|
||||||
metavar='UCODE',
|
metavar='UCODE',
|
||||||
|
|
Loading…
Reference in New Issue