From e7024eff9a54919e792d7952323dbc16093d3766 Mon Sep 17 00:00:00 2001 From: Andreas Gnau <andreas.gnau@iopsys.eu> Date: Mon, 11 Jan 2021 12:05:58 +0100 Subject: [PATCH] bcmkernel: bcm_git: Rudimentary support for WLAN tarballs Add rudimentary support for adding and merging WIFI tarballs. No support was added for ordering and parsing the filenames, so right now one has to manually call the bash-functions with the right arguments by modifying the script. --- bcmkernel/scripts/bcm_git.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/bcmkernel/scripts/bcm_git.sh b/bcmkernel/scripts/bcm_git.sh index d764c72..e4504d0 100755 --- a/bcmkernel/scripts/bcm_git.sh +++ b/bcmkernel/scripts/bcm_git.sh @@ -146,6 +146,7 @@ import_module() # XXX: These special cases can be generalized and the cd-ing can be avoided # XXX: maybe check that README in outer tar matches what we expect, so we get notified # when the script needs updating for new instructions. Overkill or useful sanity check? + local wlan_impl_hint= case ${module} in "data_full_release") tar_src=$( basename $tar | sed -e "s/${module}/data_src/") @@ -185,7 +186,24 @@ import_module() done ) ;; - + wlan-all-src-*|wlan-bin-all-*) + # WLAN binaries and sources are versioned separately. So, the "module" is something + # like wlan-all-src-17.10.157.2802 for a tarball like wlan-all-src-17.10.157.2802.cpe5.04L.02.tgz. + # There can be multiple WLAN drivers implementations (impls) applied to the same release. + # When having two version numbers, if the first three components of the version number are identical, + # then that tarball most likely contains the same impl, but that is just an observation. + + # determine which impl this tarball contains (for commit message with parentheses and trailing space) + shopt -s failglob + wlan_impl_hint="(wl $(cd $repo/git_tmp/bcmdrivers/broadcom/net/wl && echo impl*)) " + shopt -u failglob + echo "$module contains wl driver $wlan_impl_hint" + + # wlan tarballs are to be extracted over the existing tree (minus the readme, if it exists) + rm -f $repo/git_tmp/readme.txt + # move the files + rsync -a "$repo/git_tmp/" "$repo/bcm963xx/" + ;; *) echo -e "\t ${module} from ${tar} not supported" return 1 @@ -214,7 +232,7 @@ import_module() git -C ${repo} tag bcm_${version}_t ;; *) - ( echo "Add ${module} to release ${version}" + ( echo "Add ${module} ${wlan_impl_hint}to release ${version}" echo echo "Filename: ${tar}" echo "SHA256: ${tar_sha256}" -- GitLab