Search code examples
android-kernellineageos

*** Missing UAPI file /home/lineageos/kernel/lenovo/tb8504f/include/uapi/linux/netfilter/xt_DSCP.h. Stop. while building recoveryimage


I am trying to build the kernel for a custom ROM and am getting the following exception:

*** Missing UAPI file /home/lineageos/kernel/lenovo/tb8504f/include/uapi/linux/netfilter/xt_DSCP.h.  Stop.

I've installed the following package on Ubuntu, but it didn't resolve the issue

sudo apt-get install linux-libc-dev-arm64-cross

Device tree:= https://github.com/darran-kelinske-f...e/lineage-15.1

Vendor tree:= https://github.com/darran-kelinske-f...e/lineage-15.1

Kernel source:= https://github.com/darran-kelinske-f...e/lineage-15.1

ROM Source:= https://github.com/LineageOS/android

Full log output:

lineageos@955f11ebe44b:~$ mka recoveryimage -j12
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=lineage_tb8504f
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-25-generic-x86_64-with-debian-9.8
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM7.181205.001
OUT_DIR=/home/lineageos/out
WITH_SU=false
============================================
ninja: no work to do.
ninja: no work to do.
Environment variable BUILD_NUMBER was modified (cda2e8402f => 8a38cbe433), regenerating...
[495/1069] including ./hardware/lineage/lineagehw/Android.mk ...
find: ‘../../../device/xiaomi/rolex/lineagehw’: No such file or directory
[1069/1069] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
build/core/base_rules.mk:391: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/[email protected]'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/[email protected]'
build/core/base_rules.mk:391: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/[email protected]'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/[email protected]'
build/core/base_rules.mk:391: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/[email protected]'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/[email protected]'
build/core/base_rules.mk:391: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/[email protected]'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/[email protected]'
build/core/Makefile:34: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/libmmcamera_interface.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib/libmmcamera_interface.so'
build/core/Makefile:34: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/bin/wcnss_service'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/bin/wcnss_service'
build/core/Makefile:34: warning: overriding commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/hw/consumerir.default.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/lineageos/out/target/product/tb8504f/vendor/lib64/hw/consumerir.default.so'
[  1% 188/12587] target  C++: libsgdisk_static <= external/gptfdisk/gptcl.cc
external/gptfdisk/gptcl.cc:36:29: warning: unused parameter 'filename' [-Wunused-parameter]
GPTDataCL::GPTDataCL(string filename) {
                            ^
1 warning generated.
[  1% 192/12587] target  C++: libsgdisk_static <= external/gptfdisk/android_popt.cc
external/gptfdisk/android_popt.cc:24:40: warning: unused parameter 'name' [-Wunused-parameter]
poptContext poptGetContext(const char *name, int argc, const char **argv,
                                       ^
external/gptfdisk/android_popt.cc:25:56: warning: unused parameter 'flags' [-Wunused-parameter]
        const struct poptOption *options, unsigned int flags) {
                                                       ^
external/gptfdisk/android_popt.cc:76:35: warning: unused parameter 'con' [-Wunused-parameter]
void poptResetContext(poptContext con) {
                                  ^
external/gptfdisk/android_popt.cc:84:52: warning: unused parameter 'flags' [-Wunused-parameter]
void poptPrintUsage(poptContext con, FILE *fp, int flags) {
                                                   ^
4 warnings generated.
[  2% 338/12587] target  C++: bu_recovery <= bootable/recovery/backup.cpp
bootable/recovery/backup.cpp:48:58: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
        p += sprintf(p, "fs.%s.size=%llu\n", part->name, part->size);
                                    ~~~~                 ^~~~~~~~~~
                                    %lu
bootable/recovery/backup.cpp:49:58: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
        p += sprintf(p, "fs.%s.used=%llu\n", part->name, part->used);
                                    ~~~~                 ^~~~~~~~~~
                                    %lu
bootable/recovery/backup.cpp:64:42: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
    p += sprintf(p, "hash.datalen=%u\n", hash_datalen);
                                  ~~     ^~~~~~~~~~~~
                                  %zu
3 warnings generated.
[  3% 391/12587] target  C: libtar <= external/libtar/lib/handle.c
external/libtar/lib/handle.c:35:19: warning: unused parameter 'mode' [-Wunused-parameter]
         int oflags, int mode, int options)
                         ^
1 warning generated.
[  4% 623/12587] target  C: libminipigz_static <= external/pigz/yarn.c
external/pigz/yarn.c:373:23: warning: unused parameter 'off_course' [-Wunused-parameter]
void destruct(thread *off_course)
                      ^
1 warning generated.
[  4% 625/12587] target  C: libzopfli_static <= external/pigz/zopfli/src/zopfli/deflate.c
external/pigz/zopfli/src/zopfli/deflate.c:300:32: warning: unused parameter 'expected_data_size' [-Wunused-parameter]
                        size_t expected_data_size,
                               ^
1 warning generated.
[  5% 630/12587] target  C: libzopfli_static <= external/pigz/zopfli/src/zopfli/lz77.c
external/pigz/zopfli/src/zopfli/lz77.c:95:60: warning: unused parameter 'datasize' [-Wunused-parameter]
void ZopfliVerifyLenDist(const unsigned char* data, size_t datasize, size_t pos,
                                                           ^
1 warning generated.
[  5% 711/12587] target  C: libexfat_static <= external/exfat/libexfat/node.c
external/exfat/libexfat/node.c:647:33: warning: taking address of packed member 'mdate' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(node->mtime, &meta1->mdate, &meta1->mtime,
                                       ^~~~~~~~~~~~
external/exfat/libexfat/node.c:647:48: warning: taking address of packed member 'mtime' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(node->mtime, &meta1->mdate, &meta1->mtime,
                                                      ^~~~~~~~~~~~
external/exfat/libexfat/node.c:649:33: warning: taking address of packed member 'adate' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(node->atime, &meta1->adate, &meta1->atime, NULL);
                                       ^~~~~~~~~~~~
external/exfat/libexfat/node.c:649:48: warning: taking address of packed member 'atime' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(node->atime, &meta1->adate, &meta1->atime, NULL);
                                                      ^~~~~~~~~~~~
external/exfat/libexfat/node.c:895:32: warning: taking address of packed member 'crdate' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(time(NULL), &meta1->crdate, &meta1->crtime,
                                      ^~~~~~~~~~~~~
external/exfat/libexfat/node.c:895:48: warning: taking address of packed member 'crtime' of class or structure 'exfat_entry_meta1' may result in an unaligned pointer value [-Waddress-of-packed-member]
        exfat_unix2exfat(time(NULL), &meta1->crdate, &meta1->crtime,
                                                      ^~~~~~~~~~~~~
6 warnings generated.
[  5% 731/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/collate.c
external/ntfs-3g/libntfs-3g/collate.c:230:16: warning: taking address of packed member 'file_name' of class or structure 'FILE_NAME_ATTR' may result in an unaligned pointer value [-Waddress-of-packed-member]
                        (ntfschar*)&file_name_attr1->file_name,
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
external/ntfs-3g/libntfs-3g/collate.c:232:16: warning: taking address of packed member 'file_name' of class or structure 'FILE_NAME_ATTR' may result in an unaligned pointer value [-Waddress-of-packed-member]
                        (ntfschar*)&file_name_attr2->file_name,
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[  5% 736/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/dir.c
external/ntfs-3g/libntfs-3g/dir.c:330:17: warning: taking address of packed member 'file_name' of class or structure 'FILE_NAME_ATTR' may result in an unaligned pointer value [-Waddress-of-packed-member]
                                (ntfschar*)&ie->key.file_name.file_name,
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
external/ntfs-3g/libntfs-3g/dir.c:470:17: warning: taking address of packed member 'file_name' of class or structure 'FILE_NAME_ATTR' may result in an unaligned pointer value [-Waddress-of-packed-member]
                                (ntfschar*)&ie->key.file_name.file_name,
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[  5% 746/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/ioctl.c
In file included from external/ntfs-3g/libntfs-3g/ioctl.c:70:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/ioctl.c:70:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/ioctl.c:70:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  5% 753/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/object_id.c
In file included from external/ntfs-3g/libntfs-3g/object_id.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/object_id.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/object_id.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  5% 754/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/reparse.c
In file included from external/ntfs-3g/libntfs-3g/reparse.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/reparse.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/reparse.c:44:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  6% 757/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/security.c
In file included from external/ntfs-3g/libntfs-3g/security.c:52:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/security.c:52:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/security.c:52:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  6% 761/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/unistr.c
external/ntfs-3g/libntfs-3g/unistr.c:432:31: warning: taking address of packed member 'file_name' of class or structure 'FILE_NAME_ATTR' may result in an unaligned pointer value [-Waddress-of-packed-member]
        ntfs_name_upcase((ntfschar*)&file_name_attr->file_name,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[  6% 763/12587] target  C: libntfs-3g_static <= external/ntfs-3g/libntfs-3g/volume.c
In file included from external/ntfs-3g/libntfs-3g/volume.c:62:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/volume.c:62:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/libntfs-3g/volume.c:62:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  6% 785/12587] target  C: libntfs3g_mount_static <= external/ntfs-3g/src/ntfs-3g.c
In file included from external/ntfs-3g/src/ntfs-3g.c:92:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/src/ntfs-3g.c:92:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/src/ntfs-3g.c:92:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[  6% 786/12587] target  C: libntfs3g_mount_static <= external/ntfs-3g/src/ntfs-3g_common.c
In file included from external/ntfs-3g/src/ntfs-3g_common.c:50:
external/ntfs-3g/include/ntfs-3g/compat.h:79:9: warning: 'S_IREAD' macro redefined [-Wmacro-redefined]
#define S_IREAD   0400    /* Read by owner.  */
        ^
bionic/libc/include/sys/stat.h:143:9: note: previous definition is here
#define S_IREAD S_IRUSR
        ^
In file included from external/ntfs-3g/src/ntfs-3g_common.c:50:
external/ntfs-3g/include/ntfs-3g/compat.h:80:9: warning: 'S_IWRITE' macro redefined [-Wmacro-redefined]
#define S_IWRITE  0200    /* Write by owner.  */
        ^
bionic/libc/include/sys/stat.h:144:9: note: previous definition is here
#define S_IWRITE S_IWUSR
        ^
In file included from external/ntfs-3g/src/ntfs-3g_common.c:50:
external/ntfs-3g/include/ntfs-3g/compat.h:81:9: warning: 'S_IEXEC' macro redefined [-Wmacro-redefined]
#define S_IEXEC   0100    /* Execute by owner.  */
        ^
bionic/libc/include/sys/stat.h:145:9: note: previous definition is here
#define S_IEXEC S_IXUSR
        ^
3 warnings generated.
[ 11% 1432/12587] Building Kernel Headers
FAILED: /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps 
/bin/bash -c "(rm -f /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps ) && (make -j6  CFLAGS_MODULE=\"-fno-pic\" -C kernel/lenovo/tb8504f O=/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/home/lineageos/prebuilts/misc/linux-x86/ccache/ccache aarch64-linux-androidkernel-\"   headers_install ) && (echo \"/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps: \\\\\" > /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps ) && (( cd kernel/lenovo/tb8504f;        if grep -q '^version_h' 'Makefile'; then            depdirs=\"arch/arm64/include/uapi include/uapi\";       else            depdirs=\"arch/arm64/include/asm include\";         fi;         deps=\"Makefile \$(find \$depdirs -type f -name '*.h')\";       for f in \$deps; do             echo \"  kernel/lenovo/tb8504f/\$f \\\\\" >> /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps;       done ;      echo \"\" >> /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps ;      for f in \$deps; do             echo \"kernel/lenovo/tb8504f/\$f:\" >> /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps;             echo \"\" >> /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/.headers_install_deps;       done        ) )"
make: Entering directory '/home/lineageos/kernel/lenovo/tb8504f'
make[1]: Entering directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
  CHK     include/generated/uapi/linux/version.h
  HOSTCC  scripts/unifdef
  INSTALL usr/include/asm-generic/ (35 files)
  INSTALL usr/include/misc/ (1 file)
  INSTALL usr/include/mtd/ (5 files)
  INSTALL usr/include/drm/ (18 files)
  INSTALL usr/include/media/ (21 files)
  INSTALL usr/include/linux/../../../usr/include/linux/staging/android/uapi/ (2 files)
  INSTALL usr/include/rdma/ (6 files)
  INSTALL usr/include/linux/byteorder/ (2 files)
  INSTALL usr/include/scsi/fc/ (4 files)
  INSTALL usr/include/linux/caif/ (2 files)
  INSTALL usr/include/sound/ (19 files)
  INSTALL usr/include/linux/can/ (5 files)
  INSTALL usr/include/scsi/ufs/ (2 files)
  INSTALL usr/include/scsi/ (5 files)
  INSTALL usr/include/linux/dvb/ (8 files)
  INSTALL usr/include/video/ (5 files)
  INSTALL usr/include/xen/ (4 files)
  INSTALL usr/include/uapi/ (0 file)
  INSTALL usr/include/linux/hdlc/ (1 file)
  INSTALL usr/include/linux/isdn/ (1 file)
  INSTALL usr/include/linux/hsi/ (1 file)
  INSTALL usr/include/linux/mfd/wcd9xxx/ (2 files)
  INSTALL usr/include/linux/mmc/ (3 files)
  INSTALL usr/include/linux/mfd/ (1 file)
/home/lineageos/kernel/lenovo/tb8504f/scripts/Makefile.headersinst:55: *** Missing UAPI file /home/lineageos/kernel/lenovo/tb8504f/include/uapi/linux/netfilter/xt_DSCP.h.  Stop.
/home/lineageos/kernel/lenovo/tb8504f/scripts/Makefile.headersinst:128: recipe for target 'netfilter' failed
make[3]: *** [netfilter] Error 2
make[3]: *** Waiting for unfinished jobs....
/home/lineageos/kernel/lenovo/tb8504f/scripts/Makefile.headersinst:128: recipe for target 'linux' failed
make[2]: *** [linux] Error 2
make[2]: *** Waiting for unfinished jobs....
/home/lineageos/kernel/lenovo/tb8504f/Makefile:1069: recipe for target 'headers_install' failed
make[1]: *** [headers_install] Error 2
make[1]: Leaving directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/lineageos/kernel/lenovo/tb8504f'
[ 11% 1443/12587] Building Kernel Config
make: Entering directory '/home/lineageos/kernel/lenovo/tb8504f'
make[1]: Entering directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
  GEN     ./Makefile
drivers/soc/qcom/Kconfig:358:warning: choice value used outside its choice group
drivers/soc/qcom/Kconfig:363:warning: choice value used outside its choice group
arch/arm64/configs/msm8937_p3588_pcb-perf_defconfig:306:warning: override: reassigning to symbol USB_USBNET
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8994 && SND_SOC_MSM8996 && SND_SOC_MSM8X16 && SND_SOC_MDM9607 && SND_SOC_MDM9640) selects SND_SOC_WCD9330 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && WCD9330_CODEC)
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8994 && SND_SOC_MSM8996 && SND_SOC_MSM8X16 && SND_SOC_MDM9607 && SND_SOC_MDM9640) selects SND_SOC_WCD9330 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && WCD9330_CODEC)
#
# configuration written to .config
#
make[1]: Leaving directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
make: Leaving directory '/home/lineageos/kernel/lenovo/tb8504f'
make: Entering directory '/home/lineageos/kernel/lenovo/tb8504f'
make[1]: Entering directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
  GEN     ./Makefile
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
drivers/soc/qcom/Kconfig:358:warning: choice value used outside its choice group
drivers/soc/qcom/Kconfig:363:warning: choice value used outside its choice group
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8994 && SND_SOC_MSM8996 && SND_SOC_MSM8X16 && SND_SOC_MDM9607 && SND_SOC_MDM9640) selects SND_SOC_WCD9330 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && WCD9330_CODEC)
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8994 && SND_SOC_MSM8996 && SND_SOC_MSM8X16 && SND_SOC_MDM9607 && SND_SOC_MDM9640) selects SND_SOC_WCD9330 which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && WCD9330_CODEC)
make[1]: Leaving directory '/home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ'
make: Leaving directory '/home/lineageos/kernel/lenovo/tb8504f'
ninja: build stopped: subcommand failed.
13:30:57 ninja failed with: exit status 1

#### failed to build some targets (01:31 (mm:ss)) ####

Solution

  • This was actually a problem with the capitalization of the files.

    The kernel source I had received from the manufacturer (Lenovo) had many files in the netfilter directory that had different capilization than what was excepted by the build tools. Changing the capitalization got around these errors.

    include/uapi/linux/netfilter/xt_dscp.h → include/uapi/linux/netfilter/xt_DSCP.h
    

    This is the commit that fixed this specific issue:

    https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/commit/d8495cc68403a8dbbc543de8e5792faf6ca3a096