History log of /rk3399_ARM-atf/tools/fiptool/fiptool.c (Results 51 – 75 of 79)
Revision Date Author Comments
# e9e0d287 27-Jan-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: simplify assert() for add_image(_desc)

lookup_image(_desc)_from_uuid() traverses the linked list, so it
is not efficient. We just want to make sure *p points to NULL here.

Signed-off-by:

fiptool: simplify assert() for add_image(_desc)

lookup_image(_desc)_from_uuid() traverses the linked list, so it
is not efficient. We just want to make sure *p points to NULL here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# ea39d557 27-Jan-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: revive replace_image() to keep the image order by update command

Commit e0f083a09b29 ("fiptool: Prepare ground for expanding the set
of images at runtime") introduced another side effect; t

fiptool: revive replace_image() to keep the image order by update command

Commit e0f083a09b29 ("fiptool: Prepare ground for expanding the set
of images at runtime") introduced another side effect; the "update"
command now changes the image order in the FIP.

Let's say you have an FIP with BL2, BL31, BL32, BL33. If you update
for example, BL32 with the "update" command, you will get a new FIP
with BL2, BL31, BL33, BL32, in this order.

It happens like this; remove_image() removes the old image from the
linked list, add_image() adds the new image at the tail of the list,
then images are packed in the new order. Prior to that commit,
images were updated by replace_image(), but it was deleted by the
re-work. Revive replace_image() that is re-implemented to work with
the linked list.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# 67973fb4 15-Jan-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: remove always true conditional

The conditional

if (desc != NULL)
...

is always true here because we assert it 6 lines above:

assert(desc != NULL);

Remove the if-conditiona

fiptool: remove always true conditional

The conditional

if (desc != NULL)
...

is always true here because we assert it 6 lines above:

assert(desc != NULL);

Remove the if-conditional and concatenate the printf() calls.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# 40866aaf 25-Dec-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: fix existence check of FIP input file for update command

This line should check the existence of the input file, but it is
actually checking the output file. When -o option is given to the

fiptool: fix existence check of FIP input file for update command

This line should check the existence of the input file, but it is
actually checking the output file. When -o option is given to the
"update" command, the outfile is unlikely to exist, then parse_fip()
is skipped and an empty FIP file is output. This is wrong behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# bf6363ac 23-Jan-2017 danh-arm <dan.handley@arm.com>

Merge pull request #810 from masahir0y/fiptool_fix

Fix fiptool bug introduced by recent rework


# 11c0a4ff 14-Jan-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: fix add_image() and add_image_desc() implementation

The "make fip" shows the content of the generated FIP at the end of
the build. (This is shown by "fiptool info" command.)

Prior to comm

fiptool: fix add_image() and add_image_desc() implementation

The "make fip" shows the content of the generated FIP at the end of
the build. (This is shown by "fiptool info" command.)

Prior to commit e0f083a09b29 ("fiptool: Prepare ground for expanding
the set of images at runtime"), the last part of the build log of
make CROSS_COMPILE=aarch64-linux-gnu- BL33=../u-boot/u-boot.bin fip
was like follows:

Trusted Boot Firmware BL2: offset=0xB0, size=0x4188, cmdline="--tb-fw"
EL3 Runtime Firmware BL31: offset=0x4238, size=0x6090, cmdline="--soc-fw"
Non-Trusted Firmware BL33: offset=0xA2C8, size=0x58B51, cmdline="--nt-fw"

With that commit, now it is displayed like follows:

Non-Trusted Firmware BL33: offset=0xB0, size=0x58B51, cmdline="--nt-fw"
EL3 Runtime Firmware BL31: offset=0x58C01, size=0x6090, cmdline="--soc-fw"
Trusted Boot Firmware BL2: offset=0x5EC91, size=0x4188, cmdline="--tb-fw"

You will notice two differences:
- the contents are displayed in BL33, BL31, BL2 order
- the offset values are wrong

The latter is more serious, and means "fiptool info" is broken.

Another interesting change is "fiptool update" every time reverses
the image order. For example, if you input FIP with BL2, BL31, BL33
in this order, the command will pack BL33, BL31, BL2 into FIP, in
this order. Of course, the order of components is not a big deal
except that users will have poor impression about this.

The root cause is in the implementation of add_image(); the
image_head points to the last added image. For example, if you call
add_image() for BL2, BL31, BL33 in this order, the resulted image
chain is:

image_head -> BL33 -> BL31 -> BL2

Then, they are processed from the image_head in "for" loops:

for (image = image_head; image != NULL; image = image->next) {

This means images are handled in Last-In First-Out manner.

Interestingly, "fiptool create" is still correct because
add_image_desc() also reverses the descriptor order and the command
works as before due to the double reverse.

The implementation of add_image() is efficient, but it made the
situation too complicated.

Let's make image_head point to the first added image. This will
add_image() inefficient because every call of add_image() follows
the ->next chain to get the tail. We can solve it by adopting a
nicer linked list structure, but I am not doing as far as that
because we handle only limited number of images anyway.

Do likewise for add_image_desc().

Fixes: e0f083a09b29 ("fiptool: Prepare ground for expanding the set of images at runtime")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# 696ccba6 14-Jan-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: introduce xzalloc() helper function

We often want to zero out allocated memory.

My main motivation for this commit is to set image::next and
image_desc::next to NULL automatically in the n

fiptool: introduce xzalloc() helper function

We often want to zero out allocated memory.

My main motivation for this commit is to set image::next and
image_desc::next to NULL automatically in the next commit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# fc7c870b 13-Jan-2017 davidcunado-arm <david.cunado@arm.com>

Merge pull request #797 from dp-arm/dp/fiptool-improvements

fiptool: Add support for operating on binary blobs using the UUID


# d02fcebe 30-Dec-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Factor out setting of image descriptor action

An image descriptor contains an action and an argument. The action
indicates the intended operation, as requested by the user. It can be
pack

fiptool: Factor out setting of image descriptor action

An image descriptor contains an action and an argument. The action
indicates the intended operation, as requested by the user. It can be
pack, unpack or remove. Factor out setting those fields to a separate
function to minimize code duplication across the various commands that
modify these fields.

Change-Id: I1682958e8e83c4884e435cff6d0833c67726461f
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>

show more ...


# 9fc9ff1f 21-Dec-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Fix format specifier for malloc/strdup wrappers

Change-Id: Ife8f198b4c45961e85ed6f4d463daa59009dab1c
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>


# fcab6bbe 03-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Add support for operating on binary blobs using the UUID

Previously, fiptool only understood a fixed set of images as
specified in tbbr_config.c. It preserved unknown images during
the upd

fiptool: Add support for operating on binary blobs using the UUID

Previously, fiptool only understood a fixed set of images as
specified in tbbr_config.c. It preserved unknown images during
the update, unpack and remove operations but it was not possible to
explicitly refer to one of those unknown images.

Add a new --blob option to create/update/unpack/remove images that
are not known at compile time. This is accomplished by specifying
the UUID and filename pair as shown below:

$ ./fiptool create --blob uuid=01234567-89ab-cdef-0123-456789abcdef,file=foo.bin fip.bin
$ ./fiptool info fip.bin
01234567-89ab-cdef-0123-456789abcdef: offset=0x60, size=0x1AA68

Fixes ARM-software/tf-issues#420

Change-Id: Iaac2504b9a4252289c09e73d29645cbe240f3a82
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>

show more ...


# e0f083a0 14-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Prepare ground for expanding the set of images at runtime

To allow operating on images with unknown UUIDs, fiptool needs to
be able to track an arbitrary amount of images and not be limited

fiptool: Prepare ground for expanding the set of images at runtime

To allow operating on images with unknown UUIDs, fiptool needs to
be able to track an arbitrary amount of images and not be limited
to the set of images described by the builtin table.

Convert the table to a list to accommodate this scenario.

Change-Id: I0e6d738eece7795d74fc72d165a3098f223d4414
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>

show more ...


# 919ad05e 08-Dec-2016 danh-arm <dan.handley@arm.com>

Merge pull request #773 from dp-arm/dp/fiptool-enhancements

Various fiptool enhancements and bug fixes


# a22f6285 04-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Provide malloc/strdup wrappers to simplify error checking

Change-Id: Ie3e43e9f7d31df40a5997047b9bddec0a06fd47f
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>


# cc672bb2 07-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Use getopt for the top level command parsing

Change-Id: I18a4327e41fc090dcea9a647f7673182ca0ed1d9
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>


# 20f87e78 07-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Initialize opt_index to 0 for getopt(3)

Change-Id: I62c1a636eb0d9f73fa3a6356e32b5a44f268d421
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>


# 60b499fe 04-Nov-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Constify various function params

Additionally, remove the -o option for the create command
as it is not supported.

Change-Id: I27993a6fc5e3b0b9710e2ec5322e4296bc87d0df
Signed-off-by: dp-ar

fiptool: Constify various function params

Additionally, remove the -o option for the create command
as it is not supported.

Change-Id: I27993a6fc5e3b0b9710e2ec5322e4296bc87d0df
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>

show more ...


# 061723f9 28-Oct-2016 davidcunado-arm <david.cunado@arm.com>

Merge pull request #744 from masahir0y/fiptool

fiptool: fix Segmentation fault when only --verbose option is given


# 6b886ea9 27-Oct-2016 davidcunado-arm <david.cunado@arm.com>

Merge pull request #738 from dp-arm/dp/fiptool-uuid

fiptool: Link `toc_entry` and `image` structures via UUID


# c9cb4089 26-Oct-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

fiptool: fix Segmentation fault when only --verbose option is given

Fix the following bug:

$ tools/fiptool/fiptool -v
Segmentation fault (core dumped)

Signed-off-by: Masahiro Yamada <yamada.ma

fiptool: fix Segmentation fault when only --verbose option is given

Fix the following bug:

$ tools/fiptool/fiptool -v
Segmentation fault (core dumped)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

show more ...


# b04efcce 30-Aug-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Link `toc_entry` and `image` structures via UUID

The `toc_entry` and `image` data structures had a cyclic
relationship. This patch removes the explicit dependencies and introduces
function

fiptool: Link `toc_entry` and `image` structures via UUID

The `toc_entry` and `image` data structures had a cyclic
relationship. This patch removes the explicit dependencies and introduces
functions to link them via the UUID.

This change highlights the intent of the code better and makes it more
flexible for future enhancements.

Change-Id: I0c3dd7bfda2a631a3827c8ba4831849c500affe9
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>

show more ...


# 8874924e 19-Sep-2016 danh-arm <dan.handley@arm.com>

Merge pull request #710 from dp-arm/dp/fiptool-usage

fiptool: Invoke command specific usage function


# 368d4ebf 19-Sep-2016 danh-arm <dan.handley@arm.com>

Merge pull request #701 from dp-arm/dp/fiptool-sha256

fiptool: Add support for printing the sha256 digest with info command


# 85ee2778 15-Sep-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Invoke command specific usage function

Instead of always calling the top level usage function when an
error is detected, call the command-specific usage function.

For example running `fipt

fiptool: Invoke command specific usage function

Instead of always calling the top level usage function when an
error is detected, call the command-specific usage function.

For example running `fiptool create` will produce the same output
as `fiptool help create`. This is more convenient for the user
when they make a mistake.

Change-Id: I60178ab89d47adf93cdfe6d8b5d5f778a5ea3bca

show more ...


# 9df69ba3 24-Aug-2016 dp-arm <dimitris.papastamos@arm.com>

fiptool: Add support for printing the sha256 digest with info command

This feature allows one to quickly verify that the expected
image is contained in the FIP without extracting the image and
runni

fiptool: Add support for printing the sha256 digest with info command

This feature allows one to quickly verify that the expected
image is contained in the FIP without extracting the image and
running sha256sum(1) on it.

The sha256 digest is only shown when the verbose flag is used.

This change requires libssl-dev to be installed in order to build
Trusted Firmware. Previously, libssl-dev was optionally needed only
to support Trusted Board Boot configurations.

Fixes ARM-Software/tf-issues#124

Change-Id: Ifb1408d17f483d482bb270a589ee74add25ec5a6

show more ...


1234