From f48397a0bc930b0edbc31709d45c037f0b8b34ec Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 22 Nov 2018 16:42:49 -0500 Subject: Remove libpayload's veyron subtarget targets file There's no need to build for each supported veyron model since the libpayload veyron config is just for veyron in general. --- projects/libpayload/configs/depthcharge/veyron/targets | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 projects/libpayload/configs/depthcharge/veyron/targets (limited to 'projects') diff --git a/projects/libpayload/configs/depthcharge/veyron/targets b/projects/libpayload/configs/depthcharge/veyron/targets deleted file mode 100644 index 1722192f..00000000 --- a/projects/libpayload/configs/depthcharge/veyron/targets +++ /dev/null @@ -1,2 +0,0 @@ -minnie -speedy -- cgit v1.2.3-70-g09d2 From 84c7f3d68de6f4e882c1c4a1666e6807cfd7a7e0 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Thu, 22 Nov 2018 18:00:33 -0500 Subject: Add function depthcharge_libpayload_build_path() This function will return the correct build path for libpayload built for depthcharge targets nyan and veyron. Without this function, and using project_build_path() instead, LIBPAYLOAD_DIR would be set to "$root/$BUILD/libpayload-depthcharge-nyan-big" instead of the proper "$root/$BUILD/libpayload-depthcharge-nyan", for example. --- projects/depthcharge/depthcharge | 2 +- projects/depthcharge/depthcharge-helper | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'projects') diff --git a/projects/depthcharge/depthcharge b/projects/depthcharge/depthcharge index 966b9689..dee1f555 100755 --- a/projects/depthcharge/depthcharge +++ b/projects/depthcharge/depthcharge @@ -69,7 +69,7 @@ build() { local sources_path=$(project_sources_path "$project" "$repository" "$@") local build_path=$(project_build_path "$project" "$@") - local libpayload_build_path=$(project_build_path "libpayload" "$project" "$@") + local libpayload_build_path=$(depthcharge_libpayload_build_path "$project" "$@") local libpayload_build_install_path="$libpayload_build_path/install" local vboot_sources_path=$(project_sources_path "vboot" "vboot" "devices") diff --git a/projects/depthcharge/depthcharge-helper b/projects/depthcharge/depthcharge-helper index 440fe0fe..d389fb97 100755 --- a/projects/depthcharge/depthcharge-helper +++ b/projects/depthcharge/depthcharge-helper @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Copyright (C) 2016 Paul Kocialkowski +# Copyright (C) 2018 Andrew Robbins # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,3 +25,22 @@ depthcharge_arch() { depthcharge_device() { arguments_concat "_" "$@" } + +depthcharge_libpayload_build_path() { + local project='libpayload' + local build_path="$root/$BUILD/$project" + + local argument + + for argument in "$@"; do + build_path="$build_path-$argument" + + if [[ -d $build_path ]]; then + break + else + continue + fi + done + + printf '%s\n' "$build_path" +} -- cgit v1.2.3-70-g09d2