Add support for device-tree-based drivers.
This commit is contained in:
parent
aa7585d04b
commit
1895c3806b
13 changed files with 519 additions and 52 deletions
|
@ -71,6 +71,7 @@ static struct argp_option options[] = {
|
|||
N_("embed FILE as a memdisk image\n"
|
||||
"Implies `-p (memdisk)/boot/grub' and overrides any prefix supplied previously,"
|
||||
" but the prefix itself can be overridden by later options"), 0},
|
||||
{"dtb", 'D', N_("FILE"), 0, N_("embed FILE as a device tree (DTB)\n"), 0},
|
||||
/* TRANSLATORS: "embed" is a verb (command description). "*/
|
||||
{"config", 'c', N_("FILE"), 0, N_("embed FILE as an early config"), 0},
|
||||
/* TRANSLATORS: "embed" is a verb (command description). "*/
|
||||
|
@ -117,6 +118,7 @@ struct arguments
|
|||
char *dir;
|
||||
char *prefix;
|
||||
char *memdisk;
|
||||
char *dtb;
|
||||
char **pubkeys;
|
||||
size_t npubkeys;
|
||||
char *font;
|
||||
|
@ -176,6 +178,13 @@ argp_parser (int key, char *arg, struct argp_state *state)
|
|||
arguments->prefix = xstrdup ("(memdisk)/boot/grub");
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
if (arguments->dtb)
|
||||
free (arguments->dtb);
|
||||
|
||||
arguments->dtb = xstrdup (arg);
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
arguments->pubkeys = xrealloc (arguments->pubkeys,
|
||||
sizeof (arguments->pubkeys[0])
|
||||
|
@ -300,7 +309,7 @@ main (int argc, char *argv[])
|
|||
arguments.memdisk, arguments.pubkeys,
|
||||
arguments.npubkeys, arguments.config,
|
||||
arguments.image_target, arguments.note,
|
||||
arguments.comp);
|
||||
arguments.comp, arguments.dtb);
|
||||
|
||||
grub_util_file_sync (fp);
|
||||
fclose (fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue