[U-Boot] [[RFC Patch] 1/2] tools: buildmand: Remove duplicated code