From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Subject: Re: Migrations to xorriso
Date: Wed, 19 May 2010 14:01:50 +0200 [thread overview]
Message-ID: <20100519120150.287390@gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
Hi,
would the following changes be acceptable for
grub-mkrescue ?
- Option --xorriso=PROGFILE allows to use a
particular binary as xorriso program.
This will avoid the need to install xorriso.
One can just unpack and build it in some
directory and use .../xorriso/xorriso
as binary.
- Option --diet saves about 400 kB of image
size without losing much benefit.
I attach an untested patch to illustrate the
intended changes.
If ok in principle, then i would do
beautifications and make some tests.
Nevertheless, a GRUB expert should make own
tests afterwards. So maybe Vladimir wants
to take it just as proposal for an own
more qualified change.
Have a nice day :)
Thomas
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
[-- Attachment #2: grub-mkrescue.in.ts.patch --]
[-- Type: text/x-patch, Size: 1777 bytes --]
--- grub-mkrescue.in 2010-05-18 10:02:06.000000000 +0200
+++ grub-mkrescue.in.ts 2010-05-19 13:53:18.000000000 +0200
@@ -38,6 +38,9 @@ efi32_dir=${libdir}/$(echo ${PACKAGE_TAR
efi64_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi
rom_directory=
+xorriso=xorriso
+diet=no
+
# Usage: usage
# Print the usage.
usage () {
@@ -50,6 +53,8 @@ Make GRUB rescue image.
--output=FILE save output in FILE [required]
--modules=MODULES pre-load specified modules MODULES
--rom-directory=DIR save rom images in DIR [optional]
+ --xorriso=PROGFILE use PROGFILE as xorriso program [optional]
+ --diet apply size reducing measures [optional]
$0 generates a bootable rescue image with specified source files or directories.
@@ -78,6 +83,10 @@ for option in "$@"; do
PATH=${override_dir}:$PATH
export PATH
;;
+ --xorriso=*)
+ xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
+ --diet)
+ diet=yes ;;
-*)
echo "Unrecognized option \`$option'" 1>&2
usage
@@ -254,7 +263,14 @@ if [ -e "${iso9660_dir}/boot/coreboot.el
fi
# build iso image
-xorriso -pathspecs on -as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
+if [ "${diet}" = yes ]; then
+ if [ -e "${output_image}" ]; then
+ rm "${output_image}" || exit 1
+ fi
+ "${xorriso}" -report_about HINT -as mkisofs -graft-points -no-pad ${grub_mkisofs_arguments} --protective-msdos-label -r ${iso9660_dir} ${source} | cat >"${output_image}"
+else
+ "${xorriso}" -report_about HINT -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o "${output_image}" -r ${iso9660_dir} ${source}
+fi
rm -rf ${iso9660_dir}
rm -f ${embed_img}
next reply other threads:[~2010-05-19 12:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 12:01 Thomas Schmitt [this message]
2010-05-19 12:13 ` Migrations to xorriso Colin Watson
2010-05-19 13:23 ` Thomas Schmitt
2010-05-19 21:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-19 18:40 ` Isaac Dupree
2010-05-19 19:34 ` Thomas Schmitt
2010-05-19 21:10 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-19 21:35 ` Seth Goldberg
2010-05-19 21:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2010-05-20 9:30 Thomas Schmitt
2010-05-17 21:33 Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-18 8:49 ` Thomas Schmitt
2010-05-18 12:50 ` Thomas Schmitt
2010-05-19 19:45 ` Thomas Schmitt
2010-05-19 21:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-20 6:31 ` Thomas Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100519120150.287390@gmx.net \
--to=scdbackup@gmx.net \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.