fix open files issue and bump firesim with various fixes

This commit is contained in:
Sagar Karandikar
2022-10-16 17:19:12 -07:00
parent fb2f83b90c
commit a646044705
3 changed files with 14 additions and 1 deletions

View File

@@ -96,4 +96,5 @@ $RDIR/scripts/gen-tags.sh
cat << EOT >> env.sh
# line auto-generated by $0
conda activate $RDIR/.conda-env
source $RDIR/scripts/fix-open-files.sh
EOT

12
scripts/fix-open-files.sh Normal file
View File

@@ -0,0 +1,12 @@
# first, check if the system allows sufficient limits (the hard limit)
HARD_LIMIT=$(ulimit -Hn)
REQUIRED_LIMIT=16384
if [ "$HARD_LIMIT" -lt "$REQUIRED_LIMIT" ]; then
echo "WARNING: Your system does not support an open files limit (the output of 'ulimit -Sn' and 'ulimit -Hn') of at least $REQUIRED_LIMIT, which is required to workaround a bug in buildroot. You will not be able to build a Linux distro with FireMarshal until this is addressed."
fi
# in any case, set the soft limit to the same value as the hard limit
ulimit -Sn $(ulimit -Hn)