[U-Boot] mkenvimage not working for me.
Nick Thomas
nick.thomas at pixsan.com
Tue Sep 27 15:02:50 CEST 2011
Hi David,
Thanks for your prompt reply.
The U-Boot I am using comes from the ST Microelectronics. Their STLinux
distribution for embedded devices.
UBoot appears to be at version 1.3.1 - but I'm not sure if that is an ST
version number or not.
I suspect that the problems I am having are probably best directed towards
ST themselves.
I suspect that the CRC calculation, for the 4 bytes of CRC at the head of
the environment, might be ST specific.
I will investigate further.
Thanks,
Nick Thomas
On 27 September 2011 12:56, David Wagner <david.wagner at free-electrons.com>wrote:
> Hi,
> (CCing u-boot mailing list and Mike Frysinger)
>
> stdlib.h is indeed missing.
> EXIT_FAILURE and EXIT_SUCCESS are defined within stdlib.h, so that
> explains it.
>
> How old are you u-boot sources ? compiler.h has been introduced by:
> commit 37566090766d61beef70c62986b90749920255d8
> Author: Mike Frysinger <vapier at gentoo.org>
> Date: Thu Jul 2 19:23:25 2009 -0400
>
> If your U-Boot is older than that, could you please test again with the
> latest possible version ? Btw, cpu_to_be32 is defined within compiler.h
>
> Thanks for testing and reporting.
> Regards,
> David.
>
> On 09/27/2011 12:03 PM, Nick Thomas wrote:
> > Hi,
> >
> > I am trying to use the mkenvimage utilty to create a environment image
> file
> > ready for flashing.
> >
> > I have a few problems - the main one being that it looks like the CRC is
> > incorrect for my system.
> >
> > Also, there are compiler errors too:
> > 1) The code uses malloc without #include <stdlib.h>
> > 2) EXIT_FAILURE and EXIT_SUCCESS aren't defined.
> > 3) I can't find a <compiler.h> file, so I just commented it out.
> > 4) cpu_to_be32 can't be found. I thought these were kernel space funcs
> > anyway.
> > I have replaced cpu_to_be32 with htobe32 - which I think is in the libz
> > library.
> >
> > Anyway, after making those changes I get mkenvimage to compile, and it
> > creates a environment image file.
> > But, after flashing in to my STLinux unit the U-Boot complains that the
> > environment has an invalid CRC ?!
> >
> > Also, I notice that the output of uboot printenv has some long lines
> > truncated - so it can't reliably used as direct input into this utility.
> >
> >
> > Regards
> >
> > Nick Thomas
> >
>
>
> --
> David Wagner, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
--
Nick Thomas
Software Engineer
Pixsan Digital Software Ltd
More information about the U-Boot
mailing list