libreboot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d79ac751b2adddfaae4cd41d9f0c3f8c9c42fa59
parent 8658a0cb5c79a334484db926ca2fce75b5265a87
Author: Francis Rowe <info@gluglug.org.uk>
Date:   Tue, 16 Jun 2015 16:32:33 +0100

Update GRUB

vesamenu.c32 patch removed (merged upstream)

Diffstat:
resources/grub/patch/0002-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch | 209-------------------------------------------------------------------------------
resources/scripts/helpers/download/grub | 7+------
2 files changed, 1 insertion(+), 215 deletions(-)

diff --git a/resources/grub/patch/0002-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch b/resources/grub/patch/0002-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch @@ -1,209 +0,0 @@ -From 191aeee1b67ff30d6c868320a51cb9fb766874be Mon Sep 17 00:00:00 2001 -From: Lunar <lunar@torproject.org> -Date: Fri, 13 Feb 2015 22:08:11 +0100 -Subject: [PATCH] lib/syslinux_parse: add support for (vesa)menu.c32 - -Fixes Savannah bug #44238. ---- - grub-core/lib/syslinux_parse.c | 165 ++++++++++++++++++++++++++--------------- - 1 file changed, 107 insertions(+), 58 deletions(-) - -diff --git a/grub-core/lib/syslinux_parse.c b/grub-core/lib/syslinux_parse.c -index 22389eb..153260b 100644 ---- a/grub-core/lib/syslinux_parse.c -+++ b/grub-core/lib/syslinux_parse.c -@@ -840,6 +840,82 @@ simplify_filename (char *str) - } - - static grub_err_t -+print_config (struct output_buffer *outbuf, -+ struct syslinux_menu *menu, -+ const char *filename, const char *basedir) -+{ -+ struct syslinux_menu *menuptr; -+ grub_err_t err = GRUB_ERR_NONE; -+ char *new_cwd = NULL; -+ char *new_target_cwd = NULL; -+ char *newname = NULL; -+ int depth = 0; -+ -+ new_cwd = get_read_filename (menu, basedir); -+ if (!new_cwd) -+ { -+ err = grub_errno; -+ goto out; -+ } -+ new_target_cwd = get_target_filename (menu, basedir); -+ if (!new_target_cwd) -+ { -+ err = grub_errno; -+ goto out; -+ } -+ newname = get_read_filename (menu, filename); -+ if (!newname) -+ { -+ err = grub_errno; -+ goto out; -+ } -+ simplify_filename (newname); -+ -+ print_string ("#"); -+ print_file (outbuf, menu, filename, NULL); -+ print_string (" "); -+ print (outbuf, newname, grub_strlen (newname)); -+ print_string (":\n"); -+ -+ for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++) -+ if (grub_strcmp (menuptr->filename, newname) == 0 -+ || depth > 20) -+ break; -+ if (menuptr) -+ { -+ print_string (" syslinux_configfile -r "); -+ print_file (outbuf, menu, "/", NULL); -+ print_string (" -c "); -+ print_file (outbuf, menu, basedir, NULL); -+ print_string (" "); -+ print_file (outbuf, menu, filename, NULL); -+ print_string ("\n"); -+ } -+ else -+ { -+ err = config_file (outbuf, menu->root_read_directory, -+ menu->root_target_directory, new_cwd, new_target_cwd, -+ newname, menu, menu->flavour); -+ if (err == GRUB_ERR_FILE_NOT_FOUND -+ || err == GRUB_ERR_BAD_FILENAME) -+ { -+ grub_errno = err = GRUB_ERR_NONE; -+ print_string ("# File "); -+ err = print (outbuf, newname, grub_strlen (newname)); -+ if (err) -+ goto out; -+ print_string (" not found\n"); -+ } -+ } -+ -+ out: -+ grub_free (newname); -+ grub_free (new_cwd); -+ grub_free (new_target_cwd); -+ return err; -+} -+ -+static grub_err_t - write_entry (struct output_buffer *outbuf, - struct syslinux_menu *menu, - struct syslinux_menuentry *curentry) -@@ -1227,6 +1303,36 @@ write_entry (struct output_buffer *outbuf, - break; - } - -+ if (grub_strcasecmp (basename, "menu.c32") == 0 || -+ grub_strcasecmp (basename, "vesamenu.c32") == 0) -+ { -+ char *ptr; -+ char *end; -+ -+ ptr = curentry->append; -+ if (!ptr) -+ return grub_errno; -+ -+ while (*ptr) -+ { -+ end = ptr; -+ for (end = ptr; *end && !grub_isspace (*end); end++); -+ if (*end) -+ *end++ = '\0'; -+ -+ /* "~" is supposed to be current file, so let's skip it */ -+ if (grub_strcmp (ptr, "~") != 0) -+ { -+ err = print_config (outbuf, menu, ptr, ""); -+ if (err != GRUB_ERR_NONE) -+ break; -+ } -+ for (ptr = end; *ptr && grub_isspace (*ptr); ptr++); -+ } -+ err = GRUB_ERR_NONE; -+ break; -+ } -+ - /* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap, - FIXME: Linux, Lua, Meminfo, rosh, Sanbboot */ - -@@ -1239,70 +1345,13 @@ write_entry (struct output_buffer *outbuf, - } - case KERNEL_CONFIG: - { -- char *new_cwd, *new_target_cwd; - const char *ap; - ap = curentry->append; - if (!ap) - ap = curentry->argument; - if (!ap) - ap = ""; -- new_cwd = get_read_filename (menu, ap); -- if (!new_cwd) -- return grub_errno; -- new_target_cwd = get_target_filename (menu, ap); -- if (!new_target_cwd) -- return grub_errno; -- -- struct syslinux_menu *menuptr; -- char *newname; -- int depth = 0; -- -- newname = get_read_filename (menu, curentry->kernel_file); -- if (!newname) -- return grub_errno; -- simplify_filename (newname); -- -- print_string ("#"); -- print_file (outbuf, menu, curentry->kernel_file, NULL); -- print_string (" "); -- print (outbuf, newname, grub_strlen (newname)); -- print_string (":\n"); -- -- for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++) -- if (grub_strcmp (menuptr->filename, newname) == 0 -- || depth > 20) -- break; -- if (menuptr) -- { -- print_string (" syslinux_configfile -r "); -- print_file (outbuf, menu, "/", NULL); -- print_string (" -c "); -- print_file (outbuf, menu, ap, NULL); -- print_string (" "); -- print_file (outbuf, menu, curentry->kernel_file, NULL); -- print_string ("\n"); -- } -- else -- { -- err = config_file (outbuf, menu->root_read_directory, -- menu->root_target_directory, new_cwd, new_target_cwd, -- newname, menu, menu->flavour); -- if (err == GRUB_ERR_FILE_NOT_FOUND -- || err == GRUB_ERR_BAD_FILENAME) -- { -- grub_errno = err = GRUB_ERR_NONE; -- print_string ("# File "); -- err = print (outbuf, newname, grub_strlen (newname)); -- if (err) -- return err; -- print_string (" not found\n"); -- } -- if (err) -- return err; -- } -- grub_free (newname); -- grub_free (new_cwd); -- grub_free (new_target_cwd); -+ print_config (outbuf, menu, curentry->kernel_file, ap); - } - break; - case KERNEL_NO_KERNEL: --- -1.9.1 - diff --git a/resources/scripts/helpers/download/grub b/resources/scripts/helpers/download/grub @@ -45,7 +45,7 @@ cd "grub/" # Reset to the last commit that was tested # ------------------------------------------------------------------------------ -git reset --hard fa07d919d1ff868b18d8a42276d094b63a58e299 +git reset --hard afd0f21b2027310fda52b00ac1b964041d39a363 # Apply patches # ------------------------------------------------------------------------------ @@ -53,11 +53,6 @@ git reset --hard fa07d919d1ff868b18d8a42276d094b63a58e299 # Replace "GNU GRUB version" in GRUB screen with "FREE AS IN FREEDOM" git am "../resources/grub/patch/0001-grub-core-normal-main.c-Display-FREE-AS-IN-FREEDOM-n.patch" -# See 0002-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch -# Wait for it or an improved version of it to be merged, then update GRUB and delete the patch file -# https://people.torproject.org/~lunar/volatile/2015-03-17-e3Yp1d7FifQ/0001-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch -git am "../resources/grub/patch/0002-lib-syslinux_parse-add-support-for-vesa-menu.c32.patch" - cd "../" printf "\n\n"