[U-Boot] [PATCH] build: define CPU only when arch/${ARCH}/cpu/${CPU} exists

Simon Glass sjg at chromium.org
Tue Jul 8 00:44:36 CEST 2014


Hi Masahiro,

On 24 June 2014 07:10, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> The directory arch/${ARCH}/cpu/${CPU} does not exist
> in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86.
>
> These architectures have only one CPU type.
> Defining CPU should not be required for such architectures.
>
> This commit allows cpu field (= the 3rd field of boards.cfg)
> to be kept blank.
>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Andreas Bießmann <andreas.devel at googlemail.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Sonic Zhang <sonic.zhang at analog.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: Thomas Chou <thomas at wytron.com.tw>
> Cc: Stefan Kristiansson <stefan.kristiansson at saunalahti.fi>

Acked-by: Simon Glass <sjg at chromium.org>

But see question below.
> diff --git a/mkconfig b/mkconfig
> index 2bf5897..401f262 100755
> --- a/mkconfig
> +++ b/mkconfig
> @@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}"
>  arch="$2"
>  cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'`
>  spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'`
> +
> +if [ "$cpu" = "-" ] ; then
> +       cpu=
> +fi
> +
>  if [ "$6" = "<none>" ] ; then
>         board=
>  elif [ "$6" = "-" ] ; then
> @@ -114,10 +119,10 @@ fi
>
>  rm -f asm/arch
>
> -if [ -z "${soc}" ] ; then
> -       ln -s ${LNPREFIX}arch-${cpu} asm/arch
> -else
> +if [ "${soc}" ] ; then

Will this work OK in dash? (or non-bash)

>         ln -s ${LNPREFIX}arch-${soc} asm/arch
> +elif [ "${cpu}" ] ; then
> +       ln -s ${LNPREFIX}arch-${cpu} asm/arch
>  fi
>
>  if [ -z "$KBUILD_SRC" ] ; then
> --
> 1.9.1
>

Regards,
Simon


More information about the U-Boot mailing list