|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Device Tree setup for 8272-based boardHi,
We are migrating our PowerPC 8272-based board from 2.6.14 to 2.6.27. One of the big changes is the need for a Device Tree for bootup. So far, my bootup looks like the below (using u-boot). I am just using arch/powerpc/boot/cuboot-824x.c and /arch/powerpc/boot/dts/mpc8272ads.dts for now. Therefore, all the settings as printed below are wrong ie. Memory, ENET0 mac, CPU clock freq, etc. When I change the settings in mpc8272ads.dts and do a fresh recompile, the settings do not change. However, if I use another cuboot*.c file, I get a different set of printed settings eg. 2 ethernet ports instead of 1. This is fine, but I don't see where in the cuboot*.c file these settings are specified. Can someone suggest where these might be? Cheers, Daniel ## Booting image at 00200000 ... Image Name: Linux-2.6.27-mybuild Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1477233 Bytes = 1.4 MB Load Address: 00400000 Entry Point: 00400594 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Memory <- <0x0 0x4000000> (64MB) ENET0: local-mac-address <- c0:a8:01:4b:7e:13 CPU clock-frequency <- 0xa175c100 (2709MHz) CPU timebase-frequency <- 0x4ead9a0 (83MHz) CPU bus-frequency <- 0x13ab6680 (330MHz) zImage starting: loaded at 0x00400000 (sp: 0x03f7c9c8) Allocating 0x316e8c bytes for kernel ... gunzipping (0x00000000 <- 0x0040c000:0x0071367c)...done 0x2f41a0 bytes Linux/PowerPC load: Finalizing device tree... flat tree at 0x40acd8 (there is no more output after this) _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardHi Daniel,
I think you'd better read Documentation/powerpc/bootwrapper.txt, and choose the appropriate image target. -------------------------------------------------- From: "Daniel Ng" <daniel_ng11@...> Sent: Friday, December 19, 2008 2:31 PM To: <linuxppc-embedded@...> Subject: Device Tree setup for 8272-based board > Hi, > > We are migrating our PowerPC 8272-based board from 2.6.14 to 2.6.27. > > One of the big changes is the need for a Device Tree for bootup. > > So far, my bootup looks like the below (using u-boot). > > I am just using arch/powerpc/boot/cuboot-824x.c > and /arch/powerpc/boot/dts/mpc8272ads.dts for now. Therefore, all the settings > as printed below are wrong ie. Memory, ENET0 mac, CPU clock freq, etc. > > When I change the settings in mpc8272ads.dts and do a fresh recompile, the > settings do not change. However, if I use another cuboot*.c file, I get a > different set of printed settings eg. 2 ethernet ports instead of 1. This is > fine, but I don't see where in the cuboot*.c file these settings are > specified. Can someone suggest where these might be? > > Cheers, > Daniel > > > ## Booting image at 00200000 ... > Image Name: Linux-2.6.27-mybuild > Image Type: PowerPC Linux Kernel Image (gzip compressed) > Data Size: 1477233 Bytes = 1.4 MB > Load Address: 00400000 > Entry Point: 00400594 > Verifying Checksum ... OK > Uncompressing Kernel Image ... OK > Memory <- <0x0 0x4000000> (64MB) > ENET0: local-mac-address <- c0:a8:01:4b:7e:13 > CPU clock-frequency <- 0xa175c100 (2709MHz) > CPU timebase-frequency <- 0x4ead9a0 (83MHz) > CPU bus-frequency <- 0x13ab6680 (330MHz) > > zImage starting: loaded at 0x00400000 (sp: 0x03f7c9c8) > Allocating 0x316e8c bytes for kernel ... > gunzipping (0x00000000 <- 0x0040c000:0x0071367c)...done 0x2f41a0 bytes > > Linux/PowerPC load: > Finalizing device tree... flat tree at 0x40acd8 > > (there is no more output after this) > > > > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@... > https://ozlabs.org/mailman/listinfo/linuxppc-embedded > Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardDaniel Ng wrote:
> We are migrating our PowerPC 8272-based board from 2.6.14 to 2.6.27. > > One of the big changes is the need for a Device Tree for bootup. > > So far, my bootup looks like the below (using u-boot). > > I am just using arch/powerpc/boot/cuboot-824x.c cuboot-824x is for 8240, 8245, and similar chips. You want cuboot-pq2. > When I change the settings in mpc8272ads.dts and do a fresh recompile, the > settings do not change. However, if I use another cuboot*.c file, I get a > different set of printed settings eg. 2 ethernet ports instead of 1. This is > fine, but I don't see where in the cuboot*.c file these settings are > specified. Can someone suggest where these might be? The cuboot file defines things like TARGET_CPM2 or TARGET_824x, which influences the compilation of the bd_t struct. It's messy, which is why we use device trees now. :-) -Scott _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardScott Wood <scottwood <at> freescale.com> writes:
> The cuboot file defines things like TARGET_CPM2 or TARGET_824x, which > influences the compilation of the bd_t struct. It's messy, which is why > we use device trees now. > Thanks for your helpful responses Scott and Ming Qian. Now, from reading the docco can you please verify my understanding is correct?- First, I need a basic DTS file which will give me a basic Device Tree. The cuboot*.c file takes care of adding other parameters to the Device Tree passed from u-boot via the old bd_info struct. Is this correct? If so, would it be possible to do away with the DTS file altogether? On the other hand, would it be possible to do away with the cuboot*.c file by providing a complete DTS file? Cheers, Daniel _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardDaniel Ng wrote:
> Thanks for your helpful responses Scott and Ming Qian. Now, from reading the > docco can you please verify my understanding is correct?- > > First, I need a basic DTS file which will give me a basic Device Tree. The > cuboot*.c file takes care of adding other parameters to the Device Tree passed > from u-boot via the old bd_info struct. > > Is this correct? Yes. > If so, would it be possible to do away with the DTS file > altogether? How, other than by encoding all the information about the board in code rather than data, which would be a step backwards? > On the other hand, would it be possible to do away with the > cuboot*.c file by providing a complete DTS file? Yes, though that eliminates the ability to dynamically set certain parameters from the firmware. Better is to use an up-to-date u-boot, and have u-boot fill in the dynamic fields (MAC address, clocks, command line, etc) directly. -Scott _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardScott Wood <scottwood <at> freescale.com> writes:
> cuboot-824x is for 8240, 8245, and similar chips. You want cuboot-pq2. Hi Scott et al, I seem to get further with the cuboot-824x file- with the cuboot-pq2 file the boot sequence doesn't even reach the 'zImage starting' stage. The machine reboots just before it should be printing out 'zImage starting'. Is there a way I can get more detailed debug to see what's happening? Do settings from bd_info struct override the settings from the DTS file? Also, a lot of the settings passed from u-boot in our 2.6.14 environment are plain wrong eg. wrong memory, wrong processor speed. In this case, the correct settings are set elsewhere (for memory, it is a kernel parameter ie. mem=32M, and the processor speed is set in the 2.6.14 'make menuconfig'). Therefore, the machine still boots into Linux correctly. For 2.6.27, would these incorrect settings be causing my problems? Daniel _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardDaniel Ng wrote:
> Scott Wood <scottwood <at> freescale.com> writes: >> cuboot-824x is for 8240, 8245, and similar chips. You want cuboot-pq2. > > Hi Scott et al, > > I seem to get further with the cuboot-824x file- with the cuboot-pq2 file Nonetheless, cuboot-pq2 is the correct one. > the boot sequence doesn't even reach the 'zImage starting' stage. The machine > reboots just before it should be printing out 'zImage starting'. What does it print before it reboots? Try disabling the PCI and localbus setup. > Is there a way I can get more detailed debug to see what's happening? printf(). :-) > Do settings from bd_info struct override the settings from the DTS file? Yes. > Also, a lot of the settings passed from u-boot in our 2.6.14 environment are > plain wrong eg. wrong memory, wrong processor speed. In this case, the correct > settings are set elsewhere (for memory, it is a kernel parameter ie. mem=32M, > and the processor speed is set in the 2.6.14 'make menuconfig'). Therefore, > the machine still boots into Linux correctly. For 2.6.27, would these > incorrect settings be causing my problems? Yes, if u-boot is providing junk, then you'll probably want to hack up the wrapper to ignore it. Or just upgrade u-boot to one that works. :-) -Scott _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
|
|
Re: Device Tree setup for 8272-based boardScott Wood <scottwood <at> freescale.com> writes:
> Yes, if u-boot is providing junk, then you'll probably want to hack up > the wrapper to ignore it. Or just upgrade u-boot to one that works. > Thanks for your advice Scott. Looks like upgrading u-boot will be the easiest way forward. _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@... https://ozlabs.org/mailman/listinfo/linuxppc-embedded |
| Free embeddable forum powered by Nabble | Forum Help |