[Moto G 4G Android Development] sevenrock:
Finally I was able to build and boot for the first time a self-built ROM :)

without any crashes reported and with working wifi, bluetooth, camera

(photo & video) and (1809/13) also FMRadio.

I needed to apply *a lot of* patches, for reference:

local_manifest_xt1039.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<project path="device/motorola/peregrine" name="sevenrock/android_device_motorola_peregrine" remote="github" revision="lineage-16.0" />
<project path="device/motorola/msm8226-common" name="sevenrock/android_device_motorola_msm8226-common" remote="github" revision="lineage-16.0" />
<project path="kernel/motorola/msm8226" name="RenanQueiroz/android_kernel_motorola_msm8226" remote="github" revision="lineage-16.0" />
<project path="vendor/motorola" name="RenanQueiroz/proprietary_vendor_motorola" remote="github" revision="lineage-16.0" />

<project path="device/qcom/common" name="LineageOS/android_device_qcom_common" revision="lineage-15.1" remote="github"/>
<project path="hardware/qcom/fm" name="LineageOS/android_hardware_qcom_fm" groups="qcom,qcom_fm" />
<project path="system/qcom" name="LineageOS/android_system_qcom" groups="qcom" revision="lineage-15.1" />
<project path="vendor/qcom/opensource/cryptfs_hw" name="LineageOS/android_vendor_qcom_opensource_cryptfs_hw" />
<project path="packages/apps/FMRadio" name="LineageOS/android_packages_apps_FMRadio" />
<project path="packages/overlays/Lineage" name="LineageOS/android_packages_overlays_Lineage" />
<project path="packages/resources/devicesettings" name="LineageOS/android_packages_resources_devicesettings" revision="lineage-16.0" remote="github"/>

</manifest>

My github repos are based on

https://github.com/sevenrock/android_device_motorola_peregrine <- https://github.com/MotoDevelopment/android_device_motorola_falcon.git

https://github.com/sevenrock/android_device_motorola_msm8226-common <- https://github.com/MotoDevelopment/android_device_motorola_msm8226-common.git

Now the other patches from gerrit:

python vendor/lineage/build/tools/repopick.py \
223340 223341 223342 223343 223344 223345 223346 \
225546 \
226148 226154 226236 226343 \
227260 227261 \
229612 \
230099 230382 230610 230642 230755 \
231710 231711

for i in \
pie-mode-bits \
pie-wlan-caf \
pie-powermenu \
pie-su \
pie-trust-interface \
lineagehw-hidl \
wifi-p \
pie-hw-fde \
directly-show-unlock-screen \
pie-lock-pattern \
pie-expanded-desktop \
pie-hide-night-display \
revert-textrels \
torch-colorz \
pie-battery-styles \
pie-qcom-legacy-sepolicy \
pie-kernel-headers \
pie-styles \
; \
do
python vendor/lineage/build/tools/repopick.py -t $i
done

To fix build errors with qcom packages apply this patch:

--- los16.0/system/qcom/softap/jni/Android.mk.orig	2018-08-26 23:33:51.890102343 +0200
+++ los16.0/system/qcom/softap/jni/Android.mk	2018-08-26 23:33:42.770035526 +0200
@@ -9,6 +9,8 @@

LOCAL_MODULE := libQWiFiSoftApCfg

+LOCAL_CFLAGS := -Werror -Wno-error=unused-parameter
+
LOCAL_MODULE_TAGS := optional

LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
--- los16.0/system/qcom/softap/sdk/Android.mk.orig	2018-08-26 23:20:01.283920943 +0200
+++ los16.0/system/qcom/softap/sdk/Android.mk	2018-08-26 23:41:32.477464560 +0200
@@ -12,6 +12,8 @@

LOCAL_CFLAGS += -DSDK_VERSION=\"0.0.1.0\"

+LOCAL_CFLAGS += -Wno-error
+
LOCAL_USE_VNDK := true

LOCAL_COPY_HEADERS_TO := sdk/softap/include