Skip to content
Snippets Groups Projects
  1. Feb 12, 2015
  2. Jan 30, 2015
  3. Jan 29, 2015
    • Guilherme Maciel Ferreira's avatar
      dumpimage: fit: extract FIT images · 39931f96
      Guilherme Maciel Ferreira authored
      
      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: default avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      39931f96
    • Guilherme Maciel Ferreira's avatar
      dumpimage: add 'T' option to explicitly set the image type · f41f5b7c
      Guilherme Maciel Ferreira authored
      
      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: default avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      f41f5b7c
  4. Jan 14, 2015
  5. Dec 11, 2014
    • Simon Glass's avatar
      dm: i2c: Add tests for I2C · ecc2ed55
      Simon Glass authored
      
      Add some basic tests to check that the system works as expected.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      ecc2ed55
    • Masahiro Yamada's avatar
      dm_test: improve the appearance shown by "dm tree" command · a56642c7
      Masahiro Yamada authored
      
      The command "dm tree" lists devices in a tree-like format.
      This commit makes it look more like what the Unix command "tree"
      shows.
      
      => dm tree
       Class       Probed   Name
      ----------------------------------------
       root        [ + ]    root_driver
       demo        [   ]    |-- demo_shape_drv
       demo        [   ]    |-- demo_simple_drv
       demo        [   ]    |-- demo_shape_drv
       demo        [   ]    |-- demo_simple_drv
       demo        [   ]    |-- demo_shape_drv
       test        [   ]    |-- test_drv
       test        [   ]    |-- test_drv
       test        [   ]    |-- test_drv
       gpio        [   ]    |-- gpio_sandbox
       serial      [   ]    |-- serial_sandbox
       serial      [ + ]    |-- serial
       demo        [   ]    |-- triangle
       demo        [   ]    |-- square
       demo        [   ]    |-- hexagon
       gpio        [   ]    |-- gpios
       spi         [   ]    |-- spi@0
       spi_emul    [   ]    |   `-- flash@0
       cros_ec     [ + ]    `-- cros-ec@0
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      a56642c7
  6. Nov 23, 2014
  7. Nov 14, 2014
    • Łukasz Majewski's avatar
      test: ums: Add sleep before unmount directory · fbd3b79d
      Łukasz Majewski authored
      
      This change helps to run script on machines with quite long uptime.
      Without this the following error emerges:
      
      File: ./dat_14M.img
      umount: /mnt/tmp-ums-test: device is busy.
              (In some cases useful info about processes that use
               the device is found by lsof(8) or fuser(1))
      TX: md5sum:083d3d22b542d3ecba61b12d17e03f9f
      mount: /dev/sdd6 already mounted or /mnt/tmp-ums-test busy
      mount: according to mtab, /dev/sdd6 is already mounted on /mnt/tmp-ums-test
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
      fbd3b79d
  8. Nov 07, 2014
  9. Oct 27, 2014
    • Simon Glass's avatar
      test: Add a simple test to detected warnings with uint64_t, uintptr_t · b01495e6
      Simon Glass authored
      
      These types are problematic because they are typically declared in a
      non-standard way in U-Boot. For example, U-Boot uses 'long long' for
      int64_t even on a 64-bit machine whereas stdint.h uses 'long'.
      Similarly, U-Boot always uses 'long' for intptr_t whereas stdint.h mostly
      uses 'int'.
      
      This simple test script runs a few toolchains on a few archs to check for
      warnings.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      b01495e6
    • Simon Glass's avatar
      cli: hush: Adjust 'run' command to run each line of the env var · 87b6398b
      Simon Glass authored
      
      The run command treats each argument an an environment variable. It gets the
      value of each variable and executes it as a command. If an environment
      variable contains a newline and the hush cli is used, it is supposed to
      execute each line one after the other.
      
      Normally a newline signals to hush to exit - this is used in normal command
      line entry - after a command is entered we want to return to allow the user
      to enter the next one. But environment variables obviously need to execute
      to completion.
      
      Add a special case for the execution of environment variables which
      continues when a newline is seen, and add a few tests to check this
      behaviour.
      
      Note: it's not impossible that this may cause regressions in other areas.
      I can't think of a case but with any change of behaviour with limited test
      coverage there is always a risk. From what I can tell this behaviour has
      been around since at least U-Boot 2011.03, although this pre-dates sandbox
      and I have not tested it on real hardware.
      
      Reported-by: default avatarWolfgang Denk <wd@denx.de>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      87b6398b
  10. Oct 24, 2014
  11. Oct 22, 2014
  12. Sep 24, 2014
  13. Aug 28, 2014
    • Simon Glass's avatar
      Correct sandbox filesystem commands in FIT image test · dfe6f4d6
      Simon Glass authored
      
      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: default avatarSimon Glass <sjg@chromium.org>
      dfe6f4d6
Loading