KallistiOS git master
Independent SDK for the Sega Dreamcast
|
ROMFS virtual file system. More...
Go to the source code of this file.
Functions | |
int | fs_romdisk_mount (const char *mountpoint, const uint8 *img, int own_buffer) |
Mount a ROMFS image as a new filesystem. | |
int | fs_romdisk_unmount (const char *mountpoint) |
Unmount a ROMFS image. | |
ROMFS virtual file system.
This file contains support for the romdisk VFS. This VFS allows you to make Linux-style ROMFS images and either embed them into your binary or load them at runtime from some other source (such as a CD-ROM). These images are made with the genromfs program that is included in the utils portion of the tree.
You can choose to automount one ROMFS image by embedding it into your binary and using the appropriate flags (INIT_DEFAULT by itself or INIT_FS_ROMDISK with other flags) when calling the KOS_INIT_FLAGS() macro with a custom flag selection. The embedded ROMFS will mount itself on /rd.
Mounting additional images that you load from some other sources (such as a modified BIOS) on whatever mountpoint you want, is also possible. Using fs_romdisk_mount() and passing a pointer to the location of a romdisk image will mount it.
A romdisk filesystem image can be created by adding "KOS_ROMDISK_DIR=" to your Makefile and pointing it to the directory contaning all the resources you wish to have embeded in filesystem image. A rule to create the image is provided in the rules provided in Makefile.rules, the created object file must be linked with your binary file by adding romdisk.o to your list of objects.