Re: Recent u-boot port change

From: Milan Obuch <freebsd-ports_at_dino.sk>
Date: Mon, 09 May 2022 10:29:39 UTC
On Sun, 8 May 2022 15:29:08 -0700
Christopher Bowman <crb@chrisbowman.com> wrote:

> First, I truly do appreciate all the effort every one puts into
> FreeBSD. Apologies if I’m not quite following protocol here:
>
> I see that u-boot master port was recently upgraded to pull u-boot
> 2022.04. I have a private port that I’ve been using but looks me to
> an earlier version of the port since the recent one uses a version of
> u-boot I can’t get to work. I attempted to update my private port
> based on the new version to see if I can get it working and committed
> However, I’m confused how the master port ever built.

Hi,

I am building some of the u-boot ports in order to verify the process
and test them locally. I think master port is not built directly, it
serves as common place for u-boot related patches and similar things.
You should build your slave port.

> When I try to build with my patches applied I get the following
> errors:
> 
> tools/mkeficapsule.c:18:10: fatal error: 'uuid/uuid.h' file not found
> #include <uuid/uuid.h>
>        ^~~~~~~~~~~~~
> 1 error generated.
> 
> There is a uuid.h in /usr/include so I patched this.
> 
> Then I come across:
> 
> tools/mkeficapsule.c:21:10: fatal error: 'gnutls/gnutls.h' file not
> found #include <gnutls/gnutls.h>
>        ^~~~~~~~~~~~~~~~~
> 1 error generated.
> 
> Ok so I install gnutls and patch the make file to also search
> /usr/local/include where that gets installed.  Next I get:
> 
> tools/mkeficapsule.c:631:8: warning: implicit declaration of function
> 'uuid_parse' is invalid in C99 [-Wimplicit-function-declaration] if
> (uuid_parse(optarg, uuid_buf)) { ^
> 1 warning generated.
> 
> uuid_parse doesn’t exist in /usr/include/uudi.h but
> /usr/include/sys/uuid.h which is included by /usr/include/uuid.h does
> have a parse_uuid (note: not uuid_parse) which looks right so I patch
> again but now I get:
> 
> tools/mkeficapsule.c:631:8: warning: implicit declaration of function
> 'parse_uuid' is invalid in C99 [-Wimplicit-function-declaration] if
> (parse_uuid(optarg, uuid_buf)) { ^
> 1 warning generated.
> 
> at which point I give up and start to wonder how any of the other
> u-boot ports build? I mean this doesn’t look very specific to my
> port which is a Xilinx Zynq/arm architecture. I didn’t see any other
> Zynq ports in the tree so I couldn’t look at them for reference.
> This all happens on a 13.0 system with a recent git copy of ports.
>

I have some local ports for Zynq based boards. I just did not verified
them yet with new 2022.04 u-boot, I used old FreeBSD box for tests
which needs full upgrade (in process). But testing u-boot ports locally
is just before trying local ports...

One hint - there is freebsd-uboot mailing list, designed specifically
for u-boot related issues. While it is not much activity there, I think
it is more appropriate for this discussion...

Regards,
Milan