FreeBSD on non-fpu device
hsu at wlansystems.com
Sat Jan 19 16:56:51 PST 2008
There is very low cost microscopic PC (see eBOX 2300 and eBOX 2300SX
www.compactpc.com.tw), which previously run FreeBSD fine, being based on
Vortex86 cpu on Sis SoC chip 550. Unfortunately the manufacturer
switched to a new SoC cpu which is 486SX derivative without FPU. This
does not work with FreeBSD.
Why anyone would be interested? The eBOX 2300SX cpu is a SoC device,
which is by far the lowest power consumption I have seen, and this is
probably cheapest computer on the market, still suitable for number of
applications. While it is not exactly a speed daemon, it works well
enough for all kinds of mp3-playing, small servers and control applications.
Linux is known to work but also requires extra drivers and possibly some
patches, and apparently most current distributions do not have math
emulation on by default.
FreeBSD 4.11 install CD does boot on this thing, and might work, but
failed to detect neither the ethernet nor external USB DVD drive I was
using for install, so I would not go forward on actually getting the OS
to the hard disk.
Now, I was wondering if FreeBSD could be actually run on these things,
by compiling the kernel and world with -msoft-float CFLAGS on another
computer? This might work iff:
- there is no assembly code utilizing fpu instructions.
- there is nothing in the world requiring some other compilers than gcc,
or compilers without -msoft-float option. However, I am under
assumption that all the world is compiled with gcc? It may be necessary
to change calling conventions as well, that might break other other things.
- Possibly -mno-fp-ret-in-387 may be needed - any experiences?
Now, has anyone ever tried this? Is this hopeless? What goes wrong?
Alternatively, porting MATH_EMULATE back from NetBSD etc might be an
option, but might be a larger task, and apparently NetBSD math emulation
did not work out of box either (seems to be a cpu detection bug, based
on mailing list discussions).
There are other issues with the device, drivers etc, but that is less
We can donate hardware to someone who wants to have a go on getting this
device running FreeBSD.
More information about the freebsd-hackers