This is a template for minix tasks. Create new repository by clicking "Use this template" button in the upper right corner.
- Go to the
/scriptsdirectory. - In the
.configfile changeusername=ab123456to your student index. This is used to access the students machine and for exporting the solution. - Run
download_image.shscript. This will create/images/base_imagedirectory, download minix.img.xz from students.mimuw.edu.pl and decompress it. You may need to provide your password during this step.
- Run
create_image.shscript. This will create newminix.imgin the/imagesdirectory. Re-running this script always deletes previous image before creating a new one. - Using another terminal run
start_machine.shscript. This will run qemu machine. - Run
set_up_machine.sh. This will set up SSH key on the running machine and install rsync on it. If you don't have a ssh key, you may need to generate it using ssh-keygen. - Run
sync_machine.shscript to sync local/usrand/testswith the running machine.
Edit minix source code in the /sources/task/usr directory and other programs in the /tests directory.
Sync changes with the running machine using sync_machine.sh script. Install changes using reinstall_machine.sh script.
If something went wrong, you can always create new image as in Creating new image section.
To create ab123456.patch file, use create_patch.sh script.
Apply patch to the newly craeted minix machine using apply_patch.sh.
Applying may fail if the running machine's files differ from original source.
Minix sometimes crashes/freezes during ssh operations.
Memory limit can be inceased to reduce the likelihood of it by setting bigger value for -m flag in qemu-system-x86_64 command inside start_machine.sh script.
You can edit reinstall_machine.sh script to remove some make && make install commands if the current task does not involve all of the directories.
ssh -p "${ssh_port}" root@localhost << EOF
cd /usr/src
make includes
cd /usr/src/minix/fs/procfs
make && make install
cd /usr/src/minix/servers/pm
make && make install
cd /usr/src/minix/drivers/storage/ramdisk
make && make install
cd /usr/src/minix/drivers/storage/memory
make && make install
cd /usr/src/lib/libc
make && make install
cd /usr/src/releasetools
make do-hdboot
echo "Rebooting. You can exit with Ctrl+C"
reboot
EOFWorkflow inspired by LAB 1 minix_source.tar.xz on the SO2021 lab website.