나는 명령을 사용하고 있습니다
make 100ask_imx6ull_defconfig
커널을 컴파일하고 구성할 때 다음 오류 메시지가 나타납니다.
***
*** Can't find default configuration "arch/x86/configs/100ask_imx6ull_defconfig"!
***
scripts/kconfig/Makefile:112: recipe for target '100ask_imx6ull_defconfig' failed
make[1]: *** [100ask_imx6ull_defconfig] Error 1
Makefile:543: recipe for target '100ask_imx6ull_defconfig' failed
make: *** [100ask_imx6ull_defconfig] Error 2
이는 구성 파일을 찾을 수 없다는 의미이므로 검색했습니다.
find / -iname 100ask_imx6ull_defconfig
이 구성 파일이 있음을 발견했습니다.
아치 디렉터리에 구성 파일이 있지만 이전 오류는 다음과 같습니다.
*** 기본 구성 "arch/ x86 /configs/100ask_imx6ull_defconfig"를 찾을 수 없습니다 !
이는 make 명령이 arch/arm 디렉토리에서 구성 파일을 검색하지 않고, arch/x86 디렉토리에서 검색함을 보여줍니다. make 명령은 기본적으로 arch/$(ARCH)/configs에서 구성 파일을 검색합니다. /디렉토리.
export ARCH=arm
이 명령은 Linux 셸에서 환경 변수ARCH
의 값을 설정하는 데 사용됩니다arm
. 이 환경 변수는 일반적으로 Linux 커널이나 기타 아키텍처별 소프트웨어를 컴파일할 때 사용됩니다. 환경 변수를 설정하면ARCH
컴파일 중인 대상 아키텍처가 ARM임을 빌드 시스템에 알릴 수 있습니다. 이러한 방식으로 컴파일 시스템은 ARM 아키텍처에 적합한 컴파일 옵션과 툴 체인을 사용하여 코드를 컴파일합니다.
그래서 ARCH 환경 변수를 설정해야 하는데,
그런 다음 커널을 컴파일하고 구성했는데 더 이상 오류가 보고되지 않았습니다.
make 100ask_imx6ull_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
그런 다음 다음 명령을 사용하여 커널을 계속 컴파일하십시오.
make zImage -j4
그러면 다음 오류가 보고됩니다.
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
gcc: error: unrecognized command line option ‘-mapcs’; did you mean ‘-maes’?
gcc: error: unrecognized command line option ‘-mno-sched-prolog’; did you mean ‘-Wno-sign-promo’?
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’; did you mean ‘-fno-sched-interblock’?
gcc: error: unrecognized command line option ‘-mfpu=vfp’; did you mean ‘-mcpu=’?
scripts/Makefile.build:293: recipe for target 'scripts/mod/empty.o' failed
make[2]: *** [scripts/mod/empty.o] Error 1
scripts/Makefile.build:544: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
SHIPPED scripts/genksyms/parse.tab.c
SHIPPED scripts/genksyms/lex.lex.c
SHIPPED scripts/genksyms/keywords.hash.c
SHIPPED scripts/genksyms/parse.tab.h
CC kernel/bounds.s
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
gcc: error: unrecognized command line option ‘-mapcs’; did you mean ‘-maes’?
gcc: error: unrecognized command line option ‘-mno-sched-prolog’; did you mean ‘-Wno-sign-promo’?
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’; did you mean ‘-fno-sched-interblock’?
gcc: error: unrecognized command line option ‘-mfpu=vfp’; did you mean ‘-mcpu=’?
Kbuild:45: recipe for target 'kernel/bounds.s' failed
해결책:
export CROSS_COMPILE=arm-buildroot-linux-gnueabihf-