После сборки нужно проверить конфигурацию ядра, я исправлял по одной опции, и заново запускал make hybris-boot и make hybris - recovery, если все собиралось без ошибок, после этого снова проверял конфиг.
HABUILD_SDK $ cd $ANDROID_ROOT
hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config
Файл конфигурации находится тут: $ANDROID_ROOT/kernel/asus/msm8916/arch/arm64/configs/cyanogenmod_Z00L_defconfig
Команда поиска файла конфигурации find . -type f -name "cyanogenmod_Z00L*"
Добавлены следующие параметры в конфиг ядра:
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_IKCONFIG_PROC=y
CONFIG_DUMMY=n
CONFIG_ANDROID_LOW_MEMORY_KILLER=n
CONFIG_DEVTMPFS=y
CONFIG_FHANDLE=y
CONFIG_VT=y
CONFIG_SYSVIPC=y
CONFIG_DEVTMPFS_MOUNT=y
Исправление ошибок с конфиге после проверки:
- ERROR: CONFIG_FHANDLE is invalid (СДЕЛАНО) It is unset Allowed values : y Comment says: systemd: http://cgit.freedesktop.org/systemd/systemd/commit/README?id=001809282918f273d372f1ee09d10b783c18a474
- ERROR: CONFIG_ANDROID_LOW_MEMORY_KILLER is invalid Value is: y Allowed values : n Comment says: not tested with Mer
- ERROR: CONFIG_VT is invalid
It is unset Allowed values : y Comment says: Required for virtual consoles
При компиляции выходит ошибка:
LD init/built-in.o drivers/built-in.o: In function `vgacon_init': sensors_ssc.c:(.text+0x24664): undefined reference to `screen_info' sensors_ssc.c:(.text+0x24668): undefined reference to `screen_info' drivers/built-in.o: In function `vgacon_startup': sensors_ssc.c:(.text+0x24694): undefined reference to `screen_info' sensors_ssc.c:(.text+0x246a0): undefined reference to `screen_info' sensors_ssc.c:(.text+0x24720): undefined reference to `screen_info' drivers/built-in.o:sensors_ssc.c:(.text+0x24a7c): more undefined references to `screen_info' follow make[2]: *** [vmlinux] Error 1 make[1]: *** [sub-make] Error 2 make[1]: Leaving directory `/path/to/mer/android/droid/kernel/asus/msm8916' make: *** [TARGET_KERNEL_BINARIES] Error 2
Решение:
Файл находится ./kernel/asus/msm8916/drivers/sensors/sensors_ssc.c в который нужно добавить эти строчки:
#include <linux/screen_info.h>
#ifdef CONFIG_VT
struct screen_info screen_info;
#endif
Вот здесь расположен последний конфиг для Z00L.
проверка конфигурации ядра выдает следующие предупреждения, ошибки исправлены.
HABUILD_SDK [Z00L] ilnur@ubuntu:~/to/mer/android/droid$ hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config
WARNING: CONFIG_WATCHDOG_NOWAYOUT is invalid
It is unset
Allowed values : y, !
Comment says: If device uses watchdogs with dsme (https://github.com/nemomobile/dsme), this option should be enabled or watchdog does not protect the device in case dsme crashes.
WARNING: CONFIG_CGROUP_DEVICE is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_BT_HCIUART_H4 is invalid
It is unset
Allowed values : y, !
Comment says: Bluez (optional): Needed if bluez used as bluetooth stack
WARNING: CONFIG_BLK_CGROUP is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_CGROUP_MEM_RES_CTLR_KMEM is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_NETPRIO_CGROUP is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_FANOTIFY is invalid
It is unset
Allowed values : y, !
Comment says: optional, required for systemd readahead.
WARNING: CONFIG_LBDAF is invalid
It is unset
Allowed values : y, !
Comment says: ext4 filesystem requires this in order to support filesysetms with huge_file feature, which is enabled by default by mke2fs.ext4
WARNING: CONFIG_CGROUP_PERF is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_CGROUP_MEM_RES_CTLR_SWAP is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_CGROUP_MEM_RES_CTLR is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_AUDIT is invalid
Value is: y
Allowed values : n, !
Comment says: systemd: Either disable here or in cmdline http://cgit.freedesktop.org/systemd/systemd/commit/README?id=77b6e19458f37cfde127ec6aa9494c0ac45ad890
WARNING: CONFIG_BT_HCIUART is invalid
It is unset
Allowed values : y, !
Comment says: Bluez (optional): Needed if bluez used as bluetooth stack
WARNING: CONFIG_FW_LOADER_USER_HELPER is invalid
Value is: y
Allowed values : n, !
Comment says: it's actually needed by some Lollipop based devices; systemd(optional): http://cgit.freedesktop.org/systemd/systemd/commit/README?id=713bc0cfa477ca1df8769041cb3dbc83c10eace2
WARNING: CONFIG_AUTOFS4_FS is invalid
It is unset
Allowed values : y, m, !
Comment says: systemd (optional): http://cgit.freedesktop.org/systemd/systemd/commit/README?id=713bc0cfa477ca1df8769041cb3dbc83c10eace2
WARNING: CONFIG_NETFILTER_NETLINK_ACCT is invalid
It is unset
Allowed values : y, m, !
Comment says: connman (optional): for routing and statistic support in sessions, http://git.kernel.org/cgit/network/connman/connman.git/commit/README?id=41f37125887cb9208da2441e350e1e3324c17ee6
WARNING: CONFIG_NET_CLS_CGROUP is invalid
It is unset
Allowed values : y, !
Comment says: systemd (optional): http://0pointer.de/blog/projects/cgroups-vs-cgroups.html
WARNING: CONFIG_SCHED_DEBUG is invalid
It is unset
Allowed values : y, !
Comment says: systemd-bootchart (optional): http://cgit.freedesktop.org/systemd/systemd/commit/README?id=f1c24fea94e19cf2108abbeed1d36ded7102ab98
WARNING: CONFIG_RTC_DRV_CMOS is invalid
It is unset
Allowed values : y, !
Comment says: optional, but highly recommended
WARNING: CONFIG_NETFILTER_XT_MATCH_NFACCT is invalid
It is unset
Allowed values : y, m, !
Comment says: connman (optional): for routing and statistic support in sessions, http://git.kernel.org/cgit/network/connman/connman.git/commit/README?id=41f37125887cb9208da2441e350e1e3324c17ee6
WARNING: CONFIG_CHECKPOINT_RESTORE is invalid
It is unset
Allowed values : y, !
Comment says: rich-core-dumper (https://github.com/mer-tools/sp-rich-core/) needs this to collect all data for environment recreation.
CONFIG_FW_LOADER_USER_HELPER=n
Ошибка:
../../../../../../kernel/asus/msm8916/drivers/base/firmware_class.c:1241:9: warning: passing argument 2 of 'fw_load_from_user_helper' from incompatible pointer type
error, forbidden warning: firmware_class.c:1241
make[4]: *** [drivers/base/firmware_class.o] Error 1
make[3]: *** [drivers/base] Error 2
make[2]: *** [drivers] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/ilnur/to/mer/android/droid/kernel/asus/msm8916'
make: *** [TARGET_KERNEL_BINARIES] Error 2