Age | Commit message (Collapse) | Author |
|
At present we show 'main section' as the top-level section name. It may
be more helpful to show the actual image name. This is tricky because
Image is a parent class of Entry_section, so there is no distinction
between an image and a section.
Update it to show the image name.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Move to the latest tag for "Jammy" and rebuild the containers.
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
Build trace-cmd as part of the docker image, so that trace tests can be
used. Unfortunately the version provided by distributions is a little old
and has bugs. It also does not support specifying the time base for the
trace, which is required to convert microseconds to nanaseconds.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a second variant of the flame graph that shows records in terms of the
number of microseconds used by each call stack. This is a useful way of
seeing where time is going within the execution of U-Boot.
This requires a call stack that records the start time of each function,
as well as a way of subtracting all time consumed by child functions, so
that this time is not counted twice by the flamegraph. The time values in
the output are just for the function itself, not for its children.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
It is useful to see how many times each function is called, particularly
in the context of its callers. A flamegraph is a way of showing this.
Support output in this format which can be used by the flamegraph.pl
script, to generate an SVG image for browsing.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add support for writing ftrace records in the 'funcgraph' format, which
shows function entry and exit points as well as the time taken by each
function.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Use the information in the trace header instead of reading it from the
trace records. Add debugging to check that System.map and the trace header
agree on this value.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This feature was only partly implemented and serves no current purpose.
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
The old text format is not much used anymore. Instead a new trace-cmd tool
has introduced a binary format for trace records.
Add support for generating this format. This involves removing the old
text format, adding various helpers for the new format and adjusting the
code to use an output file instead of stdout.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
The current use of 'profile' in some places is confusing. Update the code
to use the word 'trace' consistently. Change the flags to better match
their meaning and add some more comments.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Per https://www.qemu.org/contribute/ the official location of the QEMU
sources are https://gitlab.com/qemu-project/qemu.git
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
The readme file for buildman is called buildman.rst.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
This is very old and does not appear to be used. The CONFIG option
enabling it is no-longer present. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This seems to have been used by ppc4xx which was removed a while back.
The Kconfig does not exist so it is never built. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This is not a Kconfig option so we should not be setting it in the
Makefile. Rename it to use a CFS_ prefix, since this is still used in
mxsimage.c
In general tools should support all the features without reference to
CONFIG options, but this is left to the maintainer to look at.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Sometimes the Makefile rules or source code refers to Kconfig options
which don't exist. Update the moveconfig tool to check this and produce
a series of reports about inconsistencies.
This can then be used to generate patches to correct the problems.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
If image file is stored on flash partition then it contains padding, which
is not part of the image itself. Image data size is stored in the image
header. So use image size from the header instead of expecting that total
image file size is size of the header plus size of the image data. This
allows dumpimage to parse image files with padding (e.g. dumped from flash
partition).
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Before reading image header, verify that image size is at least size of
the image header.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
gpimage type requires only that two first 32-bit words of data file are
non-zero. So basically every random data file can be guessed and verified
as gpimage. So completely skip gpimage type from image autodetection code
to prevent lot of false positive results. Data file with gpimage type can
be still verified and parsed by explicitly specifying -T gpimage.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Signed-off-by: Pali Rohár <pali@kernel.org>
|
|
Signed-off-by: Pali Rohár <pali@kernel.org>
|
|
The default splashfile name saved is ti.gz. User can use these
logo files and use it to test splash screen.
Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
|
|
The handle "fd" was created in imx8image.c:249 by calling the "fopen"
function and is lost in imx8image.c:282.
Should close the 'fd' file descriptor before exiting the
parse_cfg_file(image_t *param_stack, char *name) function.
Fixes: a2b96ece5be1 ("tools: add i.MX8/8X image support")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
The handle "fd" was created in imx8mimage.c:178 by calling
the "fopen" function and is lost in imx8mimage.c:210.
Should close the 'fd' file descriptor before exiting
the parse_cfg_file(char *name) function.
Fixes: 6609c2663c9c ("tools: add i.MX8M image support")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
|
|
The struct dcd_v1_t is initialized to MAX_HW_CFG_SIZE_V1 (60)
structs 'dcd_type_addr_data_t', so the indexes to use on its elements
are [0,59]. But on line 478, the variable 'length' can take on the value
60, which applies to array overflow: cd_v1->addr_data[length].type Thus,
it is necessary to tighten the check on the 'size' variable on line 463.
Fixes: 0b0c6af38738 ("Prepare v2020.01")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
|
|
Extend support for signing in auto-generated (-f auto) FIT. Previously,
it was possible to get signed 'images' subnodes in the FIT using
options -g and -o together with -f auto. This patch allows signing
'configurations' subnodes instead of 'images' ones (which are hashed),
using option -f auto-conf instead of -f auto. Adding also -K <dtb> and
-r options, will add public key to <dtb> file with required = "conf"
property.
Summary:
-f auto => FIT with crc32 images
-f auto -g ... -o ... => FIT with signed images
-f auto-conf -g ... -o ... => FIT with sha1 images and signed confs
Example: FIT with kernel, two device tree files, and signed
configurations; public key (needed to verify signatures) is
added to u-boot.dtb with required = "conf" property.
mkimage -f auto-conf -A arm -O linux -T kernel -C none -a 43e00000 \
-e 0 -d vmlinuz -b /path/to/first.dtb -b /path/to/second.dtb \
-k /folder/with/key-files -g keyname -o sha256,rsa4096 \
-K u-boot.dtb -r kernel.itb
Example: Add public key with required = "conf" property to u-boot.dtb
without needing to sign anything. This will also create a useless FIT
named unused.itb.
mkimage -f auto-conf -d /dev/null -k /folder/with/key-files \
-g keyname -o sha256,rsa4096 -K u-boot.dtb -r unused.itb
Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
On a second and third look, a recent patch seems to be writing to the
wrong place - updating offsets from the address of the pointer instead
of what the pointer points to.
Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 2d1b2ac13fe ("tool: ifwitool: Fix buffer overflow")
Acked-by: Sean Anderson <seanga2@gmail.com>
|
|
Unfortunately a recent patch snuck through without the require test
coverage. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 571bc4e67d3 ("binman: Support positioning an entry by and ELF symbol")
|
|
This property sets the minimum size of an entry, including padding but
not alignment. It can be used to reserve space for growth of an entry,
or to enforce a minimum offset for later entries in the section.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
In some cases it is desired for SPL to start TF-A instead of U-Boot
proper. Add support for a new property fit,firmware that picks a
valid entry and prepends the remaining valid entries to the
loadables list generated by the split-elf generator.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Special nodes, hash and signature, is not being added to the nodes
generated for each segment in split-elf operation.
Copy the subnode logic used in _gen_fdt_nodes to _gen_split_elf to
ensure special nodes are added to the generated nodes.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Add support to indicate what alignment to use for the FIT and its
external data. Pass the alignment to mkimage via the -B flag.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
This makes it possible to run the patman test suite simply by invoking
'pytest' from the patman sub-directory:
$ cd tools/patman
$ pytest
Otherwise, the top level .checkpatch.conf would be ignored and
multiple test_checkpatch.py tests would fail.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
This reverts commit 648d8186dd7f9c444fb07f355090d275dcdd4de4, because
it broke usage of patman on Linux, whose check script doesn't know
about '--strict' or '--u-boot'.
Reported-by: Sjoerd Simons <sjoerd@collabora.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Sjoerd Simons <sjoerd@collabora.com>
|
|
In some cases it is useful to position an entry over the top of a symbol
in an ELF file. For example, if the symbol holds a version string then it
allows the string to be accessed from the fdtmap.
Add support for this.
Suggested-by: Pali Rohár <pali@kernel.org>
Suggested-by: Keith Short <keithshort@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a function to read a phandle and associated name and offset. This is
useful for binman.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
The current support for updating variables in a binary is hard-coded to
work with U-Boot:
- It assumes the image starts at __image_copy_start
- It uses the existing U-Boot-specific entry types
It is useful for other projects to use these feature.
Add properties to enable writing symbols for any blob, a way of specifying
the base symbol and a way of providing the ELF filename to allow symbol
lookup to take place.
With this it is possible to update a Zephyr image, such as zephyr.bin
after it has been built.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
In some cases it is useful to have an entry overlap with another in a
section, either to update the contents within a blob, or to add an entry
to the fdtmap that covers only part of the blob.
Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This appears in two places in the code. Use a shared function instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
It is sometimes useful to define an entry which does not have its own
contents but does appear in the image. The contents are set by the section
which contains it, even though it appears as an entry in the fdtmap.
Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This means that the data is not yet available. Update some comments to
make this clearer.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This is a slightly different scenario from the existing testSections
tests. Add a new test for it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Some blobs are actually not necessary for the board to work correctly. Add
a property to allow this to be indicated. Missing optional blobs do not
cause a build failure.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
OP-TEE has a format with a binary header that can be used instead of the
ELF file. With newer versions of OP-TEE this may be required on some
platforms.
Add support for this in binman. First, add a method to obtain the ELF
sections from an entry, then use that in the FIT support. We then end up
with the ability to support both types of OP-TEE files, depending on which
one is passed in with the entry argument (TEE=xxx in the U-Boot build).
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a function which checks whether data is in ELF format or not. This
will be used by binman to check this for entries.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Support entries which can be optional depending on their contents. This
allows special entry types which appear in the image only when needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Several etypes have this reference in their documentation. Now that we are
using rST, link to the section directly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
|
|
These have got out of data recently. Regenerate them.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Expand this comment to cover both cases that are supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
At present only the image (which is a section) has a filename. Move this
implementation to the entry_Section class so that any section can have a
filename. With this, the section data is written to a file.
This allows parts of an image to be written, along with the entire image.
Make a note that this can be used to include the contents of a section in
one image in another (later) image.
Signed-off-by: Simon Glass <sjg@chromium.org>
|