Tools: add script to create an update tarball

This script is used to generate the tarball using the PSU image and MANIFEST
usage: generate-psu-tar [OPTION] <parameter>...
Options:
   -i,     --image        <file>      PSU FW image
   -v,     --version      <version>   PSU FW version
   -model, --model        <model>     PSU FW model
   -mf,    --manufacture  <version>   PSU FW manufacture
   -o,     --outfile      <filename>  Outfile name
			              For example : -o psufw.tar
                                      The default outfile name is image.tar,and
                                      "image" is what you input.
   -s,     --sign         <path>      Sign the image. The optional path argument specifies
                                      the private key file. Defaults to the bash variable
                                      PRIVATE_KEY_PATH if available, or else uses the
                                      open-source private key in this script.
   -h,     --help                     Display this help text and exit.

Tested: Use this script to generate the tarball for PSU update.
for example :
./generate-psu-tar -i PSU.hex -v 12-34 -model 432-1
                   -mf LITEON -o test.tar -s /home/chicago/test/private_key

./generate-psu-tar -i PSU.hex -v 12-34 -model 432-1
                   -mf LITEON -o test.tar -s test/private_key

./generate-psu-tar -i PSU.hex -v 12-34 -model 432-1 -mf LITEON -o test.tar -s

./generate-psu-tar -i PSU.hex -v 12-34 -model 432-1 -mf LITEON -o test.tar

./generate-psu-tar -i PSU.hex -v 12-34 -model 432-1 -mf LITEON

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: I50ea116bc6e1e49d7fea3e0974453c442784fbe1
1 file changed
tree: d79170aa9d05160b9e39e213a7cff4a875f21383
  1. service/
  2. src/
  3. test/
  4. tools/
  5. vendor-example/
  6. .clang-format
  7. .gitignore
  8. LICENSE
  9. MAINTAINERS
  10. meson.build
  11. meson_options.txt
  12. README.md
README.md

phosphor-psu-code-mgmt

phosphor-psu-code-mgmt is a service to provide management for PSU code, including:

  • PSU code version
  • PSU code update

Building

meson build/ && ninja -C build

Unit test

  • Run it in OpenBMC CI, refer to local-ci-build.md
  • Run it in OE SDK, run below commands in a x86-64 SDK env:
    meson -Doe-sdk=enabled -Dtests=enabled build/
    ninja -C build/ test  # Meson skips running the case due to it thinks it's cross compiling
    # Manually run the tests
    for t in `find build/test/ -maxdepth 1 -name "test_*"`; do ./$t || break ; done