mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 17:13:22 -05:00
More mem adjustments, this time to the spin wheel, 1024 for 1, 8192 for 2,
these are great setting for mtdram .. <16M files can use the small adj. >16M should zero down with 3 and increment with 2nd button.
This commit is contained in:
parent
30a11e4bf2
commit
fadcb89061
@ -1662,8 +1662,8 @@ sub uml_box {
|
|||||||
|
|
||||||
# total size
|
# total size
|
||||||
label_advanced("total size:",1,2,5,6,$table_uml);
|
label_advanced("total size:",1,2,5,6,$table_uml);
|
||||||
my $mtd_adj = Gtk::Adjustment->new( 8192.0, 0.0, 1000000000.0, 128.0,
|
my $mtd_adj = Gtk::Adjustment->new( 8192.0, 0.0, 1000000000.0, 1024.0,
|
||||||
1024.0, 0.0 );
|
8192.0, 0.0 );
|
||||||
$mtd_size = Gtk::SpinButton->new( $mtd_adj, 0, 0 );
|
$mtd_size = Gtk::SpinButton->new( $mtd_adj, 0, 0 );
|
||||||
$table_uml->attach($mtd_size,2,3,5,6,
|
$table_uml->attach($mtd_size,2,3,5,6,
|
||||||
['shrink','fill','expand'],['fill','shrink'],
|
['shrink','fill','expand'],['fill','shrink'],
|
||||||
@ -1897,6 +1897,9 @@ sub uml_box {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$mem_size = 16384 * ceil($mtd_total_size / 16384);
|
$mem_size = 16384 * ceil($mtd_total_size / 16384);
|
||||||
|
if ( $total_size == $mem_size ) {
|
||||||
|
$mem_size = $mem_size + 16384;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !$mem ) {
|
if ( !$mem ) {
|
||||||
@ -1906,7 +1909,7 @@ sub uml_box {
|
|||||||
undef $mem;
|
undef $mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Order does matter because used by linuxrc
|
# Order does matter because it's used by linuxrc
|
||||||
$entry_advanced[9] =
|
$entry_advanced[9] =
|
||||||
"mtd=mtdram,$fs_type,$total_size,$erasure_size,, " .
|
"mtd=mtdram,$fs_type,$total_size,$erasure_size,, " .
|
||||||
"$mem $ramdisk_size $initrd " .
|
"$mem $ramdisk_size $initrd " .
|
||||||
@ -1921,9 +1924,9 @@ sub uml_box {
|
|||||||
info(0,"Making $ubd0 backing file\n");
|
info(0,"Making $ubd0 backing file\n");
|
||||||
sys("dd if=/dev/zero of=$ubd0 bs=1k count=1 seek=$total_size");
|
sys("dd if=/dev/zero of=$ubd0 bs=1k count=1 seek=$total_size");
|
||||||
|
|
||||||
# Order does matter because used by linuxrc
|
# Order does matter because it's used by linuxrc
|
||||||
$entry_advanced[9] =
|
$entry_advanced[9] =
|
||||||
"mtd=blkmtd,$fs_type,$total_size,$erasure_size, " .
|
"mtd=blkmtd,$fs_type,$total_size,$erasure_size,, " .
|
||||||
"$initrd " .
|
"$initrd " .
|
||||||
$entry_advanced[9];
|
$entry_advanced[9];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user