ed2ac23c5b
Provides the API and modules for a modular initramfs. The currently included modules are: * initramfs-module-debug adds support to dynamic debugging of initramfs using bootparams * initramfs-module-udev: enables udev usage * initramfs-module-mdev: enables mdev usage * initramfs-module-e2fs: adds support for ext4, ext3 and ext2 filesystems (From OE-Core rev: 7b69ad2167a1f0e57db82817b98a0cbcb70a0dd3) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
542 B
Bash
Executable file
29 lines
542 B
Bash
Executable file
#!/bin/sh
|
|
# Copyright (C) 2011 O.S. Systems Software LTDA.
|
|
# Licensed on MIT
|
|
|
|
e2fs_enabled() {
|
|
return 0
|
|
}
|
|
|
|
e2fs_run() {
|
|
filesystems="ext4 ext3 ext2"
|
|
|
|
# load modules
|
|
for fs in $filesystems; do
|
|
load_kernel_module $fs
|
|
done
|
|
|
|
for fs in $filesystems; do
|
|
eval "fs_options=\$bootparam_${fs}"
|
|
if [ -n "$fs_options" ]; then
|
|
dev=`expr "$fs_options" : '\([^:]*\).*'`
|
|
path=`expr "$fs_options" : '[^:]*:\([^:]*\).*'`
|
|
|
|
info "Mounting $dev as $fs on $path as $fs..."
|
|
mkdir -p $path
|
|
mount -t $fs $dev $path
|
|
fi
|
|
done
|
|
}
|