Use wc to calculate file sizes

Milton pointed out that for the du command the -b and -k options aren't
really compatible. From the man page:

       -b, --bytes
              equivalent to '--apparent-size --block-size=1'

       -k     like --block-size=1K

As a result 'du -bk' will act as if the following args were
used:
	--apparent-size --block-size=1K

However, it's probably not safe to assume this. Fix this by replacing the
use of du with "wc -c". POSIX requires that wc -c prints size of each
input file in bytes so it should be safe (and portable).

Fixes: adf91f58dac9 ("Fix generate-tar on ppc64 hosts")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Change-Id: I1baf96b4c5304a27ddedf3384cf23d2c346134d8
1 file changed
tree: f6770e7044b6d58bfb9c70f895ca062eed776456
  1. m4/
  2. org/
  3. static/
  4. test/
  5. ubi/
  6. .clang-format
  7. .gitignore
  8. activation.cpp
  9. activation.hpp
  10. bootstrap.sh
  11. configure.ac
  12. generate-tar
  13. generate-ubi
  14. image_verify.cpp
  15. image_verify.hpp
  16. item_updater.cpp
  17. item_updater.hpp
  18. item_updater_main.cpp
  19. LICENSE
  20. MAINTAINERS
  21. Makefile.am
  22. msl_verify.cpp
  23. msl_verify.hpp
  24. msl_verify_main.cpp
  25. op-pnor-msl.service
  26. openpower-pnor-update@.service
  27. org.open_power.Software.Host.Updater.service
  28. README.md
  29. utils.cpp
  30. utils.hpp
  31. version.cpp
  32. version.hpp
README.md

openpower-pnor-code-mgmt

OpenPower PNOR (Processor NOR) Code Management provides a set of host software management applications for OpenPower systems. The host firmware is stored on the PNOR chip. More information can be found at Software Architecture or Host Code Update

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.