repository service wrote:
Log: sparc32: fix pre-loaded kernel command line
Fix more breakage from r828:
For some reason, QEMU/Sparc32 does not set FW_CFG_CMDLINE_SIZE, so we have to use FW_CFG_KERNEL_CMDLINE instead.
Setup romvec obp_arg.argv[1] and "boot-file" property.
Remove obsolete command line setup code from obio.c.
Looks good to me.
Just for the record, with r828 the way that bootpath/bootargs should now work is as follows:
- All Qemu configuration should now take place in the arch_init() (or equivalent) function only
- arch_init() should read the Qemu firmware device and setup the NVRAM variables boot-device and boot-file (boot-device can now take a list of space-separated devices to search - see ppc/qemu for an example of this)
- Everything else is now magically handled by Forth in (encode-bootpath) based upon the following rules from the IEEE-1275 spec:
- If either "load" or "boot" are issued on their own, search through each boot-device in order until open returns a valid ihandle, then load/boot from this. bootargs is set to the contents of boot-file.
- If either "load <device>" or "boot <device>" are specified then only attempt to use the device specified on the command line. bootargs is set to the contents of boot-file.
- If either "load <device> <cmdline>" or "boot <device> <cmdline>" are specified then only attempt to use the device specified on the command line. bootargs is set to <cmdline>.
Incidentally, I've just realised that this fixes "boot cdrom -H" on SPARC64 too :)
HTH,
Mark.