juno-uboot
U-Boot
Arm 64-bit (AArch64)
Arm Juno Development Platform
Inheritance
- juno-uboot
- base-uboot
- base
Key facts
- Vendor
- Arm
- Bootloader family
- U-Boot
- Architecture
- Arm 64-bit (AArch64) (from the template)
- Console device
ttyAMA0- Baud rate
115200- Connections
- adb, serial, ssh
- Kernel load addresses
- booti
Overridable variables (2)
Variables set with a default value in this template. They can be overridden from the device dictionary or, for some of them, from the job context.
| Variable | Default |
|---|---|
| console_device | 'ttyAMA0' |
| baud_rate | '115200' |
Fixed settings (5)
| Variable | Value |
|---|---|
| juno_kernel_args | 'ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9' |
| uboot_initrd_high | '0xffffffffffffffff' |
| uboot_fdt_high | '0xffffffffffffffff' |
| base_uboot_commands_juno_extras | [ "setenv bootdelay 1", "setenv ethact smc911x-0"] |
| base_load_commands | load_commands | default([ "setenv loadkernel 'afs load ${kernel_name} {KERNEL_ADDR}'", "setenv loadfdt 'afs load ${fdtfile} {DTB_ADDR} ; fdt addr {DTB_ADDR}; fdt resize'", "setenv loadinitrd 'afs load ${initrd_name} {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'"]) |
{# device_type: juno #}
{% extends 'base-uboot.jinja2' %}
{% set console_device = console_device | default('ttyAMA0') %}
{% set baud_rate = baud_rate | default('115200') %}
{% set juno_kernel_args = 'ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9' %}
{% set uboot_initrd_high = '0xffffffffffffffff' %}
{% set uboot_fdt_high = '0xffffffffffffffff' %}
{% set base_uboot_commands_juno_extras = [
"setenv bootdelay 1",
"setenv ethact smc911x-0"]
-%}
{% set base_load_commands = load_commands | default([
"setenv loadkernel 'afs load ${kernel_name} {KERNEL_ADDR}'",
"setenv loadfdt 'afs load ${fdtfile} {DTB_ADDR} ; fdt addr {DTB_ADDR}; fdt resize'",
"setenv loadinitrd 'afs load ${initrd_name} {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'"])
-%}
{% block body %}
board_id: '{{ board_id|default('0000000000') }}'
usb_vendor_id: '{{ usb_vendor_id|default('0000') }}'
usb_product_id: '{{ usb_product_id|default('0000') }}'
usb_filesystem_label: '{{ usb_filesystem_label|default('JUNO') }}'
{% block parameters -%}
parameters:
booti:
kernel: '{{ booti_kernel_addr|default('0x80080000') }}'
ramdisk: '{{ booti_ramdisk_addr|default('0x84000000') }}'
dtb: '{{ booti_dtb_addr|default('0x83000000') }}'
{% if device_ip or device_mac %}
interfaces:
target:
ip: {{ device_ip|default('') }}
mac: '{{ device_mac|default('') }}'
{% endif %} # device_ip or device_mac
media: # four USB slots.
usb:
UUID-required: True
{{ usb_label|default('SanDisk_Ultra') }}:
uuid: "{{ usb_uuid }}"
device_id: "{{ usb_device_id|default(0) }}" # the bootloader device id for this media on the 'usb' interface
{% endblock parameters -%}
actions:
deploy:
parameters:
mkimage_arch: arm64
add_header: u-boot
# list of deployment methods which this device supports
methods:
{% if usbg_ms_commands %}
usbg-ms:
enable: {{ usbg_ms_commands["enable"] }}
disable: {{ usbg_ms_commands["disable"] }}
{% endif %}
nfs:
tftp:
usb:
ssh:
options:
{{ ssh_options }}
host: '{{ ssh_host|default('') }}'
user: {{ ssh_user|default('root') }}
port: {{ ssh_port|default(22) }}
identity_file: {{ ssh_identity_file }}
vemsd:
parameters:
mcc_prompt: '{{ mcc_prompt|default('Cmd>') }}'
msd_mount_cmd: '{{ msd_mount_cmd|default('usb_on') }}'
flash_prompt: '{{ flash_prompt|default('Flash>') }}'
flash_enter_cmd: '{{ flash_enter_cmd|default('flash') }}'
flash_erase_cmd: '{{ flash_erase_cmd|default('eraseall') }}'
flash_erase_msg: '{{ flash_erase_msg|default('Erasing Flash') }}'
flash_exit_cmd: '{{ flash_exit_cmd|default('exit') }}'
autorun_prompt: '{{ autorun_prompt|default('Press Enter to stop auto boot...') }}'
connections:
adb:
serial:
boot:
# list of connection methods which this device supports
connections:
adb:
serial:
ssh:
# list of boot methods which this device supports.
methods:
ssh:
u-boot:
parameters:
bootloader_prompt: {{ bootloader_prompt | default('VExpress64') }}
boot_message: {{ boot_message|default('Linux version') }}
mkimage_arch: arm64
ramdisk-local:
commands:
- "{{ (base_uboot_commands + base_uboot_commands_juno_extras)|join('"\n - "') }}"
- setenv fdtfile board.dtb
- setenv initrd_name ramdisk.img
- setenv kernel_name norkern
- "{{ base_load_commands|join('"\n - "') }}"
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root=/dev/sda2 {{ juno_kernel_args }}'
- "{{ base_uboot_bootcmd }}"
nfs-local:
commands:
- "{{ (base_uboot_commands + base_uboot_commands_juno_extras)|join('"\n - "') }}"
- setenv fdtfile board.dtb
- setenv initrd_name ramdisk.img
- setenv kernel_name norkern
- "{{ base_load_commands|join('"\n - "') }}"
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root=/dev/nfs {{ base_nfsroot_args }} {{ juno_kernel_args }}'
{{ base_uboot_nfs_bootcmd }}
ramdisk-tftp:
commands:
- "{{ (base_uboot_commands + base_uboot_commands_juno_extras + base_uboot_tftp_commands)|join('"\n - "') }}"
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root=/dev/nfs {{ base_nfsroot_args}} {{ juno_kernel_args }}'
{{ base_uboot_tftp_bootcmd }}
ramdisk-tftp-usb:
commands:
- "{{ (base_uboot_commands + base_uboot_commands_juno_extras + base_uboot_tftp_commands)|join('"\n - "') }}"
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root=/dev/sda2 {{ juno_kernel_args }}'
{{ base_uboot_tftp_bootcmd }}
tftp-local-ramdisk-nfsroot:
commands:
- "{{ base_uboot_commands|join('"\n - "') }}"
- setenv initrd_name ramdisk.img
- setenv loadfdt 'tftp {DTB_ADDR} {DTB}'
- setenv loadkernel 'tftp {KERNEL_ADDR} {KERNEL}'
- setenv loadinitrd 'afs load ramdisk.img {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root=/dev/nfs {{ base_nfsroot_args }} {{ juno_kernel_args }}'
{{ base_tftp_uboot_bootcmd }}
usb:
commands:
- usb start
- usb info
- "{{ base_uboot_commands|join('"\n - "') }}"
- setenv kernel_addr_r '{KERNEL_ADDR}'
- setenv initrd_addr_r '{RAMDISK_ADDR}'
- setenv fdt_addr_r '{DTB_ADDR}'
- setenv loadkernel 'load usb 0:{ROOT_PART} ${kernel_addr_r} {KERNEL}'
- setenv loadinitrd 'load usb 0:{ROOT_PART} ${initrd_addr_r} {RAMDISK}; setenv initrd_size ${filesize}'
- setenv loadfdt 'load usb 0:{ROOT_PART} ${fdt_addr_r} {DTB}'
- setenv bootargs 'console={{ console_device }},{{ baud_rate }}n8 root={ROOT} {{ juno_kernel_args }}'
- "{{ base_uboot_bootcmd }}"
use-defaults:
commands:
- boot
{% endblock body -%}
{% block timeouts %}
timeouts:
actions:
apply-overlay-image:
minutes: {{ action_timeout_apply_overlay_image | default(2) }}
dd-image:
minutes: {{ action_timeout_dd_image | default(20) }}
download-retry:
minutes: {{ action_timeout_download_retry | default(5) }}
http-download:
minutes: {{ action_timeout_http_download | default(10) }} # large due to android images etc
lava-test-shell:
minutes: {{ action_timeout_lava_test_shell | default(3) }}
nfs-deploy:
minutes: {{ action_timeout_nfs_deploy | default(10) }}
power-off:
seconds: {{ action_timeout_power_off | default(5) }}
bootloader-commands:
minutes: {{ action_timeout_bootloader_commands | default(3) }}
bootloader-interrupt:
seconds: {{ action_timeout_bootloader_interrupt | default(30) }}
u-boot-interrupt:
minutes: {{ action_timeout_u_boot_interrupt | default(2) }}
u-boot-commands:
minutes: {{ action_timeout_u_boot_commands | default(2) }}
umount-retry:
seconds: {{ action_timeout_umount_retry | default(45) }}
auto-login-action:
minutes: {{ action_timeout_auto_login | default(5) }}
bootloader-action:
minutes: {{ action_timeout_bootloader_action | default(3)}}
uboot-action:
minutes: {{ action_timeout_uboot_action | default(3)}}
uboot-commands:
minutes: {{ action_timeout_uboot_commands | default(3)}}
bootloader-retry:
minutes: {{ action_timeout_bootloader_retry | default(3)}}
boot-qemu-image:
minutes: {{ action_timeout_boot_qemu_image | default(2) }}
boot-image-retry:
minutes: {{ action_timeout_boot_image_retry | default(2) }}
connections:
dd-image:
minutes: {{ connection_timeout_dd_image | default(20) }}
u-boot-interrupt:
minutes: {{ action_timeout_u_boot_interrupt | default(2) }}
uboot-commands:
minutes: {{ action_timeout_uboot_commands | default(3) }}
u-boot-commands:
minutes: {{ action_timeout_u_boot_commands | default(2) }}
bootloader-commands:
seconds: {{ connection_timeout_bootloader_commands | default(30) }}
auto-login-action:
minutes: {{ connection_timeout_auto_login | default(5) }}
bootloader-interrupt:
seconds: {{ connection_timeout_bootloader_interrupt | default(30) }}
http-download:
minutes: {{ action_timeout_http_download | default(10) }} # large due to android images etc
u-boot-interrupt:
minutes: {{ connection_timeout_u_boot_interrupt | default(2) }}
{% endblock timeouts -%}
hostname: 'juno-uboot-01'
devicetype: 'juno-uboot'
constants:
# POSIX os (not AOSP)
posix:
lava_test_sh_cmd: /bin/sh
lava_test_results_dir: /lava-%s
lava_test_shell_file: ~/.bashrc
# bootloader specific
barebox:
interrupt-prompt: 'Hit m for menu or any other key to stop autoboot'
interrupt-character: '
'
final-message: 'Starting kernel'
error-messages:
- '### ERROR ### Please RESET the board ###'
- 'ERROR: .*'
- '.*: Out of memory'
u-boot:
interrupt-prompt: 'Hit any key to stop autoboot'
interrupt-character: ' '
interrupt_ctrl_list: []
interrupt-newline: True
final-message: 'Starting kernel'
error-messages:
- 'Resetting CPU'
- 'Must RESET board to recover'
- 'TIMEOUT'
- 'Retry count exceeded'
- 'Retry time exceeded; starting again'
- 'The remote end did not respond in time.'
- 'File not found'
- 'Bad Linux ARM64 Image magic!'
- 'Wrong Ramdisk Image Format'
- 'Ramdisk image is corrupt or invalid'
- 'ERROR: Failed to allocate'
- 'TFTP error: trying to overwrite reserved memory'
- 'Bad Linux RISCV Image magic!'
- 'Wrong Image Format for boot'
- 'ERROR: Did not find a cmdline Flattened Device Tree'
- 'ERROR: RD image overlaps OS image'
- 'kernel_comp_addr_r or kernel_comp_size is not provided'
- 'zimage: Bad magic'
dfu-download: 'DOWNLOAD \.\.\. OK\r\nCtrl\+C to exit \.\.\.'
grub:
interrupt-prompt: 'for a command-line'
interrupt-character: 'c'
interrupt-newline: False
error-messages:
- "error: missing (.*) symbol."
- "error: couldn't send network packet"
- "error: destination unreachable"
- "error: couldn't autoconfigure"
- "error: timeout reading"
- "error: you need to load the kernel first."
- "error: file '(.*)' not found"
- "error: no such device"
- "error: disk '(.*)' not found"
- "error: unknown filesystem"
grub-efi:
interrupt-prompt: 'for a command-line'
interrupt-character: 'c'
error-messages:
- 'Undefined OpCode Exception PC at'
- 'Synchronous Exception at'
- "error: missing (.*) symbol."
- "error: couldn't send network packet"
- "error: destination unreachable"
- "error: couldn't autoconfigure"
- "error: timeout reading"
- "error: you need to load the kernel first."
- "error: file '(.*)' not found"
- "error: no such device"
- "error: disk '(.*)' not found"
- "error: unknown filesystem"
ipxe:
interrupt-prompt: 'Press Ctrl-B for the iPXE command line'
interrupt_ctrl_list: ['b']
error-messages:
- 'No configuration methods succeeded'
- 'Connection timed out'
depthcharge:
final-message: 'Starting kernel'
error-messages:
- 'Tftp failed.'
- 'Dhcp release failed.'
- 'No space left for ramdisk'
- 'TFTP failed for ramdisk.'
- 'Dhcp release failed.'
- 'Out of space adding TFTP server IP to the command line.'
- 'No network device.'
- 'Error code \d+( \([\w\s]+\))?\r\n'
# OS shutdown message
# Override: set as the shutdown-message parameter of an Action.
# SHUTDOWN_MESSAGE
shutdown-message: 'The system is going down for reboot NOW'
# Kernel starting message
kernel-start-message: 'Linux version [0-9]'
# Default shell prompt for AutoLogin
# DEFAULT_SHELL_PROMPT
default-shell-prompt: 'lava-test: # '
# pexpect.spawn maxread
# SPAWN_MAXREAD - in bytes, quoted as a string
# 1 to turn off buffering, pexpect default is 2000
# maximum may be limited by platform issues to 4092
# avoid setting searchwindowsize:
# Data before searchwindowsize point is preserved, but not searched.
spawn_maxread: '4092'
# Set the failure retry to default or override it
failure_retry: 1
# Override boot_retry
boot_retry:
parameters:
booti:
kernel: '0x80080000'
ramdisk: '0x84000000'
dtb: '0x83000000'
# device_ip or device_mac
media: # four USB slots.
usb:
UUID-required: True
SanDisk_Ultra:
uuid: ""
device_id: "0" # the bootloader device id for this media on the 'usb' interface
board_id: '0000000000'
usb_vendor_id: '0000'
usb_product_id: '0000'
usb_filesystem_label: 'JUNO'
parameters:
booti:
kernel: '0x80080000'
ramdisk: '0x84000000'
dtb: '0x83000000'
# device_ip or device_mac
media: # four USB slots.
usb:
UUID-required: True
SanDisk_Ultra:
uuid: ""
device_id: "0" # the bootloader device id for this media on the 'usb' interface
actions:
deploy:
parameters:
mkimage_arch: arm64
add_header: u-boot
# list of deployment methods which this device supports
methods:
nfs:
tftp:
usb:
ssh:
options:
- '-o'
- 'Compression=yes'
- '-o'
- 'PasswordAuthentication=no'
- '-o'
- 'LogLevel=FATAL'
host: ''
user: root
port: 22
identity_file: dynamic_vm_keys/lava
vemsd:
parameters:
mcc_prompt: 'Cmd>'
msd_mount_cmd: 'usb_on'
flash_prompt: 'Flash>'
flash_enter_cmd: 'flash'
flash_erase_cmd: 'eraseall'
flash_erase_msg: 'Erasing Flash'
flash_exit_cmd: 'exit'
autorun_prompt: 'Press Enter to stop auto boot...'
connections:
adb:
serial:
boot:
# list of connection methods which this device supports
connections:
adb:
serial:
ssh:
# list of boot methods which this device supports.
methods:
ssh:
u-boot:
parameters:
bootloader_prompt: VExpress64
boot_message: Linux version
mkimage_arch: arm64
ramdisk-local:
commands:
- "setenv autoload no"
- "setenv bootdelay 1"
- "setenv ethact smc911x-0"
- setenv fdtfile board.dtb
- setenv initrd_name ramdisk.img
- setenv kernel_name norkern
- "setenv loadkernel 'afs load ${kernel_name} {KERNEL_ADDR}'"
- "setenv loadfdt 'afs load ${fdtfile} {DTB_ADDR} ; fdt addr {DTB_ADDR}; fdt resize'"
- "setenv loadinitrd 'afs load ${initrd_name} {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'"
- setenv bootargs 'console=ttyAMA0,115200n8 root=/dev/sda2 ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
- "{BOOTX}"
nfs-local:
commands:
- "setenv autoload no"
- "setenv bootdelay 1"
- "setenv ethact smc911x-0"
- setenv fdtfile board.dtb
- setenv initrd_name ramdisk.img
- setenv kernel_name norkern
- "setenv loadkernel 'afs load ${kernel_name} {KERNEL_ADDR}'"
- "setenv loadfdt 'afs load ${fdtfile} {DTB_ADDR} ; fdt addr {DTB_ADDR}; fdt resize'"
- "setenv loadinitrd 'afs load ${initrd_name} {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'"
- setenv bootargs 'console=ttyAMA0,115200n8 root=/dev/nfs nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
ramdisk-tftp:
commands:
- "setenv autoload no"
- "setenv bootdelay 1"
- "setenv ethact smc911x-0"
- "tftp {KERNEL_ADDR} {KERNEL}"
- "tftp {RAMDISK_ADDR} {RAMDISK}"
- "tftp {TEE_ADDR} {TEE}"
- "setenv initrd_size ${filesize}"
- "tftp {DTB_ADDR} {DTB}"
- setenv bootargs 'console=ttyAMA0,115200n8 root=/dev/nfs nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
ramdisk-tftp-usb:
commands:
- "setenv autoload no"
- "setenv bootdelay 1"
- "setenv ethact smc911x-0"
- "tftp {KERNEL_ADDR} {KERNEL}"
- "tftp {RAMDISK_ADDR} {RAMDISK}"
- "tftp {TEE_ADDR} {TEE}"
- "setenv initrd_size ${filesize}"
- "tftp {DTB_ADDR} {DTB}"
- setenv bootargs 'console=ttyAMA0,115200n8 root=/dev/sda2 ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
tftp-local-ramdisk-nfsroot:
commands:
- "setenv autoload no"
- setenv initrd_name ramdisk.img
- setenv loadfdt 'tftp {DTB_ADDR} {DTB}'
- setenv loadkernel 'tftp {KERNEL_ADDR} {KERNEL}'
- setenv loadinitrd 'afs load ramdisk.img {RAMDISK_ADDR}; setenv initrd_param {RAMDISK_ADDR}'
- setenv bootargs 'console=ttyAMA0,115200n8 root=/dev/nfs nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
usb:
commands:
- usb start
- usb info
- "setenv autoload no"
- setenv kernel_addr_r '{KERNEL_ADDR}'
- setenv initrd_addr_r '{RAMDISK_ADDR}'
- setenv fdt_addr_r '{DTB_ADDR}'
- setenv loadkernel 'load usb 0:{ROOT_PART} ${kernel_addr_r} {KERNEL}'
- setenv loadinitrd 'load usb 0:{ROOT_PART} ${initrd_addr_r} {RAMDISK}; setenv initrd_size ${filesize}'
- setenv loadfdt 'load usb 0:{ROOT_PART} ${fdt_addr_r} {DTB}'
- setenv bootargs 'console=ttyAMA0,115200n8 root={ROOT} ip=dhcp rw rootwait earlycon=pl011,0x7ff80000 debug systemd.log_target=null user_debug=31 androidboot.hardware=juno loglevel=9'
- "{BOOTX}"
use-defaults:
commands:
- boot
timeouts:
actions:
apply-overlay-image:
minutes: 2
dd-image:
minutes: 20
download-retry:
minutes: 5
http-download:
minutes: 10 # large due to android images etc
lava-test-shell:
minutes: 3
nfs-deploy:
minutes: 10
power-off:
seconds: 5
bootloader-commands:
minutes: 3
bootloader-interrupt:
seconds: 30
u-boot-interrupt:
minutes: 2
u-boot-commands:
minutes: 2
umount-retry:
seconds: 45
auto-login-action:
minutes: 5
bootloader-action:
minutes: 3
uboot-action:
minutes: 3
uboot-commands:
minutes: 3
bootloader-retry:
minutes: 3
boot-qemu-image:
minutes: 2
boot-image-retry:
minutes: 2
connections:
dd-image:
minutes: 20
u-boot-interrupt:
minutes: 2
uboot-commands:
minutes: 3
u-boot-commands:
minutes: 2
bootloader-commands:
seconds: 30
auto-login-action:
minutes: 5
bootloader-interrupt:
seconds: 30
http-download:
minutes: 10 # large due to android images etc
u-boot-interrupt:
minutes: 2
Rendered with the default values (no device dictionary), using LAVA's own template environment.