Endeavours with Minix 3 and SMP
Running Minix 3 in Oracle VirtualBox is pretty straight forward. Running the development version of Minix 3 is also simple. Download and install the current release candidate, e.g. minix_R3.4.0rc4-72e11e2.iso.bz2.
Next, we should grab the source code and rebuild the system:
pkgin up pkgin_sets # answer y to each question cd /usr git clone git://git.minix3.org/minix src cd src make build 2>&1 | tee -a make-build-20170213.txt
On my home computer this took 35-40 minutes, and on my desktop computer at work this took 55 minutes.
Reboot the VM to take advantage of the newly installed system.
shutdown -r now Upgrading to the latest Minix 3-CURRENT.; exit
With our new system up & running, we should try building a system with SMP support enabled. I followed the “old” instructions.
cd /usr/src export CONFIG_SMP=y export CONFIG_MAX_CPUS=4 make build 2>&1 | tee -a make-build-SMP-20170213.txt
After a while the compiler complained about whatever bitchunk_t
means while compiling minix/lib/libsys/rmib.c
. See line 17 of minix/include/minix/bitmap.h
.
I started looking around the source tree for clues. After many false attempts, I patched minix/include/minix/drivers.h
as follows:
diff --git a/minix/include/minix/drivers.h b/minix/include/minix/drivers.h index da94fef..80e381c 100644 --- a/minix/include/minix/drivers.h +++ b/minix/include/minix/drivers.h @@ -9,6 +9,9 @@ #define _NETBSD_SOURCE 1 /* tell headers to include MINIX stuff */ #define _SYSTEM 1 /* get negative error number in <errno.h> */ +#include <sys/types.h> +#include <limits.h> + /* The following are so basic, all the *.c files get them automatically. */ #include <minix/config.h> /* MUST be first */ #include <minix/bitmap.h>
Rerun the build and cross your fingers:
make build 2>&1 | tee -a make-build-SMP-20170213.txt
The build finally went well, but the subsequent restart failed miserably, the VM hung itself.
Reset the VM, select the previous non-SMP build from the boot menu. Adjust the /boot/minix_latest
symlink to point to the non-SMP build and be content with that.
Come back again later and see if anything has changed.