[U-Boot] ref:fail to include stdio.h
Paul Wang
paul.wang at tectonica.net
Fri Feb 27 02:27:26 CET 2009
Hi, Wolfgang,
I am trying to port some code of xyssl to u-boot in order to do the
digital signature verification.
Unfortunately, xyssl uses some stdlib functions, which are related to
file operations, strings, malloc and free (I worry these most).
The existing SHA1 features work fine with xscale. The main issue of
digital signature verification on u-boot is the large integer
operations.
Regards.
Paul Wang.
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, February 26, 2009 7:15 PM
To: Paul Wang
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] ref:fail to include stdio.h
Dear Paul,
In message
<FE00509E242C6145AA57855D449BE2182A19D4 at server.Tectonica.local> you
wrote:
>
> The problem is: When I want to add any one of std header files
anywhere
> on my architecture (pxa270), the compiler complains: stdio.h: No such
> file or directory.
U-Boot is not a standard application that runs under control of a
general purpose OS, but it's a boot loader that lives in a very
restricted, simple environment. As such, we cannot use the standard C
library (glibc). Instead, U-Boot is self-contained and includes
everything it needs, and nothing more.
<stdio.h> is a header file that is provided by glibc - it cannot be
used with U-Boot as U-Boot doesn't provide the context needed for
such a complex library like glibc.
I'm not sure why you would want to include <stdio.h> - it is not
needed in U-Boot context. Please look around in the existing code how
things are set up in U-Boot. This is NOT like developing a user space
application under Linux. It is even more restricted than programming
Linux kernel code (and in Linux kernel code you cannot include
<stdio.h> either).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are two kinds of people, those who do the work and those who
take the credit. Try to be in the first group; there is less
competition there. - Indira Gandhi
More information about the U-Boot
mailing list