1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-02-23 17:13:22 -05:00

This pretty much covers it, have both mtdram and blkmtd working, just need to

figure out where Initrd.gz will be stored.
This commit is contained in:
freesource 2002-03-06 20:30:06 +00:00
parent 7fcb2ca973
commit 6b3eda4286

View File

@ -1772,7 +1772,7 @@ sub uml_box {
# Everything becomes an option for Initrd to parse # Everything becomes an option for Initrd to parse
# and is put on the options[9] line # and is put on the options[9] line
my ($initrd, $ram, $mem, $root, $ramdisk_size); my ($initrd, $ram, $mem, $root, $ramdisk_size, $ubd0);
for ( $entry_advanced[10],$entry_advanced[9] ) { for ( $entry_advanced[10],$entry_advanced[9] ) {
@ -1798,6 +1798,15 @@ sub uml_box {
$initrd = $1; $initrd = $1;
} }
# Grab the file being used
if ( m,(ubd0=[/\d\w-]+), ) {
my $ubd0_replacement = $1;
$ubd0 = (split(/=/,$1))[1];
chomp $ubd0;
$ubd0 = $ubd0 . "_dd";
s/$ubd0_replacement/ubd0=$ubd0/;
}
if ( $mtd_radio_mtdram->get_active() ) { if ( $mtd_radio_mtdram->get_active() ) {
# Check for the existence mem= # Check for the existence mem=
@ -1881,8 +1890,10 @@ sub uml_box {
undef $mem; undef $mem;
} }
$entry_advanced[9] = "$initrd $mem $ramdisk_size " . # Order does matter because used by linuxrc
"mtd=mtdram,$fs_type,$total_size,$erasure_size " . $entry_advanced[9] =
"mtd=mtdram,$fs_type,$total_size,$erasure_size,, " .
"$mem $ramdisk_size $initrd " .
$entry_advanced[9]; $entry_advanced[9];
} }
@ -1890,8 +1901,14 @@ sub uml_box {
# blkmtd # blkmtd
else { else {
$entry_advanced[9] = "$initrd " . # Make backing file
"mtd=blkmtd,$fs_type,$total_size,$erasure_size " . info(0,"Making $ubd0 backing file\n");
sys("dd if=/dev/zero of=$ubd0 bs=1k count=1 seek=$total_size");
# Order does matter because used by linuxrc
$entry_advanced[9] =
"mtd=blkmtd,$fs_type,$total_size,$erasure_size, " .
"$initrd " .
$entry_advanced[9]; $entry_advanced[9];
} }