[U-Boot] [PATCH v2] zynq: Use GPLed files for SPL

Masahiro Yamada yamada.m at jp.panasonic.com
Thu Oct 30 04:28:20 CET 2014


Hi Soren,



On Wed, 29 Oct 2014 10:33:14 -0700
Soren Brinkmann <soren.brinkmann at xilinx.com> wrote:

> The latest Xilinx tools generate ps7_init files that are explicitly
> available under GPL. Change the makefile to allow drop in of those files
> for building the SPL.
> 
> Signed-off-by: Soren Brinkmann <soren.brinkmann at xilinx.com>
> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
> ---
> This  works, but I wonder whether there is a more elegant way to issue the
> warning.
> 
> v2:
>  - keep support for legacy file names
>  - issue compiler warning when legacy files are used
> ---
>  board/xilinx/zynq/Makefile | 10 ++++++++--
>  board/xilinx/zynq/legacy.c |  2 ++
>  board/xilinx/zynq/xil_io.h |  2 +-
>  3 files changed, 11 insertions(+), 3 deletions(-)
>  create mode 100644 board/xilinx/zynq/legacy.c
> 
> diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile
> index 71c0c351f929..0c54898b9a8e 100644
> --- a/board/xilinx/zynq/Makefile
> +++ b/board/xilinx/zynq/Makefile
> @@ -7,9 +7,15 @@
>  
>  obj-y	:= board.o
>  
> -# Please copy ps7_init.c/h from hw project to this directory
> +# Please copy ps7_init_gpl.c/h from hw project to this directory
>  obj-$(CONFIG_SPL_BUILD) += \
> -		$(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o)
> +		$(if $(wildcard $(srctree)/$(src)/ps7_init_gpl.c), ps7_init_gpl.o)
>  
>  # Suppress "warning: function declaration isn't a prototype"
> +CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes
> +
> +# keep support for legacy file names to give users time to switch
> +obj-$(CONFIG_SPL_BUILD) += \
> +		$(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o legacy.o)
> +
>  CFLAGS_REMOVE_ps7_init.o := -Wstrict-prototypes



I think, if both ps7_init_gpl.c and ps7_init.c exist, the build will fail,
so the former should take precedence over the latter.


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list