@ -92,12 +92,10 @@ my $uml =
$uml->boot();
$uml->boot();
# Make the GID/UID 0 FS
# Make the GID/UID 0 FS
if ( $filesystem =~ /^mkcramfs/ || $filesystem =~ /^genromfs/ ) {
if ( $filesystem =~ /^mkcramfs/ || $filesystem =~ /^genromfs/ ||
$filesystem =~ /^mkfs\.jffs/ ) {
$uml->command("mke2fs -m0 /dev/ubd/1");
$uml->command("mke2fs -m0 /dev/ubd/1");
}
}
elsif ( $filesysem =~ /^genromfs/ ) {
$uml->command("$filesystem");
}
else {
else {
$uml->command("$filesystem /dev/ubd/1");
$uml->command("$filesystem /dev/ubd/1");
}
}
@ -115,7 +113,7 @@ if ( $filesystem =~ /^mkcramfs/ ) {
$uml->command("mount -t hostfs none -o $cram_dir /mnt2");
$uml->command("mount -t hostfs none -o $cram_dir /mnt2");
$uml->command("mkcramfs /mnt1 /mnt2/$cramfs_name");
$uml->command("mkcramfs /mnt1 /mnt2/$cramfs_name");
}
}
if ( $filesystem =~ /^genromfs/ ) {
els if ( $filesystem =~ /^genromfs/ ) {
my $romfs_dir = dirname($mount_point);
my $romfs_dir = dirname($mount_point);
my $root_fs_name = basename($ARGV[1]);
my $root_fs_name = basename($ARGV[1]);
my $romfs_name = "$root_fs_name" . "_romfs";
my $romfs_name = "$root_fs_name" . "_romfs";
@ -123,6 +121,23 @@ if ( $filesystem =~ /^genromfs/ ) {
$uml->command("mount -t hostfs none -o $romfs_dir /mnt2");
$uml->command("mount -t hostfs none -o $romfs_dir /mnt2");
$uml->command("genromfs -d /mnt1 -f /mnt2/$romfs_name");
$uml->command("genromfs -d /mnt1 -f /mnt2/$romfs_name");
}
}
elsif ( $filesystem =~ /^mkfs\.jffs2/ ) {
my $jffs2_dir = dirname($mount_point);
my $root_fs_name = basename($ARGV[1]);
my $jffs2_name = "$root_fs_name" . "_jffs2";
$uml->command("umount /mnt2");
$uml->command("mount -t hostfs none -o $jffs2_dir /mnt2");
$uml->command("mkfs.jffs2 -r /mnt1 -o /mnt2/$jffs2_name -e 0x20000 -p");
}
elsif ( $filesystem =~ /^mkfs\.jffs/ ) {
my $jffs_dir = dirname($mount_point);
my $root_fs_name = basename($ARGV[1]);
my $jffs_name = "$root_fs_name" . "_jffs";
$uml->command("umount /mnt2");
$uml->command("mount -t hostfs none -o $jffs_dir /mnt2");
$uml->command("mkfs.jffs -d /mnt1 -o /mnt2/$jffs_name -e 0x20000 -p");
}
$uml->command("umount /mnt1; umount /mnt2");
$uml->command("umount /mnt1; umount /mnt2");
$uml->halt();
$uml->halt();