[PATCH 2/4] powerpc: Add device tree utility functions to zImage

Segher Boessenkool segher at kernel.crashing.org
Thu Mar 22 04:10:21 EST 2007


> @@ -262,6 +253,10 @@ void start(void *sp)
>  	printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",
>  	       _start, sp);
>
> +	/* Ensure that the device tree has a /chosen node */
> +	if (! finddevice("/chosen"))
> +		create_node(NULL, "chosen");
> +
>  	vmlinux = prep_kernel();
>  	initrd = prep_initrd(vmlinux, loader_info.initrd_addr,
>  			     loader_info.initrd_size);

So this is done early, and unconditional now?  Just
double checking, not enough context (for me, anyway)
in the patch itself.


Segher




More information about the Linuxppc-dev mailing list