Page MenuHomeFreeBSD

stand/uboot: reorg

Authored by imp on Dec 9 2021, 8:37 PM.
Referenced Files
Unknown Object (File)
Fri, May 24, 7:08 PM
Unknown Object (File)
Sun, May 12, 5:02 PM
Unknown Object (File)
Fri, May 10, 8:47 PM
Unknown Object (File)
Mon, May 6, 4:17 AM
Unknown Object (File)
Sun, May 5, 10:04 AM
Unknown Object (File)
Sun, May 5, 10:03 AM
Unknown Object (File)
Thu, May 2, 12:58 AM
Unknown Object (File)
Wed, May 1, 9:51 PM



Build uboot ubldr and friends like we build efi binaries
o move everything to be under stand/uboot
o md code goes in arch/$ARCH
o move everything over from the library

  • Had to rename console.c, disk.c and module.c due to conflicts

o update version to 1.5 to reflect the new way of building

This results in a more consistent build system and should represent no
functional change, apart from powerpc version getting new help
file. Also, moved to exlcuding uboot on powerpc64le by using
BROKEN_OPTION instead of the incidental exclusion we had before due to
Makefile reorgs.

Sponsored by: Netflix

Test Plan

Looking for ways to test this...

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

imp requested review of this revision.Dec 9 2021, 8:37 PM
imp added reviewers: manu, mmel, bdragon, tsoome.
jrtc27 added inline comments.

I think you mean || ${__T} == "powerpc64le" inside your parentheses (!ppcbe == !(ppc && be) == (!ppc || !be) == (!ppc || le))? What you have is equivalent to the existing ${__T:Mpowerpc*} == "".

Get logic right, per jessica's feedback

imp marked an inline comment as done.Dec 9 2021, 10:10 PM
imp added inline comments.

I think this fix is correct, please verify.

stevek added inline comments.

Instead of the separate :M values you can do it like this:

.if ${__T:Narm*:Npowerpc*} != "" || ${__T} == "powerpc64le"

(Note that I don't think you intended to have $__fT in there... it looks like a "f" creeped in.)

imp marked an inline comment as done.Dec 10 2021, 3:58 AM
imp added inline comments.

I agree about the stray f.

However, your example is != and mine is ==, so ${__T:Narm*:Npowerpc*} will always produce the null set, no?


stevek's suggestion uses :N not :M, but :N isn't commonly used in base for this, especially this file likes :M != "", so I'd prefer to keep it as is


We use the :N form a lot in our build at Juniper as it's rather convenient and more efficient than a bunch of separate expressions


For example of usage already in the tree, see share/mk/ with the .TARGETS variable


OK. I've convinced myself that :N makes sense (thanks jrtc27 for the insight).
I'm inclined to keep it as is for the moment,...

I do have one question on ubldr: how do I test it?

This revision was not accepted when it landed; it landed in state Needs Review.Dec 15 2021, 4:15 AM
Closed by commit rG9dc70af83e59: stand/uboot: reorg (authored by imp). · Explain Why
This revision was automatically updated to reflect the committed changes.