In https://github.com/ucb-bar/chipyard/pull/876#issuecomment-831639151
it was requested that we add a note to build-toolchains.sh saying that the
url rewrites can be removed. I went a step further and made it self-checking.
Once qemu is bumped far enough that none of it's submodules come from
git.qemu.org, then the test added in this commit will fail CI during the bump PR
and everyone will be reminded to remove the url renaming rules and change
module_build back to module_all for qemu.
Co-authored-by: Tim Snyder <snyder.tim@gmail.com>
git.qemu.org seems to be down or under heavy load. Latest qemu
seems to have changed it's .gitmodules to use gitlab. Since we're
using a github.com mirror, when cloning qemu use rewrite rules to
use github instead of git.qemu.org. Also install the rewrite rules
recursively into the local config of qemu and it's submodules so
that any further git commands done interactively by the user
will also use github.
Co-authored-by: Tim Snyder <snyder.tim@gmail.com>
Ubuntu does not ship with curl by default any more. If we are to use
curl to install SBT's required information, we must ensure it is
available for use on Ubuntu.
Ubuntu 20.04 LTS (the most recent LTS release) stopped shipping Python
3.6 in their default repositories.
Upping it to Python 3.8 does not seem to have broken the
design/elaboration process. I tested re-building Chipyard and all its
dependencies using this new version, and everything appears to have
remained the same.
* Runs `make clean` after `make-install` to reduce used disk
Make install leaves many .o and other files
Fixes problems with disk space on github actions runner
* Create a flag --clean-after-install that can be passed as the second argument to `make_build` function.
* Create a flag --clean-after-install that can be passed as the second argument to `make_build` function.
Ups tools-cache-version to v7
* Now running clean after install just depends on adding an environment variable when using scripts
that call `module_make` or `module_build`. Those two bash functions will check CLEANAFTERINSTALL and if
it is non-empty, they will call `make clean` after other `make` calls.
* build-toolchains.sh gets new flag
--clean-after-install to turn enable
`make clean` in `module_make` and `module_run`
elf2hex writes zeros to a segment for which MemSize > FileSize, which adheres to the ELF spec.
Thus, we should calculate the total size of the file from the MemSize of the last segment, rather than the FileSize.