Page MenuHomeFreeBSD

stand/uboot: reorg
ClosedPublic

Authored by imp on Dec 9 2021, 8:37 PM.
Tags
None
Referenced Files
F102557039: D33362.diff
Thu, Nov 14, 12:54 AM
Unknown Object (File)
Thu, Oct 31, 7:35 PM
Unknown Object (File)
Sat, Oct 26, 1:29 AM
Unknown Object (File)
Wed, Oct 23, 3:06 AM
Unknown Object (File)
Wed, Oct 23, 3:06 AM
Unknown Object (File)
Wed, Oct 23, 2:42 AM
Unknown Object (File)
Fri, Oct 18, 6:15 AM
Unknown Object (File)
Oct 8 2024, 8:08 AM

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43265
Build 40153: arc lint + arc unit

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.
share/mk/src.opts.mk
319

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.
share/mk/src.opts.mk
319

I think this fix is correct, please verify.

stevek added inline comments.
share/mk/src.opts.mk
319

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.
share/mk/src.opts.mk
319

I agree about the stray f.

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

share/mk/src.opts.mk
319

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

share/mk/src.opts.mk
319

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

share/mk/src.opts.mk
319

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

share/mk/src.opts.mk
319

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.