dl_tarball: Add special support for ice comms ddp fw

This is a firmware package for Intel Ice NIC hardware,
addressing dynamic device personalization for the
communications market.

Intel likes their zips of zips, causing us to have to
perform an extra extraction step to get the zip file
that we want.

Verification:
Success Path
- create a test .lst file with just the entry for the
  intel ice comms ddp firmware in it
- run the dl_tarball.sh script against the test .lst file
- verify that the ice_comms zip file is successfully
  produced in the proper directory
- verify that the wrapper zip file is also left in the
  proper directory
Failure Path
- modify test .lst so that the url to the wrapper zip
  is no longer valid
- verify that the script reports the download error
  properly and handles it properly

Story: 2009823
Task: 44410

Change-Id: I2f8229d9a67ca986c4ad97049e8abf141cd07895
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
This commit is contained in:
Jim Somerville 2022-02-02 17:51:47 -05:00
parent 38afa75cc7
commit 3e9d564404

View File

@ -315,6 +315,21 @@ for line in $(cat $tarball_file); do
# rm -f "$tarball_name" # rm -f "$tarball_name"
rm -rf "$directory_name" rm -rf "$directory_name"
elif [[ "${tarball_name}" = '800-Series-DDP-Comms-Package-1.3.31.0.zip' ]]; then
download_file --quiet "${tarball_url}" "${tarball_name}"
if [ $? -ne 0 ]; then
echo "Warning: failed to download '${tarball_url}'"
error_count=$((error_count + 1))
popd > /dev/null # pushd $output_tarball
continue
fi
# Just extract exactly what we want, leaving no garbage behind to cleanup
unzip "${tarball_name}" ice_comms-1.3.31.0.zip
# Don't delete the original zip archive we just extracted from.
# We don't use it, but it will prevent re-downloading this file.
# rm -f "${tarball_name}"
elif [[ "$tarball_name" = 'MLNX_OFED_SRC-5.0-2.1.8.0.tgz' ]]; then elif [[ "$tarball_name" = 'MLNX_OFED_SRC-5.0-2.1.8.0.tgz' ]]; then
srpm_path="${directory_name}/SRPMS/" srpm_path="${directory_name}/SRPMS/"
download_package "$tarball_name" "$tarball_url" download_package "$tarball_name" "$tarball_url"