From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KA4Au-0000bA-9m for mharc-grub-devel@gnu.org; Sat, 21 Jun 2008 10:34:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KA4As-0000b3-BD for grub-devel@gnu.org; Sat, 21 Jun 2008 10:34:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KA4Aq-0000ap-2g for grub-devel@gnu.org; Sat, 21 Jun 2008 10:34:41 -0400 Received: from [199.232.76.173] (port=40805 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KA4Ap-0000al-SK for grub-devel@gnu.org; Sat, 21 Jun 2008 10:34:39 -0400 Received: from wr-out-0506.google.com ([64.233.184.235]:54443) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KA4Ap-0002F1-9T for grub-devel@gnu.org; Sat, 21 Jun 2008 10:34:39 -0400 Received: by wr-out-0506.google.com with SMTP id c30so1356843wra.14 for ; Sat, 21 Jun 2008 07:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=B5HaZXJ9j+UOa7qe1Gv4kohs/WRR8H4UGTfmmkNW9+Q=; b=qUei4j3h4yDzRrvqWRcvXlCr1099m7j0xm55s4z2tv5q6fojrGrryPe7Zx98UwbC65 QY3/Qh4jjcTa+z2kZDVRU5B+tsm35LK5/1vWg/G+R2Y5X+OLWZL1JECrQSX+bNg1Unlr miRnrTfLND2ZorWPuZLCkFymRYyiWo1rSMAAU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=qVvQfkD+xgtsXcOgt8uKTqWujiU1dqWp5wNWtBH7p/v/VuVI/iaM51xPumGqs2D88e jOJC5o+ODzEvFGqBCljhgEAEG+RT8gBVZJKEQ7P7uphbl6PQ3r15NJM+MGysDIalL1ig lAk2XsDTgWQ3i1jH4b1NaZaVIaMSDaqdEY9lQ= Received: by 10.90.116.9 with SMTP id o9mr2849034agc.49.1214058878228; Sat, 21 Jun 2008 07:34:38 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id e76sm2422287hse.18.2008.06.21.07.34.36 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Jun 2008 07:34:37 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <20080621141907.GC24465@thorin> References: <20080619133147.GA5018@thorin> <485AA89A.5030404@isaac.cedarswampstudios.org> <20080621141907.GC24465@thorin> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3W74bbCRKVoj1ScSvvI7" Date: Sat, 21 Jun 2008 16:35:07 +0200 Message-Id: <1214058907.10018.39.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] add a counter in grub_dprintf X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 14:34:43 -0000 --=-3W74bbCRKVoj1ScSvvI7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El s=C3=A1b, 21-06-2008 a las 16:19 +0200, Robert Millan escribi=C3=B3: > But space in post-mbr area is precious, and if we can save a bit, it mean= s > less users who will run into trouble in first place. >=20 Disclaimer: the following is just the product of brainstorming from a mind tortured by hours of studying projective geometry. Use with care ^^ Why not modify the build system to create _two_ instances of kernel.img, one with and another without debugging? grub_mkimage would create the normal, smaller core.img (without dprintf) for installing and embedding; and store a core_dbg.img in the /boot/grub folder, so that if instrumentation is required the only thing the users needs to do is chain that debug version of GRUB: grub> multiboot /boot/grub/core_dbg.img grub> boot Another option would be to separate grub_dprintf into a module of its own that could, or could not, go into core.img depending on space pressure. We'd still need a "grub_dprintf" in the kernel, but it would just reduce to "Is debug.mod loaded? Yes->call debug_grub_dprintf". This would only result in a substantial reduction of kernel if grub_dprintf is currently a big function (and I haven't even taken a look at it) with format substitution and all. The downside is that we'd have no dprintf at all until modules are loaded, though some logic can be hardcoded so that debug.mod is loaded first, if present. --=-3W74bbCRKVoj1ScSvvI7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASF0RmqSl+Fbdeo72AQJeLRAAmRAAUNxNAH/NU1oi3ahjMj0q6tGUluqz G+e57xoUUJiGzx18ICwZkXd9ktzfhTRTvgwQdnHOVwjvkHLPGnjan1wCsdm35dAa jg7z8FSOms5vQEtEtHkDefUJdxG6vnhVIZ7IjYtcg40tsq0a/0iiTKuVpuljteYv cWNWK/OF3lhD/j095vqh87mP1LCKEHS+++cMRcCzHeyN9JQ7vwUCJj5fBrV1XVxj /m1CNMq+qBwTRi1RidkYnheMg8IuaP0o+8lq/RrafQ1dpyPwxqbB0a/DNfFaMw80 iP1lPS/uotf2VbYyrcIEclJbxw8bV4juNR/K7VFNbGOSeCYHLlMTiGkTGyjEhM3e DQGUk1AmI+k9knrtyMkhXyZ1v8N/DaIyP+h4qDNHcwlRsBQpjxuyyNq9Pki4rC2L LHWN3LwzkPD+L3UBpEifH48Mw4Rhmwkb4QpxylUlxOuUxmgfeiRhNMlmU+mEELvN bFstk8XptVhllP7JSlO9k4iOgQrZ+AxcUIJ5LhfCikFvC3FSpGflsUdvDzI6XRC0 paWTS0rI29RjSJttmAQ7a83UPg6SxIxO9sy8w6itelx01t1ulQZczegcXUipXnN9 V1ThDm/iZwvqkbiTPKhItwFC0OUUM8M2KsB/l6L+94kMk8vryEQTjsmg1BhZERyy PkgD4ScHVIg= =Lv7m -----END PGP SIGNATURE----- --=-3W74bbCRKVoj1ScSvvI7--