From 1da8f1798e307fb8422753984339beb00025f97d Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sun, 12 Apr 2015 12:24:58 +0200 Subject: MIPS: Add support for vmlinux.bin appended dtb Add support for detecting a vmlinux.bin appended dtb and overriding the boot arguments to match the UHI interface. Due to the PERCPU section being empty for !SMP, but still modifying the current address by aligning it to the page size, do not define it for !SMP builds to allow __appended_dtb to still point to the actual end of the data. Signed-off-by: Jonas Gorski Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: John Crispin Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Aaro Koskinen Cc: Markos Chandras Cc: Andrew Bresticker Cc: Daniel Schwierzeck Cc: Paul Burton Cc: James Hartley Patchwork: https://patchwork.linux-mips.org/patch/9739/ Signed-off-by: Ralf Baechle --- arch/mips/Kconfig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'arch/mips/Kconfig') diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 164d8c73552f..7cb5f6dbaeee 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2677,6 +2677,33 @@ config USE_OF config BUILTIN_DTB bool +choice + prompt "Kernel appended dtb support" if OF + default MIPS_NO_APPENDED_DTB + + config MIPS_NO_APPENDED_DTB + bool "None" + help + Do not enable appended dtb support. + + config MIPS_RAW_APPENDED_DTB + bool "vmlinux.bin" + help + With this option, the boot code will look for a device tree binary + DTB) appended to raw vmlinux.bin (without decompressor). + (e.g. cat vmlinux.bin .dtb > vmlinux_w_dtb). + + This is meant as a backward compatibility convenience for those + systems with a bootloader that can't be upgraded to accommodate + the documented boot protocol using a device tree. + + Beware that there is very little in terms of protection against + this option being confused by leftover garbage in memory that might + look like a DTB header after a reboot if no actual DTB is appended + to vmlinux.bin. Do not leave this option active in a production kernel + if you don't intend to always append a DTB. +endchoice + endmenu config LOCKDEP_SUPPORT -- cgit v1.2.3-55-g7522