From afa442a9ae9af8f8341a3654599c00c7addce0eb Mon Sep 17 00:00:00 2001 From: "Angus Ainslie (Purism)" Date: Tue, 4 Aug 2020 09:07:59 -0700 Subject: [PATCH 1/3] librem5-devkit-flash-image : add the plain image to the help text Signed-off-by: Angus Ainslie (Purism) --- scripts/librem5-devkit-flash-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/librem5-devkit-flash-image b/scripts/librem5-devkit-flash-image index 635133e..161d3c0 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'], -- GitLab From 18ad831f2d01ff37bccb0dbf465908e2fa3a8b83 Mon Sep 17 00:00:00 2001 From: "Angus Ainslie (Purism)" Date: Tue, 4 Aug 2020 09:43:03 -0700 Subject: [PATCH 2/3] librem5-devkit-flash-image : add dogwood variant There is a new image to support dogwood so add that to the download name Signed-off-by: Angus Ainslie (Purism) --- scripts/librem5-devkit-flash-image | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/librem5-devkit-flash-image b/scripts/librem5-devkit-flash-image index 161d3c0..8614d5f 100755 --- a/scripts/librem5-devkit-flash-image +++ b/scripts/librem5-devkit-flash-image @@ -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))), -- GitLab From 749a0d7e682d55a4ee7f0939933a8b5e96aec034 Mon Sep 17 00:00:00 2001 From: "Angus Ainslie (Purism)" Date: Tue, 4 Aug 2020 10:01:39 -0700 Subject: [PATCH 3/3] gitlab-ci.yml : update the download image names Signed-off-by: Angus Ainslie (Purism) --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fec7d9..8324719 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: -- GitLab