Commit Graph

12 Commits

Author SHA1 Message Date
Robert P. J. Day
b28c5fcc1c test-fit.py: Minor grammar/spelling/clarification tweaks
* Add note that execution needs Python development package installed
* Standardize on upper case "FIT", "FDT" as necessary for clarity
* Fix "tempoerary", "linex" typos

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2017-03-20 18:04:41 -04:00
Simon Glass
0edd82e244 image: Fix FIT and vboot tests to exit sandbox correctly
When used with a device tree, sandbox now requires a 'reset' controller. Add
this to the device trees so that reset works and the tests can complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 5010d98f (sandbox: Use the reset driver to handle reset)
2016-02-26 08:53:10 -07:00
Karl Apsite
657fd2d031 add test for two 'loadables'
Nothing too fancy.  A simple test that attmpts to load two loadables and
verify that they are properly unpacked in the u-boot sandbox.
Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-05-28 08:18:21 -04:00
Guilherme Maciel Ferreira
39931f966a dumpimage: fit: extract FIT images
The dumpimage is able to extract components contained in a FIT image:

  $ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE

The CONTAINER.ITB is a regular FIT container file. The INDEX is the poisition
of the sub-image to be retrieved, and FILE is the file (path+name) to save the
extracted sub-image.

For example, given the following kernel.its to build a kernel.itb:

  /dts-v1/;
  / {
      ...
      images {
        kernel@1 {
          description = "Kernel 2.6.32-34";
          data = /incbin/("/boot/vmlinuz-2.6.32-34-generic");
          type = "kernel";
          arch = "ppc";
          os = "linux";
          compression = "gzip";
          load = <00000000>;
          entry = <00000000>;
          hash@1 {
            algo = "md5";
          };
        };
        ...
      };
      ...
    };

The dumpimage can extract the 'kernel@1' node through the following command:

  $ ./dumpimage -T flat_dt -i kernel.itb -p 0 kernel
  Extracted:
   Image 0 (kernel@1)
    Description:  Kernel 2.6.32-34
    Created:      Wed Oct 22 15:50:26 2014
    Type:         Kernel Image
    Compression:  gzip compressed
    Data Size:    4040128 Bytes = 3945.44 kB = 3.85 MB
    Architecture: PowerPC
    OS:           Linux
    Load Address: 0x00000000
    Entry Point:  0x00000000
    Hash algo:    md5
    Hash value:   22352ad39bdc03e2e50f9cc28c1c3652

Which results in the file 'kernel' being exactly the same as '/boot/vmlinuz-2.6.32-34-generic'.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-01-29 13:38:41 -05:00
Guilherme Maciel Ferreira
f41f5b7c05 dumpimage: add 'T' option to explicitly set the image type
Some image types, like "KeyStone GP", do not have magic numbers to
distinguish them from other image types. Thus, the automatic image
type discovery does not work correctly.

This patch also fix some integer type mismatches.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-01-29 13:38:41 -05:00
Simon Glass
cc4477289d test: Add DEBUG output option to test-fit.py
Sometimes it is useful to see the output from U-Boot, so add an option to
make this easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 11:35:43 -05:00
Simon Glass
b5493d17bd sandbox: Correct ordering of 'sb save' commands
Prior to commit d455d87 there was an inconsistency between the position of
the 'address' parameter in 'sb load' and 'sb save'. This was corrected but
it broke some tests. Fix the tests and also the help for 'sb save'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 11:35:43 -05:00
Simon Glass
dfe6f4d684 Correct sandbox filesystem commands in FIT image test
The host filesystem name has changed, so update the tests. The tests now
run again correctly:

$ make O=b/sandbox sandbox_defconfig all
...
$ test/image/test-fit.py -u b/sandbox/u-boot
FIT Tests

=========
Kernel load
Kernel + FDT load
Kernel + FDT + Ramdisk load

Tests passed
Caveat: this is only a sanity check - test coverage is poor

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Guilherme Maciel Ferreira
6496d00fb8 sandbox: dumpimage: Test dumpimage
Add a test for dumpimage.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2013-12-13 09:15:32 -05:00
Wolfgang Denk
1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Simon Glass
aec36cfdac Show stdout on error in fit-test
When this test fails it is useful to see the output from U-Boot. Add
printing of this information on failure.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-06-26 10:16:41 -04:00
Simon Glass
301e803867 sandbox: image: Create a test for loading FIT images
The image code is fairly complex with various different options. It would
be useful to have comprehensive tests for this.

As a start, create a script which tries out loading a kernel/ramdisk/fdt
from a FIT and checks that the images appear in the right place in memory.

This uses sandbox which now supports bootm and related features.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-06-04 16:06:32 -04:00