Skip to content

Commit 6240367

Browse files
authored
Merge pull request #1 from sgaud-quic/flasher
flasher: Update flasher.jinja2 to handle qcom-next jobs
2 parents 3f690b1 + 2bc1dfb commit 6240367

2 files changed

Lines changed: 25 additions & 24 deletions

File tree

‎data_validation/validate_data.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55

66
# Allowed boot methods
7-
allowed_boot_methods = ['fastboot', 'u-boot', 'efi']
7+
allowed_boot_methods = ['fastboot', 'u-boot', 'efi', 'flasher']
88

99

1010
class Validator:
@@ -26,7 +26,7 @@ def validate_platform_config(self):
2626

2727
if self.platform_config['boot_method'] == 'efi' and not self.platform_config.get('flash_image'):
2828
return False, "BOOT_METHOD 'efi' requires FLASH_IMAGE to be set"
29-
29+
3030
return True, "Valid platform_config"
3131

3232

‎templates/boot/flasher.jinja2‎

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,37 @@
1-
{%- set flash_image_url = flash_image_url | default(platform_config.flash_image, true) -%}
2-
{%- set flash_image_auth = flash_image_auth | default('LAVA_BASIC_AUTH', true) -%}
3-
{%- if flash_image_name is not defined and flash_image_url -%}
4-
{%- set flash_image_path = flash_image_url.split('?')[0] -%}
5-
{%- set flash_image_name = flash_image_path.split('/')[-1] -%}
6-
{%- endif -%}
7-
81
- deploy:
92
images:
103
image:
11-
headers:
12-
Authorization: '{{ flash_image_auth }}'
13-
url: '{{ flash_image_url }}'
4+
url: '{{ node.artifacts.flash_image }}'
145
postprocess:
156
docker:
16-
image: ghcr.io/foundriesio/lava-lmp-sign:main
7+
image: ghcr.io/mwasilew/docker-mkbootimage:master
178
steps:
189
- export IMAGE_PATH=$PWD
10+
- cp overlay*.tar.gz overlay.tar.gz
11+
- echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings
12+
- echo "OVERLAY_PATH=/" >> $IMAGE_PATH/flash.settings
13+
- echo "ROOTFS_IMAGE=rootfs.img" >> $IMAGE_PATH/flash.settings
1914
- echo "DEVICE_TYPE={{ platform_config.name }}" >> $IMAGE_PATH/flash.settings
20-
- echo "PORT={{ flash_port | default('0', true) }}" >> $IMAGE_PATH/flash.settings
15+
- echo "PORT=0" >> $IMAGE_PATH/flash.settings
2116
- cat $IMAGE_PATH/flash.settings
2217
timeout:
23-
minutes: 20
18+
minutes: 30
2419
to: downloads
25-
namespace: kernelciflasher
26-
20+
{% set flash_image_url = node.artifacts.flash_image %}
21+
{% set flash_image_path = flash_image_url.split('?')[0] %}
22+
{% set flash_image_name = flash_image_path.split('/')[-1] %}
2723
- deploy:
2824
images:
2925
image:
3026
url: 'downloads://{{ flash_image_name }}'
3127
settings:
32-
url: 'downloads://flash.settings'
28+
url: downloads://flash.settings
29+
overlay:
30+
url: downloads://overlay.tar.gz
3331
timeout:
34-
minutes: 30
32+
minutes: 10
3533
to: flasher
36-
namespace: kernelciflasher
37-
3834
- boot:
39-
namespace: target
4035
{% if meta_qcom | default(false, true) %}
4136
auto_login:
4237
login_prompt: 'login:'
@@ -45,8 +40,14 @@
4540
password: oelinux123
4641
{% endif %}
4742
prompts:
48-
- root@rb3gen2-core-kit
43+
- root@{{ platform_config.name }}
4944
- root@(.*):[/~]#
45+
failure_retry: 3
5046
timeout:
51-
minutes: 20
47+
minutes: 10
48+
timeouts:
49+
bootloader-commands:
50+
minutes: 3
51+
auto-login-action:
52+
minutes: 10
5253
method: minimal

0 commit comments

Comments
 (0)