From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NpLbZ-00065p-Qu for mharc-grub-devel@gnu.org; Wed, 10 Mar 2010 08:05:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpLbW-00063q-Iz for grub-devel@gnu.org; Wed, 10 Mar 2010 08:05:38 -0500 Received: from [140.186.70.92] (port=50954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpLbU-00062e-MV for grub-devel@gnu.org; Wed, 10 Mar 2010 08:05:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NpLbT-0002Et-AQ for grub-devel@gnu.org; Wed, 10 Mar 2010 08:05:36 -0500 Received: from mail-fx0-f215.google.com ([209.85.220.215]:53420) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NpLbT-0002Ep-4Z for grub-devel@gnu.org; Wed, 10 Mar 2010 08:05:35 -0500 Received: by fxm7 with SMTP id 7so610136fxm.26 for ; Wed, 10 Mar 2010 05:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=5qEZOMbbMMlf4N1yNOE8HUdWDy+qg/YWGdhz9St4IWk=; b=OdXTu3W3QiYuFcqrXmeji/pqHwD69aByVKKswxdY8OdaCqi3bo67FJht2vsd0PGEQX PSI2cvgkeDXeDOM8mg6Wlb6vSnBd4g5ME8U+Pcdd6AFWykKpRWF4Me1YhBG6brSGrIBH 4UkMslDsDzh27YW0iYhEGJ10ZAxWFyGAUwNtM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=JJZNxhh/zVFixUp9drUWuW2lWvoqbnQl2KpaLYE+Jpnw11riX/Qr5XAOX98UFIivv2 Vis2O68B7DxdNkeu1TNsJSCPji8sysixw/+Zzba2eVRVDWIC4YzFzn37kM46rIv/Zpdk GaQsZCkLIFhASUjL4jLG/CaWtzntZlGDedwl0= Received: by 10.87.50.22 with SMTP id c22mr2711610fgk.7.1268226334243; Wed, 10 Mar 2010 05:05:34 -0800 (PST) Received: from debian.bg45.phnet (public-docking-hg-2-125.ethz.ch [129.132.247.125]) by mx.google.com with ESMTPS id e3sm7308087fga.3.2010.03.10.05.05.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Mar 2010 05:05:32 -0800 (PST) Message-ID: <4B979915.8020203@gmail.com> Date: Wed, 10 Mar 2010 14:05:25 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <87aaug8iw0.wl%jir@sekiba.com> In-Reply-To: <87aaug8iw0.wl%jir@sekiba.com> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig4E3EEA2BB0D0DCEDAECAC41B" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: How can I use grub_getcrc32 in fs module 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, 10 Mar 2010 13:05:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4E3EEA2BB0D0DCEDAECAC41B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jiro SEKIBA wrote: > Hi, > > How can I write Makefile to use grub_getcrc32 in file module? > > I'm trying to use grub_getcrc32 function to calculate crc of > the specific part of the disk so as to validate the disk. > =20 Filesystem modules are often size-constrained. So we skip the consistency checks unless they are inherent part of filesystem operation.= If filesystem is corrupted there isn't much we can do other than hope that boot-related files aren't affected. GRUB itself never writes to fs metadata so it won't lead to any additional corruption > I added lib/crc.c in SOURCES in common.rmk for the fs module. > It looks OK to compile the target fs module. > However I got following link error for grub-setup and grub-probe. > > grub_setup-fs_nilfs2.o: In function `grub_nilfs2_valid_sb': > nilfs2.c:(.text+0xe29): undefined reference to `grub_getcrc32' > nilfs2.c:(.text+0xe47): undefined reference to `grub_getcrc32' > nilfs2.c:(.text+0xe7e): undefined reference to `grub_getcrc32' > collect2: ld returned 1 exit status > > I was trying to specify lib/crc.c in grub_setup_SOURCES, but got same r= esult. > > =20 Stupid question: have you rerun ./autogen.sh ? > What is the best way to add dependency for those programs if > I want to use crc calculation in fs module? > > thank you very much in advance > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig4E3EEA2BB0D0DCEDAECAC41B 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.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkuXmRsACgkQNak7dOguQglnhAD9GdO6oURtalMvxrBjtyoYDIaC ym0EFfVvpxXZ5gfj4ewA/34zwrmYt/UxZxEoZfLGr3N7LdsMD6TmIQ19H9wviDAj =1KZN -----END PGP SIGNATURE----- --------------enig4E3EEA2BB0D0DCEDAECAC41B--