openocd: add head build support

Closes #22447.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>