From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YnSSw-0007xv-7k for mharc-grub-devel@gnu.org; Wed, 29 Apr 2015 09:55:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnSSt-0007wr-Ow for grub-devel@gnu.org; Wed, 29 Apr 2015 09:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnSSs-00082e-NR for grub-devel@gnu.org; Wed, 29 Apr 2015 09:55:51 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:35008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnSSs-00082T-Fy for grub-devel@gnu.org; Wed, 29 Apr 2015 09:55:50 -0400 Received: by wgyo15 with SMTP id o15so29208323wgy.2 for ; Wed, 29 Apr 2015 06:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=F1I21TcCgv8rr7BVB9BlaAajK/HQ3h7hEdTLQ5gDQGY=; b=toWzizY9dKSvNcZdiAooJRR/asGFcRaus3uXlvwF7PUcsAglnzCUDE9bhFQfBRWkbd 79EJp9ynRYU7TfahMN91FL0uVb/2c5OXHkzQ/nTnDQKlFtwAJUpKbgYKEtWMMTB8J/yJ XjwRHGwQmGflofU3+mYr2T7RT95dWoVB+DnRq0Y4ZyKDyP/u4S3DsRDCMvItJmsNWDPU WkI22w/6w0TQZTcEOdY31F6rJXILpOC8MJgYGDjIQaHEIw2fYf48kjkyq3e9iOpiZSaA oyfe7BSINVm3rH7Lt1EHzMUjM3xuHmIgQzq49STImxSuewBhaupJGb1lwUkQoFobzT0L ZjuQ== X-Received: by 10.194.236.33 with SMTP id ur1mr17176752wjc.77.1430315749792; Wed, 29 Apr 2015 06:55:49 -0700 (PDT) Received: from ?IPv6:2620:0:105f:fd00:863a:4bff:fe50:abc4? ([2620:0:105f:fd00:863a:4bff:fe50:abc4]) by mx.google.com with ESMTPSA id di9sm21326734wib.16.2015.04.29.06.55.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 06:55:49 -0700 (PDT) Message-ID: <5540E2E4.1010807@gmail.com> Date: Wed, 29 Apr 2015 15:55:48 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [syslinux] Using memdisk with grub2 and a gzip-compressed ISO References: <55396F5E.7090303@zytor.com> <20150424061443.3d80329c@opensuse.site> <5539B8C1.4030401@zytor.com> <20150424064128.71489695@opensuse.site> <5539C90A.9000608@zytor.com> <553EB638.4060704@zytor.com> In-Reply-To: <553EB638.4060704@zytor.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uGodVOkvlaXPu5xUbKHXam54X7Of1Ranr" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::234 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 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, 29 Apr 2015 13:55:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uGodVOkvlaXPu5xUbKHXam54X7Of1Ranr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 28.04.2015 00:20, H. Peter Anvin wrote: > On 04/23/2015 11:25 PM, Andrei Borzenkov via Syslinux wrote: >> On Fri, Apr 24, 2015 at 7:39 AM, H. Peter Anvin wrote:= >>> On 04/23/2015 08:41 PM, Andrei Borzenkov wrote: >>>> >>>> CRC+length (in case of gzip) are located immediately after compresse= d >>>> stream. After stream is decompressed you get location where it ends = and >>>> automatically where length is located. >>>> >>> >>> I know. One could decompress it twice, >> >> Cannot you incrementally reallocate uncompressed buffer? >> >=20 > That is very hard because of how memory is managed in MEMDISK. >=20 It's fine to skip padding if only one file is supplied on command line. What about: diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c index 117232f..a63a11a 100644 --- a/grub-core/loader/linux.c +++ b/grub-core/loader/linux.c @@ -205,7 +205,8 @@ grub_initrd_init (int argc, char *argv[], initrd_ctx->nfiles++; initrd_ctx->components[i].size =3D grub_file_size (initrd_ctx->components[i].file); - initrd_ctx->size +=3D ALIGN_UP (initrd_ctx->components[i].size, 4)= ; + if (argc !=3D 1) + initrd_ctx->size +=3D ALIGN_UP (initrd_ctx->components[i].size, 4= ); } if (newc) --uGodVOkvlaXPu5xUbKHXam54X7Of1Ranr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EAREKAAYFAlVA4uQACgkQmBXlbbo5nOtdKAD9GGPh+4mjdRxNh++SXlfd7bP8 1T9cEG/q2N47KqYlT0YBAJCM8UqgZAV8sSq4tN4HDoSOvHV7mDMrBpfCY8mOJOJc =zThg -----END PGP SIGNATURE----- --uGodVOkvlaXPu5xUbKHXam54X7Of1Ranr--