From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: zImage: allow supplementing appended DTB with traditional ATAG data
Date: Tue, 21 Jun 2011 10:32:19 -0700 [thread overview]
Message-ID: <8yad3i7nl98.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <20110621070058.GA9228@S2101-09.ap.freescale.net> (Shawn Guo's message of "Tue, 21 Jun 2011 15:00:59 +0800")
On Tue, Jun 21 2011, Shawn Guo wrote:
> On Tue, Jun 21, 2011 at 01:09:15AM -0400, Nicolas Pitre wrote:
>> From: Nicolas Pitre <nicolas.pitre@linaro.org>
>>
>> Some old bootloaders can't be updated to a device tree capable one,
>> yet they provide ATAGs with memory configuration, the ramdisk address,
>> the kernel cmdline string, etc. To allow a device tree enabled
>> kernel to be used with such bootloaders, it is necessary to convert those
>> ATAGs into FDT properties and fold them into the DTB appended to zImage.
>>
>> Currently the following ATAGs are converted:
>>
>> ATAG_CMDLINE
>> ATAG_MEM (up to 8 memory regions)
>> ATAG_INITRD2
>>
>> If the corresponding information already exists in the appended DTB, it
>> is replaced, otherwise the required node is created to hold it.
>>
>> The code looks for ATAGs at the location pointed by the value of r2 upon
>> entry into the zImage code. If no ATAGs are found there, an attempt at
>> finding ATAGs at the typical 0x100 offset from start of RAM is made.
>> Otherwise the DTB is left unchanged.
>>
>> Thisstarted from an older patch from John Bonesio <bones@secretlab.ca>,
>> with contributions from David Brown <davidb@codeaurora.org>.
>>
>> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
>> ---
>
> With this patch applied, I saw nothing coming from kernel on imx51
> babbage serial port.
Can you try seeing if it works with padding in the DTB that you are
using? Right now, I'm using something like:
/ {
...
memory {
reg = <0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>;
};
chosen {
bootargs = " "; /* Enough for arg */
linux,initrd-start = <0>;
linux,initrd-end = <0>;
};
};
I get problems if the fdt code tries to expand the tree, even if I add
padding when running the dtc (I've tried -p 1024).
Hopefully, I'll get some time today to try and figure out what is going
on.
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-06-21 17:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 5:09 [PATCH 0/4] allow DTB to be appended to the ARM zImage with ATAG conversion Nicolas Pitre
2011-06-21 5:09 ` [PATCH 1/4] ARM: zImage: ensure it is always a multiple of 64 bits in size Nicolas Pitre
2011-06-21 5:09 ` [PATCH 2/4] ARM: zImage: Allow the appending of a device tree binary Nicolas Pitre
2011-06-21 5:09 ` [PATCH 3/4] ARM: zImage: make sure appended DTB doesn't get overwritten by kernel .bss Nicolas Pitre
2011-06-21 5:09 ` [PATCH 4/4] ARM: zImage: allow supplementing appended DTB with traditional ATAG data Nicolas Pitre
2011-06-21 7:00 ` Shawn Guo
2011-06-21 17:32 ` David Brown [this message]
2011-06-21 22:58 ` David Brown
2011-06-21 23:13 ` David Brown
2011-06-21 23:22 ` Warner Losh
2011-06-21 23:35 ` Nicolas Pitre
2011-06-21 21:59 ` [PATCH 0/4] allow DTB to be appended to the ARM zImage with ATAG conversion David Brown
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=8yad3i7nl98.fsf@huya.qualcomm.com \
--to=davidb@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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