diff options
author | Marcin Nowakowski <marcin.nowakowski@imgtec.com> | 2016-12-02 10:49:10 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2016-12-09 08:56:27 +0100 |
commit | 83a53ce9248fbcdf9dcac507b895d818db8c1706 (patch) | |
tree | ab0f0c93cf5c8e75df11345eeba0ab70ed38507e /kexec/arch/mips/kexec-mips.c | |
parent | 18bf48b15c289e88cb65cdc758749e2735eac291 (diff) |
mips: add dtb loading support
Kexec for MIPS currently does not support loading devicetrees, unless
they are embedded in the kernel elf file.
Add an option to either pass a new dtb file or - if not specified - to
be generated from existing device tree on the device. As new generic
platforms require a dtb to be passed separately this is required for
such platforms and will be ignored by the kernel otherwise.
Generic kexec infrastructure for dtb support is used.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/mips/kexec-mips.c')
-rw-r--r-- | kexec/arch/mips/kexec-mips.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kexec/arch/mips/kexec-mips.c b/kexec/arch/mips/kexec-mips.c index 867e9c3..2605c17 100644 --- a/kexec/arch/mips/kexec-mips.c +++ b/kexec/arch/mips/kexec-mips.c @@ -21,6 +21,10 @@ #include "kexec-mips.h" #include <arch/options.h> +/* Currently not used but required by top-level fs2dt code */ +off_t initrd_base = 0; +off_t initrd_size = 0; + static struct memory_range memory_range[MAX_MEMORY_RANGES]; /* Return a sorted list of memory ranges. */ @@ -77,6 +81,7 @@ void arch_usage(void) printf( " --command-line=STRING Set the kernel command line to STRING.\n" " --append=STRING Set the kernel command line to STRING.\n" + " --dtb=FILE Use FILE as the device tree blob.\n" ); } @@ -103,6 +108,9 @@ int arch_process_options(int argc, char **argv) case OPT_APPEND: arch_options.command_line = optarg; break; + case OPT_DTB: + arch_options.dtb_file = optarg; + break; default: break; } |