Xiaomi_Kernel_OpenSource
Xiaomi_Kernel_OpenSource copied to clipboard
Mi 5X Kernel Cannot Boot
I tried to build Mi 5X kernel under the instruction of Wiki
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
(cd aarch64-linux-android-4.9 && git checkout android-8.1.0_r70)
git clone https://github.com/MiCode/Xiaomi_Kernel_OpenSource.git
cd Xiaomi_Kernel_OpenSource && git checkout sakura-o-oss
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE=CROSS_COMPILE=${HOME}/aarch64-linux-android-4.9/bin/aarch64-linux-android-
mkdir out
make O=out tiffany-perf_defconfig
make O=out -j8
cd ..
# Build process success
Then I tried to update the new kernel
# in phone
dd if=/dev/block/bootdevice/by-name/boot of=boot.img bs=1M
# download boot.img to local machine
# in local machine
unpackbootimg -i boot.img
# OUTPUT:
# BOARD_KERNEL_CMDLINE console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 buildvariant=user
# BOARD_KERNEL_BASE 80000000
# BOARD_NAME
# BOARD_PAGE_SIZE 2048
# BOARD_HASH_TYPE sha1
# BOARD_KERNEL_OFFSET 00008000
# BOARD_RAMDISK_OFFSET 01000000
# BOARD_SECOND_OFFSET 00f00000
# BOARD_TAGS_OFFSET 00000100
# BOARD_OS_VERSION 8.1.0
# BOARD_OS_PATCH_LEVEL 2019-08
# BOARD_HEADER_VERSION 0
cp Xiaomi_Kernel_OpenSource/out/arch/arm64/boot/Image.gz-dtb boot.img-zImage
mkbootimg --kernel boot.img-zImage --ramdisk boot.img-ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 buildvariant=user" --board "" --base 80000000 --pagesize 2048 --kernel_offset 00008000 --ramdisk_offset 01000000 --second_offset 00f00000 --tags_offset 00000100 --os_version 8.1.0 --os_patch_level 2019-08 --header_version 0 --hash sha1 -o new-boot.img
# upload new-boot.img to phone
# in phone
dd if=new-boot.img of=/dev/block/bootdevice/by-name/boot bs=1M
reboot
However, the phone stuck at the splash screen, even without showing "loading" status.
I wonder if there are mistakes in my building and updating process, or could anyone give me some suggestions for debugging such problems? Thank you!
export TARGET_PRODUCT=tiffany solve the issue
tiffany
What is the principle behind this?