[Upgrading, Modifying and Unlocking] Omar_Mohamed:
I have tried to compile a kernel for SM-T585 and it successfully compiled but the device did not boot. I tried this kernel Source 1 because I have lineage and Kernel Source 2.

I dumped my boot.img and did binwalk on the extracted working kernel and the compiled non-working kernel and the output was very different in each case:

extracted kernel:

DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
93088 0x16BA0 SHA256 hash constants, little endian
9822304 0x95E060 Linux kernel version 3.18.1
9838592 0x962000 ELF, 64-bit LSB shared object, version 1 (SYSV)
9861416 0x967928 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
10976065 0xA77B41 eCos RTOS string reference: "ecos_booster_init"
10976089 0xA77B59 eCos RTOS string reference: "ecos_booster_request_pm_qos"
10976121 0xA77B79 eCos RTOS string reference: "ecos_booster_start"
10976145 0xA77B91 eCos RTOS string reference: "ecos_booster_stop"
11088151 0xA93117 mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
11163038 0xAA559E Copyright string: "Copyright (c) Samsung Inc. 2013-2015 *"
11527810 0xAFE682 Unix path: /var/run/rpcbind.sock
11531914 0xAFF68A Unix path: /var/run/gssproxy.sock
14178881 0xD85A41 Unix path: /lib/firmware/updates/3.18.137-g82f719e2f
14242444 0xD9528C Unix path: /sys/bus/usb/devices/X-XX/power/level"
14267364 0xD9B3E4 PARity archive data - file number 20549
14595322 0xDEB4FA Unix path: /sys/firmware/devicetree/base
14618622 0xDF0FFE Unix path: /dev/block/param
14677917 0xDFF79D Unix path: /sys/class/sec/sec_key/hall_detect
14685530 0xE0155A eCos RTOS string reference: "ecos boost policy:%d"
14685678 0xE015EE eCos RTOS string reference: "ecos_booster_stop failed. err:%d"
14784410 0xE1979A Neighborly text, "NeighborSolicitss"
14784427 0xE197AB Neighborly text, "NeighborAdvertisementscmp6OutMsgs"
14806813 0xE1EF1D Neighborly text, "NeighborhHWMPactivePathTimeout"
14811085 0xE1FFCD Copyright string: "Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved."
15807152 0xF132B0 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
15963648 0xF39600 CRC32 polynomial table, little endian
16325160 0xF91A28 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 1A30-01-01, size 2048
16456312 0xFB1A78 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 1A80-01-03, size 2048
16456512 0xFB1B40 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 1B48-01-03, size 2048
16523256 0xFC1FF8 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 2000-01-04, size 2048
16523312 0xFC2030 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 2038-01-04, size 2048
16523368 0xFC2068 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 2070-01-04, size 2048

compiled kernel [Kernel Source 1]:

DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
98528 0x180E0 SHA256 hash constants, little endian
9879640 0x96C058 Linux kernel version 3.18.1
9895936 0x970000 ELF, 64-bit LSB shared object, version 1 (SYSV)
9918768 0x975930 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
10386584 0x9E7C98 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x10119f0, 1A90-01-01, size 2
10387424 0x9E7FE0 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x1011b30, 1C70-01-01, size 5
10391120 0x9E8E50 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x1011db0, 1EB0-01-01, size 4
10392928 0x9E9560 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0xdd9d81, 2030-01-01, size 3989060
10394888 0x9E9D08 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0xdd9e8a, 1FB0-01-01, size 3989060
11032585 0xA85809 eCos RTOS string reference: "ecos_booster_init"
11032609 0xA85821 eCos RTOS string reference: "ecos_booster_request_pm_qos"
11032641 0xA85841 eCos RTOS string reference: "ecos_booster_start"
11032665 0xA85859 eCos RTOS string reference: "ecos_booster_stop"
11144687 0xAA0DEF mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
11219582 0xAB327E Copyright string: "Copyright (c) Samsung Inc. 2013-2015 *"
11584322 0xB0C342 Unix path: /var/run/rpcbind.sock
11588426 0xB0D34A Unix path: /var/run/gssproxy.sock
14218186 0xD8F3CA Unix path: /lib/firmware/updates/3.18.140-gf65c925ee-dirty
14282581 0xD9EF55 Unix path: /sys/bus/usb/devices/X-XX/power/level"
14307173 0xDA4F65 PARity archive data - file number 20549
14633051 0xDF485B Unix path: /sys/firmware/devicetree/base
14656165 0xDFA2A5 Unix path: /dev/block/param
14715143 0xE08907 Unix path: /sys/class/sec/sec_key/hall_detect
14722580 0xE0A614 eCos RTOS string reference: "ecos boost policy:%d"
14722728 0xE0A6A8 eCos RTOS string reference: "ecos_booster_stop failed. err:%d"
14814284 0xE20C4C Neighborly text, "NeighborSolicitss"
14814301 0xE20C5D Neighborly text, "NeighborAdvertisementscmp6OutMsgs"
14835807 0xE2605F Neighborly text, "NeighborhHWMPactivePathTimeout"
14838445 0xE26AAD Copyright string: "Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved."
15838296 0xF1AC58 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
15996416 0xF41600 CRC32 polynomial table, little endian
16850944 0x1012000 Intel x86 or x64 microcode, sig 0xffffffc0, pf_mask 0x00, 2008-01-09, size 2048

compiled kernel [Kernel Source 2]:

DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
92880 0x16AD0 SHA256 hash constants, little endian
8945664 0x888000 ELF, 64-bit LSB shared object, version 1 (SYSV)
9252952 0x8D3058 Linux kernel version 3.18.1
9283936 0x8DA960 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
10172657 0x9B38F1 eCos RTOS string reference: "ecos_booster_init"
10172681 0x9B3909 eCos RTOS string reference: "ecos_booster_request_pm_qos"
10172713 0x9B3929 eCos RTOS string reference: "ecos_booster_start"
10172737 0x9B3941 eCos RTOS string reference: "ecos_booster_stop"
10283903 0x9CEB7F mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
10358782 0x9E0FFE Copyright string: "Copyright (c) Samsung Inc. 2013-2015 *"
13058808 0xC742F8 Unix path: /lib/firmware/updates/3.18.14
13122267 0xC83ADB Unix path: /sys/bus/usb/devices/X-XX/power/level"
13146629 0xC89A05 PARity archive data - file number 20549
13496024 0xCDEED8 Unix path: /sys/firmware/devicetree/base
13518004 0xCE44B4 Unix path: /dev/block/param
13573095 0xCF1BE7 Unix path: /sys/class/sec/sec_key/hall_detect
13580546 0xCF3902 eCos RTOS string reference: "ecos boost policy:%d"
13580694 0xCF3996 eCos RTOS string reference: "ecos_booster_stop failed. err:%d"
13671304 0xD09B88 Neighborly text, "NeighborSolicitss"
13671321 0xD09B99 Neighborly text, "NeighborAdvertisementscmp6OutMsgs"
13688205 0xD0DD8D Neighborly text, "NeighborhHWMPactivePathTimeout"
14608216 0xDEE758 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)
14684160 0xE01000 ELF, 64-bit LSB shared object, version 1 (SYSV)
14689728 0xE025C0 CRC32 polynomial table, little endian
14790224 0xE1AE50 Unix path: /sys/power/cpuhotplug/enable 0
14790255 0xE1AE6F Unix path: /sys/power/cpufreq_self_discharging 900000
14790305 0xE1AEA1 Unix path: /sys/power/cpufreq_self_discharging 0
14790343 0xE1AEC7 Unix path: /sys/power/cpuhotplug/enable 1

Did anyone managed to compile a kernel for this device or have an idea on how to debug the kernel that apparently doesn't work?