[Moto G 4G Android Development] arterry:
Thanks for an updated step by step sevenrock! I managed to build the rom using your steps (except for patch 236765 which gave me errors).

My rom however reboots me back to the fastboot menu, i'll copy the last_kmesg below to where I think the error shows up. It does not hang during starup which is good i guess, but im not sure what is causing the reboots since the log shows many errors. I'll try to track down the problem.

My current setup only has 4GB of ram so adding swap space and adding special JVM arguments was needed so it compile successfully. I'm not sure the reboot issue is related to my ram setup.

[ 39.891613,0] fsck.f2fs: Info: Fix the reported corruption.
[ 39.891621,0]
[ 39.891889,0] fsck.f2fs: Info: No support kernel version!
[ 39.891896,0]
[ 39.892106,0] fsck.f2fs: Info: Segments per section = 1
[ 39.892112,0]
[ 39.892263,0] fsck.f2fs: Info: Sections per zone = 1
[ 39.892269,0]
[ 39.892471,0] fsck.f2fs: Info: sector size = 512
[ 39.892476,0]
[ 39.892625,0] fsck.f2fs: Info: total sectors = 11583232 (5655 MB)
[ 39.892631,0]
[ 39.892835,0] fsck.f2fs: Info: MKFS version
[ 39.892841,0]
[ 39.893057,0] fsck.f2fs: "Linux version 3.4.42-g13b401b (hudsoncm@ilclbld71) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Wed Apr 13 05:11:06 CDT 2016"
[ 39.893068,0]
[ 39.893297,0] fsck.f2fs: Info: FSCK version
[ 39.893302,0]
[ 39.893459,0] fsck.f2fs: from "3.4.113-g4c4f40bad45 #1 SMP PREEMPT Sat Dec 8 14:05:06 UTC 2018"
[ 39.893468,0]
[ 39.893715,0] fsck.f2fs: to "3.4.113-g46c217f075b #1 SMP PREEMPT Tue Mar 5 07:10:54 PST 2019"
[ 39.893723,0]
[ 39.893977,0] fsck.f2fs: Info: superblock features = 0 :
[ 39.893983,0]
[ 39.894509,0] fsck.f2fs: Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
[ 39.894519,0]
[ 39.894899,0] fsck.f2fs: Info: total FS sectors = 11583200 (5655 MB)
[ 39.894907,0]
[ 39.895346,0] fsck.f2fs: Info: CKPT version = 7c4bd
[ 39.895352,0]
[ 39.895651,0] fsck.f2fs: Info: checkpoint state = 4 : compacted_summary sudden-power-off
[ 39.895659,0]
[ 39.896055,0] fsck.f2fs:
[ 39.896060,0]
[ 39.896280,0] fsck.f2fs: [FSCK] Unreachable nat entries [Ok..] [0x0]
[ 39.896288,0]
[ 39.896552,0] fsck.f2fs: [FSCK] SIT valid block bitmap checking [Ok..]
[ 39.896559,0]
[ 39.896846,0] fsck.f2fs: [FSCK] Hard link checking for regular file [Ok..] [0x0]
[ 39.896855,0]
[ 39.897128,0] fsck.f2fs: [FSCK] valid_block_count matching with CP [Ok..] [0xc5d74]
[ 39.897137,0]
[ 39.897565,0] fsck.f2fs: [FSCK] valid_node_count matcing with CP (de lookup) [Ok..] [0x947]
[ 39.897573,0]
[ 39.897911,0] fsck.f2fs: [FSCK] valid_node_count matcing with CP (nat lookup) [Ok..] [0x947]
[ 39.897920,0]
[ 39.898301,0] fsck.f2fs: [FSCK] valid_inode_count matched with CP [Ok..] [0x675]
[ 39.898310,0]
[ 39.898605,0] fsck.f2fs: [FSCK] free segment_count matched with CP [Ok..] [0x431]
[ 39.898613,0]
[ 39.898909,0] fsck.f2fs: [FSCK] next block offset is free [Ok..]
[ 39.898917,0]
[ 39.899178,0] fsck.f2fs: [FSCK] fixing SIT types
[ 39.899184,0]
[ 39.899457,0] fsck.f2fs: [FSCK] other corrupted bugs [Ok..]
[ 39.899465,0]
[ 39.899711,0] fsck.f2fs:
[ 39.899715,0]
[ 39.899909,0] fsck.f2fs: Done.
[ 39.899914,0]
[ 40.069657,2] init: [libfs_mgr]__mount(source=/dev/block/bootdevice/by-name/userdata,target=/data,type=f2fs)=0: Success
[ 40.069885,2] init: [libfs_mgr]mount_with_alternatives(): Mounted /dev/block/bootdevice/by-name/userdata on /data with fs_type=f2fs instead of ext4
[ 40.073718,3] init: Command 'mount_all /vendor/etc/fstab.qcom --late' action=late-fs (/vendor/etc/init/hw/init.qcom.rc:89) took 31122ms and succeeded
[ 40.074472,3] init: processing action (post-fs-data) from (/init.rc:385)
[ 40.076170,3] init: Received control message 'start' for 'bootanim' from pid: 207 (/system/bin/surfaceflinger)
[ 40.076858,3] init: starting service 'vold'...
[ 40.085768,0] type=1400 audit(11647133.143:19): avc: denied { noatsecure } for uid=0 pid=210 comm="fsck.f2fs" scontext=u:r:init:s0 tcontext=u:r:fsck:s0 tclass=process permissive=0
[ 40.086056,0] type=1400 audit(11647164.263:20): avc: denied { noatsecure } for uid=0 pid=239 comm="vold" scontext=u:r:init:s0 tcontext=u:r:vold:s0 tclass=process permissive=0
[ 40.097533,1] init: Reboot ending, jumping to kernel
[ 40.117418,0] mdss_dsi_panel_off+: ctrl=00000000 ndx=0
[ 40.118001,0] synaptics_dsx_sensor_state: state change ACTIVE -> SUSPEND
[ 40.352848,0] tps65132: operation not allowed
[ 40.357094,0] vddio_disp: operation not allowed
[ 40.357270,0] mdss_dsi_panel_off-:
[ 40.357357,0] mdss_dsi_off+: ctrl=00000000 ndx=0
[ 40.383787,0] mdss_dsi_off-:
[ 40.386504,0] mdss_fb_open: Shutdown pending. Aborting operation
[ 40.386690,0] mdss_fb_open: Shutdown pending. Aborting operation
[ 40.387004,0] mdss_fb_release_all: try to close unopened fb 0!
[ 40.387101,0] mdss_fb_release_all: try to close unopened fb 0!
[ 40.390729,0] Restarting system with command 'bootloader'.
[ 40.391239,0] Current task:init(1) Parent task:swapper/0(0)
[ 40.391401,0] Going down for restart now
[ 40.392346,0] failed to disable wdog debug: -4
[ 40.392450,0] Calling SCM to disable SPMI PMIC arbiter

PREV
Linux version 3.4.113-g46c217f075b (arterry@arterry) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Mar 5 07:10:54 PST 2019

THIS
ABOOT.GIT = MBM-NG-V41.1A-0-g80481ae
TZ.GIT = MBM-NG-V41.1A-0-g99c1a7c
RPM.GIT = MBM-NG-V41.1A-0-g8b7736e
SBL1.GIT = MBM-NG-V41.1A-0-g199f3c5
SDI.GIT = MBM-NG-V41.1A-0-gdc5aeaf
Linux version 3.4.42-g5e5969d-dirty (luca@luca020400-arch) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Sun Feb 7 22:11:19 CET 2016
RAM: Samsung, S4 SDRAM, 1024 MB, MR5:0x01, MR6:0x11, MR7:0x00, MR8:0x18
socinfo: id=200, ver=1.1, raw_id=2053, raw_ver=1, hw_plat=0, hw_plat_ver=0, hw_plat_subtype=0
ACPU: Speed bin 0 PVS version 1

No errors detected

Boot info:
Last boot reason: reboot