|
AquilaOS documentation
How it works, and its code
|
initramfs: the root filesystem from the RAM disk the boot loader loaded. More...
#include <core/system.h>#include <core/string.h>#include <core/panic.h>#include <mm/mm.h>#include <dev/ramdev.h>#include <fs/vfs.h>#include <fs/initramfs.h>#include <fs/devfs.h>#include <fs/posix.h>#include <aquila/errno.h>#include <ds/queue.h>#include <boot/boot.h>Go to the source code of this file.
Functions | |
| int | initramfs_archiver_register (struct fs *fs) |
| Registers a filesystem that can make a root from a RAM disk archive. | |
| int | load_ramdisk (module_t *module) |
| Mounts the RAM disk as the root filesystem. | |
Variables | |
| static struct vnode * | rd_dev = NULL |
| static struct queue * | archivers = QUEUE_NEW() |
initramfs: the root filesystem from the RAM disk the boot loader loaded.
The RAM disk is an archive; each archiver (cpiofs, the only one) is asked in turn to make a filesystem from it, and the first that can becomes the root.
Definition in file initramfs.c.
| int initramfs_archiver_register | ( | struct fs * | fs | ) |
Registers a filesystem that can make a root from a RAM disk archive.
| fs | the filesystem, whose load operation reads the archive |
Definition at line 32 of file initramfs.c.
References archivers, initramfs_archiver_register(), fs::name, and printk().
Referenced by cpio_init(), and initramfs_archiver_register().
| int load_ramdisk | ( | module_t * | module | ) |
Mounts the RAM disk as the root filesystem.
The kernel can't go on without a root: if no archiver can read the RAM disk, it panics.
| module | the boot loader's module that holds the RAM disk |
Definition at line 49 of file initramfs.c.
References archivers, DEV, devfs, vnode::fs, kmalloc(), fs::load, load_ramdisk(), M_ZERO, vnode::mode, NULL, panic, printk(), queue_for, rd_dev, rd_size, vnode::rdev, vnode::size, and vfs_mount_root().
Referenced by kmain(), and load_ramdisk().
Definition at line 24 of file initramfs.c.
Referenced by initramfs_archiver_register(), and load_ramdisk().
Definition at line 23 of file initramfs.c.
Referenced by load_ramdisk().