diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 5340cc8..b0aaa60 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -1489,12 +1489,28 @@ sub create_expect_uml { } - if ( $fs_type eq "mkcramfs" || $fs_type eq "genromfs" ) { + if ( $fs_type eq "mkcramfs" || $fs_type eq "genromfs" || + $fs_type eq "mkfs.jffs" || $fs_type eq "mkfs.jffs2") { # Will just keep appending _cramfs .. leaving it to the # user to realize this is happening, that way the user # has control over the dd file. - $fs_type eq "mkcramfs" ? ($device = $device . "_cramfs") : - ($device = $device . "_romfs"); +## $fs_type eq "mkcramfs" ? ($device = $device . "_cramfs") : +## ($device = $device . "_romfs"); + + if ( $fs_type eq "mkcramfs" ) { + $device = $device . "_cramfs"; + } + elsif ( $fs_type eq "genromfs" ) { + $device = $device . "_romfs"; + } + # These guys just get written over, but that is o.k. + elsif ( $fs_type eq "mkfs.jffs" ) { + $device = $device . "_jffs"; + } + elsif ( $fs_type eq "mkfs.jffs2" ) { + $device = $device . "_jffs2"; + } + my $cramfs_name = basename($device); # If somebody closes ARS, this won't get updated, # but that is a minor matter. diff --git a/BootRoot/YardBox.pm b/BootRoot/YardBox.pm index 521c9cc..82b9c5f 100644 --- a/BootRoot/YardBox.pm +++ b/BootRoot/YardBox.pm @@ -490,15 +490,17 @@ sub file_system { # usinng uml_exlusively else { my %uml_helper_fs_types = qw(mke2fs 1 mkcramfs 1 genromfs 1 - mkfs.minix 1 mkminix 1 - mkreiserfs 1); + mkfs.minix 1 mkminix 1 + mkreiserfs 1 mkfs.jffs 1 + mkfs.jffs2 1); if ( !$uml_helper_fs_types{$executable} ) { error_window("ROOT_FS_HELPER ERROR: " . "These are supported " . "make fs commands:\n\nmke2fs mkcramfs" . - " genromfs mkfs.minix mkminix mkreiserfs"); + " genromfs mkfs.minix mkminix mkreiserfs" . + " mkfs.jffs mkfs.jffs2"); return; } diff --git a/Changes b/Changes index 775601a..3ee9145 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ + +Added jffs/jffs2 image construction. + 1.3.5 - 02/13/2002 ------------------ diff --git a/expect_uml b/expect_uml index d354434..a99de3c 100755 --- a/expect_uml +++ b/expect_uml @@ -92,12 +92,10 @@ my $uml = $uml->boot(); # 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"); } -elsif ( $filesysem =~ /^genromfs/ ) { - $uml->command("$filesystem"); -} else { $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("mkcramfs /mnt1 /mnt2/$cramfs_name"); } -if ( $filesystem =~ /^genromfs/ ) { +elsif ( $filesystem =~ /^genromfs/ ) { my $romfs_dir = dirname($mount_point); my $root_fs_name = basename($ARGV[1]); 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("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->halt();