grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* grub-mkstandalone fixes
@ 2011-12-04  9:42 Keshav P R
  2011-12-04  9:47 ` Keshav P R
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-04  9:42 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 271 bytes --]

Hi,
    It seems like grub-mkstandalone was copied directly from grub-mkrescue
without checking the options. Also there is no way to specify a grub.cfg to
be copied as (memdisk)/boot/grub/grub.cfg . The attached patch fixes all of
this. Pleas apply it.

Regards.

Keshav

[-- Attachment #1.2: Type: text/html, Size: 298 bytes --]

[-- Attachment #2: grub-mkstandalone-fixes.patch --]
[-- Type: text/x-patch, Size: 2054 bytes --]

diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..15af6ad 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -86,7 +86,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -95,10 +95,15 @@ do
     --output=*)
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
 
+    -c | --config)
+	config_file=`argument $option "$@"`; shift ;;
+    --config=*)
+	config_file=`echo "$option" | sed 's/--config=//'` ;;
+
     --directory | -d)
-        source_directory=`argument $option "$@"`; shift ;;
+	source_directory=`argument $option "$@"`; shift ;;
     --directory=*)
-	source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;;
+	source_directory=`echo "$option" | sed 's/--directory=//'` ;;
 
     --grub-mkimage)
 	grub_mkimage=`argument $option "$@"`; shift ;;
@@ -108,12 +113,12 @@ do
     --compression | -C)
 	compression=`argument $option "$@"`; shift ;;
     --compression=*)
-        compression=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	compression=`echo "${option}/" | sed 's/--compression=//'` ;;
 
     --format | -O)
 	format=`argument $option "$@"`; shift ;;
     --format=*)
-        format=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	format=`echo "${option}/" | sed 's/--format=//'` ;;
 
     *)
 	source="${source} ${option} $@"; break ;;
@@ -162,12 +167,17 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour
         cp -f "$file" "${memdisk_dir}"/boot/grub/
     fi
 done
+
 for file in ${pkglib_DATA}; do
     if test -f "${source_directory}/${file}"; then
         cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/
     fi
 done
 
+if test -f "${config_file}"; then
+    cp -f "${config_file}" "${memdisk_dir}"/boot/grub/grub.cfg
+fi
+
 mkdir -p "${memdisk_dir}"/boot/grub/locale
 for file in "${source_directory}"/po/*.mo; do
     if test -f "$file"; then

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: grub-mkstandalone fixes
  2011-12-04  9:42 grub-mkstandalone fixes Keshav P R
@ 2011-12-04  9:47 ` Keshav P R
  2011-12-04  9:59   ` Keshav P R
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-04  9:47 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]

On Sun, Dec 4, 2011 at 15:12, Keshav P R <the.ridikulus.rat@gmail.com>wrote:

> Hi,
>     It seems like grub-mkstandalone was copied directly from grub-mkrescue
> without checking the options. Also there is no way to specify a grub.cfg to
> be copied as (memdisk)/boot/grub/grub.cfg . The attached patch fixes all of
> this. Pleas apply it.
>
> Regards.
>
> Keshav
>

Minor fix in previous patch, new file attached.

[-- Attachment #1.2: Type: text/html, Size: 724 bytes --]

[-- Attachment #2: grub-mkstandalone-fixes.patch --]
[-- Type: text/x-patch, Size: 2692 bytes --]

diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..3a77870 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -31,7 +31,7 @@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
 
 self=`basename $0`
 
-source_dirrectory=
+source_directory=
 compression=auto
 format=
 grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
@@ -51,6 +51,7 @@ Make GRUB rescue image.
   -O, --format=FORMAT     generate an image in format
                           available formats: %s
   -C, --compression=(xz|none|auto)  choose the compression to use
+  -c, --config=FILE       use specified file as grub.cfg
   --modules=MODULES       pre-load specified modules MODULES
   --grub-mkimage=FILE     use FILE as grub-mkimage
 
@@ -86,7 +87,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -95,10 +96,15 @@ do
     --output=*)
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
 
+    -c | --config)
+	config_file=`argument $option "$@"`; shift ;;
+    --config=*)
+	config_file=`echo "$option" | sed 's/--config=//'` ;;
+
     --directory | -d)
-        source_directory=`argument $option "$@"`; shift ;;
+	source_directory=`argument $option "$@"`; shift ;;
     --directory=*)
-	source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;;
+	source_directory=`echo "$option" | sed 's/--directory=//'` ;;
 
     --grub-mkimage)
 	grub_mkimage=`argument $option "$@"`; shift ;;
@@ -108,12 +114,12 @@ do
     --compression | -C)
 	compression=`argument $option "$@"`; shift ;;
     --compression=*)
-        compression=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	compression=`echo "${option}/" | sed 's/--compression=//'` ;;
 
     --format | -O)
 	format=`argument $option "$@"`; shift ;;
     --format=*)
-        format=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	format=`echo "${option}/" | sed 's/--format=//'` ;;
 
     *)
 	source="${source} ${option} $@"; break ;;
@@ -162,12 +168,17 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour
         cp -f "$file" "${memdisk_dir}"/boot/grub/
     fi
 done
+
 for file in ${pkglib_DATA}; do
     if test -f "${source_directory}/${file}"; then
         cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/
     fi
 done
 
+if test -f "${config_file}"; then
+    cp -f "${config_file}" "${memdisk_dir}"/boot/grub/grub.cfg
+fi
+
 mkdir -p "${memdisk_dir}"/boot/grub/locale
 for file in "${source_directory}"/po/*.mo; do
     if test -f "$file"; then

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: grub-mkstandalone fixes
  2011-12-04  9:47 ` Keshav P R
@ 2011-12-04  9:59   ` Keshav P R
  2011-12-14 19:49     ` Keshav P R
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-04  9:59 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 512 bytes --]

On Sun, Dec 4, 2011 at 15:17, Keshav P R <the.ridikulus.rat@gmail.com>wrote:

> On Sun, Dec 4, 2011 at 15:12, Keshav P R <the.ridikulus.rat@gmail.com>wrote:
>
>> Hi,
>>     It seems like grub-mkstandalone was copied directly from
>> grub-mkrescue without checking the options. Also there is no way to specify
>> a grub.cfg to be copied as (memdisk)/boot/grub/grub.cfg . The attached
>> patch fixes all of this. Pleas apply it.
>>
>> Regards.
>>
>> Keshav
>>
>
> Minor fix in previous patch, new file attached.
>

[-- Attachment #1.2: Type: text/html, Size: 1092 bytes --]

[-- Attachment #2: grub-mkstandalone-fixes.patch --]
[-- Type: text/x-patch, Size: 2690 bytes --]

diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..dcb2372 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -31,7 +31,7 @@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
 
 self=`basename $0`
 
-source_dirrectory=
+source_directory=
 compression=auto
 format=
 grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
@@ -51,6 +51,7 @@ Make GRUB rescue image.
   -O, --format=FORMAT     generate an image in format
                           available formats: %s
   -C, --compression=(xz|none|auto)  choose the compression to use
+  -c, --config=FILE       use specified file as grub.cfg
   --modules=MODULES       pre-load specified modules MODULES
   --grub-mkimage=FILE     use FILE as grub-mkimage
 
@@ -86,7 +87,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -95,10 +96,15 @@ do
     --output=*)
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
 
+    -c | --config)
+	config_file=`argument $option "$@"`; shift ;;
+    --config=*)
+	config_file=`echo "$option" | sed 's/--config=//'` ;;
+
     --directory | -d)
-        source_directory=`argument $option "$@"`; shift ;;
+	source_directory=`argument $option "$@"`; shift ;;
     --directory=*)
-	source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;;
+	source_directory=`echo "$option" | sed 's/--directory=//'` ;;
 
     --grub-mkimage)
 	grub_mkimage=`argument $option "$@"`; shift ;;
@@ -108,12 +114,12 @@ do
     --compression | -C)
 	compression=`argument $option "$@"`; shift ;;
     --compression=*)
-        compression=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	compression=`echo "${option}" | sed 's/--compression=//'` ;;
 
     --format | -O)
 	format=`argument $option "$@"`; shift ;;
     --format=*)
-        format=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	format=`echo "${option}" | sed 's/--format=//'` ;;
 
     *)
 	source="${source} ${option} $@"; break ;;
@@ -162,12 +168,17 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour
         cp -f "$file" "${memdisk_dir}"/boot/grub/
     fi
 done
+
 for file in ${pkglib_DATA}; do
     if test -f "${source_directory}/${file}"; then
         cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/
     fi
 done
 
+if test -f "${config_file}"; then
+    cp -f "${config_file}" "${memdisk_dir}"/boot/grub/grub.cfg
+fi
+
 mkdir -p "${memdisk_dir}"/boot/grub/locale
 for file in "${source_directory}"/po/*.mo; do
     if test -f "$file"; then

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: grub-mkstandalone fixes
  2011-12-04  9:59   ` Keshav P R
@ 2011-12-14 19:49     ` Keshav P R
  2011-12-18 21:23       ` Keshav P R
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-14 19:49 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 502 bytes --]

>
>  On Sun, Dec 4, 2011 at 15:12, Keshav P R <the.ridikulus.rat@gmail.com>wrote:
>>
>>> Hi,
>>>     It seems like grub-mkstandalone was copied directly from
>>> grub-mkrescue without checking the options. Also there is no way to specify
>>> a grub.cfg to be copied as (memdisk)/boot/grub/grub.cfg . The attached
>>> patch fixes all of this. Please apply it.
>>>
>>> Regards.
>>>
>>> Keshav
>>>
>>
>> Patch with --config option removed (now contains only trivial/typo fixes)
>> attached.
>>
>
- Keshav

[-- Attachment #1.2: Type: text/html, Size: 1156 bytes --]

[-- Attachment #2: grub-mkstandalone-trivial-fixes.patch --]
[-- Type: application/octet-stream, Size: 1897 bytes --]

diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..b0dbf9b 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -31,7 +31,7 @@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
 
 self=`basename $0`
 
-source_dirrectory=
+source_directory=
 compression=auto
 format=
 grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
@@ -86,7 +86,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -96,9 +96,9 @@ do
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
 
     --directory | -d)
-        source_directory=`argument $option "$@"`; shift ;;
+	source_directory=`argument $option "$@"`; shift ;;
     --directory=*)
-	source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;;
+	source_directory=`echo "$option" | sed 's/--directory=//'` ;;
 
     --grub-mkimage)
 	grub_mkimage=`argument $option "$@"`; shift ;;
@@ -108,12 +108,12 @@ do
     --compression | -C)
 	compression=`argument $option "$@"`; shift ;;
     --compression=*)
-        compression=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	compression=`echo "${option}" | sed 's/--compression=//'` ;;
 
     --format | -O)
 	format=`argument $option "$@"`; shift ;;
     --format=*)
-        format=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	format=`echo "${option}" | sed 's/--format=//'` ;;
 
     *)
 	source="${source} ${option} $@"; break ;;
@@ -162,6 +162,7 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour
         cp -f "$file" "${memdisk_dir}"/boot/grub/
     fi
 done
+
 for file in ${pkglib_DATA}; do
     if test -f "${source_directory}/${file}"; then
         cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: grub-mkstandalone fixes
  2011-12-14 19:49     ` Keshav P R
@ 2011-12-18 21:23       ` Keshav P R
  2011-12-22 12:07         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-18 21:23 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 547 bytes --]

>
>  On Sun, Dec 4, 2011 at 15:12, Keshav P R <the.ridikulus.rat@gmail.com>wrote:
>>>
>>>> Hi,
>>>>     It seems like grub-mkstandalone was copied directly from
>>>> grub-mkrescue without checking the options. Also there is no way to specify
>>>> a grub.cfg to be copied as (memdisk)/boot/grub/grub.cfg . The attached
>>>> patch fixes all of this. Please apply it.
>>>>
>>>> Regards.
>>>>
>>>> Keshav
>>>>
>>>
Updated patch with --config option removed and with a ChangeLog entry (now
contains only trivial/typo fixes) attached.

Regards.

Keshav

[-- Attachment #1.2: Type: text/html, Size: 1375 bytes --]

[-- Attachment #2: grub-mkstandalone-typo-fixes.patch --]
[-- Type: text/x-patch, Size: 2242 bytes --]

diff --git a/ChangeLog b/ChangeLog
index 4aacc74..79efa42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-19  Keshav P R  <the.ridikulus.rat@gmail.com>
+
+	* util/grub-mkstandalone.in: Fix minor typo errors.
+
 2011-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	* grub-core/commands/i386/pc/drivemap.c (int13slot): Replace
diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..b0dbf9b 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -31,7 +31,7 @@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
 
 self=`basename $0`
 
-source_dirrectory=
+source_directory=
 compression=auto
 format=
 grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
@@ -86,7 +86,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -96,9 +96,9 @@ do
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
 
     --directory | -d)
-        source_directory=`argument $option "$@"`; shift ;;
+	source_directory=`argument $option "$@"`; shift ;;
     --directory=*)
-	source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;;
+	source_directory=`echo "$option" | sed 's/--directory=//'` ;;
 
     --grub-mkimage)
 	grub_mkimage=`argument $option "$@"`; shift ;;
@@ -108,12 +108,12 @@ do
     --compression | -C)
 	compression=`argument $option "$@"`; shift ;;
     --compression=*)
-        compression=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	compression=`echo "${option}" | sed 's/--compression=//'` ;;
 
     --format | -O)
 	format=`argument $option "$@"`; shift ;;
     --format=*)
-        format=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+	format=`echo "${option}" | sed 's/--format=//'` ;;
 
     *)
 	source="${source} ${option} $@"; break ;;
@@ -162,6 +162,7 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour
         cp -f "$file" "${memdisk_dir}"/boot/grub/
     fi
 done
+
 for file in ${pkglib_DATA}; do
     if test -f "${source_directory}/${file}"; then
         cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: grub-mkstandalone fixes
  2011-12-18 21:23       ` Keshav P R
@ 2011-12-22 12:07         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-12-22 12:07 UTC (permalink / raw)
  To: grub-devel

On 18.12.2011 22:23, Keshav P R wrote:
>
>             On Sun, Dec 4, 2011 at 15:12, Keshav P R
>             <the.ridikulus.rat@gmail.com
>             <mailto:the.ridikulus.rat@gmail.com>> wrote:
>
>                 Hi,
>                     It seems like grub-mkstandalone was copied
>                 directly from grub-mkrescue without checking the
>                 options. Also there is no way to specify a grub.cfg to
>                 be copied as (memdisk)/boot/grub/grub.cfg . The
>                 attached patch fixes all of this. Please apply it.
>
>                 Regards.
>
>                 Keshav
>
>
> Updated patch with --config option removed and with a ChangeLog entry 
> (now contains only trivial/typo fixes) attached.
>
Comitted, thanks
> Regards.
>
> Keshav
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-22 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-04  9:42 grub-mkstandalone fixes Keshav P R
2011-12-04  9:47 ` Keshav P R
2011-12-04  9:59   ` Keshav P R
2011-12-14 19:49     ` Keshav P R
2011-12-18 21:23       ` Keshav P R
2011-12-22 12:07         ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).