-
-
Save jonator/ddd080fa8dcf01a19b87fdda88421124 to your computer and use it in GitHub Desktop.
setup pintos in one fell swoop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you need to cp ~/cis520/pintos/src/utils/pintos-gdb ~/pintos-goodfile | |
mkdir cis520 | |
cd cis520 | |
cp /pub/CIS520/pintos.tgz . | |
mkdir pintos | |
tar xvzf pintos.tgz -C pintos --strip-components=1 | |
# Begin part 2 | |
cd ~/cis520/pintos/src/threads | |
make | |
# Begin part 3 | |
cd ~/cis520 | |
cp /pub/CIS520/tools/bochs-2.4.5.tar.gz . | |
tar xvzf bochs-2.4.5.tar.gz | |
cd bochs-2.4.5 | |
patch -p1 < /pub/CIS520/tools/bochs-2.4.5-jitter.patch | |
cd ~/cis520 | |
mkdir -p usr/local/bin/ | |
cd bochs-2.4.5 | |
./configure --prefix=$(pwd)/cis520/usr/local --enable-gdb-stub --with-x --with-x11 --with-term --with-nogui | |
make | |
make install | |
./configure --enable-debugger --with-x --with-x11 --with-term --with-nogui | |
make | |
cp bochs ~/cis520/usr/local/bin/bochs-dbg | |
# Begin part 4 | |
cd ~ | |
[[ ":$PATH:" != *"$(pwd)/cis520/pintos/src/utils:$(pwd)/cis520/usr/local/bin:"* ]] && PATH="$(pwd)/cis520/pintos/src/utils:$(pwd)/cis520/usr/local/bin:${PATH}" && (echo "export PATH=$(pwd)/cis520/pintos/src/utils:$(pwd)/cis520/usr/local/bin:$PATH" >> ~/.bashrc) | |
[[ ":$BXSHARE:" != *"$(pwd)/cis520/usr/local/share/bochs"* ]] && PATH="$(pwd)/cis520/usr/local/share/bochs:${PATH}" && (echo "export =$(pwd)/cis520/usr/local/share/bochs" >> ~/.bashrc) | |
source ~/.bashrc | |
echo "source ~/.bashrc" >> ~/.bash_profile | |
cp ~/cis520/pintos/src/misc/gdb-macros ~/cis520/usr/local/bin | |
# echo "edit pintos/src/utils/pintos-gdb, change GDBMACROS to point to /home/j/jdeweese1/cis520/usr/local/bin/gdb-macros" | |
# mv ~/pintos-goodfile ~/cis520/pintos/src/utils/pintos-gdb | |
cd ~ | |
sed -i "s|/usr/class/cs140/pintos/pintos/src/misc/gdb-macros|$(pwd)/cis520/usr/local/bin/gdb-macros|g" ~/cis520/pintos/src/utils/pintos-gdb | |
cd ~/cis520/pintos/src/threads | |
printf "\n\n\n\n\n\n\n\n\ntest by running pintos-gdb with no args\n\n\n\n\n\n\n\n\n\n" | |
{ sleep 2; echo "quit"; } | pintos-gdb | |
make | |
printf "\n\n\n\n\n\n\n\n\n\n\n\n\npintos should now be ready to go!\n======================================" | |
cd ~/cis520/pintos/src/threads | |
make | |
cd build | |
pintos -v -- run alarm-multiple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment