boards.io

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 tree

base-uboot 284 device-types

Device-types extending base-uboot (284)

Device typeVendorArchThrough
alpine-db Annapurna Labs arm directly
am335x-sancloud-bbe Texas Instruments arm beaglebone-black
am437x-idk-evm Texas Instruments arm directly
am57xx-beagle-x15 Texas Instruments arm directly
am6 Texas Instruments arm directly
apq8016-sbc-uboot Qualcomm arm64 directly
armada-370-db Marvell arm directly
armada-370-rd Marvell arm directly
armada-3720-db Marvell arm64 directly
armada-3720-espressobin Marvell arm64 directly
armada-375-db Marvell arm directly
armada-385-db-ap Marvell arm directly
armada-388-clearfog Marvell arm directly
armada-388-clearfog-pro Marvell arm armada-388-clearfog
armada-388-gp Marvell arm directly
armada-398-db Marvell arm directly
armada-7040-db Marvell arm64 directly
armada-8040-db Marvell arm64 directly
armada-xp-db Marvell arm directly
armada-xp-gp Marvell arm directly
armada-xp-linksys-mamba Marvell arm directly
armada-xp-openblocks-ax3-4 Marvell arm directly
arndale Samsung arm directly
at91-sama5d2_xplained Microchip arm directly
at91-sama5d4_xplained Microchip arm directly
at91rm9200ek Microchip arm directly
at91sam9261ek Microchip arm directly
at91sam9g20ek Microchip arm directly
at91sam9m10g45ek Microchip arm directly
at91sam9x25ek Microchip arm directly
at91sam9x35ek Microchip arm directly
avenger96 STMicroelectronics arm directly
b2120h410 STMicroelectronics arm directly
b2260 STMicroelectronics arm directly
bcm2711-rpi-4-b
Raspberry Pi 4b
Broadcom arm64 directly
bcm2712-rpi-5-b
Raspberry Pi 5
Broadcom arm64 directly
bcm2835-rpi-b-rev2 Broadcom arm directly
bcm2836-rpi-2-b
Raspberry Pi 2b
Broadcom arm rpi-common
bcm2837-rpi-3-b
Raspberry Pi 3b
Broadcom arm64 directly
bcm2837-rpi-3-b-32
Raspberry Pi 3b
Broadcom arm directly
bcm2837-rpi-3-b-plus
Raspberry Pi 3b
Broadcom arm64 directly
beagle-xm Texas Instruments arm directly
beaglebone-black Texas Instruments arm directly
cubietruck Allwinner arm directly
da850-lcdk
device-type for Davinci da850-lcdk board
Texas Instruments arm directly
de0-nano-soc Intel arm directly
dra7-evm Texas Instruments arm directly
eic7700-hifive-premier-p550 ESWIN riscv64 directly
fsl-ls1012a-rdb NXP arm64 fsl-ls-common
fsl-ls1028a-rdb NXP arm64 fsl-ls-common
fsl-ls1043a-rdb NXP arm64 fsl-ls-common
fsl-ls1046a-frwy NXP arm64 fsl-ls-common
fsl-ls1046a-rdb NXP arm64 fsl-ls-common
fsl-ls1088a-rdb NXP arm64 fsl-ls-common
fsl-ls2088a-rdb NXP arm64 fsl-ls-common
fsl-lx2160a-rdb NXP arm64 directly
fsl-lx2162a-qds NXP arm64 directly
fsl-s32v234sbc NXP arm64 s32v234-evb
gemini-ssi1328 Cortina arm directly
hifive-unleashed-a00 SiFive riscv64 directly
hifive-unmatched-a00 SiFive riscv64 directly
highbank Calxeda arm directly
hsdk Synopsys arc directly
imx6dl-sabreauto NXP arm imx6qdl-common
imx6dl-sabresd NXP arm imx6qdl-common
imx6dl-udoo NXP arm directly
imx6q-nitrogen6x NXP arm directly
imx6q-sabreauto NXP arm imx6qdl-common
imx6q-sabrelite
i.MX6Q SABRE Lite
NXP arm directly
imx6q-sabresd NXP arm imx6qdl-common
imx6q-udoo NXP arm directly
imx6q-var-dt6customboard NXP arm directly
imx6qp-sabreauto NXP arm imx6qdl-common
imx6qp-sabresd NXP arm imx6qdl-common
imx6sl-evk NXP arm imx6us7d-common
imx6sll-evk NXP arm imx6us7d-common
imx6sx-sdb NXP arm imx6us7d-common
imx6ul-14x14-evk NXP arm imx6us7d-common
imx6ull-14x14-evk NXP arm imx6us7d-common
imx6ull-evk NXP arm imx6us7d-common
imx6ulz-14x14-evk NXP arm imx6us7d-common
imx6ulz-lite-evk NXP arm imx6us7d-common
imx7d-sdb NXP arm imx6us7d-common
imx7s-warp NXP arm64 directly
imx7ulp-evk NXP arm imx7u-common
imx8dx-mek NXP arm64 imx8q-common
imx8dxl-ddr3l-evk NXP arm64 imx8q-common
imx8dxl-evk NXP arm64 imx8q-common
imx8dxl-evk-dl2 NXP arm64 imx8q-common
imx8dxl-evk-dl3 NXP arm64 imx8q-common
imx8dxl-orangebox NXP arm64 imx8q-common
imx8dxl-phantom-mek NXP arm64 imx8q-common
imx8mm-ddr4-evk NXP arm64 imx8m-common
imx8mm-evk NXP arm64 imx8m-common
imx8mn-ddr3l-ab2 NXP arm64 imx8m-common
imx8mn-ddr3l-evk NXP arm64 imx8m-common
imx8mn-ddr4-evk NXP arm64 imx8m-common
imx8mn-evk NXP arm64 imx8m-common
imx8mp-ab2 NXP arm64 imx8m-common
imx8mp-ddr4-evk NXP arm64 imx8m-common
imx8mp-debix-model-a NXP arm64 imx8m-common
imx8mp-evk NXP arm64 imx8m-common
imx8mp-frdm NXP arm64 imx8m-common
imx8mp-ipi-lec
I-Pi SMARC IMX8M Plus An I-Pi SMARC Plus carrier board paired with a LEC-IMX8MP SMARC module.
NXP arm64 imx8m-common
imx8mp-verdin-laa NXP arm64 directly
imx8mp-verdin-nonwifi-dahlia NXP arm64 imx8m-common
imx8mq-evk NXP arm64 imx8m-common
imx8mq-wevk NXP arm64 imx8m-common
imx8qm-mek NXP arm64 imx8q-common
imx8qxp-mek NXP arm64 imx8q-common
imx8ulp-9x9-evk NXP arm64 imx8u-common
imx8ulp-evk NXP arm64 imx8u-common
imx91-11x11-evk NXP arm64 imx9-common
imx91-11x11-frdm NXP arm64 imx9-common
imx91-11x11-frdm-s NXP arm64 imx9-common
imx91-9x9-qsb NXP arm64 imx9-common
imx91p-11x11-evk NXP arm64 imx9-common
imx91p-9x9-qsb NXP arm64 imx9-common
imx93-11x11-evk NXP arm64 imx9-common
imx93-11x11-evk-pmic-pf0900 NXP arm64 imx9-common
imx93-11x11-frdm NXP arm64 imx9-common
imx93-14x14-evk NXP arm64 imx9-common
imx93-9x9-qsb NXP arm64 imx9-common
imx937-frdm NXP arm64 imx9-common
imx93w-evk NXP arm64 imx9-common
imx93w-frdm NXP arm64 imx9-common
imx941-15x15-lpddr4-evk NXP arm64 imx9-common
imx941-19x19-lpddr4-evk NXP arm64 imx9-common
imx942-15x15-lpddr4-evk NXP arm64 imx9-common
imx942-19x19-lpddr4-evk NXP arm64 imx9-common
imx943-15x15-lpddr4-evk NXP arm64 imx9-common
imx943-19x19-lpddr4-evk NXP arm64 imx9-common
imx943-19x19-lpddr5-evk NXP arm64 imx9-common
imx943-orangebox NXP arm64 imx9-common
imx95-15x15-ab2 NXP arm64 imx9-common
imx95-15x15-evk NXP arm64 imx9-common
imx95-15x15-frdm NXP arm64 imx9-common
imx95-15x15-lpddr5-frdm NXP arm64 imx9-common
imx95-19x19-evk NXP arm64 imx9-common
imx95-19x19-frdm-pro NXP arm64 imx9-common
imx95-19x19-verdin NXP arm64 imx9-common
imx952-15x15-evk NXP arm64 imx9-common
imx952-19x19-evk NXP arm64 imx9-common
imx952-frdm NXP arm64 imx9-common
intel-ixp42x-welltech-epbx100 Intel arm directly
jetson-tk1
Tegra 124 Jetson TK1
NVIDIA arm tegra124-common
jh7100-starfive-visionfive-v1 StarFive riscv64 directly
jh7100-visionfive StarFive riscv64 directly
juno-uboot Arm arm64 directly
k3-am625-sk Texas Instruments arm64 directly
k3-am625-verdin-wifi-mallow Texas Instruments arm64 directly
k3-am62p5-sk Texas Instruments arm64 k3-common
k3-am642-sk Texas Instruments arm64 k3-common
kirkwood-db-88f6282 Marvell arm directly
kirkwood-openblocks_a7 Marvell arm directly
kontron-bl-imx8mm NXP arm64 directly
kontron-kbox-a-230-ls NXP arm64 kontron-sl28-common
kontron-kswitch-d10-mmt-6g-2gs Microchip arm kontron-kswitch-d10-mmt-common
kontron-kswitch-d10-mmt-8g Microchip arm kontron-kswitch-d10-mmt-common
kontron-pitx-imx8m NXP arm64 directly
kontron-sl28-var3-ads2 NXP arm64 kontron-sl28-common
kv260 AMD / Xilinx arm64 directly
ls1021a-twr NXP arm directly
meson-axg-s400 Amlogic arm64 meson-gx-common
meson-g12a-sei510 Amlogic arm64 meson-g12-common
meson-g12a-u200 Amlogic arm64 meson-gx-common
meson-g12a-x96-max Amlogic arm64 meson-g12-common
meson-g12b-a311d-khadas-vim3 Amlogic arm64 meson-g12-common
meson-g12b-a311d-libretech-cc Amlogic arm64 meson-g12-common
meson-g12b-odroid-n2 Amlogic arm64 meson-g12-common
meson-gxbb-nanopi-k2 Amlogic arm64 meson-gx-common
meson-gxbb-p200 Amlogic arm64 meson-gx-common
meson-gxl-s805x-libretech-ac Amlogic arm64 meson-gx-common
meson-gxl-s805x-p241 Amlogic arm64 meson-gx-common
meson-gxl-s905d-p230 Amlogic arm64 meson-gx-common
meson-gxl-s905x-khadas-vim
Common Amlogic Meson GX configuration
Amlogic arm64 meson-gx-common
meson-gxl-s905x-libretech-cc Amlogic arm64 meson-gx-common
meson-gxl-s905x-p212 Amlogic arm64 meson-gx-common
meson-gxm-khadas-vim2 Amlogic arm64 meson-gx-common
meson-gxm-q200 Amlogic arm64 meson-gx-common
meson-sm1-khadas-vim3l Amlogic arm64 meson-g12-common
meson-sm1-odroid-c4 Amlogic arm64 meson-gx-common
meson-sm1-s905d3-libretech-cc Amlogic arm64 meson-g12-common
meson-sm1-sei610 Amlogic arm64 meson-g12-common
meson8b-ec100 Amlogic arm directly
meson8b-odroidc1 Amlogic arm directly
mt8365-genio-350-evk MediaTek arm64 mt8xxx-genio-common
mt8370-genio-510-evk MediaTek arm64 mt8xxx-genio-common
mt8390-genio-700-evk MediaTek arm64 mt8xxx-genio-common
mt8395-genio-1200-evk MediaTek arm64 mt8xxx-genio-common
mt8395-radxa-nio-12l MediaTek arm64 mt8xxx-genio-common
mustang Ampere / AppliedMicro arm directly
nxp-ls2088 NXP arm64 directly
odroid-n2 Amlogic arm exynos4-5-common
odroid-x2
Hardkernel Odroid X2
Samsung arm exynos4-5-common
odroid-xu3
Hardkernel Odroid XU3
Samsung arm exynos4-5-common
orion5x-rd88f5182-nas Marvell arm directly
osm-imx93 NXP arm64 imx9-common
ox820-cloudengines-pogoplug-series-3 Oxford Semiconductor arm directly
panda Texas Instruments arm directly
peach-pi
Peach pi AKA Samsung Chromebook 2 running u-boot (chainloaded by vendor u-boot)
Samsung arm exynos4-5-common → exynos5420-common
poplar HiSilicon arm64 directly
qrb4210-rb2-uboot Qualcomm arm64 directly
r8a7742-iwg21d-q7 Renesas arm rzg1-common
r8a7743-iwg20d-q7 Renesas arm rzg1-common
r8a7744-iwg20d-q7 Renesas arm rzg1-common
r8a7745-iwg22d-sodimm Renesas arm rzg1-common
r8a77470-iwg23s-sbc Renesas arm rzg1-common
r8a774a1-hihope-rzg2m-ex Renesas arm64 rzg2-common
r8a774b1-hihope-rzg2n-ex Renesas arm64 rzg2-common
r8a774c0-ek874 Renesas arm64 rzg2-common
r8a774e1-hihope-rzg2h-ex Renesas arm64 rzg2-common
r8a7791-porter Renesas arm directly
r8a7795-h3ulcb-kf
Renesas R-Car H3 ULCB with kingfisher expansion board
Renesas arm64 rcar-gen3-common
r8a7795-salvator-x
Renesas R-Car Salvator-X H3
Renesas arm64 rcar-gen3-common
r8a77950-ulcb
H3ULCB (R-Car Starter Kit Premier) board with R-Car H3 ES1.x
Renesas arm64 rcar-gen3-common
r8a7796-m3ulcb
Renesas R-Car Starter Kit Pro
Renesas arm64 rcar-gen3-common
r8a7796-m3ulcb-kf
Renesas R-Car Starter Kit Pro with Kingfisher expansion board
Renesas arm64 rcar-gen3-common
r8a779f4-s4sk Renesas arm64 rcar-gen3-common
r8a779g3-sparrow-hawk Renesas arm64 rcar-gen3-common
r8a779m1-ulcb
Renesas R-Car Starter Kit H3e-2G
Renesas arm64 rcar-gen3-common
r9a07g043u11-smarc Renesas arm64 directly
r9a07g044c2-smarc Renesas arm64 directly
r9a07g044l2-smarc Renesas arm64 directly
r9a07g054l2-smarc Renesas arm64 directly
r9a09g057-rzv2h-evk Renesas arm64 directly
rk3288-miqi Rockchip arm directly
rk3288-rock2-square
Radxa Rock square, running upstream u-boot (not the vendor u-boot)
Rockchip arm directly
rk3328-rock64 Rockchip arm64 directly
rk3399-khadas-edge-v Rockchip arm64 directly
rk3399-puma-haikou Rockchip arm64 directly
rk3399-roc-pc Rockchip arm64 directly
rk3399-rock-pi-4b
Rock pi 4 b
Rockchip arm64 directly
rk3576-rock-4d Rockchip arm64 rk3576-common
rk3588-rock-5-itx Rockchip arm64 directly
rk3588-rock-5b Rockchip arm64 directly
rzn1d Renesas arm directly
s32g399a-rdb3 NXP arm64 directly
s32v234-evb NXP arm64 directly
sama53d Microchip arm directly
sama5d34ek Microchip arm directly
sama5d36ek Microchip arm directly
sharkl2 Unisoc arm directly
snow
snow AKA Samsung arm Chromebook running u-boot (chainloaded by vendor u-boot)
Samsung arm exynos4-5-common
soca9 Intel arm directly
spacemit-k1-bananapi-f3 SpaceMIT riscv64 directly
stm32mp157a-dhcor-avenger96 STMicroelectronics arm directly
stm32mp157c-dk2 STMicroelectronics arm directly
stm32mp15x-eval STMicroelectronics arm directly
sun4i-a10-olinuxino-lime Allwinner arm sunxi-common
sun50i-a64-bananapi-m64 Allwinner arm64 sunxi-common
sun50i-a64-pine64-plus Allwinner arm64 sunxi-common
sun50i-h5-libretech-all-h3-cc Allwinner arm64 sunxi-common
sun50i-h5-nanopi-neo-plus2 Allwinner arm64 sunxi-common
sun50i-h6-orangepi-3 Allwinner arm64 sunxi-common
sun50i-h6-orangepi-one-plus Allwinner arm64 sunxi-common
sun50i-h6-pine-h64 Allwinner arm64 sunxi-common
sun50i-h6-pine-h64-model-b Allwinner arm64 sunxi-common
sun55i-a527-cubie-a5e Allwinner arm64 sunxi-common
sun5i-a13-olinuxino-micro Allwinner arm sunxi-common
sun5i-gr8-chip-pro Allwinner arm sunxi-common
sun5i-r8-chip Allwinner arm sunxi-common
sun6i-a31-app4-evb1 Allwinner arm sunxi-common
sun7i-a20-cubieboard2 Allwinner arm sunxi-common
sun7i-a20-olinuxino-lime2 Allwinner arm sunxi-common
sun7i-a20-olinuxino-micro Allwinner arm sunxi-common
sun8i-a23-evb Allwinner arm sunxi-common
sun8i-a33-olinuxino Allwinner arm sunxi-common
sun8i-a33-sinlinx-sina33 Allwinner arm sunxi-common
sun8i-a83t-allwinner-h8homlet-v2 Allwinner arm sunxi-common
sun8i-a83t-bananapi-m3 Allwinner arm sunxi-common
sun8i-h2-plus-bananapi-m2-zero Allwinner arm64 directly
sun8i-h2-plus-libretech-all-h3-cc Allwinner arm sunxi-common
sun8i-h2-plus-orangepi-r1 Allwinner arm sunxi-common
sun8i-h2-plus-orangepi-zero Allwinner arm sunxi-common
sun8i-h3-bananapi-m2-plus Allwinner arm sunxi-common
sun8i-h3-libretech-all-h3-cc Allwinner arm sunxi-common
sun8i-h3-orangepi-pc Allwinner arm sunxi-common
sun8i-r40-bananapi-m2-ultra Allwinner arm sunxi-common
sun9i-a80-cubieboard4 Allwinner arm sunxi-common
synquacer-uboot Socionext arm64 directly
x15 Texas Instruments arm directly
x15-bl Texas Instruments arm x15
xilinx-zcu102 AMD / Xilinx arm64 directly
{% 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 %}