u-boot-bootscr: clean up logic for name parsing