base-uboot
base template
This template is not a device-type: it holds the settings shared by the 284 device-types that extend it, directly or not.
Inheritance
- base-uboot
- base
Extended by templates
- exynos4-5-common
- fsl-ls-common
- imx6qdl-common
- imx6us7d-common
- imx7u-common
- imx8m-common
- imx8q-common
- imx8u-common
- imx9-common
- k3-common
- kontron-kswitch-d10-mmt-common
- kontron-sl28-common
- meson-g12-common
- meson-gx-common
- mt8xxx-genio-common
- rcar-gen3-common
- rk3576-common
- rpi-common
- rzg1-common
- rzg2-common
- sunxi-common
- tegra124-common
Inheritance tree
base-uboot 284 device-types
exynos4-5-common 5 device-types
exynos5420-common 1 device-type
- odroid-n2
- odroid-x2
- odroid-xu3
- snow
imx7u-common 1 device-type
imx8u-common 2 device-types
imx9-common 33 device-types
- imx91-11x11-evk
- imx91-11x11-frdm
- imx91-11x11-frdm-s
- imx91-9x9-qsb
- imx91p-11x11-evk
- imx91p-9x9-qsb
- imx93-11x11-evk
- imx93-11x11-evk-pmic-pf0900
- imx93-11x11-frdm
- imx93-14x14-evk
- imx93-9x9-qsb
- imx937-frdm
- imx93w-evk
- imx93w-frdm
- imx941-15x15-lpddr4-evk
- imx941-19x19-lpddr4-evk
- imx942-15x15-lpddr4-evk
- imx942-19x19-lpddr4-evk
- imx943-15x15-lpddr4-evk
- imx943-19x19-lpddr4-evk
- imx943-19x19-lpddr5-evk
- imx943-orangebox
- imx95-15x15-ab2
- imx95-15x15-evk
- imx95-15x15-frdm
- imx95-15x15-lpddr5-frdm
- imx95-19x19-evk
- imx95-19x19-frdm-pro
- imx95-19x19-verdin
- imx952-15x15-evk
- imx952-19x19-evk
- imx952-frdm
- osm-imx93
k3-common 2 device-types
kontron-sl28-common 2 device-types
meson-gx-common 13 device-types
rk3576-common 1 device-type
rpi-common 1 device-type
sunxi-common 30 device-types
- sun4i-a10-olinuxino-lime
- sun50i-a64-bananapi-m64
- sun50i-a64-pine64-plus
- sun50i-h5-libretech-all-h3-cc
- sun50i-h5-nanopi-neo-plus2
- sun50i-h6-orangepi-3
- sun50i-h6-orangepi-one-plus
- sun50i-h6-pine-h64
- sun50i-h6-pine-h64-model-b
- sun55i-a527-cubie-a5e
- sun5i-a13-olinuxino-micro
- sun5i-gr8-chip-pro
- sun5i-r8-chip
- sun6i-a31-app4-evb1
- sun7i-a20-cubieboard2
- sun7i-a20-olinuxino-lime2
- sun7i-a20-olinuxino-micro
- sun8i-a23-evb
- sun8i-a33-olinuxino
- sun8i-a33-sinlinx-sina33
- sun8i-a83t-allwinner-h8homlet-v2
- sun8i-a83t-bananapi-m3
- sun8i-h2-plus-libretech-all-h3-cc
- sun8i-h2-plus-orangepi-r1
- sun8i-h2-plus-orangepi-zero
- sun8i-h3-bananapi-m2-plus
- sun8i-h3-libretech-all-h3-cc
- sun8i-h3-orangepi-pc
- sun8i-r40-bananapi-m2-ultra
- sun9i-a80-cubieboard4
tegra124-common 1 device-type
- alpine-db
- am437x-idk-evm
- am57xx-beagle-x15
- am6
- apq8016-sbc-uboot
- armada-370-db
- armada-370-rd
- armada-3720-db
- armada-3720-espressobin
- armada-375-db
- armada-385-db-ap
armada-388-clearfog 1 device-type
- armada-388-gp
- armada-398-db
- armada-7040-db
- armada-8040-db
- armada-xp-db
- armada-xp-gp
- armada-xp-linksys-mamba
- armada-xp-openblocks-ax3-4
- arndale
- at91-sama5d2_xplained
- at91-sama5d4_xplained
- at91rm9200ek
- at91sam9261ek
- at91sam9g20ek
- at91sam9m10g45ek
- at91sam9x25ek
- at91sam9x35ek
- avenger96
- b2120h410
- b2260
- bcm2711-rpi-4-b
- bcm2712-rpi-5-b
- bcm2835-rpi-b-rev2
- bcm2837-rpi-3-b
- bcm2837-rpi-3-b-32
- bcm2837-rpi-3-b-plus
- beagle-xm
beaglebone-black 1 device-type
- cubietruck
- da850-lcdk
- de0-nano-soc
- dra7-evm
- eic7700-hifive-premier-p550
- fsl-lx2160a-rdb
- fsl-lx2162a-qds
- gemini-ssi1328
- hifive-unleashed-a00
- hifive-unmatched-a00
- highbank
- hsdk
- imx6dl-udoo
- imx6q-nitrogen6x
- imx6q-sabrelite
- imx6q-udoo
- imx6q-var-dt6customboard
- imx7s-warp
- imx8mp-verdin-laa
- intel-ixp42x-welltech-epbx100
- jh7100-starfive-visionfive-v1
- jh7100-visionfive
- juno-uboot
- k3-am625-sk
- k3-am625-verdin-wifi-mallow
- kirkwood-db-88f6282
- kirkwood-openblocks_a7
- kontron-bl-imx8mm
- kontron-pitx-imx8m
- kv260
- ls1021a-twr
- meson8b-ec100
- meson8b-odroidc1
- mustang
- nxp-ls2088
- orion5x-rd88f5182-nas
- ox820-cloudengines-pogoplug-series-3
- panda
- poplar
- qrb4210-rb2-uboot
- r8a7791-porter
- r9a07g043u11-smarc
- r9a07g044c2-smarc
- r9a07g044l2-smarc
- r9a07g054l2-smarc
- r9a09g057-rzv2h-evk
- rk3288-miqi
- rk3288-rock2-square
- rk3328-rock64
- rk3399-khadas-edge-v
- rk3399-puma-haikou
- rk3399-roc-pc
- rk3399-rock-pi-4b
- rk3588-rock-5-itx
- rk3588-rock-5b
- rzn1d
- s32g399a-rdb3
s32v234-evb 1 device-type
- sama53d
- sama5d34ek
- sama5d36ek
- sharkl2
- soca9
- spacemit-k1-bananapi-f3
- stm32mp157a-dhcor-avenger96
- stm32mp157c-dk2
- stm32mp15x-eval
- sun8i-h2-plus-bananapi-m2-zero
- synquacer-uboot
- xilinx-zcu102
Device-types extending base-uboot (284)
{% extends 'base.jinja2' %}
{% set base_high_limits = base_high_limits|default(true) %}
{% set base_uboot_commands = base_uboot_commands|default([]) + ["setenv autoload no"] -%}
{% set base_uboot_high_limits = [
"setenv initrd_high " + uboot_initrd_high|default('0xffffffff'),
"setenv fdt_high " + uboot_fdt_high|default('0xffffffff')]
-%}
{% set base_uboot_dhcp_command = [
uboot_ipaddr_cmd|default('dhcp'),
"setenv serverip {SERVER_IP}" ]
-%}
{% if append_dtb %}
{% set uboot_load_fdt = [] %}
{% else %}
{% set uboot_load_fdt = [uboot_load_fdt|default("tftp {DTB_ADDR} {DTB}")] %}
{% endif %}
{% set base_uboot_tftp_commands = uboot_tftp_commands|default([
"tftp {KERNEL_ADDR} {KERNEL}",
"tftp {RAMDISK_ADDR} {RAMDISK}",
"tftp {TEE_ADDR} {TEE}",
"setenv initrd_size ${filesize}"] + uboot_load_fdt)
-%}
{% set apply_dtbo_commands = apply_dtbo_commands|default([
"tftp {DTBO_ADDR} {DTBO}",
"fdt apply {DTBO_ADDR}"])
-%}
{% set uboot_load_dtbo = [
"fdt addr {DTB_BASE_ADDR}",
"fdt resize {DTB_BASE_RESIZE}",
"{APPLY_DTBO_COMMANDS}"]
-%}
{% if enable_dtbo_support %}
{% set base_uboot_tftp_commands = base_uboot_tftp_commands + uboot_load_dtbo %}
{% endif %}
{% set uboot_fdt_extra_commands = uboot_fdt_extra_commands|default([]) %}
{% if uboot_fdt_extra_commands %}
{% set base_uboot_tftp_commands = base_uboot_tftp_commands +
["fdt addr {DTB_ADDR}"] + uboot_fdt_extra_commands
%}
{% endif %}
{% set base_uboot_bootcmd = uboot_bootcmd|default(uboot_bootx_cmd|default('{BOOTX}')) -%}
{% set base_uboot_pci_commands = uboot_pci_commands|default(["pci enum"]) -%}
{% set base_uboot_usb_commands = uboot_usb_commands|default(["usb start"]) -%}
{% set uboot_needs_pci = uboot_needs_pci|default(false) %}
{% set uboot_needs_usb = uboot_needs_usb|default(false) %}
{% set usb_uuid = usb_uuid|default('') %}
{% set usb_device_id = usb_device_id|default(0) %}
{% set uboot_mac_addr = uboot_mac_addr|default('') %}
{% set base_uboot_set_mac = ["setenv ethaddr"] -%}
{% if uboot_mac_addr %}
{% set base_uboot_set_mac = ["setenv ethaddr " + uboot_mac_addr] -%}
{% endif %}
{% set uboot_set_mac = uboot_set_mac|default(false) %}
{% set uboot_common_cmds = [] %}
{% if uboot_needs_pci %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_pci_commands %}
{% endif %}
{% if uboot_needs_usb %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_usb_commands %}
{% endif %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_commands %}
{% if base_high_limits %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_high_limits %}
{% endif %}
{% if uboot_set_mac %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_set_mac %}
{% endif %}
{% set uboot_common_cmds = uboot_common_cmds + base_uboot_dhcp_command + base_uboot_tftp_commands %}
{% set uboot_allow_chain_load_grub = uboot_allow_chain_load_grub|default(true) %}
{% set additional_bcu_cleanup_commands = additional_bcu_cleanup_commands|default([]) -%}
{# adds the parameters: top level block #}
{% block parameters %}
{{ super() }}
{% if text_offset %}
text_offset: '{{text_offset}}'
{% endif %}
{% if booti_kernel_addr %}
image:
kernel: '{{ booti_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ booti_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ booti_dtb_addr|default('0x81000000') }}'
tee: '{{ booti_tee_addr|default('0x83000000') }}'
dtbo: '{{ booti_dtbo_addr|default('0x93c00000') }}'
booti:
kernel: '{{ booti_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ booti_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ booti_dtb_addr|default('0x81000000') }}'
tee: '{{ booti_tee_addr|default('0x83000000') }}'
dtbo: '{{ booti_dtbo_addr|default('0x93c00000') }}'
{% endif %}
{% if bootm_kernel_addr %}
uimage:
kernel: '{{ bootm_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ bootm_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ bootm_dtb_addr|default('0x81000000') }}'
tee: '{{ bootm_tee_addr|default('0x83000000') }}'
dtbo: '{{ bootm_dtbo_addr|default('0x93c00000') }}'
bootm:
kernel: '{{ bootm_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ bootm_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ bootm_dtb_addr|default('0x81000000') }}'
tee: '{{ bootm_tee_addr|default('0x83000000') }}'
dtbo: '{{ bootm_dtbo_addr|default('0x93c00000') }}'
{% endif %}
{% if bootz_kernel_addr %}
zimage:
kernel: '{{ bootz_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ bootz_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ bootz_dtb_addr|default('0x81000000') }}'
tee: '{{ bootz_tee_addr|default('0x83000000') }}'
dtbo: '{{ bootz_dtbo_addr|default('0x93c00000') }}'
bootz:
kernel: '{{ bootz_kernel_addr|default('0x80000000') }}'
ramdisk: '{{ bootz_ramdisk_addr|default('0x82000000') }}'
dtb: '{{ bootz_dtb_addr|default('0x81000000') }}'
tee: '{{ bootz_tee_addr|default('0x83000000') }}'
dtbo: '{{ bootz_dtbo_addr|default('0x93c00000') }}'
{% endif %}
dtb_base_resize: {{ dtb_base_resize|default(1048576) }}
{% endblock parameters %}
{% block body %}
{% if console_device %}
{% set console_device = "console=" + console_device + "," %}
{% set parity = console_parity|default('n') %}
{% set databits = console_databits|default('8') %}
{% set baud_rate = baud_rate | default(115200)|string + parity + databits %}
{% endif %}
{% set base_kernel_args = extra_kernel_args | default(base_kernel_args) %}
{% set action_timeout_bootloader_commands = action_timeout_bootloader_commands | default(3) %}
{% set connection_timeout_bootloader_commands = connection_timeout_bootloader_commands | default(30) %}
{% if fastboot_deploy_uboot_commands %}
adb_serial_number: "{{ adb_serial_number|default('0000000000') }}"
fastboot_serial_number: "{{ fastboot_serial_number|default('0000000000') }}"
fastboot_options: {{ fastboot_options|default([]) }}
# This attribute identifies whether a device should get into fastboot mode by
# interrupting uboot and issuing commands at the bootloader prompt.
fastboot_via_uboot: True
{% endif %}
actions:
deploy:
parameters:
{#
# uboot_ramdisk_format defaults to the u-boot legacy image format. This is not
# a good default but it keeps us backwards compatible with old device-type
# templates that predate its introduction. It should almost always be set to
# "raw" for new device-type templates.
#
# Note that the u-boot legacy format requires CONFIG_LEGACY_IMAGE_FORMAT be
# set and support for raw images is controlled by CONFIG_SUPPORT_RAW_INITRD.
#}
add_header: {{ uboot_ramdisk_format|default("u-boot") }}
mkimage_arch: {{ uboot_mkimage_arch|default('arm64') }} # string to pass to mkimage -A when adding UBoot headers
append_dtb: {{ append_dtb|default(false) }}
use_xip: {{ use_xip|default(false) }}
connections:
fastboot:
serial:
methods:
{% if uboot_ums_flash %}
u-boot-ums:
{% endif %}
{% if usbg_ms_commands %}
usbg-ms:
enable: {{ usbg_ms_commands["enable"] }}
disable: {{ usbg_ms_commands["disable"] }}
{% endif %}
{% if flasher_deploy_commands %}
flasher:
commands: {{ flasher_deploy_commands|yaml_quote }}
{% endif %}
image:
overlay:
usb:
tftp:
nbd:
ssh:
options:
{{ ssh_options }}
host: "{{ ssh_host|default('') }}"
port: {{ ssh_port|default(22) }}
user: "{{ ssh_user|default('root') }}"
identity_file: "{{ ssh_identity_file }}"
{% if recovery_mode %}
{{ recovery_mode }}
recovery_mode:
{% for url in recovery_mode_command %}
- {{ url }}
{% endfor %}
recovery_exit:
{% for url in recovery_exit_command %}
- {{ url }}
{% endfor %}
{% endif %}
{% if fastboot_deploy_uboot_commands %}
fastboot:
u-boot:
parameters:
bootloader_prompt: "{{ bootloader_prompt }}"
interrupt_prompt: "{{ interrupt_prompt }}"
interrupt_char: "{{ interrupt_char }}"
fastboot:
commands:
{% for command in fastboot_deploy_uboot_commands %}
- {{ command }}
{% endfor %}
{{- fastboot_interrupt_params }}
{% endif %}
boot:
connections:
fastboot:
serial:
methods:
minimal:
ssh:
dfu:
implementation: u-boot
reset_works: False
parameters:
enter-commands:
{% for command in deploy_dfu_commands %}
- {{ command }}
{% endfor %}
command: dfu-util
{% if fastboot_boot_uboot %}
fastboot: {{ fastboot_sequence }}
{% endif %}
u-boot:
parameters:
bootloader_prompt: {{ bootloader_prompt|default('=>') }}
interrupt_prompt: {{ interrupt_prompt|default('Hit any key to stop autoboot') }}
interrupt_char: "{{ interrupt_char|default('') }}"
needs_interrupt: {{ uboot_needs_interrupt|default(True) }}
{% if enable_dtbo_support %}
apply_dtbo_commands: {{ apply_dtbo_commands }}
{% endif %}
{% if uboot_altbank %}
uboot_altbank: {{ uboot_altbank }}
uboot_altbank_cmd: "{{ uboot_altbank_cmd|default('reset')}}"
{% endif %}
{% if uboot_ums_flash %}
uboot_ums_flash: {{ uboot_ums_flash }}
uboot_mass_storage_device: {{ uboot_mass_storage_device|default(None) }}
{% endif %}
{% if uboot_set_mac %}
lava_mac: {{ uboot_mac_addr }}
{% endif %}
{% if fastboot_boot_uboot %}
{{- fastboot_boot_uboot }}
{{- fastboot_boot_grub }}
{% endif %}
# method specific stanza
ums:
commands:
- "{{ ums_command|default('ums 0 mmc 0')}}"
{% if uboot_method_fit %}
fit:
commands:
- "{{ (base_uboot_commands + base_uboot_dhcp_command)|join('"\n - "') }}"
- "tftp {KERNEL_ADDR} {KERNEL}"
- "setenv bootargs '{{ console_device }}{{ baud_rate }} rootfstype=ramfs {{ base_kernel_args }}'"
- "bootm {KERNEL_ADDR}{% if bootm_device_tree_config %}#conf@{{ bootm_device_tree_config }}{% endif %}"
{% endif %}
nfs:
commands:
- "{{ uboot_common_cmds|join('"\n - "') }}"
# Always quote the entire string if the command includes a colon to support correct YAML.
- "setenv bootargs '{{ console_device }}{{ baud_rate }} root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_kernel_args }} {{ base_ip_args }}'"
- "{{ base_uboot_bootcmd }}"
nbd:
commands:
- "{{ uboot_common_cmds|join('"\n - "') }}"
# Always quote the entire string if the command includes a colon to support correct YAML.
- "setenv bootargs '{{ console_device }}{{ baud_rate }} rw {{ base_nbdroot_args }} {{ base_kernel_args }} {{ base_ip_args }} verbose earlyprintk systemd.log_color=false ${extraargs} rw'"
- "{{ base_uboot_bootcmd }}"
ramdisk:
commands:
- "{{ uboot_common_cmds|join('"\n - "') }}"
- "setenv bootargs '{{ console_device }}{{ baud_rate }} root=/dev/ram0 {{ base_kernel_args }} {{ base_ip_args }}'"
- "{{ base_uboot_bootcmd }}"
usb:
commands:
- "{{ (base_uboot_usb_commands + base_uboot_commands)|join('"\n - "') }}"
- "load usb {{ usb_device_id }}:{ROOT_PART} {KERNEL_ADDR} {KERNEL}"
- "load usb {{ usb_device_id }}:{ROOT_PART} {RAMDISK_ADDR} {RAMDISK}"
- "setenv initrd_size ${filesize}"
- "load usb {{ usb_device_id }}:{ROOT_PART} {DTB_ADDR} {DTB}"
- "{{ console_device }}{{ baud_rate }} root={ROOT} {{ base_kernel_args }} {{ base_ip_args }}"
- "{{ base_uboot_bootcmd }}"
sata:
commands:
- "scsi scan"
- "{{ base_uboot_commands|join('"\n - "') }}"
- "load scsi {ROOT_PART} {KERNEL_ADDR} {KERNEL}"
- "load scsi {ROOT_PART} {RAMDISK_ADDR} {RAMDISK}; setenv initrd_size ${filesize}"
- "load scsi {ROOT_PART} {DTB_ADDR} {DTB}"
- "setenv bootargs '{{ console_device }}{{ baud_rate }} root={ROOT} {{ base_kernel_args }} {{ base_ip_args }}'"
- "{{ base_uboot_bootcmd }}"
uuu:
options:
{% if uuu_usb_otg_path is iterable and uuu_usb_otg_path is not string %}
usb_otg_path: {{ uuu_usb_otg_path }}
{% else %}
usb_otg_path: "{{ uuu_usb_otg_path }}"
{% endif %}
usb_otg_path_command: {{ uuu_usb_otg_path_command }}
corrupt_boot_media_command: {{ uuu_corrupt_boot_media_command }}
power_off_before_corrupt_boot_media: {{ uuu_power_off_before_corrupt_boot_media }}
docker_image: "{{ uuu_docker_image }}"
remote_options: "{{ uuu_remote_options }}"
bcu_board_name: "{{ bcu_board_name }}"
bcu_board_id: "{{ bcu_board_id }}"
bcu_board_id_command: {{ bcu_board_id_command }}
has_bcu_commands: "{{ has_bcu_commands }}"
additional_bcu_cleanup_commands: {{ additional_bcu_cleanup_commands }}
{% if uboot_allow_chain_load_grub %}
grub:
parameters:
bootloader_prompt: 'grub>'
needs_interrupt: true
grub-efi:
parameters:
bootloader_prompt: 'grub>'
needs_interrupt: true
{% endif %}
{% if extra_boot_methods %}
{{ extra_boot_methods|indent(first=True,width=6) }}
{% endif %}
test:
methods:
docker:
global_options:
- {{ docker_shell_global_arguments }}
options:
- {{ docker_shell_extra_arguments }}
{% endblock body %}