Monday, October 15, 2007

Prex - Real Time Embedded OS

Designed based on micro kernel architecture, Prex is targeted for embedded system application. It also follows the POSIX standard, so many applications can be easily ported to the os environment.
I decided to try it on qemu. The latest stable version is 0.3.0 (floppy image), while the current version is 0.5.0 (source).
Now, build the 0.5.0 source:
tar zxvf prex-0.5.0.tar.gz
cd prex-0.5.0/
./configure --target=i386-pc
make
It will generate an image file 'prexos' in the current directory. The image file is not bootable by qemu. In order to run it via qemu, we have to make use the available floppy image, and replace it with the latest version. Basically, the image file consists of bootsector.bin which is located in the first sector and the prexos image in the root directory. Meaning, we have to replace the prexos image from the latest stable 0.3.0 with the recently compiled 0.5.0.
Now, after extracting prex-0.3.0.i386-pc.img.gz, we get prex-0.3.0.i386-pc.img. As a root, we have to modify /etc/mtools.conf, such that we emulate the image as the DOS a drive:
kedit /etc/mtools.conf &
Replace
drive a: file="/dev/fd0" exclusive
with
drive a: file="[directory of the floppy image]/prex-0.3.0.i386-pc.img" exclusive
Now we replace the older 0.3.0 image with the new one using the mcopy command :
cd prex-0.5.0/
mcopy prexos a:

Long file name "prexos" already exists.
a)utorename A)utorename-all r)ename R)ename-all o)verwrite O)verwrite-all
s)kip S)kip-all q)uit (aArRoOsSq):
type o (overwrite).
Now, we're ready to boot the image with the latest kernel version.
qemu -fda prex-0.3.0.i386-pc.img
Here's a screenshot:

No comments: