Zheng Bao (zheng.bao@amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11474
-gerrit
commit a13a77e0c957a53f6b2012b8cb95e6a4dcedc927 Author: zbao fishbaozi@gmail.com Date: Tue Sep 1 22:31:08 2015 -0400
buildgcc: Check free disk and warn if its size is too small
We can only warn and can not stop building, because if the user saves the temp file the last time, the space might be enough.
3G is an estimated size, which is required when I build i386-elf.
Change-Id: Iae988300937018f166ff626b75c3a16bfa757ad9 Signed-off-by: Zheng Bao zheng.bao@amd.com Signed-off-by: Zheng Bao fishbaozi@gmail.com --- util/crossgcc/buildgcc | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index bbf01b9..0ed9a39 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -290,6 +290,11 @@ cleanup() printf "${green}ok${NC}\n" }
+freedisk() { + avail=$(LC_ALL=C eval df -k ./ | sed 1d | awk '{print $4}') + test $avail -lt 3145728 && printf "${red}WARNING: There might be not enough space.${NC}\n" +} + myhelp() { printf "Usage: $0 [-V] [-c] [-p <platform>] [-d <target directory>] [-D <dest dir>] [-C] [-G] [-S]\n" @@ -585,6 +590,7 @@ case "$PACKAGE" in ;; esac
+freedisk # Find all the required tools:
TAR=$(searchtool tar) || exit $?