[PATCH 17/19] bootwrapper: compatibility layer for old U-Boots (a.k.a. cuImage, cuboot)

Kumar Gala galak at kernel.crashing.org
Tue Mar 13 08:12:07 EST 2007


On Mar 12, 2007, at 3:42 PM, Scott Wood wrote:

> Add a bootwrapper platform (cuboot) that takes a bd_t from a legacy
> U-Boot, and inserts data from it into a device tree which has been
> compiled into the kernel.  This should help ease the transition to
> arch/powerpc in cases where U-Boot has not yet been updated to pass a
> device tree, or where upgrading firmware isn't practical.
>
> The device trees currently in the kernel tree must have
> /chosen/linux,stdout-path added to work with cuboot.
>
> The kernel command line, mac addresses, and various clocks will be  
> filled
> in based on the bd_t.
>
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> ---
>  arch/powerpc/Kconfig                      |   16 ++++
>  arch/powerpc/Makefile                     |    2 +-
>  arch/powerpc/boot/.gitignore              |    3 +
>  arch/powerpc/boot/Makefile                |   20 ++++-
>  arch/powerpc/boot/cuboot-83xx.c           |    4 +
>  arch/powerpc/boot/cuboot-85xx.c           |    4 +
>  arch/powerpc/boot/cuboot-86xx.c           |    4 +
>  arch/powerpc/boot/cuboot.c                |  137 ++++++++++++++++++ 
> +++++++++++
>  arch/powerpc/boot/ppcboot.h               |  103 ++++++++++++++++++ 
> ++++
>  arch/powerpc/boot/wrapper                 |   46 ++++++++--
>  arch/powerpc/platforms/83xx/mpc834x_mds.c |    5 +-
>  11 files changed, 329 insertions(+), 15 deletions(-)
>  create mode 100644 arch/powerpc/boot/cuboot-83xx.c
>  create mode 100644 arch/powerpc/boot/cuboot-85xx.c
>  create mode 100644 arch/powerpc/boot/cuboot-86xx.c
>  create mode 100644 arch/powerpc/boot/cuboot.c
>  create mode 100644 arch/powerpc/boot/ppcboot.h
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 6dfbd52..54f7b34 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -967,6 +967,22 @@ config SECCOMP
>
>  	  If unsure, say Y. Only embedded should say N here.
>
> +config CUIMAGE_DTS
> +	string "Device tree source file"
> +	depends on DEFAULT_UIMAGE
> +	help
> +	  This specifies the device tree source (.dts) file to be
> +	  compiled and included when building the cuImage target.  If a
> +	  relative filename is given, then it will be relative to
> +	  arch/powerpc/boot/dts.
> +
> +	  The cuImage target is used for booting on older U-Boot (and
> +	  PPCBoot) bootloaders that pass a bd_t instead of a device tree.
> +	  Such a kernel will not work with a newer U-Boot that passes the
> +	  device tree itself.  If your U-Boot does not mention a device
> +	  tree in "help bootm", then use the uImage target instead of
> +	  cuImage.
> +
>  endmenu

Why don't we make this more generic a reference the DTS regardless if  
you are using CUIMAGE?

- k



More information about the Linuxppc-dev mailing list