[Skiboot] [PATCH 4/4] init: Test device tree for binary kernel

Stewart Smith stewart at linux.vnet.ibm.com
Mon Mar 7 15:13:23 AEDT 2016

Michael Neuling <mikey at neuling.org> writes:
> Test device tree for binary kernel in /kernel-binary-base.  Use this
> if found and assume it's stripped from the elf.
> This can reduce the boot time since the kernel no longer needs to
> relocate itself.
> An example of how to do this using mambo is given with the follow
> skiboot.tcl patch and these commands:
> % objcopy -O binary vmlinux vmlinux.stripped
> % SKIBOOT_ZIMAGE=vmlinux.stripped
> diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
> index d3b4120..f0f09c9 100644
> --- a/external/mambo/skiboot.tcl
> +++ b/external/mambo/skiboot.tcl
> @@ -34,7 +34,7 @@ if { ![info exists env(SKIBOOT_ZIMAGE)] } {
>  mconfig payload PAYLOAD $env(SKIBOOT_ZIMAGE)
>  # Paylod: Memory location for a Linux style ramdisk/initrd
> -mconfig payload_addr PAYLOAD_ADDR 0x20000000;
> +mconfig payload_addr PAYLOAD_ADDR 0x0;
>  # FW: Where should ePAPR Flat Devtree Binary be loaded
>  mconfig epapr_dt_addr EPAPR_DT_ADDR 0x1f00000;# place at 31M
> @@ -144,6 +144,7 @@ set root_node [mysim of find_device "/"]
>  mysim of addprop $root_node string "epapr-version" "ePAPR-1.0"
>  mysim of setprop $root_node "compatible" "ibm,powernv"
> +mysim of addprop $root_node int "kernel-binary-base" $mconf(payload_addr)
>  set cpus_node [mysim of find_device "/cpus"]
>  mysim of addprop $cpus_node int "#address-cells" 1
> Signed-off-by: Michael Neuling <mikey at neuling.org>
> ---
> We can bikeshed the dt binding here.  Should it be in /chosen?  Should
> we allow elf vs stripped in the dt binding?  Maybe another name?

Well... I have all the painting gear you could wish for, so LET'S GET

I have a feeling that /chosen would make a bunch more sense, as we're
choosing to boot from memory location, but there's no reason we'd *have*
to boot from there, and while it may be a description of what's in a
memory location, it seems like more of a choice to boot from theer than
a description of the machine.

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list