However ,if I use pmbootstrap flasher flash_rootfs and then pmbootstrap flasher flash_kernel,and reboot the device,it won't boot into pmos.pmbootstrap flasher boot will got me stuck in the oem boot screen .In both method,device does not appeared in lsusb,the last message in dmesg says USB disconnect.
But using the boot.img-zImage extracted from Lineage OS recovery zip , pmbootstrap initfs hook_add debug-shell and fastboot boot [LOS-zImage] [pmos-generated-initramfs-file],I am able to telnet into it.No luck with pmos_continue_boot,network interface is still there,but can't ssh or telnet into it.
Android recovery zip will not boot either,log file: pmos.log
Could you double check if your kernel boots up or not with the maximum-attention hook?
Sure.
I redownload the defconfig from LOS kernel repo,reconfigured.
During pmbootstrap prepare the menuconfig,I get some warning:
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)warning: (ARCH_MSM_KRAIT && ARCH_MSM8909 && ARCH_MSM8916 && ARCH_MSM8610 && ARCH_MSM8226) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
And during the compile
/home/pmos/build/src/android_kernel_motorola_msm8952-8e10a4d0df34bcd4bbb29b8fdff959e937f1e5fa/kernel/Makefile:145: *** No X.509 certificates found ***
as well as some not guard and defined but not used warning.
After flash into the device,flashlights and led did not blinked.
$ lsusbBus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 001 Device 005: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)Bus 001 Device 004: ID 0a5c:2110 Broadcom Corp. BCM2045B (BDC-2) [Bluetooth Controller]Bus 001 Device 009: ID 258a:0013 Bus 001 Device 008: ID 258a:0012 Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. HubBus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 HubBus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
last few messages in dmesg:
[10252.590389] usb 2-1.1: new high-speed USB device number 7 using ehci-pci[10256.535418] usb 2-1.1: USB disconnect, device number 7[10260.106970] usb 2-1.1: new high-speed USB device number 8 using ehci-pci[10413.527762] loop: module loaded[10414.682114] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null)[10414.794526] EXT4-fs (loop0p1): mounting ext2 file system using the ext4 subsystem[10414.799162] EXT4-fs (loop0p1): mounted filesystem without journal. Opts: (null)[10545.139366] usb 2-1.1: USB disconnect, device number 8
Seems the kernel did not boot.
But I did tried to add maximum-attention hook and boot with Lineage OS kernel,flashlight,led,and the motor did caught my attention.
Depending on that, read on in Troubleshooting:boot for what you could do to debug the missing network or completely not booting kernel.
I'll try to open it and see if I can find the tx/rx touch point.
moto g4 is a qcdt device,and I did the following:
/tmp/los/boot.img was extracted from lineage-14.1-20180328-nightly-athene-signed.zip
/tmp/pmos/boot.img-motorola-athene copied from chroot of motorola athene /boot folder.
Great debugging session, that's very helpful data!
During pmbootstrap prepare the menuconfig,I get some warning
I think this should not happen, when using menuconfig to change the config file (because then it takes care of the dependencies). Could it be that you've changed the config manually?
The DTB files being in the right order looks good. One additional check you could do is using abootimg (e.g. pmbootstrap chroot --add=abootimg) to replace the kernel and initramfs in a copy of the working boot.img with the postmarketOS versions. If that image boots, then the issue is somewhere in the boot.img generation.
The warning will pops up even the defconfig is untouched.
I use another kernel repo which uses a 64 bit defconfig(msm8952 is a 64 bit compatable chip,most kernel source for this device uses a 32 bit defconfig).
And it boots!
Now I can ssh into it and try things out.
Use another compression algorithm (run pmbootstrap menuconfig linux-... and change it there). Gzip should work, but will produce a big kernel, because pmbootstrap currently installs a workaround to always use the fastest compression method (-1), when the most compressing one (-9) is chosen. This will increase the kernel size the most.
Yeah..I tried to use another compression algorithm..but there's no entrance to select compression algorithm inside General Setup
by the way I'm using BDFrostbite/android_kernel_motorola_msm8952
and this defconfig when I posted my last comment,sorry for didn't post these ahead.
Now I'm trying to patch the kernel to add compression algorithm.
This is weird, I've downloaded your kernel and tried it myself. When searching for KERNEL_LZMA for example, it says it depends on HAVE_KERNEL_LZMA which is set to =n and there's no menu entry for it. I've tried to add this to the kernel config manually, and it did not work either. Seems to me like a kernel rebase gone wrong, and now options are missing in the menu or something.
I found in most kernel repository(with 64-bit support), arch/arm64/boot/compressed/ does not exist,where arch/arm/boot/compressed/ does,even for those postmarket OS ported(eg. motorola-potter and oneplus-oneplus2).
Maybe the big size is because there are some unnecessary feature enabled?Not sure,but I'll look into it.I can make the entry shows up in menuconfig -> General Setup by adding something to arch/arm64/Kconfig,that did add KERNEL_[COMPRESSIN_ALGORITHM]=y to the config file but have no effects to the final kernel size.
And sure will try other kernels(after all,we got a working one!).
By having a ported device as a reference to change the config file,I still wasn't able to flash kernel withpmbootstrap flasher flash_kernel.
motorola-potter seems have same issue,So I continued to work on the display and stuff.
Now I got display working properly,but no progress with touchscreen(I did got output when cat /dev/input/event2 in TWRP,but adding this to devideinfo does not work).