arm_coreboot: Support grub-mkstandalone.
This commit is contained in:
parent
848bed9d92
commit
3edabad8fe
3 changed files with 22 additions and 3 deletions
|
@ -29,6 +29,8 @@
|
||||||
#define GRUB_INSTALL_OPTIONS \
|
#define GRUB_INSTALL_OPTIONS \
|
||||||
{ "modules", GRUB_INSTALL_OPTIONS_MODULES, N_("MODULES"), \
|
{ "modules", GRUB_INSTALL_OPTIONS_MODULES, N_("MODULES"), \
|
||||||
0, N_("pre-load specified modules MODULES"), 1 }, \
|
0, N_("pre-load specified modules MODULES"), 1 }, \
|
||||||
|
{ "dtb", GRUB_INSTALL_OPTIONS_DTB, N_("FILE"), \
|
||||||
|
0, N_("embed a specific DTB"), 1 }, \
|
||||||
{ "install-modules", GRUB_INSTALL_OPTIONS_INSTALL_MODULES, \
|
{ "install-modules", GRUB_INSTALL_OPTIONS_INSTALL_MODULES, \
|
||||||
N_("MODULES"), 0, \
|
N_("MODULES"), 0, \
|
||||||
N_("install only MODULES and their dependencies [default=all]"), 1 }, \
|
N_("install only MODULES and their dependencies [default=all]"), 1 }, \
|
||||||
|
@ -99,6 +101,7 @@ enum grub_install_plat
|
||||||
GRUB_INSTALL_PLATFORM_I386_XEN,
|
GRUB_INSTALL_PLATFORM_I386_XEN,
|
||||||
GRUB_INSTALL_PLATFORM_X86_64_XEN,
|
GRUB_INSTALL_PLATFORM_X86_64_XEN,
|
||||||
GRUB_INSTALL_PLATFORM_ARM64_EFI,
|
GRUB_INSTALL_PLATFORM_ARM64_EFI,
|
||||||
|
GRUB_INSTALL_PLATFORM_ARM_COREBOOT,
|
||||||
GRUB_INSTALL_PLATFORM_MAX
|
GRUB_INSTALL_PLATFORM_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,7 +118,8 @@ enum grub_install_options {
|
||||||
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY,
|
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY,
|
||||||
GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY,
|
GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY,
|
||||||
GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE,
|
GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE,
|
||||||
GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS
|
GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS,
|
||||||
|
GRUB_INSTALL_OPTIONS_DTB
|
||||||
};
|
};
|
||||||
|
|
||||||
extern char *grub_install_source_directory;
|
extern char *grub_install_source_directory;
|
||||||
|
|
|
@ -73,6 +73,7 @@ grub_install_help_filter (int key, const char *text,
|
||||||
|
|
||||||
static int (*compress_func) (const char *src, const char *dest) = NULL;
|
static int (*compress_func) (const char *src, const char *dest) = NULL;
|
||||||
char *grub_install_copy_buffer;
|
char *grub_install_copy_buffer;
|
||||||
|
static char *dtb;
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_install_copy_file (const char *src,
|
grub_install_copy_file (const char *src,
|
||||||
|
@ -364,6 +365,11 @@ grub_install_parse (int key, char *arg)
|
||||||
case GRUB_INSTALL_OPTIONS_INSTALL_FONTS:
|
case GRUB_INSTALL_OPTIONS_INSTALL_FONTS:
|
||||||
handle_install_list (&install_fonts, arg, 0);
|
handle_install_list (&install_fonts, arg, 0);
|
||||||
return 1;
|
return 1;
|
||||||
|
case GRUB_INSTALL_OPTIONS_DTB:
|
||||||
|
if (dtb)
|
||||||
|
free (dtb);
|
||||||
|
dtb = xstrdup (arg);
|
||||||
|
return 1;
|
||||||
case GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS:
|
case GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS:
|
||||||
if (strcmp (arg, "no") == 0
|
if (strcmp (arg, "no") == 0
|
||||||
|| strcmp (arg, "none") == 0)
|
|| strcmp (arg, "none") == 0)
|
||||||
|
@ -486,9 +492,10 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix,
|
||||||
|
|
||||||
grub_util_info ("grub-mkimage --directory '%s' --prefix '%s'"
|
grub_util_info ("grub-mkimage --directory '%s' --prefix '%s'"
|
||||||
" --output '%s' "
|
" --output '%s' "
|
||||||
|
" --dtb '%s' "
|
||||||
"--format '%s' --compression '%s' %s %s\n",
|
"--format '%s' --compression '%s' %s %s\n",
|
||||||
dir, prefix,
|
dir, prefix,
|
||||||
outname, mkimage_target,
|
outname, dtb ? : "", mkimage_target,
|
||||||
compnames[compression], note ? "--note" : "", s);
|
compnames[compression], note ? "--note" : "", s);
|
||||||
free (s);
|
free (s);
|
||||||
|
|
||||||
|
@ -499,7 +506,7 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix,
|
||||||
grub_install_generate_image (dir, prefix, fp, outname,
|
grub_install_generate_image (dir, prefix, fp, outname,
|
||||||
modules.entries, memdisk_path,
|
modules.entries, memdisk_path,
|
||||||
pubkeys, npubkeys, config_path, tgt,
|
pubkeys, npubkeys, config_path, tgt,
|
||||||
note, compression, 0);
|
note, compression, dtb);
|
||||||
while (dc--)
|
while (dc--)
|
||||||
grub_install_pop_module ();
|
grub_install_pop_module ();
|
||||||
}
|
}
|
||||||
|
@ -666,6 +673,7 @@ static struct
|
||||||
[GRUB_INSTALL_PLATFORM_ARM_EFI] = { "arm", "efi" },
|
[GRUB_INSTALL_PLATFORM_ARM_EFI] = { "arm", "efi" },
|
||||||
[GRUB_INSTALL_PLATFORM_ARM64_EFI] = { "arm64", "efi" },
|
[GRUB_INSTALL_PLATFORM_ARM64_EFI] = { "arm64", "efi" },
|
||||||
[GRUB_INSTALL_PLATFORM_ARM_UBOOT] = { "arm", "uboot" },
|
[GRUB_INSTALL_PLATFORM_ARM_UBOOT] = { "arm", "uboot" },
|
||||||
|
[GRUB_INSTALL_PLATFORM_ARM_COREBOOT] = { "arm", "coreboot" },
|
||||||
};
|
};
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
|
@ -486,6 +486,7 @@ have_bootdev (enum grub_install_plat pl)
|
||||||
|
|
||||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||||
|
@ -911,6 +912,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
|
@ -946,6 +948,7 @@ main (int argc, char *argv[])
|
||||||
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
|
@ -1448,6 +1451,7 @@ main (int argc, char *argv[])
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||||
|
@ -1542,6 +1546,7 @@ main (int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
|
case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
|
||||||
case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
|
case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
|
||||||
|
@ -1629,6 +1634,7 @@ main (int argc, char *argv[])
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_PC:
|
case GRUB_INSTALL_PLATFORM_I386_PC:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
||||||
|
@ -1889,6 +1895,7 @@ main (int argc, char *argv[])
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||||
|
case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||||
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
||||||
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
||||||
|
|
Loading…
Reference in a new issue