Open MrFlyingToasterman opened 7 years ago
Here's the stack with the msmcortex_defconfig:
[...]
CC net/ipv6/netfilter/ip6t_REJECT.o
CC net/ipv4/esp4.o
CC net/netfilter/nf_nat_proto_dccp.o
CC drivers/gpu/msm/kgsl_trace.o
LD net/ipv6/netfilter/nf_conntrack_ipv6.o
LD net/ipv6/netfilter/nf_defrag_ipv6.o
LD net/ipv6/netfilter/built-in.o
CC net/ipv6/sit.o
CC net/ipv4/ipcomp.o
In file included from drivers/gpu/msm/kgsl_trace.h:1235:0,
from drivers/gpu/msm/kgsl_trace.c:21:
include/trace/define_trace.h:83:43: fatal error: ./kgsl_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
make[3]: [scripts/Makefile.build:258: drivers/gpu/msm/kgsl_trace.o] Fehler 1 (ignoriert)
CC drivers/gpu/msm/kgsl_drawobj.o
CC net/netfilter/nf_nat_proto_udplite.o
CC net/ipv4/xfrm4_tunnel.o
[...]
CC drivers/mfd/msm-cdc-supply.o
LD drivers/media/platform/msm/camera_v2/fd/built-in.o
CC drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.o
CC drivers/media/platform/msm/camera_v2/isp/msm_isp_util.o
CC drivers/mfd/wcd9xxx-utils.o
CC drivers/media/tuners/mc44s803.o
In file included from drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c:25:0:
include/trace/events/msm_cam.h:19:21: fatal error: msm_isp.h: No such file or directory
#include "msm_isp.h"
^
compilation terminated.
make[6]: [scripts/Makefile.build:258: drivers/media/platform/msm/camera_v2/isp/msm_isp_util.o] Fehler 1 (ignoriert)
CC drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.o
LD drivers/media/tuners/tda18271.o
LD drivers/media/tuners/built-in.o
CC drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.o
[...]
CC [M] drivers/net/wireless/ath/wil6210/wil_crash_dump.o
LD drivers/platform/msm/ipa/ipa_clients/built-in.o
CC drivers/platform/msm/ipa/ipa_v2/ipa.o
LD drivers/pci/host/built-in.o
LD drivers/pci/built-in.o
CC drivers/pwm/core.o
CC [M] drivers/net/wireless/ath/wil6210/p2p.o
CC drivers/power/qcom/debug_core.o
In file included from drivers/platform/msm/ipa/ipa_v2/ipa_trace.h:152:0,
from drivers/platform/msm/ipa/ipa_v2/ipa.c:41:
include/trace/define_trace.h:83:43: fatal error: ./ipa_trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
make[5]: [scripts/Makefile.build:258: drivers/platform/msm/ipa/ipa_v2/ipa.o] Fehler 1 (ignoriert)
CC drivers/platform/msm/ipa/ipa_v2/ipa_debugfs.o
CC drivers/pwm/sysfs.o
CC drivers/power/qcom/apm.o
CC [M] drivers/net/wireless/ath/wil6210/ftm.o
CC drivers/pwm/pwm-qpnp.o
[...]
CC drivers/video/fbdev/core/fbsysfs.o
LD drivers/platform/msm/ipa/ipa_v3/ipat.o
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/platform/msm/ipa/ipa_v3/ipa.o: Datei oder Verzeichnis nicht gefunden
make[5]: [scripts/Makefile.build:387: drivers/platform/msm/ipa/ipa_v3/ipat.o] Fehler 1 (ignoriert)
LD drivers/platform/msm/ipa/ipa_v3/built-in.o
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/platform/msm/ipa/ipa_v3/ipat.o: Datei oder Verzeichnis nicht gefunden
make[5]: [scripts/Makefile.build:337: drivers/platform/msm/ipa/ipa_v3/built-in.o] Fehler 1 (ignoriert)
CC drivers/platform/msm/ipa/ipa_api.o
CC drivers/usb/core/endpoint.o
[...]
LD drivers/usb/storage/built-in.o
LD drivers/usb/built-in.o
LD drivers/built-in.o
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/soc/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/gpu/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/net/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/media/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/bluetooth/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/platform/built-in.o: Datei oder Verzeichnis nicht gefunden
make[1]: [scripts/Makefile.build:337: drivers/built-in.o] Fehler 1 (ignoriert)
LINK vmlinux
LD vmlinux.o
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find drivers/built-in.o: Datei oder Verzeichnis nicht gefunden
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-linaro-4.9/bin/aarch64-linux-android-ld: cannot find sound/built-in.o: Datei oder Verzeichnis nicht gefunden
make: [Makefile:946: vmlinux] Fehler 1 (ignoriert)
make[1]: *** Keine Regel vorhanden, um das Ziel „vmlinux“,
benötigt von „arch/arm64/boot/Image“, zu erstellen.
make[1]: Das Ziel „arch/arm64/boot/Image.gz-dtb“ wurde wegen Fehlern nicht aktualisiert.
make: [arch/arm64/Makefile:120: Image.gz-dtb] Fehler 2 (ignoriert)
Building modules, stage 2.
MODPOST 8 modules
CC block/test-iosched.mod.o
CC drivers/char/rdbg.mod.o
[...]
Still no rule to build the target vmlinux; The target arch/arm64/boot/Image.gz-dtb was not updated because of errors. I have built a lot of Kernels in the last couple of days. I am probably confused with the defconfigs.
How can i get the missing dependencies ?
Read your errors properly!!! Nothing to do with vmlinux: fatal error: ./ipa_trace.h: No such file or directory fatal error: msm_isp.h: No such file or directory fatal error: ./kgsl_trace.h: No such file or directory
Already an issue: https://github.com/OnePlusOSS/android_kernel_oneplus_msm8998/issues/3 Kernel fails to build when building only kernel.
Needs full source, and make bootimage:
Building the System
[Set up environment]
Initialize the environment with the envsetup.sh script. git a $ . build/envsetup.sh
[Choose a Target]
Choose which target to build with lunch.
$ lunch
enter 25 for msm8996-userdebug
enter 26 for msm8996-user
[Build the code]
Build everything with make. GNU make can handle parallel tasks with a -jN argument.
$ make -j4
Try fix: https://github.com/adinkwok/oneplus5-kernel/commit/ec4ec687ba23609b9c323145c7d509262b0f025f
Where can i find a documentation to build ? And where can i find the full source ?
Downloading the Source
Repo sync all code with default.xml repo init -u git://github.com/OnePlusOSS/android.git -b oneplus/QC8998_N_7.1 --depth=1 repo sync
Root your device
Pull the necessary libraries from your device by executing the script pull_library.sh
After pull_library.sh be executed, a directory named "vendor" should be generated. Copy this directory to root of project.
Building the System
[Set up environment] Initialize the environment with the envsetup.sh script. git a $ . build/envsetup.sh [Choose a Target] Choose which target to build with lunch. $ lunch enter **32 for msm8998-userdebug 33 for msm8998-user
[Build the code] Build everything with make. GNU make can handle parallel tasks with a -jN argument. $ make -j4 [Flash a Device] Let device enter fastboot mode, run $ adb reboot bootloader Once the device is in fastboot mode, run $ fastboot flash boot boot.img $ fastboot flash system system.img If you want flash new /data partition, run $ fastboot flash userdata userdata.img
https://github.com/OnePlusOSS/android/tree/oneplus/QC8998_N_7.1
The current kernel source is not able to be built with GCC 4.9 without making some basic changes. As @rancidfrog already mentioned, the following patch is necessary to have a successful build:
https://github.com/adinkwok/oneplus5-kernel/commit/1492bdf1e3d8f4b61d31225afe186624e5816352
Which version did it work with without these modifications?
I build with Google's latest GCC 4.9 prebuilt.
It can be found here: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
Build works fine without needing any fixes as long as you specify an output directory in all your make commands. E.g. "make O=out ...". No issues when building msmcortex-perf_defconfig
anyone came up with a solution for this? thanks
@jgcaap, I've mentioned that you need to specify the "O=
E.g "make O=output ARCH=arm64 msmcortex-perf_defconfig"
Hi @adinkwok I once compiled an official kernel, which was successfully compiled after modification. However, when it was flash into the phone, the phone could not enter the system, so it could only enter the fastboot mode. Later, I also successfully compiled the kernel you modified, but it can only enter the fastboot mode. I would like to ask whether your kernel can run successfully, or what steps I am still short of, thank you!
Downloading the Source
Repo sync all code with default.xml repo init -u git://github.com/OnePlusOSS/android.git -b oneplus/QC8998_N_7.1 --depth=1 repo sync
Root your device
Pull the necessary libraries from your device by executing the script pull_library.sh
After pull_library.sh be executed, a directory named "vendor" should be generated. Copy this directory to root of project.
Building the System
[Set up environment] Initialize the environment with the envsetup.sh script. git a $ . build/envsetup.sh [Choose a Target] Choose which target to build with lunch. $ lunch enter **32 for msm8998-userdebug 33 for msm8998-user
[Build the code] Build everything with make. GNU make can handle parallel tasks with a -jN argument. $ make -j4 [Flash a Device] Let device enter fastboot mode, run $ adb reboot bootloader Once the device is in fastboot mode, run $ fastboot flash boot boot.img $ fastboot flash system system.img If you want flash new /data partition, run $ fastboot flash userdata userdata.img
https://github.com/OnePlusOSS/android/tree/oneplus/QC8998_N_7.1
where can i find the pull_library.sh script file
Here's my stack:
Information about my OS:
Some DEV ENV information:
Prepare:
Compile issue:
I tried with the following defconfigs:
Can it be that I am missing a source?