Skip to content
Snippets Groups Projects
Commit a8b0f9b6 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

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: default avatarMasahiro 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>
parent d1db76f1
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -24,10 +24,7 @@ OBJCOPYFLAGS := ...@@ -24,10 +24,7 @@ OBJCOPYFLAGS :=
# so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
# CPU-specific code. # CPU-specific code.
CPUDIR=arch/$(ARCH)/cpu/$(CPU) CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),)
ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR)))
CPUDIR=arch/$(ARCH)/cpu
endif
sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <asm/arch/sound.h> #include <asm/sound.h>
#include <asm/sdl.h> #include <asm/sdl.h>
int sound_play(uint32_t msec, uint32_t frequency) int sound_play(uint32_t msec, uint32_t frequency)
......
...@@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}" ...@@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}"
arch="$2" arch="$2"
cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'` cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'`
spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'` spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'`
if [ "$cpu" = "-" ] ; then
cpu=
fi
if [ "$6" = "<none>" ] ; then if [ "$6" = "<none>" ] ; then
board= board=
elif [ "$6" = "-" ] ; then elif [ "$6" = "-" ] ; then
...@@ -114,10 +119,10 @@ fi ...@@ -114,10 +119,10 @@ fi
rm -f asm/arch rm -f asm/arch
if [ -z "${soc}" ] ; then if [ "${soc}" ] ; then
ln -s ${LNPREFIX}arch-${cpu} asm/arch
else
ln -s ${LNPREFIX}arch-${soc} asm/arch ln -s ${LNPREFIX}arch-${soc} asm/arch
elif [ "${cpu}" ] ; then
ln -s ${LNPREFIX}arch-${cpu} asm/arch
fi fi
if [ -z "$KBUILD_SRC" ] ; then if [ -z "$KBUILD_SRC" ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment