On Mon, Jan 30, 2012 at 12:11 PM, Anthony Liguori <anth...@codemonkey.ws> wrote: > On 01/29/2012 06:28 PM, John Williams wrote: >> >> On Sun, Jan 29, 2012 at 4:51 PM, Peter Crosthwaite >> <peter.crosthwa...@petalogix.com> wrote: >>> >>> Hi All, >>> >>> So on the topic of these command line arguments for initrd, dtb and >>> friends, >>> another related issue we have encountered (and have hacked around in our >>> tree) is not being able to relocate the initrd or kernel. Currently these >>> memory locations are hardcoded in arm_boot.c: >>> >>> #define KERNEL_ARGS_ADDR 0x100 >>> #define KERNEL_LOAD_ADDR 0x00010000 >>> #define INITRD_LOAD_ADDR 0x00d00000 >>> >>> If you see patch 6/7 in this same series I put in place a hack to >>> override >>> the initrd location in memory, but I wonder if instead this should go up >>> to >>> the command line interface as a parameter. Currently the machine model >>> (or >>> arm_boot.c) defines exactly where kernels/initrds/command-line-args line >>> in >>> memory, but since these are software properties should perhaps they go up >>> to >>> the command line as -kernel,foo=bar options? E.G: >>> >>> qemu-system-arm >>> >>> -kernel,kernel-image=/foo/zImage,kernel-addr=0x00010000,initrd=/foo/initrd,initrd_addr=0x00d00000 >> >> >> There's an opportunity here - QEMU needs the cmdline ability to load >> random binaries/elfs anyway, such as >> >> --load file@address > > > Make an elf loader device if you desire this ability but I'm skeptical that > it really is all that useful.
It is useful for non-Linux use-cases, of which there are many! Can you explain how you'd see such a 'loader device' in practice? How does it get bound into the machine model? How do we pass arguments to it? Thanks, John -- John Williams, PhD, B. Eng, B. IT PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663