[PATCH 4/4] ARM: zImage: allow supplementing appended DTB with traditional ATAG data
David Brown
davidb at codeaurora.org
Wed Jun 22 03:32:19 EST 2011
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 at 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 at secretlab.ca>,
>> with contributions from David Brown <davidb at codeaurora.org>.
>>
>> Signed-off-by: Nicolas Pitre <nicolas.pitre at 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.
More information about the devicetree-discuss
mailing list