lk2nd
lk2nd copied to clipboard
Motorola Moto G7 Power (ocean) bootloops after flashing lk2nd
I'm attempting to install postmarketOS on my Motorola Moto G7 Power (ocean), which in turn requires flashing lk2nd. However, after flashing the latest release for msm8953 (v20.0 at the time of writing) and rebooting, the device bootloops - more specifically, it reaches the "Bootloader is unlocked" warning screen, waits five seconds, flashes black for a fraction of a second, then returns to the warning screen, repeating this process until the device is force-rebooted into the stock fastboot mode.
Holding volume up / down after the unlocked bootloader warning screen appears (to attempt to enter lk2nd's fastboot / recovery) makes no difference.
The output of fastboot flash boot_a lk2nd-msm8953.img:
(bootloader) is-logical:boot_a: not found
(bootloader) is-logical:boot_a: not found
Sending 'boot_a' (258 KB) OKAY [ 0.006s]
Writing 'boot_a' (bootloader) Image not signed or corrupt
OKAY [ 0.058s]
(supposedly, the "Image not signed or corrupt" message is normal)
I'm not sure how to get any further diagnostic information.
Also paging @ultra-azu, as she's the postmarketOS maintainer for this device.
This occurs for me as well, after writing the latest it will boot loop showing the charging system as it is plugged in. I can get back to the bootloader flashing by holding volume down + power.
Is there an older version of lk2nd that is working correctly? (preferably one of the releases from this repository, not just the really old version from msm8953-mainline/lk2nd)
Is there an older version of lk2nd that is working correctly? (preferably one of the releases from this repository, not just the really old version from msm8953-mainline/lk2nd)
I did try every version with no luck unfortunately. I had luck with msm8953-mainline/lk2nd which booted successfully, however I attempted to then update lk2nd and then the userdata image which resulted in the IMEI being zeroed, OEM lock being re-enabled, and being stuck in fastboot. The phone in the past had adoptable storage setup, although a factory reset seemed to have reverted that before I did the flashing.
... I had luck with
msm8953-mainline/lk2ndwhich booted successfully, ...
Is there any way you could tell me how you managed that? Tried to compile it myself (following the pmOS wikipage) but it gives me numerous errors...
... I had luck with
msm8953-mainline/lk2ndwhich booted successfully, ...Is there any way you could tell me how you managed that? Tried to compile it myself (following the pmOS wikipage) but it gives me numerous errors...
The errors are due to GCC being more strict these days, therefor I fixed the errors which would have previously only been warnings.
The errors are due to GCC being more strict these days, therefor I fixed the errors which would have previously only been warnings.
I don't know how to fix them myself 3:
ocean is sdm632 device and it will need custom empty/minimal dtbo image like Redmi 7 (onclite) and Fairphone 3. The old msm8953-mainline/lk2nd works because it is keeping nodes from the downstream devicetree. https://github.com/barni2000/dtbo-lk2nd
ocean is sdm632 device and it will need custom empty/minimal dtbo image like Redmi 7 (onclite) and Fairphone 3. The old msm8953-mainline/lk2nd works because it is keeping nodes from the downstream devicetree. https://github.com/barni2000/dtbo-lk2nd
I tried that and it still bootloops.
Small set of values from the dts for my specific model if anyone else wants a go:
model = "ocean";
qcom,msm-name = "SDM632";
qcom,board-id = <0x43 0xc100>;
qcom,msm-id = <0x15d 0x00>;
qcom,pmic-id = <0x10016 0x25 0x00 0x00>;
ocean is sdm632 device and it will need custom empty/minimal dtbo image like Redmi 7 (onclite) and Fairphone 3. The old msm8953-mainline/lk2nd works because it is keeping nodes from the downstream devicetree. https://github.com/barni2000/dtbo-lk2nd
I tried that and it still bootloops.
Small set of values from the dts for my specific model if anyone else wants a go:
model = "ocean"; qcom,msm-name = "SDM632"; qcom,board-id = <0x43 0xc100>; qcom,msm-id = <0x15d 0x00>; qcom,pmic-id = <0x10016 0x25 0x00 0x00>;
Can you share your dtbo dts?
@barni2000 I probably got the dtbo files wrong. Also attached the dts that my phone uses from lineageOS as a reference
@barni2000 I probably got the dtbo files wrong. Also attached the dts that my phone uses from lineageOS as a reference
it have multiple board-id
qcom,board-id = <0x42 0xb1a0>;
qcom,board-id = <0x141 0xc100>;
qcom,board-id = <0x141 0xa100>;
qcom,board-id = <0x141 0xa200>;
qcom,board-id = <0x43 0xb200>;
qcom,board-id = <0x42 0xa100>;
qcom,board-id = <0x141 0xb200>;
qcom,board-id = <0x42 0xb1b0>;
qcom,board-id = <0x43 0xc100>;
qcom,board-id = <0x42 0xa200>;
qcom,board-id = <0x141 0xb1b0>;
qcom,board-id = <0x141 0xb1a0>;
maybe device dt should move under QCDTBS list in makefile like at potter.
Maybe bootloader needs msm-id and model in dtbo.img https://github.com/LineageOS/android_kernel_motorola_sdm632/blob/lineage-22.2/arch/arm64/boot/dts/qcom/sdm632-ocean-na-pvt1-overlay.dts#L21-L25
maybe device dt should move under QCDTBS list in makefile like at potter.
Maybe bootloader needs
msm-idandmodelin dtbo.img https://github.com/LineageOS/android_kernel_motorola_sdm632/blob/lineage-22.2/arch/arm64/boot/dts/qcom/sdm632-ocean-na-pvt1-overlay.dts#L21-L25
I've tried both (seperately and together) and this doesn't fix anything.
@barni2000 I probably got the dtbo files wrong. Also attached the dts that my phone uses from lineageOS as a reference original.dts.txt sdm632-motorola-ocean.dts.txt dtboimg-motorola-ocean.cfg.txt
it have multiple board-id
qcom,board-id = <0x42 0xb1a0>; qcom,board-id = <0x141 0xc100>; qcom,board-id = <0x141 0xa100>; qcom,board-id = <0x141 0xa200>; qcom,board-id = <0x43 0xb200>; qcom,board-id = <0x42 0xa100>; qcom,board-id = <0x141 0xb200>; qcom,board-id = <0x42 0xb1b0>; qcom,board-id = <0x43 0xc100>; qcom,board-id = <0x42 0xa200>; qcom,board-id = <0x141 0xb1b0>; qcom,board-id = <0x141 0xb1a0>;
I just used the board-id that my lineageOS install was seemingly using
I have checked twrp.img it seems the device is using appended dtbs, maybe it is interfering with other devices so try make TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_QCDTBS="" LK2ND_DTBS="" LK2ND_ADTB="sdm632-motorola-ocean.dtb" lk2nd-msm8953 also you will need that dtbo.img but you can try erase dtbo partition first.
I have checked
twrp.imgit seems the device is using appended dtbs, maybe it is interfering with other devices so trymake TOOLCHAIN_PREFIX=arm-none-eabi- LK2ND_QCDTBS="" LK2ND_DTBS="" LK2ND_ADTB="sdm632-motorola-ocean.dtb" lk2nd-msm8953...
Doing this results in a .img that cannot be flashed.
(bootloader) is-logical:boot_b: not found
(bootloader) is-logical:boot_b: not found
Sending 'boot_b' (300 KB) OKAY [ 0.007s]
Writing 'boot_b' FAILED (Status read failed (No such device))
fastboot: error: Command failed
(Flashing it just causes a restart. Might be a cable problem? Maybe?)
Without the new make flags, I get this:
(bootloader) is-logical:boot_b: not found
(bootloader) is-logical:boot_b: not found
Sending 'boot_b' (340 KB) OKAY [ 0.008s]
Writing 'boot_b' (bootloader) Image not signed or corrupt
OKAY [ 0.035s]
Finished. Total time: 0.383s
Hi, I've just been bringing up river (ocean's less power-ful cousin, hah) and encountered the same problem.
Looks like the dtbo source with multiple board IDs is completely bogus. The loader only looks at the first two numbers. I discovered this by making the same type of big list for river — it didn't work.. so I started commenting out the IDs.. and after commenting out two I booted into lk2nd!
/dts-v1/;
/ {
qcom,board-id = //<0x145 0xa100>,
// <0x145 0xa200>,
<0x45 0xa100>,
<0x45 0xa200>,
<0x45 0xb1b0>;
model = "river";
__fixups__ {};
};
So that's been working on one ocean variant, and not any of the others.
The original dtbo partition contains multiple independent whole dtbs, each with just one board ID, not one dtb with a long long board-id.
@unilock @tulpenkiste @XerTheSquirrel please try https://github.com/barni2000/dtbo-lk2nd/pull/6 — or directly my DTBO build: dtbo-motorola.zip
... please try barni2000/dtbo-lk2nd#6 — or directly my DTBO build: dtbo-motorola.zip
Will be trying! Going to refresh postmarketOS first...
Your dtbo appears to fix the bootlooping :3