ppcrcd/yaboot/yaboot.c
sparky
cvs at pld-linux.org
Thu Jun 16 00:55:39 CEST 2005
Author: sparky
Date: Thu Jun 16 00:55:30 2005
New Revision: 6094
Modified:
ppcrcd/yaboot/yaboot.c
Log:
- chunksize disminuyed to 2Mb, and after each chunk loaded a dot
will by displayed (so user will know it is realy loading)
useful with ppcrcd.sqf
- added but commented out initrd gunziping: 1. it is not working
2. it chould not be neaded
Modified: ppcrcd/yaboot/yaboot.c
==============================================================================
--- ppcrcd/yaboot/yaboot.c (original)
+++ ppcrcd/yaboot/yaboot.c Thu Jun 16 00:55:30 2005
@@ -986,7 +986,7 @@
/* If ramdisk, load it (only if booting a vmlinux). For now, we
* can't tell the size it will be so we claim an arbitrary amount
- * of 4Mb.
+ * of 2Mb.
*/
if (flat_vmlinux && params.rd.file) {
if(strlen(boot.file) && !strcmp(boot.file,"\\\\") && params.rd.file[0] != '/'
@@ -1003,20 +1003,26 @@
free(params.rd.file);
params.rd.file=loc;
}
- prom_printf("Loading ramdisk...\n");
+ prom_printf("Loading ramdisk...");
result = open_file(¶ms.rd, &file);
if (result != FILE_ERR_OK) {
prom_printf("%s:%d,", params.rd.dev, params.rd.part);
prom_perror(result, params.rd.file);
}
else {
-#define INITRD_CHUNKSIZE 0x400000
+#define INITRD_CHUNKSIZE 0x200000
+ /*gunzip_file = file;
+ gunzip_test_header();*/
+
initrd_base = prom_claim(loadinfo.base+loadinfo.memsize, INITRD_CHUNKSIZE, 0);
if (initrd_base == (void *)-1) {
- prom_printf("Claim failed for initrd memory\n");
+ prom_printf("\nClaim failed for initrd memory\n");
initrd_base = 0;
} else {
- initrd_size = file.fs->read(&file, INITRD_CHUNKSIZE, initrd_base);
+ initrd_size = /*compressed_file ?
+ gunzip_read(initrd_base, INITRD_CHUNKSIZE) :*/
+ file.fs->read(&file, INITRD_CHUNKSIZE, initrd_base);
+ prom_printf(".");
if (initrd_size == 0)
initrd_base = 0;
initrd_read = initrd_size;
@@ -1025,14 +1031,18 @@
initrd_want = (void *)((unsigned long)initrd_more+INITRD_CHUNKSIZE);
initrd_more = prom_claim(initrd_want, INITRD_CHUNKSIZE, 0);
if (initrd_more != initrd_want) {
- prom_printf("Claim failed for initrd memory at %p rc=%p\n",initrd_want,initrd_more);
+ prom_printf("\nClaim failed for initrd memory at %p rc=%p\n",initrd_want,initrd_more);
break;
}
- initrd_read = file.fs->read(&file, INITRD_CHUNKSIZE, initrd_more);
+ initrd_read = /*compressed_file ?
+ gunzip_read(initrd_more, INITRD_CHUNKSIZE) :*/
+ file.fs->read(&file, INITRD_CHUNKSIZE, initrd_more);
+ prom_printf(".");
DEBUG_F(" block at %p rc=%lu\n",initrd_more,initrd_read);
initrd_size += initrd_read;
}
}
+ prom_printf(".\n");
file.fs->close(&file);
memset(&file, 0, sizeof(file));
}
More information about the pld-cvs-commit
mailing list