When I hack U-Boot I never do it inside Yocto build system but I use a toolchain (which is build using Yocto) for it.
For toolchain build:
$: bitbake meta-toolchain
Using this you can build U-Boot byhand.
Once you did the need changes, considering you're making a product, you would do:
* make a company/product layer
* add a board file which is based on your development platform
* add a bbappend to apply the need patch for it
I hope it is helpful.