Copy gcc-2.8.1-mips.tar.gz to usr/local directory, and unzip it.
sudo cp gcc-2.8.1-mips.tar.gz /usr/local cd usr/local tar -xvf gcc-2.8.1-mips.tar.gz
Add permission by chmod +rwx filename .
Test
Go back to the Code folder. Here is what we have in Code directory.
ass3 bin lab2 lab5 machine Makefile.dep network threads vm ass4 filesys lab3 lab7-8 Makefile.common monitor test userprog
Go to /test/arch/unknown-i386-linux folder, delete files in folders depends and objects (don’t remove the two folders), and in test, delete all files end in .noff.
Test test
Makefile.
make
If failed, remember to add permission to certain files (_the_directory_name_/bin/arch/unknown-i386-linux/bin/coff2noff & coff2flat) suggested. If success, we got some .noff files in test:
*** thread 0 looped 0 times *** thread 1 looped 0 times *** thread 0 looped 1 times *** thread 1 looped 1 times *** thread 0 looped 2 times *** thread 1 looped 2 times *** thread 0 looped 3 times *** thread 1 looped 3 times *** thread 0 looped 4 times *** thread 1 looped 4 times No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 130, idle 0, system 130, user 0 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0
*** thread 0 looped 0 times *** thread 1 looped 0 times *** thread 0 looped 1 times *** thread 1 looped 1 times *** thread 0 looped 2 times *** thread 1 looped 2 times *** thread 0 looped 3 times *** thread 1 looped 3 times *** thread 0 looped 4 times *** thread 1 looped 4 times No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 1190, idle 1000, system 190, user 0 Disk I/O: reads 2, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0
Cleaning up...
Test vm
Make then run:
*** thread 0 looped 0 times *** thread 1 looped 0 times *** thread 0 looped 1 times *** thread 1 looped 1 times *** thread 0 looped 2 times *** thread 1 looped 2 times *** thread 0 looped 3 times *** thread 1 looped 3 times *** thread 0 looped 4 times *** thread 1 looped 4 times No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 130, idle 0, system 130, user 0 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0
Cleaning up...
Test monitor
Make then run:
No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 590, idle 0, system 590, user 0 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0
Cleaning up...
Test network
Make then run:
*** thread 0 looped 0 times *** thread 1 looped 0 times *** thread 0 looped 1 times *** thread 1 looped 1 times *** thread 0 looped 2 times *** thread 1 looped 2 times *** thread 0 looped 3 times *** thread 1 looped 3 times *** thread 0 looped 4 times *** thread 1 looped 4 times
No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 10, idle 0, system 10, user 0 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0
Cleaning up...
Test lab5
First add a Makefile (copied from lab3), well, forget it…
Test lab7-8
Edit Makefile.local :
# include ../ass2/Makefile.local
Then Make and Run:
*** thread 0 looped 0 times *** thread 1 looped 0 times *** thread 0 looped 1 times *** thread 1 looped 1 times *** thread 0 looped 2 times *** thread 1 looped 2 times *** thread 0 looped 3 times *** thread 1 looped 3 times *** thread 0 looped 4 times *** thread 1 looped 4 times No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!
Ticks: total 130, idle 0, system 130, user 0 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0