|
|
@ -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(); |
|
|
|
|
|
|
|