diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-02-16 17:37:26 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-02-16 19:11:14 +0100 |
commit | 425162db93c50033df08ada44f3a08142bf1ed12 (patch) | |
tree | b7e01053c381542984582bbed27dd8ff2d546df0 /resources/scripts/build | |
parent | ee2731af4493e0e9510e1a5f9bb48bb91feaddcc (diff) |
boot-libre: add --gen-blob-script to generate a deblob script
This should enable various distributions and build system to reuse
the generated script to deblob u-boot releases themselves.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-x | resources/scripts/build/release/u-boot-libre | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/resources/scripts/build/release/u-boot-libre b/resources/scripts/build/release/u-boot-libre index 30c5a0ab..a871aab7 100755 --- a/resources/scripts/build/release/u-boot-libre +++ b/resources/scripts/build/release/u-boot-libre @@ -71,8 +71,11 @@ append_release_files() print_release_files() { - printf "Source code archives available at:\n" - for file in "${release_files}" ; do + version="$1" + printf "Source code archives for u-boot-libre-%s-%s available at:\n" \ + "${version}" "${revision}" + + for file in ${release_files} ; do printf "\t${file}\n" done } @@ -150,10 +153,40 @@ release_uboot_blobs_list() "${destination}.xz" } +release_uboot_deblob_script() +{ + version="$1" + + deblob_script="$(${topdir}/download u-boot --gen-deblob-script v${version})" + + release_version_dir="${uboot_release_topdir}/${version}-${revision}" + destination="${release_version_dir}/deblob-${version}-${revision}.sh" + + cd "${topdir}" + + rm -rf \ + "${destination}" \ + "${destination}.lz" \ + "${destination}.xz" + + install -m 755 -d "${release_version_dir}" + install -m 644 -T "${blobs_list}" "${destination}" + + lzip -9 --keep -vv "${destination}" + xz -9 --keep -vv "${destination}" + + append_release_files \ + "${destination}" \ + "${destination}.lz" \ + "${destination}.xz" +} + if [ $# -eq 0 ] ; then for version in ${supported_uboot_versions} ; do release_deblobbed_uboot "${version}" release_uboot_blobs_list "${version}" + release_uboot_deblob_script "${version}" + print_release_files "${version}" done exit 0 elif [ $# -eq 1 -a "$1" == "--help" ] ; then @@ -170,6 +203,8 @@ elif [ $# -eq 1 ] ; then if [ "${revision}" = "$1" ] ; then release_deblobbed_uboot "$1" release_uboot_blobs_list "$1" + release_uboot_deblob_script "$1" + print_release_files "$1" exit 0 fi done |