summaryrefslogtreecommitdiff
path: root/arch/arm/Kconfig
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-09-13 22:37:07 -0400
committerSimone Willett <swillett@nvidia.com>2012-08-03 17:49:49 -0700
commitf7d783cc292186266622cfebb552fcf695aefd46 (patch)
tree25b68b5d7aa06a4c11f4f93e718d3292d477884f /arch/arm/Kconfig
parentc00192e6a9cddb848b5cc8944893e1577085c897 (diff)
ARM: zImage: allow supplementing appended DTB with traditional ATAG data
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 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> Tested-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Dave Martin <dave.martin@linaro.org> Tested-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Chinmay Kamat <ckamat@nvidia.com> Change-Id: Ifb96adf6976da0f518c9c2cdad6be85f94c8ad1c Original: b90b9a38251e9c89c34179eccde57411ceb5f1aa Reviewed-on: http://git-master/r/107423 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/Kconfig')
-rw-r--r--arch/arm/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fc9d147ae30e..bc3e8dc005bb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1960,6 +1960,18 @@ config ARM_APPENDED_DTB
location into r2 of a bootloader provided DTB is always preferable
to this option.
+config ARM_ATAG_DTB_COMPAT
+ bool "Supplement the appended DTB with traditional ATAG information"
+ depends on ARM_APPENDED_DTB
+ help
+ Some old bootloaders can't be updated to a DTB capable one, yet
+ they provide ATAGs with memory configuration, the ramdisk address,
+ the kernel cmdline string, etc. Such information is dynamically
+ provided by the bootloader and can't always be stored in a static
+ DTB. To allow a device tree enabled kernel to be used with such
+ bootloaders, this option allows zImage to extract the information
+ from the ATAG list and store it at run time into the appended DTB.
+
config CMDLINE
string "Default kernel command string"
default ""