提交 a8b0f9b6 编写于 作者: M Masahiro Yamada 提交者: Tom Rini

build: define CPU only when arch/${ARCH}/cpu/${CPU} exists

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: NMasahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
上级 d1db76f1
此差异已折叠。
......@@ -24,10 +24,7 @@ OBJCOPYFLAGS :=
# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
# CPU-specific code.
CPUDIR=arch/$(ARCH)/cpu/$(CPU)
ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR)))
CPUDIR=arch/$(ARCH)/cpu
endif
CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
......
......@@ -5,7 +5,7 @@
*/
#include <common.h>
#include <asm/arch/sound.h>
#include <asm/sound.h>
#include <asm/sdl.h>
int sound_play(uint32_t msec, uint32_t frequency)
......
......@@ -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
ln -s ${LNPREFIX}arch-${soc} asm/arch
elif [ "${cpu}" ] ; then
ln -s ${LNPREFIX}arch-${cpu} asm/arch
fi
if [ -z "$KBUILD_SRC" ] ; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册