[27]_make[2]: arm-hisiv300-linux-gcc: Command not found

之前编译海思的sdk时都是uboot、kernel、rootfs都是分开独立编译的,没有完全按照sdk的说明来,这次编译osdrv目录时,不管怎么整,都是出现下面的问题:

------前面省略n行---

Try 'dirname --help' for more information.
make[2]: arm-hisiv300-linux-gcc: Command not found
/bin/sh: arm-hisiv300-linux-gcc: command not found
make[2]: arm-hisiv300-linux-gcc: Command not found
make[2]: *** [hello_world.o] Error 127
dirname: missing operand
Try 'dirname --help' for more information.
make[1]: *** [examples/standalone] Error 2
make[1]: *** Waiting for unfinished jobs....
/bin/sh: arm-hisiv300-linux-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information.

很不明白,uclibc工具链之前安装了都是好好的,为什么就说找不到呢?折腾了许久,看了顶层的Makefile才知道原来它只认识arm-hisiv300-linux或者arm-hisiv400-linux,其他的统统不认识,我去.....解决办法:

1.给原来的工具链重新创建符号链接为arm-hisiv300-linux或者arm-hisiv400-linux并在~/.brashrc中export PATH导出环境编译,然后source .brashrc使生效。

##########################################################################################
# prepare param
##########################################################################################
export OSDRV_DIR=$(shell pwd)
export OSDRV_CROSS
export CHIP
export ARCH=arm
export CROSS_COMPILE=$(OSDRV_CROSS)-
export OSDRV_CROSS_CFLAGS

# if CHIP is support, we set SUPPORT_CHIP = "yes"
SUPPORT_CHIP := "no"

ifeq ($(OSDRV_CROSS), )
$(error you must set OSDRV_CROSS first!)
endif

ifeq ($(CHIP), )
$(error you must set CHIP first!)
endif

ifeq ($(OSDRV_CROSS),arm-hisiv300-linux)
LIB_TYPE:=uclibc
BUSYBOX_CFG:=config_v300_arm9
TOOLCHAIN_DIR:=arm-hisiv300-linux
CROSS_SPECIFIED:=y
endif

ifeq ($(OSDRV_CROSS),arm-hisiv400-linux)
LIB_TYPE:=glibc
BUSYBOX_CFG:=config_v400_arm9
TOOLCHAIN_DIR:=arm-hisiv400-linux
CROSS_SPECIFIED:=y
endif

BUSYBOX_VER:=busybox-1.20.2
TOOLCHAIN_RUNTIME_LIB_C:=lib.tgz
TOOLCHAIN_RUNTIME_LIB:=armv5te_arm9_soft
OSDRV_CROSS_CFLAGS:=-march=armv5te -mcpu=arm926ej-s

ifneq ($(CROSS_SPECIFIED),y)
all:
@echo "---------------------------------------------------------------------"
@echo "ERROR: you should have specified an OSDRV_CROSS! "
@echo "e.g., make OSDRV_CROSS=arm-hisiv300-linux all "
@echo "e.g., make OSDRV_CROSS=arm-hisiv400-linux all "
@echo "---------------------------------------------------------------------"
endif

--------------------以上是Makefile中关于工具链的关键部分---------------------------


猜你喜欢

转载自blog.csdn.net/qhzm72/article/details/79122254