[SOLVED][HELP] Kernel compiled, but unbootable

Status
Not open for further replies.
Search This thread

krasCGQ

Recognized Contributor
Apr 13, 2015
5,433
4,935
253
20
Kendari
kud.my.id
Hi,
Some of you all (who are reading this thread) might have seen me somewhere on subforums (either this subforum and/or other devices' subforum). I was previously maintained kernels for some devices (which I discontinued them later due to limited free time and I was no longer have them under my control).

Why I make this public?
I want to collect as many information as possible regarding building arm64 kernels (which I never do it before today), not limited to a developer, but as many as possible (if can) :)

I want to make my comeback on development by making an attempt to build a custom kernel for Redmi 3. So, I have these prepared:

To make things easier without need to edit Makefile everytime I change toolchain, I created a script:
Code:
#!/bin/bash

# Placeholder - my system puts warnings everywhere about locale
export LC_ALL=en_US.UTF-8

# Environment variables
export ARCH=arm64
export CROSS_COMPILE=../../toolchains/aarch64-linux-android-4.9-kernel/bin/aarch64-linux-android-

# Actual command
make -s distclean
make -s cyanogenmod_ido_defconfig
make -s -j4

No problems during compilation process. All forbidden warnings triggered could be bypassed safely. Then, I tested my own build by creating a flashable zip. The process did flawlessly. However, it stucks forever on Mi logo.

Oh ya, I use -O3 optimizations on compilation.

Is there something I should do regarding the unbootable kernel?
I don't want to test every single toolchain out there due to my limited internet quota and my expectations on the same result.

Or... maybe suggestions?

Any help, suggestions, and comments are greatly appreciated. Thank you!

Regards.
 
Last edited:

ghal17

Senior Member
Oct 23, 2016
53
1
0
Excuse me sir, i want ask for help for my battery issue. Why my battery drop to 98% after unplug just a few second?_ I am on mokee and RR rom before and now i already flash it to MIUI but still got like that. Please help me if any solution for that ? sorry for my bad english
 

krasCGQ

Recognized Contributor
Apr 13, 2015
5,433
4,935
253
20
Kendari
kud.my.id
Hey,

well, your way of doing it looks good. Do you get a last_kmsg probably? Also did you use the correct ramdisk, etc?
Nope. It stuck all way at Mi logo. No sign of life at all. Tested on official CM-14.1 and MoKee 7.1.1.

I use the modified AnyKernel2 template (removed Busybox requirement and points to Image.gz instead).

I also tried to download other kernel and use the zip as the base and the output is same.

Sent from my ASUS_Z00A using XDA Labs
 

krasCGQ

Recognized Contributor
Apr 13, 2015
5,433
4,935
253
20
Kendari
kud.my.id
Excuse me sir, i want ask for help for my battery issue. Why my battery drop to 98% after unplug just a few second?_ I am on mokee and RR rom before and now i already flash it to MIUI but still got like that. Please help me if any solution for that ? sorry for my bad english
Hi,
It's better to stay on topic.
You may create your own separate thread so people could assist you better and won't mix up with this one. :)

Regards.

Sent from my ASUS_Z00A using XDA Labs
 

krasCGQ

Recognized Contributor
Apr 13, 2015
5,433
4,935
253
20
Kendari
kud.my.id
Problem solved.
The culprit is the missing DTB!
When I look into the source once again, there's something missing: DTB file.

The file doesn't exist on arch/arm64/boot/dts, but instead on arch/arm/boot/dts. So, I created a link:
Code:
$ ln -s ../../../arm/boot/dts/msm8939-qrd-wt88509_64.dtb ./arch/arm64/boot/dts/msm8939-qrd-wt88509_64.dtb

Then I enabled CONFIG_BUILD_ARM64_APPENDED_DTB and re-compile kernel (using Google's GCC). Re-test it again (but with a boot.img extracted from MoKee zip unpacked with AIK and finally it booted!

Thank you very much, anyway.

Thread marked as Solved for now.

Sent from my ASUS_Z00A using XDA Labs
 

rikusuicide

Senior Member
Oct 6, 2011
405
17
0
Mayen
Problem solved.
The culprit is the missing DTB!
When I look into the source once again, there's something missing: DTB file.

The file doesn't exist on arch/arm64/boot/dts, but instead on arch/arm/boot/dts. So, I created a link:
Code:
$ ln -s ../../../arm/boot/dts/msm8939-qrd-wt88509_64.dtb ./arch/arm64/boot/dts/msm8939-qrd-wt88509_64.dtb

Then I enabled CONFIG_BUILD_ARM64_APPENDED_DTB and re-compile kernel (using Google's GCC). Re-test it again (but with a boot.img extracted from MoKee zip unpacked with AIK and finally it booted!

Thank you very much, anyway.

Thread marked as Solved for now.

Sent from my ASUS_Z00A using XDA Labs
Hey what did you change from original kernel? New features like hotplug? Is it easy to compile an booting kernel?

Sent from my Redmi 3 using XDA-Developers mobile app
 

krasCGQ

Recognized Contributor
Apr 13, 2015
5,433
4,935
253
20
Kendari
kud.my.id
Will you release an costume kernel? CM 13, CM 14.1 or miui 8? Ya need testers?
Maybe next year, as things go unpredictable.
EDIT: MIUI won't be supported due to lack of resources required.

I'll ask moderators to close this thread to prevent other type of nonsense discussions.

Sent from my ASUS_Z00A using XDA Labs
 
Last edited:
Status
Not open for further replies.