Linux/DTB build problems when trying to create a custom build (Lakka-related)

  • Posting here despite being a bit Lakka-related because I'm trying to compile Lakka using LibreELEC's build system. Also, it seems that experts on the build system hang out here more than at the Lakka forums. Apologies in advance (and be ready to do a facepalm).

    So I'm trying to create a Lakka build for my S812 device based on patches from LibreELEC. Since Lakka's build system is basically an older version of LibreELEC's (forked from OpenELEC), the existing project/device contents that I got from LibreELEC doesn't exactly work with Lakka's. So I replaced the scripts and tools folder of Lakka's with LibreELEC's, and replaced the packages/linux/package.mk with LibreELEC's too.

    Along the way, there were some build errors because of missing packages which I managed to fix by grabbing the relevant package.mk from LibreELEC and some CMake build problems which I fixed by replacing the config/functions with LibreELEC's too. So right now, I have this frankenstein of a build system that ~sorta~ works.

    However, I got stumped when compiling the linux kernel, it encountered errors when compiling the DTS:

    Upon inspecting the relevant lines in arch/arm/Makefile:

    Code
    dtbs: scripts
            $(Q)$(MAKE) $(build)=$(subst $(wildcard $(srctree)//),,$(subst $(join /,$(subst dtb,dts,$@)),,$(firstword $(wildcard $(srctree)/$(boot)/dts/amlogic/$(subst dtb,dts,$@) $(srctree)/$(CUSTOMER_DIR_NAME)/meson/dt/$(subst dtb,dts,$@))))) \
            MACHINE=$(MACHINE) \
            dtbs

    It seems that the $(build)=.... gets resolved to obj=, that is, the entire parameter, for some reason, resolves to nothing. I'm out of ideas on how to proceed but I imagine that I have to pull something again from the LibreELEC build system.

    EDIT: btw, the Linux version I'm using is this: GitHub - kszaq/linux at 263a24f2e8e17cdd527e5c4aa462240d5e156edb

    Edited once, last by SnT2k (January 2, 2017 at 2:07 PM).