diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-01-24 19:18:58 +0000 |
---|---|---|
committer | Christoffer Dall <c.dall@virtualopensystems.com> | 2012-02-05 13:07:07 -0500 |
commit | 14dcbbd384abc25d475fd2021db3007a22383e46 (patch) | |
tree | a406e5c9d6ef6e13d1fe136b07f615bbd52a65bc /model.lds.S | |
parent | 2b03c4f2e42b2745d3ac26450e59cc674cfe3904 (diff) |
boot-wrapper: Support reading kernel/initrd via semihosting
Implement support in the boot-wrapper for reading our kernel,
initrd and command line arguments using the semihosting ABI
provided by a Fast Model. We build a second AXF file
linux-system-semi.axf which does not depend on or bake in
a kernel binary. Instead when you start the model with it
you pass the model a parameter like:
-C cluster.cpu0.semihosting-cmd_line="--kernel /path/to/uImage
--initrd /path/to/initrd -- console=ttyAMA0 mem=512M ..."
The boot wrapper will interpret the --kernel and --initrd
arguments as taking an option which is a (host system)
path, and pass the tail of the string following '--' to
the kernel as its command line.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'model.lds.S')
-rw-r--r-- | model.lds.S | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/model.lds.S b/model.lds.S index 4769480..3af4e07 100644 --- a/model.lds.S +++ b/model.lds.S @@ -13,11 +13,12 @@ TARGET(binary) INPUT(./monitor.o) INPUT(./boot.o) +#ifndef SEMIHOSTING INPUT(./uImage) #ifdef USE_INITRD INPUT(./filesystem.cpio.gz) #endif - +#endif @@ -30,15 +31,22 @@ MON_OFFSET = 0xf0000000; SECTIONS { . = PHYS_OFFSET; + +#ifdef SEMIHOSTING + .text : { bootsemi.o } +#else .text : { boot.o } +#endif . = PHYS_OFFSET + 0x8000 - 0x40; kernel = . + 0x40; +#ifndef SEMIHOSTING .kernel : { ./uImage } +#endif . = PHYS_OFFSET + 0x00800000; filesystem = .; -#ifdef USE_INITRD +#if defined(USE_INITRD) && !defined(SEMIHOSTING) .filesystem : { ./filesystem.cpio.gz } fs_size = . - filesystem; #endif |