* Porting "prep" from ppc to powerpc.
@ 2007-05-26 2:38 Rob Landley
2007-05-27 23:20 ` David Gibson
2007-05-28 7:55 ` Gabriel Paubert
0 siblings, 2 replies; 9+ messages in thread
From: Rob Landley @ 2007-05-26 2:38 UTC (permalink / raw)
To: linuxppc-dev
Is anyone already doing this? I asked around here a few weeks ago and got the
advice:
> In theory.. copy the files from ppc/platforms/prep.* to
> powerpc/platforms/prep/
> and make some Kconfigs and see what breaks :)
Unfortunately, there isn't a ppc/platforms/prep. Under arch/ppc there's:
./boot/simple/misc-prep.c
./boot/simple/prepmap.c
./boot/utils/mkprep.c
./configs/prep_defconfig
./platforms/prep_pci.c
./platforms/prep_setup.c
./syslib/prep_nvram.c
And I'm not sure which are relevant. Any hints?
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-26 2:38 Porting "prep" from ppc to powerpc Rob Landley @ 2007-05-27 23:20 ` David Gibson 2007-05-29 21:16 ` Rob Landley 2007-05-28 7:55 ` Gabriel Paubert 1 sibling, 1 reply; 9+ messages in thread From: David Gibson @ 2007-05-27 23:20 UTC (permalink / raw) To: Rob Landley; +Cc: linuxppc-dev On Fri, May 25, 2007 at 10:38:39PM -0400, Rob Landley wrote: > Is anyone already doing this? I asked around here a few weeks ago and got the > advice: > > > In theory.. copy the files from ppc/platforms/prep.* to > > powerpc/platforms/prep/ > > and make some Kconfigs and see what breaks :) Actually, I don't really recommend that method in any case. Instead I suggest making a Kconfig under arch/powerpc, then adding things until it builds, then adding things until it boots. When you need to know what has to be done at a particular point, consult arch/ppc. > Unfortunately, there isn't a ppc/platforms/prep. Under arch/ppc there's: > > ./boot/simple/misc-prep.c > ./boot/simple/prepmap.c > ./boot/utils/mkprep.c > ./configs/prep_defconfig > ./platforms/prep_pci.c > ./platforms/prep_setup.c > ./syslib/prep_nvram.c > > And I'm not sure which are relevant. Any hints? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-27 23:20 ` David Gibson @ 2007-05-29 21:16 ` Rob Landley 0 siblings, 0 replies; 9+ messages in thread From: Rob Landley @ 2007-05-29 21:16 UTC (permalink / raw) To: David Gibson; +Cc: linuxppc-dev On Sunday 27 May 2007 7:20 pm, David Gibson wrote: > On Fri, May 25, 2007 at 10:38:39PM -0400, Rob Landley wrote: > > Is anyone already doing this? I asked around here a few weeks ago and got the > > advice: > > > > > In theory.. copy the files from ppc/platforms/prep.* to > > > powerpc/platforms/prep/ > > > and make some Kconfigs and see what breaks :) > > Actually, I don't really recommend that method in any case. > > Instead I suggest making a Kconfig under arch/powerpc, then adding > things until it builds, then adding things until it boots. When you > need to know what has to be done at a particular point, consult > arch/ppc. So study the old code until I figure out what should be in the Kconfig, what "things" to add for it to build, and what "things" to add until it boots. And the hint as to where to start is... study the old code. Right. Copying the old implementation to the new directory and debugging it sounded like something I might be able to do. Starting from scratch? Not so much. Rob ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-26 2:38 Porting "prep" from ppc to powerpc Rob Landley 2007-05-27 23:20 ` David Gibson @ 2007-05-28 7:55 ` Gabriel Paubert 2007-05-28 8:23 ` Benjamin Herrenschmidt 2007-05-29 21:02 ` Rob Landley 1 sibling, 2 replies; 9+ messages in thread From: Gabriel Paubert @ 2007-05-28 7:55 UTC (permalink / raw) To: Rob Landley; +Cc: linuxppc-dev On Fri, May 25, 2007 at 10:38:39PM -0400, Rob Landley wrote: > Is anyone already doing this? I'm interested but I don't have the time right now. > I asked around here a few weeks ago and got the > advice: > > > In theory.. copy the files from ppc/platforms/prep.* to > > powerpc/platforms/prep/ > > and make some Kconfigs and see what breaks :) > > Unfortunately, there isn't a ppc/platforms/prep. Under arch/ppc there's: > > ./boot/simple/misc-prep.c > ./boot/simple/prepmap.c > ./boot/utils/mkprep.c > ./configs/prep_defconfig > ./platforms/prep_pci.c > ./platforms/prep_setup.c > ./syslib/prep_nvram.c > > And I'm not sure which are relevant. Any hints? I was thinking of writing a bootwrapper that would convert residual data to flat device tree. There is a lot of valuable information in the residual data, like the interrupt routing (which is correct if you can read the spec, which is not what the code in arch/ppc did). Gabriel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-28 7:55 ` Gabriel Paubert @ 2007-05-28 8:23 ` Benjamin Herrenschmidt 2007-05-28 8:46 ` Gabriel Paubert 2007-05-29 21:02 ` Rob Landley 1 sibling, 1 reply; 9+ messages in thread From: Benjamin Herrenschmidt @ 2007-05-28 8:23 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev, Rob Landley On Mon, 2007-05-28 at 09:55 +0200, Gabriel Paubert wrote: > I was thinking of writing a bootwrapper that would > convert residual data to flat device tree. There > is a lot of valuable information in the residual data, > like the interrupt routing (which is correct if you > can read the spec, which is not what the code in > arch/ppc did). We were wondering the other day how reliable the residual data are... David Gibson's been toying with that too already, you should sync with him. Cheers, Ben. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-28 8:23 ` Benjamin Herrenschmidt @ 2007-05-28 8:46 ` Gabriel Paubert 2007-05-28 9:22 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 9+ messages in thread From: Gabriel Paubert @ 2007-05-28 8:46 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Rob Landley On Mon, May 28, 2007 at 06:23:34PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2007-05-28 at 09:55 +0200, Gabriel Paubert wrote: > > I was thinking of writing a bootwrapper that would > > convert residual data to flat device tree. There > > is a lot of valuable information in the residual data, > > like the interrupt routing (which is correct if you > > can read the spec, which is not what the code in > > arch/ppc did). > > We were wondering the other day how reliable the residual data are... > On the boards I use, they are very good. And there is some information (memory size, tb and cpu freq, etc...) that I'd rather take from the residual data than trying to guess. > David Gibson's been toying with that too already, you should sync with > him. I've not yet started to write anything (finishing a hardware project). Regards, Gabriel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-28 8:46 ` Gabriel Paubert @ 2007-05-28 9:22 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 9+ messages in thread From: Benjamin Herrenschmidt @ 2007-05-28 9:22 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev, Rob Landley On Mon, 2007-05-28 at 10:46 +0200, Gabriel Paubert wrote: > On Mon, May 28, 2007 at 06:23:34PM +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2007-05-28 at 09:55 +0200, Gabriel Paubert wrote: > > > I was thinking of writing a bootwrapper that would > > > convert residual data to flat device tree. There > > > is a lot of valuable information in the residual data, > > > like the interrupt routing (which is correct if you > > > can read the spec, which is not what the code in > > > arch/ppc did). > > > > We were wondering the other day how reliable the residual data are... > > > > On the boards I use, they are very good. And there is some information > (memory size, tb and cpu freq, etc...) that I'd rather take from the > residual data than trying to guess. > > > David Gibson's been toying with that too already, you should sync with > > him. > > I've not yet started to write anything (finishing a hardware project). Ok, well, anyway, that's good to know that they are good. Ben. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-28 7:55 ` Gabriel Paubert 2007-05-28 8:23 ` Benjamin Herrenschmidt @ 2007-05-29 21:02 ` Rob Landley 2007-05-30 11:19 ` Benjamin Herrenschmidt 1 sibling, 1 reply; 9+ messages in thread From: Rob Landley @ 2007-05-29 21:02 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Monday 28 May 2007 3:55 am, Gabriel Paubert wrote: > On Fri, May 25, 2007 at 10:38:39PM -0400, Rob Landley wrote: > > Is anyone already doing this? > > I'm interested but I don't have the time right now. I'm interested but don't have the expertise. I don't have prep documentation, I'm not familiar with the internals of the powerpc architecture (beyond the endianness/word size/alignment checklist for porting userspace programs from arch to arch), I know just enough about Open Firmware to really dislike it, and I don't actually have prep hardware. I do have qemu, but it doesn't actually work even with the old ARCH=ppc prep kernels. It segfaults trying to decompress them. I was hoping to use a prep kernel to debug qemu, but my build system (which already builds several other architecutres from the same script) can't do ARCH=ppc because that doesn't understand "make headers_install", so I have to build them by hand supplying different architectures at different steps of the process. Which puts it waaaaay down on my todo list. Fixing the Linux build system to actually work for prep would be nice, but it sounds like teaching ARCH=ppc to do "make headers install" would be a couple orders of magnitude easier... Rob ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Porting "prep" from ppc to powerpc. 2007-05-29 21:02 ` Rob Landley @ 2007-05-30 11:19 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 9+ messages in thread From: Benjamin Herrenschmidt @ 2007-05-30 11:19 UTC (permalink / raw) To: Rob Landley; +Cc: linuxppc-dev On Tue, 2007-05-29 at 17:02 -0400, Rob Landley wrote: > I know just enough about Open > Firmware to really dislike it, You need to learn more or fix your taste :-) Ben. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-30 11:19 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-26 2:38 Porting "prep" from ppc to powerpc Rob Landley 2007-05-27 23:20 ` David Gibson 2007-05-29 21:16 ` Rob Landley 2007-05-28 7:55 ` Gabriel Paubert 2007-05-28 8:23 ` Benjamin Herrenschmidt 2007-05-28 8:46 ` Gabriel Paubert 2007-05-28 9:22 ` Benjamin Herrenschmidt 2007-05-29 21:02 ` Rob Landley 2007-05-30 11:19 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).