Skip to content
Snippets Groups Projects
Commit c0f037f6 authored by Igor Opaniuk's avatar Igor Opaniuk Committed by Stefano Babic
Browse files

mach-imx: bootaux: elf firmware support

Currently imx-specific bootaux command doesn't support ELF format
firmware for Cortex-M4 core.

This patches introduces a PoC implementation of handling elf firmware
(load_elf_image_phdr() was copy-pasted from elf.c just for PoC).
ELF64 binaries isn't supported yet.

This has the advantage that the user does not need to know to which
address the binary has been linked to. However, in order to handle
and load the elf sections to the right address, we need to translate the
Cortex-M4 core memory addresses to primary/host CPU memory
addresses (Cortex A7/A9 cores).

This allows to boot firmwares from any location with just using
bootaux, e.g.:
> tftp ${loadaddr} hello_world.elf && bootaux ${loadaddr}

Similar translation table can be found in the Linux remoteproc
driver [1].

[1] https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/imx_rproc.c



Signed-off-by: default avatarIgor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: default avatarStefan Agner <stefan.agner@toradex.com>
Reviewed-by: default avatarOleksandr Suvorov <oleksandr.suvorov@toradex.com>
parent ebabbf11
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment