All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] mkenvimage not working for me.
       [not found] <CAFaXcQMtX3Qg2zdpPG4S+gpfY2t6yhp1Xu4kG2vZa0VvRFbViA@mail.gmail.com>
@ 2011-09-27 11:56 ` David Wagner
  2011-09-27 13:02   ` Nick Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: David Wagner @ 2011-09-27 11:56 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] mkenvimage not working for me.
  2011-09-27 11:56 ` [U-Boot] mkenvimage not working for me David Wagner
@ 2011-09-27 13:02   ` Nick Thomas
  2011-09-27 14:56     ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Thomas @ 2011-09-27 13:02 UTC (permalink / raw)
  To: u-boot

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@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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] mkenvimage not working for me.
  2011-09-27 13:02   ` Nick Thomas
@ 2011-09-27 14:56     ` Mike Frysinger
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2011-09-27 14:56 UTC (permalink / raw)
  To: u-boot

On Tuesday, September 27, 2011 09:02:50 Nick Thomas wrote:
> Hi David,

please don't top post

> 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.

if you aren't using the master branch of the public u-boot git tree, then your 
troubles should be directed to whoever is giving you the source tree you're 
using
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110927/6e255e43/attachment.pgp 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-27 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAFaXcQMtX3Qg2zdpPG4S+gpfY2t6yhp1Xu4kG2vZa0VvRFbViA@mail.gmail.com>
2011-09-27 11:56 ` [U-Boot] mkenvimage not working for me David Wagner
2011-09-27 13:02   ` Nick Thomas
2011-09-27 14:56     ` Mike Frysinger

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.