我认为问题的根源在于头部并没有设置在任何地方,但我不知道该怎么做。
我用来编译的命令
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-android-
$ cd msm-angler
$ make msm_defconfig
$ make
我没有使用git-checkout命令,因为我刚刚从google git repos下载了tar.gz文件
使用make msm_defconfig命令时会出现一些警告。
arch/arm64/configs/msm_defconfig:431:
warning: override: reassigning to symbol LEDS_TRIGGERS
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
#
# configuration written to .config
#
这是运行make
时出现的错误Makefile:796: *** multiple target patterns. Stop.
这是第796行
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
这里是设置vmlinux-deps的地方(第788行)
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
这里设置了KBUILD_LDS,KBUILD_VMLINUX_INIT和KBUILD_VMLINUX_MAIN(第781-783行)
export KBUILD_VMLIUX_INIT := $(head-y) $(init-y)
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
这里是设置所有* -y东西的地方(除了head-y)(第525-529行)
init-y := init/
drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/
我似乎无法找到设置头部的任何地方,这可能是问题的根源,但我不知道该为头部做些什么。