summaryrefslogtreecommitdiffstats
path: root/master/debian/core_in_fs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/debian/core_in_fs.patch')
-rw-r--r--master/debian/core_in_fs.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/master/debian/core_in_fs.patch b/master/debian/core_in_fs.patch
new file mode 100644
index 0000000..7b597ea
--- /dev/null
+++ b/master/debian/core_in_fs.patch
@@ -0,0 +1,31 @@
+Index: b/util/grub-setup.c
+===================================================================
+--- a/util/grub-setup.c
++++ b/util/grub-setup.c
+@@ -76,6 +76,7 @@
+
+ #define DEFAULT_BOOT_FILE "boot.img"
+ #define DEFAULT_CORE_FILE "core.img"
++#define CORE_IMG_IN_FS "setup_left_core_image_in_filesystem"
+
+ #ifdef GRUB_MACHINE_SPARC64
+ #define grub_target_to_host16(x) grub_be_to_cpu16(x)
+@@ -489,6 +490,8 @@
+
+ grub_free (sectors);
+
++ unlink (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS);
++
+ goto finish;
+ }
+ #endif
+@@ -514,6 +517,9 @@
+ /* The core image must be put on a filesystem unfortunately. */
+ grub_util_info ("will leave the core image on the filesystem");
+
++ fp = fopen (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS, "w");
++ fclose (fp);
++
+ /* Make sure that GRUB reads the identical image as the OS. */
+ tmp_img = xmalloc (core_size);
+ core_path_dev_full = grub_util_get_path (dir, core_file);