diff options
-rw-r--r-- | projects/coreboot/configs/targets | 1 | ||||
-rwxr-xr-x | projects/coreboot/coreboot | 13 | ||||
-rw-r--r-- | projects/crossgcc/configs/targets | 1 | ||||
-rwxr-xr-x | projects/crossgcc/crossgcc | 16 | ||||
-rwxr-xr-x | projects/crossgcc/crossgcc-helper | 15 | ||||
-rw-r--r-- | projects/depthcharge/configs/veyron/targets | 2 | ||||
-rwxr-xr-x | projects/depthcharge/depthcharge | 5 | ||||
-rw-r--r-- | projects/libpayload/configs/depthcharge/veyron/targets | 2 | ||||
-rwxr-xr-x | projects/libpayload/libpayload | 6 |
9 files changed, 39 insertions, 22 deletions
diff --git a/projects/coreboot/configs/targets b/projects/coreboot/configs/targets index d7e90413..5b8e87b0 100644 --- a/projects/coreboot/configs/targets +++ b/projects/coreboot/configs/targets @@ -1 +1,2 @@ depthcharge +seabios diff --git a/projects/coreboot/coreboot b/projects/coreboot/coreboot index 5a3c3c7f..f577ca26 100755 --- a/projects/coreboot/coreboot +++ b/projects/coreboot/coreboot @@ -74,23 +74,12 @@ build() { local crossgcc_bin_path="$crossgcc_build_path/bin/" local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" ) - project_action "build" "crossgcc" "$arch" - if git_project_check "$repository" then git_project_checkout "$project" "$repository" "$payload" "$@" fi - project_action "checkout" "vboot" "devices" - - project_action "build" "$payload" "$@" - - if coreboot_ec_check "$payload" "$@" - then - ec=$( coreboot_ec "$payload" "$@" ) - - project_action "build" "$ec" "$@" - fi + project_action_arguments "checkout" "vboot" "devices" rm -f "$sources_path/.xcompile" diff --git a/projects/crossgcc/configs/targets b/projects/crossgcc/configs/targets index fb05f39d..8c9fb8ba 100644 --- a/projects/crossgcc/configs/targets +++ b/projects/crossgcc/configs/targets @@ -1 +1,2 @@ arm +i386 diff --git a/projects/crossgcc/crossgcc b/projects/crossgcc/crossgcc index 3ad3b7ae..f0d7a5d1 100755 --- a/projects/crossgcc/crossgcc +++ b/projects/crossgcc/crossgcc @@ -123,7 +123,10 @@ prefix() { case $arch in "arm") - printf '%s\n' "$build_path/bin/arm-eabi-" + printf '\n%s\n' "$build_path/bin/arm-eabi-" + ;; + "i386") + printf '\n%s\n' "$build_path/bin/i386-elf-" ;; esac } @@ -145,7 +148,16 @@ build() { mkdir -p "$build_path" - make -C "$sources_path" CPUS="$TASKS" DEST="$build_path" "crossgcc-$arch" + local bootstrap_flag + + if ! crossgcc_same_major_version_test; then + printf '\n%s' 'GCC major versions differ. Bootstrapping' 1>&2 + printf '%s\n\n' ' to avoid potential build failure' 1>&2 + + bootstrap_flag='-b' + fi + + make -C "$sources_path" "$bootstrap_flag" CPUS="$TASKS" DEST="$build_path" "crossgcc-$arch" } build_check() { diff --git a/projects/crossgcc/crossgcc-helper b/projects/crossgcc/crossgcc-helper index 5c4072d2..3891a15c 100755 --- a/projects/crossgcc/crossgcc-helper +++ b/projects/crossgcc/crossgcc-helper @@ -15,6 +15,21 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +crossgcc_same_major_version_test() { + local buildgcc_path="$sources_path/util/crossgcc/buildgcc" + local sources_path="$(project_sources_path "$project" "$repository" "$@")" + + local crossgcc_version="$(sed -rne 's/^GCC_VERSION=(.*)$/\1/p' "$buildgcc_path")" + local host_gcc_version="$(gcc -dumpversion)" + + if [[ "${host_gcc_version%%.*}" -eq "${crossgcc_version%%.*}" ]]; then + + return 0 + else + return 1 + fi +} + crossgcc_tarballs() { local sources_path=$( project_sources_path "$project" "$repository" "$@" ) local install_path="$sources_path/util/crossgcc/tarballs/" diff --git a/projects/depthcharge/configs/veyron/targets b/projects/depthcharge/configs/veyron/targets new file mode 100644 index 00000000..1722192f --- /dev/null +++ b/projects/depthcharge/configs/veyron/targets @@ -0,0 +1,2 @@ +minnie +speedy diff --git a/projects/depthcharge/depthcharge b/projects/depthcharge/depthcharge index ca31d4be..fe64c7d9 100755 --- a/projects/depthcharge/depthcharge +++ b/projects/depthcharge/depthcharge @@ -76,10 +76,7 @@ build() { local arch=$( depthcharge_arch "$@" ) local device=$( depthcharge_device "$@" ) - project_action "build" "crossgcc" "$arch" - project_action "build" "libpayload" "$project" "$@" - - project_action "checkout" "vboot" "devices" + project_action_arguments "checkout" "vboot" "devices" mkdir -p "$build_path" diff --git a/projects/libpayload/configs/depthcharge/veyron/targets b/projects/libpayload/configs/depthcharge/veyron/targets new file mode 100644 index 00000000..1722192f --- /dev/null +++ b/projects/libpayload/configs/depthcharge/veyron/targets @@ -0,0 +1,2 @@ +minnie +speedy diff --git a/projects/libpayload/libpayload b/projects/libpayload/libpayload index fc5f8764..06c239dd 100755 --- a/projects/libpayload/libpayload +++ b/projects/libpayload/libpayload @@ -39,16 +39,14 @@ build() { local build_path=$( project_build_path "$project" "$@" ) local build_install_path="$build_path/install" - local config=$( libpayload_config "$@" ) - local config_path="configs/$config" + local config_name=$( libpayload_config "$@" ) + local config_path="$sources_path/configs/$config_name" local arch=$( libpayload_arch "$@" ) local crossgcc_build_path=$( project_build_path "crossgcc" "$arch" ) local crossgcc_bin_path="$crossgcc_build_path/bin/" - project_action "build" "crossgcc" "$arch" - rm -f "$sources_path/.xcompile" mkdir -p "$build_path" |