Steward
分享是一種喜悅、更是一種幸福
手機 - F(x)tec Pro1 - LineageOS - Build Kernel
參考資料:
https://github.com/LineageOS/android_kernel_fxtec_sm6115
$ cd
$ wget https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/clang-r536225.tar.gz
$ git clone https://github.com/LineageOS/android_kernel_fxtec_sm6115 -b lineage-22.2 --depth=1
$ cd android_kernel_fxtec_sm6115
$ mkdir clang
$ cd clang
$ tar xvf ~/clang-r536225.tar.gz
$ cd ..
$ sudo fallocate -l 16G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ export PATH=$PWD/clang/bin:$PATH
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ export CROSS_COMPILE_COMPAT=arm-linux-gnueabi-
$ export LLVM=1
$ export LLVM_IAS=1
### sudo ln -s /usr/bin/python3 /usr/local/bin/python
$ make mrproper
$ wget https://github.com/steward-fu/website/releases/download/pro1/lineageos_pro1_defconfig
$ cp lineageos_pro1_defconfig .config
$ make olddefconfig
$ make Image.gz -j4
drivers/crypto/msm/ota_crypto.c:804:45: error: array has incomplete element type 'const struct of_device_id'
804 | static const struct of_device_id qcota_match[] = {
| ^
./include/linux/device.h:310:15: note: forward declaration of 'struct of_device_id'
310 | const struct of_device_id *of_match_table;
| ^
$ vim drivers/crypto/msm/ota_crypto.c
#include <linux/of.h>
$ make Image.gz -j4
drivers/input/touchscreen/gt1x_v1_6_revised/gt1x.c:1060:13: error: use of undeclared identifier 'gt1x_ts_pm_ops'; did you mean 'gt1x_ts_probe'?
1060 | .pm = >1x_ts_pm_ops,
| ^~~~~~~~~~~~~~
| gt1x_ts_probe
drivers/input/touchscreen/gt1x_v1_6_revised/gt1x.c:737:12: note: 'gt1x_ts_probe' declared here
737 | static int gt1x_ts_probe(struct i2c_client *client, const struct i2c_device_id *id)
| ^
$ vim drivers/input/touchscreen/gt1x_v1_6_revised/gt1x.c +1060
954 // #elif defined(CONFIG_PM)
$ make Image.gz -j4
drivers/input/touchscreen/synaptics_tcm/synaptics_tcm_i2c.c:366:9: error: incompatible integer to pointer conversion assigning to 'struct drm_panel *' from 'int' [-Wint-conversion]
366 | panel = of_drm_find_panel(node);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~
$ vim drivers/input/touchscreen/synaptics_tcm/synaptics_tcm_i2c.c +366
366 panel = (struct drm_panel *)(of_drm_find_panel(node));
$ make Image.gz -j4
drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c:29:10: error: 'msm_camera_tz_util.h' file not found with <angled> include; use "quotes" instead
29 | #include <msm_camera_tz_util.h>
| ^~~~~~~~~~~~~~~~~~~~~~
| "msm_camera_tz_util.h"
$ vim drivers/media/platform/msm/camera_v2/common/Makefile
2 ccflags-y += -I $(srctree)/drivers/media/platform/msm/camera_v2/ -Idrivers/media/platform/msm/camera_v2/common
$ make Image.gz -j4
./include/trace/events/msm_cam.h:20:10: fatal error: 'msm_isp.h' file not found
20 | #include "msm_isp.h"
$ vim drivers/media/platform/msm/camera_v2/isp/Makefile
2 ccflags-y += -I $(srctree)/drivers/media/platform/msm/camera_v2 -Idrivers/media/platform/msm/camera_v2/isp
$ make Image.gz -j4
./drivers/media/platform/msm/camera_v2/sensor/msm_sensor.h:35:10: fatal error: 'msm_camera_i2c.h' file not found
35 | #include "msm_camera_i2c.h"
$ vim drivers/media/platform/msm/camera_v2/sensor/io/Makefile
2 ccflags-y += -I $(srctree)/drivers/media/platform/msm/camera_v2/ -Idrivers/media/platform/msm/camera_v2/sensor/io
$ make Image.gz -j4
./include/trace/define_trace.h:89:10: fatal error: './ipa_trace.h' file not found
89 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
$ vim drivers/platform/msm/ipa/ipa_v2/Makefile
2 ccflags-y += -Idrivers/platform/msm/ipa/ipa_v2
$ make Image.gz -j4