[PATCH v2 03/28] mbedtls: add mbedtls into the build system

Tom Rini trini at konsulko.com
Thu May 9 17:43:06 CEST 2024


On Thu, May 09, 2024 at 11:36:37AM -0400, Raymond Mao wrote:
> Hi Tom,
> 
> On Thu, 9 May 2024 at 11:31, Tom Rini <trini at konsulko.com> wrote:
> 
> > On Thu, May 09, 2024 at 11:23:11AM -0400, Raymond Mao wrote:
> > > Hi Tom,
> > >
> > > On Thu, 9 May 2024 at 11:11, Tom Rini <trini at konsulko.com> wrote:
> > >
> > > > On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Tue, 7 May 2024 at 17:16, Tom Rini <trini at konsulko.com> wrote:
> > > > >
> > > > > > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> > > > > >
> > > > > > > Port mbedtls with dummy libc header files.
> > > > > > > Add mbedtls default config header file.
> > > > > > > Optimize mbedtls default config by disabling unused features to
> > > > > > > reduce the target size.
> > > > > > > Add mbedtls kbuild makefile.
> > > > > > > Add Kconfig and mbedtls config submenu.
> > > > > > [snip]
> > > > > > > diff --git a/include/stdio.h b/include/stdio.h
> > > > > > > index 3241e2d493f..874279c60dd 100644
> > > > > > > --- a/include/stdio.h
> > > > > > > +++ b/include/stdio.h
> > > > > > > @@ -3,6 +3,7 @@
> > > > > > >
> > > > > > >  #include <stdarg.h>
> > > > > > >  #include <linux/compiler.h>
> > > > > > > +#include <vsprintf.h>
> > > > > > >
> > > > > > >  /* stdin */
> > > > > > >  int getchar(void);
> > > > > >
> > > > > > Is this really needed? I know our include structure is a bit odd.
> > > > Should
> > > > > > we perhaps look at moving a prototype or two around to be more
> > broadly
> > > > > > compatible?
> > > > > >
> > > > > Then we need to move  prototypes of snprintf, _vprintf, putc_outstr
> > and
> > > > > printf_info from tiny-printf to stdio.h. Is this good for you?
> > > >
> > > > I don't quite follow you but yes, please work it up for review at least
> > > > as I'm not too thrilled with adding <vsprintf.h> to <stdio.h> after the
> > > > work I did removing <common.h> showed some fun around those headers as
> > > > well, and I'd like to sort it out correctly.  Thanks.
> > > >
> > > > When MbedTLS native codes include <stdio.h>, they expect to have a
> > > prototype
> > > 'snprintf', that is the reason why I hijacked <stdio.h> as we are not
> > going
> > > to
> > > change MbedTLS native codes.
> > > I mean in v3, I can move 'snprintf' related stuff to <stdio.h> so that we
> > > don't
> > > need to include <vsprintf.h>.
> >
> > Yes, I would suggest doing a branch where you just make that change to
> > stdio.h and see what the build fall out is on -next. I would not be
> > surprised if it requires a bit of work. It's work that needs to be done
> > and is worth doing, but might be... large.
> >
> > Yes, I can do this before posting v3.
> If it affects too much, it would prefer to just keep the <vsprintf.h>
> though...

No, if it effects too much I'll just have to do a series to move things
around. Which I will do, soon, if needed.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240509/a84a2afb/attachment.sig>


More information about the U-Boot mailing list