diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fec7d9e90d4419c478d7534087c797988ff8dbe..83247199d4df429c4e0fd4f2d623bb7da7d46a26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ test:download:deb: - apt-get -y install $FLASHDEPS script: - scripts/librem5-devkit-flash-image --board librem5 --variant plain --dist amber-phone --skip-flash --skip-cleanup --dir=download/ - - ls -l download/librem5.img download/flash_librem5.lst download/u-boot-librem5.imx + - ls -l download/librem5r2.img download/flash_librem5r2.lst download/u-boot-librem5.imx - rm -rf download test:download:pip: diff --git a/scripts/librem5-devkit-flash-image b/scripts/librem5-devkit-flash-image index 635133e878137f0de1e697e1900d31ddf9874967..8614d5fc7fef7a8f9a048b10eefa5fc5a05f839e 100755 --- a/scripts/librem5-devkit-flash-image +++ b/scripts/librem5-devkit-flash-image @@ -262,7 +262,7 @@ def main(): help="Maximum number of attempts to resume " "devkit image download. 0-unlimited") parser.add_argument('--variant', choices=['legacy', 'current', 'next', 'plain'], default=BOARD_VARIANT, - help='Variant of the board to download ( legacy, current, next )') + help='Variant of the board to download ( legacy, current, next, plain )') parser.add_argument('--board', choices=['devkit', 'librem5'], default=BOARD_TYPE, help='Type of the board to download ( devkit, librem5 )') parser.add_argument('--board_rev', choices=['chestnut', 'dogwood'], @@ -283,9 +283,17 @@ def main(): else: logging.basicConfig(level=level, format='%(asctime)s %(levelname)s %(message)s') + if args.board == 'librem5': + if args.board_rev == 'dogwood': + kernel_board = 'librem5r3' + else: + kernel_board = 'librem5r2' + else: + kernel_board = 'devkit' + # Check available downloads upfront so it's less likely we fail # later: - image_ref = find_image(args.image_job, args.board, args.variant, args.dist) + image_ref = find_image(args.image_job, kernel_board, args.variant, args.dist) if image_ref: image_ref['ts'] = datetime.datetime.fromtimestamp(image_ref['timestamp'] / 1000).strftime('%c') logging.info("Found disk image Build {id} '{description}' from {ts}".format(**image_ref)) @@ -314,11 +322,11 @@ def main(): if args.dir == outdir: os.makedirs(args.dir, exist_ok=True) - image_target = os.path.join(outdir, IMAGE.format(args.board)) + image_target = os.path.join(outdir, IMAGE.format(kernel_board)) uboot_target = os.path.join(outdir, UBOOT.format(args.board)) - uuu_target = os.path.join(outdir, UUU_SCRIPT.format(args.board)) + uuu_target = os.path.join(outdir, UUU_SCRIPT.format(kernel_board)) - download_image(urljoin(image_ref['url'], 'artifact/{}.xz').format(IMAGE.format(args.board)), + download_image(urljoin(image_ref['url'], 'artifact/{}.xz').format(IMAGE.format(kernel_board)), image_target, args.download_attempts) download_uboot(urljoin(uboot_ref['url'], 'artifact/output/uboot-{}/{}'.format(args.board, UBOOT.format(args.board))),