From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] A simple howto boot sequoia (ARCH=powerpc) using flattened device tree (FDT)
Date: Fri, 23 May 2008 08:12:26 -0400 [thread overview]
Message-ID: <4836B4AA.5050600@ge.com> (raw)
In-Reply-To: <200805231004.16936.sr@denx.de>
Stefan Roese wrote:
> Hi Larry,
>
> On Thursday 22 May 2008, Larry Johnson wrote:
>>>> => run nfsargs addip addtty
>>>> => printenv bootargs
>>>> bootargs=root=/dev/nfs rw nfsroot=172.25.1.3:/opt/eldk/ppc_4xxFP
>>>> ip=172.25.1.88:172.25.1.3:::sequoia:eth0:off panic=1
>>>> console=ttyS0,115200
>> The "sequoia.dts" file in linux-2.6-denx contains a line specifying
>> "bootargs", and this apparently overrides the environment variable, as
>> can be seen by typing "cat /proc/cmdline" under Linux.
>
> Correct. And when the "chosen" node exists, the "bootm" doesn't override the
> bootargs. There are three ways to change this behavior:
>
> a) Delete the chosen node from the dts
> b) Run "fdt chosen" in U-Boot before booting Linux
> c) Change U-Boot to enable overwriting the chosen node upon Linux
> booting without needing to call "fdt chosen"
>
> Currently I usually use a) if possible. So I won't add a chosen node when I
> create a new board port. But I would like to see c) implemented too
> for "older" arch/powerpc board ports (like Sequoia) that have a chosen node
> in their dts. Anyone care to send a patch for this? :)
Note: the difference between b) and c) is that "bootm" doesn't set the
"force" flag but "fdt chosen" does, so "fdt chosen" overrides all
/chosen property settings (that u-boot knows about).
It would be relatively easy to do c) by creating Yet Another Config
Variable that bootm used for the "force" flag rather than hardcoding it.
I'm not wild about creating YACV. Adding Yet Another Parameter to
bootm is probably as bad or worse. Hmmmm.
On a related note, the population of the chosen node (when not forced)
is fine grained now: if /chosen exists, but a /chosen/property does
exist it is created. If the /chosen/property already exists, it is not
modified.
For the most part, deleting the /chosen node in the source .dts is a
good thing. The fine grained population of /chosen is nice because you
can put stuff in the .dts /chosen node that u-boot doesn't know about
and thus doesn't populate, but that linux (or whatever) needs. Another
scenario would be if you want to override the u-boot value. Obviously,
this is a tradeoff - most times enhancing u-boot is a better option than
overriding/extending it in the .dts.
>>>> => fdt addr 1000000
>>>> => fdt chosen
>>>> => fdt list
>>> <...>
>>>
>>>> => fdt print
>>> <...>
>>>
>>>> => bootm 200000 - 1000000
>>>> ## Booting image at 00200000 ...
>> When I run this using U-Boot 1.3.3, it tells me that it's booting a
>> "Legacy Image". Is this correct?
>
> Yes. This refers to the "old" uImage formate compared to the "new" FIT
> (Flattened Image Tree) uImage format. Please see README for more infos about
> this FIT.
>
>>>> Image Name: Linux-2.6.25-00002-ga9bf9f0
>>>> Image Type: PowerPC Linux Kernel Image (gzip compressed)
>>>> Data Size: 1277003 Bytes = 1.2 MB
>>>> Load Address: 00000000
>>>> Entry Point: 00000000
>>>> Verifying Checksum ... OK
>>>> Uncompressing Kernel Image ... OK
>>>> Booting using the fdt at 0x1000000
>>>> Loading Device Tree to 007fc000, end 007fefff ... OK
>>>> Using Sequoia machine description
>>> <...>
>>>
>>> Thats it. Now you should boot into your shiny new Linux kernel. Attached
>>> is a gzipped output of my startup (for the curious).
>>>
>>> Once my kernel started I used the following commands to update my u-boot
>>>
>>> environment:
>>>> setenv ftd_get 'tftp 200000 ${bootfile};tftp 1000000
>>>> sequoia/sequoia.dtb;fdt addr 1000000;' setenv net_nfs 'run ftd_get
>>>> nfsargs addip addtty; fdt chosen;bootm 200000 - 1000000' saveenv
>>> Best regards
>>>
>>> Niklaus
>> I normally test Linux by booting Sequoia from the flash images
>> distributed by AMCC. The flash partition information in "sequoia.dts"
>> is for an early distribution (Rev. 2, I think). The latest distribution
>> I have is Rev. 6. (Is there anything later?)
>
> Not that I am aware of. But we should probably update it (again) to add the
> dtb partition. The kernel.org canyonlands.dts should be a good example.
>
> Best regards,
> Stefan
next prev parent reply other threads:[~2008-05-23 12:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 20:54 [U-Boot-Users] A simple howto boot sequoia (ARCH=powerpc) using flattened device tree (FDT) Niklaus Giger
2008-05-22 16:58 ` Larry Johnson
2008-05-23 8:04 ` Stefan Roese
2008-05-23 12:12 ` Jerry Van Baren [this message]
2008-05-23 12:29 ` Stefan Roese
2008-05-23 12:57 ` Jerry Van Baren
2008-05-23 13:36 ` Stefan Roese
2008-05-23 15:10 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4836B4AA.5050600@ge.com \
--to=gerald.vanbaren@ge.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox