grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I use grub_getcrc32 in fs module


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: How can I use grub_getcrc32 in fs module
Date: Wed, 10 Mar 2010 14:05:25 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]