From b9662fbe3634af2946f0423a021c4f04c983c169 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 1 Sep 2023 08:30:08 +0100 Subject: [PATCH] handle project downloads in main lbmk script this means the unified /tmp handling is now provided for in both the former "fetch" and "fetch_trees" script, which are now (respectively): ./update project repo ./update project trees if the fetch scripts weren't cleaning /tmp before, they now are, because lbmk handles it Signed-off-by: Leah Rowe --- script/build/coreboot/utils | 2 +- script/build/grub/payload | 2 +- script/build/grub/utils | 2 +- script/build/release/roms | 2 +- script/build/release/src | 4 ++-- script/handle/make/config | 4 ++-- script/handle/make/file | 2 +- script/update/blobs/download | 4 ++-- script/update/blobs/extract | 4 ++-- script/update/blobs/inject | 3 ++- script/update/blobs/mrc | 2 +- fetch => script/update/project/repo | 0 fetch_trees => script/update/project/trees | 0 13 files changed, 16 insertions(+), 15 deletions(-) rename fetch => script/update/project/repo (100%) rename fetch_trees => script/update/project/trees (100%) diff --git a/script/build/coreboot/utils b/script/build/coreboot/utils index bf0c47a7..f7af680b 100755 --- a/script/build/coreboot/utils +++ b/script/build/coreboot/utils @@ -55,7 +55,7 @@ build_for_mainboard() { buildutils() { tree="${1}" [ -d "coreboot/${tree}/" ] || \ - ./fetch_trees coreboot $tree || \ + ./update project trees coreboot $tree || \ err "buildutils: cannot fetch ${tree}" for util in cbfstool ifdtool; do [ -f "cbutils/${tree}/${util}" ] && continue diff --git a/script/build/grub/payload b/script/build/grub/payload index f8a49b64..359fc1f7 100755 --- a/script/build/grub/payload +++ b/script/build/grub/payload @@ -72,7 +72,7 @@ main() handle_dependencies() { [ -d "grub/" ] || \ - ./fetch grub || \ + ./update project repo grub || \ err "handle_dependencies: cannot fetch grub" [ -f "grub/grub-mkstandalone" ] || \ ./build grub utils || \ diff --git a/script/build/grub/utils b/script/build/grub/utils index 3a282f2e..cb80d15d 100755 --- a/script/build/grub/utils +++ b/script/build/grub/utils @@ -27,7 +27,7 @@ set -u -e main() { printf "Building GRUB\n" - [ -d "grub/" ] || ./fetch grub || err "cannot fetch grub" + [ -d "grub/" ] || ./update project repo grub || err "cannot fetch grub" build_grub } diff --git a/script/build/release/roms b/script/build/release/roms index fa27c031..ad789477 100755 --- a/script/build/release/roms +++ b/script/build/release/roms @@ -145,7 +145,7 @@ strip_archive() romdir=${1} [ -d "coreboot/${tree}" ] || \ - ./fetch_trees coreboot ${tree} || \ + ./update project trees coreboot ${tree} || \ err "strip_archive: coreboot/${tree}: can't fetch source" ./build coreboot utils ${tree} || \ err "strip_archive: coreboot/${tree}: can't build utils" diff --git a/script/build/release/src b/script/build/release/src index d72347c3..3067440b 100755 --- a/script/build/release/src +++ b/script/build/release/src @@ -85,11 +85,11 @@ create_release_directory() download_modules() { for modname in ${trees_fetch_list}; do - [ -d "${modname}" ] || ./fetch_trees ${modname} || \ + [ -d "${modname}" ] || ./update project trees ${modname} || \ err "download_modules: couldn't download ${modname} trees" done for modname in ${simple_fetch_list}; do - [ -d "${modname}/" ] || ./fetch ${modname} || \ + [ -d "${modname}/" ] || ./update project repo ${modname} || \ err "download_modules: couldn't download ${modname} repo" done } diff --git a/script/handle/make/config b/script/handle/make/config index 5af7e9e7..e7016c85 100755 --- a/script/handle/make/config +++ b/script/handle/make/config @@ -139,7 +139,7 @@ handle_dependencies() codedir="${project}/${tree}" [ -d "${codedir}" ] || \ - ./fetch_trees "${project}" "${target}" || \ + ./update project trees "${project}" "${target}" || \ fail "handle_dependencies: can't fetch ${project}/${target}" # u-boot and coreboot are both compiled with coreboot's crossgcc @@ -166,7 +166,7 @@ check_cross_compiler() # only true if not building coreboot: ctarget="${cbdir#coreboot/}" [ -d "${cbdir}" ] || \ - ./fetch_trees coreboot ${ctarget} || \ + ./update project trees coreboot ${ctarget} || \ fail "check_cross_compiler: can't fetch coreboot/${ctarget}" if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then diff --git a/script/handle/make/file b/script/handle/make/file index 855ea1c4..dcb2fc6b 100755 --- a/script/handle/make/file +++ b/script/handle/make/file @@ -52,7 +52,7 @@ main() handle_dependencies() { - [ -d "${project}" ] || ./fetch "${project%/*}" || \ + [ -d "${project}" ] || ./update project repo "${project%/*}" || \ err "handle_dependencies: can't fetch ${project%/*}" [ -d "${project}" ] || \ err "handle_dependencies: ${project%/*} not downloaded" diff --git a/script/update/blobs/download b/script/update/blobs/download index 1d18cf7e..f49ab79f 100755 --- a/script/update/blobs/download +++ b/script/update/blobs/download @@ -157,11 +157,11 @@ EOF build_dependencies() { [ -d ${cbdir} ] || \ - ./fetch_trees coreboot ${cbdir##*/} || \ + ./update project trees coreboot ${cbdir##*/} || \ err "build_dependencies: can't fetch ${cbdir}" for d in uefitool biosutilities bios_extract me_cleaner; do [ -d "${d}" ] && continue - ./fetch "${d}" || \ + ./update project repo "${d}" || \ err "build_dependencies: can't fetch ${d}" done [ -f uefitool/uefiextract ] || \ diff --git a/script/update/blobs/extract b/script/update/blobs/extract index c62700f2..ad77abd4 100755 --- a/script/update/blobs/extract +++ b/script/update/blobs/extract @@ -56,10 +56,10 @@ check_board() build_dependencies() { if [ ! -d me_cleaner ]; then - ./fetch me_cleaner || \ + ./update project repo me_cleaner || \ err "build_dependencies: can't fetch me_cleaner" elif [ ! -d "${cbdir}" ]; then - ./fetch_trees coreboot default || \ + ./update project trees coreboot default || \ err "build_dependencies: can't fetch coreboot" elif [ ! -f "${ifdtool}" ]; then make -C "${ifdtool%/ifdtool}" || \ diff --git a/script/update/blobs/inject b/script/update/blobs/inject index 08bbf41a..7efab2a9 100755 --- a/script/update/blobs/inject +++ b/script/update/blobs/inject @@ -123,7 +123,8 @@ detect_board() build_dependencies() { - [ -d "${cbdir}" ] || ./fetch_trees coreboot default + [ -d "${cbdir}" ] || ./update project trees coreboot default || \ + err "build_dependencies: could not download coreboot/default" ./build coreboot utils default || \ err "build_dependencies: could not build cbutils" ./update blobs download ${board} || \ diff --git a/script/update/blobs/mrc b/script/update/blobs/mrc index c069e678..420fa42f 100755 --- a/script/update/blobs/mrc +++ b/script/update/blobs/mrc @@ -71,7 +71,7 @@ check_existing() build_dependencies() { - [ -d "${cbdir}/" ] || ./fetch_trees coreboot default || \ + [ -d "${cbdir}/" ] || ./update project trees coreboot default || \ err "build_dependencies: cannot fetch coreboot/default" ./build coreboot utils default || \ err "build_dependencies: cannot build cbutils/default" diff --git a/fetch b/script/update/project/repo similarity index 100% rename from fetch rename to script/update/project/repo diff --git a/fetch_trees b/script/update/project/trees similarity index 100% rename from fetch_trees rename to script/update/project/trees