Poking with an (L4)Image

l4image is a tool that can inspect and modify images that are built by L4Re's build process and loaded onto a target. l4image is part of the L4Re Operating System Framework.

Get an Image

For the purpose of the this guide, we download an image we use.

wget https://l4re.org/download/snapshots/pre-built-images/amd64/bootstrap_hello-cfg.elf

Listing the Contents of an Image

$ l4image -i bootstrap_hello-cfg.elf list
B bootstrap -modaddr 0x01100000
K 0 fiasco
S 1 sigma0
R 2 moe
M 3 l4re M 4 ned
M 5 hello.cfg
M 6 hello
$

Edit Ned's Config File

Calling

l4image -i bootstrap_hello-cfg.elf edit --with-name hello.cfg
will spawn your editor to allow you modifying the contents of hello.cfg. When closing the editor, the image will be updated with the new file.

Launch an Image with QEMU

If the image is suitable for running in QEMU, it can be launched like this:

l4image -i bootstrap_hello-cfg.elf launch

Unpack an Image

All files are being extracted to the current directory:

l4image -i bootstrap_hello-cfg.elf extract

More Things

Call the help

l4image -h