This adds romfs capability.

This commit is contained in:
freesource
2001-12-21 18:05:07 +00:00
parent c388d93b8c
commit 79ceb15b1f
2 changed files with 19 additions and 7 deletions
+12 -1
View File
@@ -47,9 +47,12 @@ my $uml =
$uml->boot();
# Make the GID/UID 0 FS
if ( $filesystem =~ /^mkcramfs/ ) {
if ( $filesystem =~ /^mkcramfs/ || $filesystem =~ /^genromfs/ ) {
$uml->command("mke2fs -m0 /dev/ubd/1");
}
elsif ( $filesysem =~ /^genromfs/ ) {
$uml->command("$filesystem");
}
else {
$uml->command("$filesystem /dev/ubd/1");
}
@@ -67,6 +70,14 @@ if ( $filesystem =~ /^mkcramfs/ ) {
$uml->command("mount -t hostfs none -o $cram_dir /mnt2");
$uml->command("mkcramfs /mnt1 /mnt2/$cramfs_name");
}
if ( $filesystem =~ /^genromfs/ ) {
my $romfs_dir = dirname($mount_point);
my $root_fs_name = basename($ARGV[1]);
my $romfs_name = "$root_fs_name" . "_romfs";
$uml->command("umount /mnt2");
$uml->command("mount -t hostfs none -o $romfs_dir /mnt2");
$uml->command("genromfs -d /mnt1 -f /mnt2/$romfs_name");
}
$uml->command("umount /mnt1; umount /mnt2");
$uml->halt();