Christian, see BenH's reply to this. BenH, this is by booting an oldworld with quik, and it certainly solves a problem for Christian, and there have been various bug reports about quik being broken since 2.6.16.
Christian, benh mentioned : 09:01 < benh> but basically, you should add some printk to the code in setup-common that reads the property back from the device-tree 09:02 < benh> in check_for_initrd() Friendly, Sven Luther On Mon, Sep 18, 2006 at 04:51:14PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2006-09-18 at 08:40 +0200, Sven Luther wrote: > > Hi benh, can you have a look at this patch ? It fixes the oldworld initramfs > > problem in newer kernels. > > Sounds all bogus claims to me. It's certainly shall not be storing the > address of val. prom_setprop() takes a pointer to the data to be stored. > Data is thus first copied to val, then a pointer to val is passed to > prom_setprop. Is the patch actually fixing anything ? Also is this a 32 > or 64 bits kernel and is this booting with BootX or open firmware (there > is a separate problem with bootx_init.c that has been fixed upstream > where it failed to add the initrd to the reserve map). > > Ben. > > > Friendly, > > > > Sven Luther > > ----- Forwarded message from Christian Aichinger <[EMAIL PROTECTED]> ----- > > > > Date: Sun, 17 Sep 2006 17:17:40 +0200 > > From: Christian Aichinger <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED], debian-kernel@lists.debian.org > > Subject: Re: Bug#366620: 2.6.16-1-powerpc fails to mount rootfs, > > 2.6.15-1-powerpc works > > Message-ID: <[EMAIL PROTECTED]> > > Mail-Followup-To: Christian Aichinger <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED], [EMAIL PROTECTED], > > debian-kernel@lists.debian.org > > > > On Fri, Sep 15, 2006 at 11:21:33AM +0200, Christian Aichinger wrote: > > > The kernel somehow loses the information where the initrd image is > > > placed in memory. The correct data is there in > > > arch/powerpc/kernel/prom_init.c:prom_check_initrd(), but in > > > init/initramfs.c:populate_rootfs() it's wrong, initrd_{start,end} > > > are both 0. > > > > arch/powerpc/kernel/prom_init.c:prom_check_initrd() is broken. The > > relevant part of the code is: > > > > ,------------------ > > | unsigned long val; > > | ... > > | val = RELOC(prom_initrd_start); > > > > > > | prom_setprop(_prom->chosen, "/chosen", "linux,initrd-start", > > > > > > | &val, sizeof(val)); > > > > > > | val = RELOC(prom_initrd_end); > > > > > > | prom_setprop(_prom->chosen, "/chosen", "linux,initrd-end", > > > > > > | &val, sizeof(val)); > > > > > > `------------------ > > > > As you can see it tries to store pointers to initrd start/end in the > > /chosen node, however in reality it stores the address of val, a > > local variable. Since that's long gone invalid when the values are > > read out from /chosen again, the result is undefined. > > > > The attached is a patch fixing the problem. It would be nice if the > > bug submitters could test it to see if it fixes their problems too. > > > > Cheers, > > Christian Aichinger > > > > PS: arch/powerpc/platforms/powermac/bootx_init.c does something > > similar, though it looks saner, as it copies *val into it's own > > permanent memory block AFAICS. > > > > --- a/arch/powerpc/kernel/prom_init.c 2006-09-15 18:33:50.000000000 > > +0200 > > +++ b/arch/powerpc/kernel/prom_init.c 2006-09-15 18:33:44.000000000 > > +0200 > > @@ -2141,17 +2141,17 @@ > > struct prom_t *_prom = &RELOC(prom); > > > > if (r3 && r4 && r4 != 0xdeadbeef) { > > - unsigned long val; > > + unsigned long *ptr; > > > > RELOC(prom_initrd_start) = is_kernel_addr(r3) ? __pa(r3) : r3; > > RELOC(prom_initrd_end) = RELOC(prom_initrd_start) + r4; > > > > - val = RELOC(prom_initrd_start); > > + ptr = &RELOC(prom_initrd_start); > > prom_setprop(_prom->chosen, "/chosen", "linux,initrd-start", > > - &val, sizeof(val)); > > - val = RELOC(prom_initrd_end); > > + ptr, sizeof(prom_initrd_start)); > > + ptr = &RELOC(prom_initrd_end); > > prom_setprop(_prom->chosen, "/chosen", "linux,initrd-end", > > - &val, sizeof(val)); > > + ptr, sizeof(prom_initrd_end)); > > > > reserve_mem(RELOC(prom_initrd_start), > > RELOC(prom_initrd_end) - RELOC(prom_initrd_start)); > > > > > > > > > > ----- End forwarded message ----- > > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]