Solution of Version Conflict between linux Compilation kernel and svn
- 2021-08-12 03:58:44
- OfStack
Phenomenon
The system could have compiled the linux system kernel normally, but after installing svn, kernel compiled incorrectly.
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
gcc: directory: No such file or directory
gcc: directory": No such file or directory
<command-line>:0: warning: missing terminating " character
gcc: directory: No such file or directory
gcc: directory": No such file or directory
<command-line>:0: warning: missing terminating " character
gcc: directory: No such file or directory
gcc: directory": No such file or directory
<command-line>:0: warning: missing terminating " character
CC drivers/gpu/mali/mali/common/mali_kernel_core.o
arm-eabi-gcc: error: ": No such file or directory
make[4]: *** [drivers/gpu/mali/mali/common/mali_kernel_core.o] Errors 1
make[3]: *** [drivers/gpu/mali/mali] Errors 2
make[2]: *** [drivers/gpu/mali] Errors 2
make[1]: *** [drivers/gpu] Errors 2
make: *** [drivers] Errors 2
make: *** Waiting for unfinished tasks ....
Cause analysis
Navigating to drivers/gpu/mali/ump/Makefile. common and drivers/gpu/mali/mali/Makefile both have statements about SVN_REV: = xxxx. Normally, SVN_REV: = is empty. When the svn version is checked, SVN_REV: = has a value, causing the judgment in the script to go to the wrong branch.
Solution
Assign the SVN_REV values in both files to null "".
drivers/gpu/mali/ump/Makefile. common:
16 # Get subversion revision number, fall back to 0000 if no svn info is available
17 #SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
19 SVN_REV:=""
drivers/gpu/mali/mali/Makefile:
117 #SVN_REV := $(shell (cd $(DRIVER_DIR); (svnversion | grep -qv exported && svnversion) || git svn info | grep '^Revision: '| sed -e 's/ ^Revision: //' ) 2>/dev/null )
119 SVN_REV := ""
Summarize