mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 17:13:22 -05:00
A few more improvements to the mtd code to handle memory better 16M increments
for mtdram, will probably do a similiar thing for blkmtd which appears to be exponential 16 32 64 etc .. ofcourse at 128 things can get narly.
This commit is contained in:
parent
6b3eda4286
commit
30a11e4bf2
@ -1800,11 +1800,18 @@ sub uml_box {
|
|||||||
|
|
||||||
# Grab the file being used
|
# Grab the file being used
|
||||||
if ( m,(ubd0=[/\d\w-]+), ) {
|
if ( m,(ubd0=[/\d\w-]+), ) {
|
||||||
my $ubd0_replacement = $1;
|
if ( $1 !~ /_dd/ ) {
|
||||||
$ubd0 = (split(/=/,$1))[1];
|
my $ubd0_replacement = $1;
|
||||||
chomp $ubd0;
|
$ubd0 = (split(/=/,$1))[1];
|
||||||
$ubd0 = $ubd0 . "_dd";
|
chomp $ubd0;
|
||||||
s/$ubd0_replacement/ubd0=$ubd0/;
|
$ubd0 = $ubd0 . "_dd";
|
||||||
|
s/$ubd0_replacement/ubd0=$ubd0/;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m,(ubd0=[/\d\w-]+),;
|
||||||
|
$ubd0 = (split(/=/,$1))[1];
|
||||||
|
chomp $ubd0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $mtd_radio_mtdram->get_active() ) {
|
if ( $mtd_radio_mtdram->get_active() ) {
|
||||||
@ -1861,6 +1868,15 @@ sub uml_box {
|
|||||||
|
|
||||||
# Tell initrd whether it is mtdram or blkmtd, and
|
# Tell initrd whether it is mtdram or blkmtd, and
|
||||||
if ( $mtd_radio_mtdram->get_active() ) {
|
if ( $mtd_radio_mtdram->get_active() ) {
|
||||||
|
|
||||||
|
# blkmtd uses the _dd images, mtdram uses the real image
|
||||||
|
for ( $entry_advanced[10],$entry_advanced[9] ) {
|
||||||
|
if ( m,(ubd0=[/\d\w-]+), ) {
|
||||||
|
if ( $1 =~ /_dd/ ) {
|
||||||
|
s/_dd//g;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# ramdisk_size
|
# ramdisk_size
|
||||||
if ( !$ramdisk_size ) {
|
if ( !$ramdisk_size ) {
|
||||||
@ -1870,7 +1886,7 @@ sub uml_box {
|
|||||||
undef $ramdisk_size;
|
undef $ramdisk_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Memory needs to be figure out in 8192K blocks
|
# Memory needs to be figure out in 16384K blocks
|
||||||
# otherwise it fails, and it needs to be at least 16384
|
# otherwise it fails, and it needs to be at least 16384
|
||||||
# for uml.
|
# for uml.
|
||||||
|
|
||||||
@ -1880,7 +1896,7 @@ sub uml_box {
|
|||||||
$mem_size = 16384;
|
$mem_size = 16384;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$mem_size = 8192 * ceil($mtd_total_size / 8192);
|
$mem_size = 16384 * ceil($mtd_total_size / 16384);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !$mem ) {
|
if ( !$mem ) {
|
||||||
@ -1931,6 +1947,13 @@ sub uml_box {
|
|||||||
}
|
}
|
||||||
waitpid($pid,0);
|
waitpid($pid,0);
|
||||||
|
|
||||||
|
# Reset $entry_advanced[9] && $entry_advanced[10]
|
||||||
|
if ( $mtd_check->get_active() ) {
|
||||||
|
$entry_advanced[9] = $eab2->entry->get_text();
|
||||||
|
$entry_advanced[10] = $eab3->get_text();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user