Author: sparky
Date: Mon Jan  9 21:49:26 2006
New Revision: 6782

Modified:
   ppcrcd/trunk/yaboot/yaboot.c
Log:
- fixed and some hacks added to vmlinux extraction from zImage, It works !!!


Modified: ppcrcd/trunk/yaboot/yaboot.c
==============================================================================
--- ppcrcd/trunk/yaboot/yaboot.c        (original)
+++ ppcrcd/trunk/yaboot/yaboot.c        Mon Jan  9 21:49:26 2006
@@ -1297,11 +1297,6 @@
                return 0;
        }
 
-       /* leave some room (1Mb) for boot infos */
-       loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
-       /* Claim OF memory */
-       DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
-
        /* Determine whether we are trying to boot a vmlinux or some
        * other binary image (eg, zImage). We load vmlinux's at
        * KERNELADDR and all other binaries at their e_entry value.
@@ -1315,9 +1310,19 @@
        }
        if ( kernel_position > 0 ) {
                flat_vmlinux = 1;
+               /* hardcode some info */
+               loadinfo->load_loc = 0xc0000000;
                loadaddr = KERNELADDR;
+               loadinfo->entry = KERNEL_LINK_ADDR_PPC32;
+               /* memsize must be larger than filesize, but _ALIGN should 
help*/
                loadinfo->memsize = kernel_size;
+               loadinfo->filesize = kernel_size;
        }
+       
+       /* leave some room (1Mb) for boot infos */
+       loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+       /* Claim OF memory */
+       DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);
 
        /* On some systems, loadaddr may already be claimed, so try some
        * other nearby addresses before giving up.
@@ -1381,6 +1386,8 @@
                        prom_printf ("Gunzip read failed\n");
                        prom_release(loadinfo->base, loadinfo->memsize);
                        return 0;
+               } else {
+                       prom_printf ("vmlinux extracted successfully !\n");
                }
        }
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to