Introduction
Coremark is a cross-platform CPU benchmark tool. I would like to create a Linux boot floppy disk that would boot on a real Intel 80386 machine and then run the coremark. It should support 80386SX with as little as ~8MB of RAM.
** WARNING **: The method described here is tested and failed to work on real machines / 86box. This project is not considered as done, and may be revisited in the future.
Buildroot
The buildroot is used to compile the gcc 5 that will be used to compile the kernel and the coremark. Linux distribution offered compiler doesn't quite work here because:
- We are stuck with Linux 3.2.102 if 386 support is necessary. Linux 3.2 can only be built with gcc 3-5 by default.
- The libc bundled with distribution compiler is unlikely to target i386. This cause issues when trying to link them statically into the build.
Buildroot Config
The last buildroot version that supports 386 is the 2016.02 version. Download, extract and run make menuconfig
.
Set target architecture to i386, and target machine to 386. Set gcc version to 5.x. In bootloaders, select syslinux, image to install is mbr.
Buildroot Patch
There are several patches that is required to build the system correctly, apply them to the buildroot.