From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: How can I use grub_getcrc32 in fs module
Date: Wed, 10 Mar 2010 14:05:25 +0100 [thread overview]
Message-ID: <4B979915.8020203@gmail.com> (raw)
In-Reply-To: <87aaug8iw0.wl%jir@sekiba.com>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
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.
>
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 result.
>
>
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
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
next prev parent reply other threads:[~2010-03-10 13:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 12:23 How can I use grub_getcrc32 in fs module Jiro SEKIBA
2010-03-10 13:05 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-03-10 14:09 ` Jiro SEKIBA
2010-03-14 12:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-03-15 10:03 ` Jiro SEKIBA
2010-03-15 10:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-03-16 7:22 ` Jiro SEKIBA
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=4B979915.8020203@gmail.com \
--to=phcoder@gmail.com \
--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.