File: bootelf.rst

package info (click to toggle)
u-boot 2025.01-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 330,740 kB
  • sloc: ansic: 2,627,855; python: 60,773; sh: 41,641; asm: 21,854; makefile: 15,048; perl: 12,447; cs: 6,763; cpp: 1,868; yacc: 1,100; lex: 747; awk: 57; tcl: 32; sed: 24
file content (61 lines) | stat: -rw-r--r-- 1,382 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.. SPDX-License-Identifier: GPL-2.0-or-later
.. Copyright 2024, Maxim Moskalets <maximmosk4@gmail.com>

.. index::
   single: bootelf (command)

bootelf command
===============

Synopsis
--------

::

    bootelf [-p|-s] [-d <fdt_addr>] [<image_addr> [<arg>]...]

Description
-----------

The *bootelf* command is used to launch a ELF binary at *image_addr*. If
*image_addr* is not specified, the bootelf command will try to find image in
*image_load_addr* variable (*CONFIG\_SYS\_LOAD\_ADDR* by default).

Args after *image_addr* will be passed to application in common *argc*, *argv*
format.

A command sequence to run a ELF image using FDT might look like

::

    load mmc 0:1 ${loadaddr} /kernel.elf
    load mmc 0:1 ${fdt_addr_r} /soc-board.dtb
    bootelf -d ${fdt_addr_r} ${loadaddr} ${loadaddr}

image_addr
    Address of the ELF binary.

fdt_addr
    Address of the device-tree. This argument in only needed if bootable
    application uses FDT that requires additional setup (like /memory node).

arg
    Any text arguments for bootable application. This is usually the address
    of the device-tree.

Flags:

-p
    Load ELF image via program headers.

-s
    Load ELF image via section headers.

-d
    Setup FDT by address.

Configuration
-------------

The bootelf command is only available if CONFIG_CMD_ELF=y. FDT setup by flag -d
need CONFIG_CMD_ELF_FDT_SETUP=y.