[U-Boot-Users] Suggestion on CRCing data on NAND?

mitsy mitsy12 at gmail.com
Thu Aug 17 22:44:17 CEST 2006


Wolfgang,

Here's what I need to do from u-boot. I'd like to check the validity
of rootfs before launching Linux kernel. NFS is not available for what
I'm doing so if the rootfs is corrupted, the kernel will just panic
and hang there. We can't use boot disk, etc. either. So, I'd like to
check rootfs and if it seems corrupted, u-boot will download the valid
rootfs image (via tftp) and burn it on flash before it launches
kernel.

I'm planning on making the rootfs read-only so that CRC checking make
sense for this purpose. If there's anything we need to save, we will
just save them in a flash in a separate partition.

Is there a better way for this process that we can do from u-boot? If
so, I'd love to hear it.

Thanks!

mitsy

On 8/17/06, Wolfgang Denk <wd at denx.de> wrote:
> In message <e0590900608171108x20a32b79va810cf81dc140fac at mail.gmail.com> you wrote:
> > I need to calculate CRC for the data (jffs2) on NAND flash. (u-boot is
>
> I cannot imagine what that would be good for. The CRC would ounly  be
> useful  if this was a read-only partition, then JFFS2 is probably not
> the optimal solution; or it is a writable partition, and then your CRC
> is void.
>
> > Can anyone suggest a better/faster way?
>
> Explain what you really want to do. I guess you are on the wrong
> track.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Looks clean and obviously correct to me, but then _everything_ I
> write always looks obviously correct to me.  - Linus Torvalds in
> <Pine.LNX.4.10.10012090054360.791-100000 at penguin.transmeta.com>
>




More information about the U-Boot mailing list