From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OEhyR-0005q5-L8 for mharc-grub-devel@gnu.org; Wed, 19 May 2010 08:02:07 -0400 Received: from [140.186.70.92] (port=38790 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEhyO-0005pH-2h for grub-devel@gnu.org; Wed, 19 May 2010 08:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEhyF-0006dX-B8 for grub-devel@gnu.org; Wed, 19 May 2010 08:02:03 -0400 Received: from mail.gmx.net ([213.165.64.20]:53493) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OEhyE-0006cr-V7 for grub-devel@gnu.org; Wed, 19 May 2010 08:01:55 -0400 Received: (qmail 20445 invoked by uid 0); 19 May 2010 12:01:52 -0000 Received: from 212.46.126.165 by www152.gmx.net with HTTP; Wed, 19 May 2010 14:01:50 +0200 (CEST) Content-Type: multipart/mixed; boundary="========GMX287391274270510574256" Date: Wed, 19 May 2010 14:01:50 +0200 From: "Thomas Schmitt" Message-ID: <20100519120150.287390@gmx.net> MIME-Version: 1.0 To: grub-devel@gnu.org X-Authenticated: #2145628 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/0DtxLZT/0huUdoRhgUWKlCglcNMSVTp5PlC3t17 Dlp5SoWpEYRWj28KsGbcXpns1+C87uy6NEIg== X-GMX-UID: QaaaeA4+eWUkWC7bSW9nbjgjL0tsZo0O X-FuHaFi: 0.65000000000000002 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Re: Migrations to xorriso X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 12:02:05 -0000 --========GMX287391274270510574256 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 --========GMX287391274270510574256 Content-Type: text/x-patch; charset="iso-8859-15"; name="grub-mkrescue.in.ts.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="grub-mkrescue.in.ts.patch" --- 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} --========GMX287391274270510574256--