Commit ee0a2694 authored by Guido Gunther's avatar Guido Gunther
Browse files

librem5-devkit-flash: Strip board revision from uboot board name

It's still possilble to override it completely
parent 823653f8
......@@ -8,6 +8,7 @@ import jenkins
import logging
import lzma
import os
import re
import requests
import shutil
import subprocess
......@@ -303,8 +304,11 @@ def main():
if args.uboot_job:
uboot_ref = find_uboot(args.uboot_job)
uboot_board = args.board
uboot_ref = find_uboot(UBOOT_JOB_NAME.format(args.board))
# uboot builds don't carry board revisions (yet?)
uboot_board = args.board[:-2] if re.match('librem5r[0-9]$', args.board) else args.board
uboot_ref = find_uboot(UBOOT_JOB_NAME.format(uboot_board))
if uboot_ref:
uboot_ref['ts'] = datetime.datetime.fromtimestamp(uboot_ref['timestamp'] / 1000).strftime('%c')
......@@ -323,13 +327,13 @@ def main():
os.makedirs(args.dir, exist_ok=True)
image_target = os.path.join(outdir, IMAGE.format(args.board))
uboot_target = os.path.join(outdir, UBOOT.format(args.board))
uboot_target = os.path.join(outdir, UBOOT.format(uboot_board))
uuu_target = os.path.join(outdir, UUU_SCRIPT.format(args.board))
download_image(urljoin(image_ref['url'], 'artifact/{}.xz').format(IMAGE.format(args.board)),
image_target, args.download_attempts)
'artifact/output/uboot-{}/{}'.format(args.board, UBOOT.format(args.board))),
'artifact/output/uboot-{}/{}'.format(args.board, UBOOT.format(uboot_board))),
write_uuu_script(uuu_target, image_target, uboot_target, uuu_mods)
if not args.skip_flash:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment