[okl4-developer] File system functionality

Hal Ashburner hala at ok-labs.com
Tue Oct 30 12:34:51 EST 2007


On Mon, 2007-10-29 at 20:57 -0400, Jorge Torres wrote:
> Hi,

> I think the rootfs is mainly for you to specify you wombat's init. 

The rootfs is indeed for OKLinux, which can't actually boot without one.
You'll notice dev.txt which is used to populate the /dev
directory. /etc/init.d/rcS /etc/inittab are also obviously required,
then you're going to need some binaries that run on top of OKLinux. For
the most part we keep this to the bare minimum, which is busybox and a
bunch of symlinks to it. This gives you init, sh, ls, cat, more, etc.
Some of which are also required to boot.

OKLinux obviously has many filesystems, ext2 is the one that is used by
default. It doesn't use disk or flash but instead uses a ramdisk.

It is possible to enable the OKLinux drivers. On ia32 they are actually
enabled by default so you can mount your disk by doing something like

# mount /dev/hda1 /mnt
# pivot_root . /mnt
# chroot .
# mount /sys sysfs sys
# mount /proc proc proc

And you can read and write your ide disk, assuming appropriate
formatting etc.

With a bit of playing you can probably turn on any device driver that
doesn't require DMA. Enabling DMA will take a little bit of hacking to
get going, but is possible.

Alternatively you can write a disk driver for iguana & a stub driver for
OKLinux such that OKLinux apps and iguana apps can both share access to
the disk. Then write or port a filesystem to iguana and you're good to
go.

Hal





More information about the Developer mailing list