Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is this kernel from? #1

Open
lattice0 opened this issue Feb 26, 2022 · 1 comment
Open

where is this kernel from? #1

lattice0 opened this issue Feb 26, 2022 · 1 comment

Comments

@lattice0
Copy link

Hello, where does this kernel comes from?

https://github.com/MiCode/Xiaomi_Kernel_OpenSource/commits/lime-q-oss

is very old and cannot be built, I applied some patches but still some needs to be done. However, that's the official one. I wanted to know where did you get this from and why/how it's much more updated

Thank you!

@lattice0
Copy link
Author

lattice0 commented Mar 9, 2022

May you kindly help me figuring out what I'm doing wrong? Because my kernel won't boot.

I'm trying to compile this kernel https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/lime-q-oss for my Poco M3

I did:

export ARCH=arm64 && export SUBARCH=arm64
export CROSS_COMPILE=/opt/aosp_prebuilts/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export DTC_EXT="/opt/google_misc/misc/linux-x86/dtc/dtc"
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- vendor/citrus-perf_defconfig
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- EXTRA_CFLAGS="-I $PWD/techpack/display/pll/ -I $PWD/techpack/camera/drivers/cam_sensor_module/cam_cci/  -I $PWD/techpack/camera/drivers/cam_req_mgr -DSDCARDFS_VERSION= -I $PWD/" -j$(nproc --all) 2>&1 | tee kernel.log

and unpacked/repacked boot.img with

unpackbootimg -i boot.img -o boot_img_unpacked

mkbootimg --kernel "$SCRIPT_DIR/devices/$DEVICE/kernel/k/arch/arm64/boot/Image.gz" \
    --ramdisk boot.img-ramdisk \
    --dtb boot.img-dtb \
    --cmdline "$(< boot.img-cmdline)" \
    --base "$(< boot.img-base)" \
    --kernel_offset "$(< boot.img-kernel_offset)" \
    --ramdisk_offset "$(< boot.img-ramdisk_offset)" \
    --tags_offset "$(< boot.img-tags_offset)" \
    --dtb_offset "$(< boot.img-dtb_offset)" \
    --os_version "$(< boot.img-os_version)" \
    --os_patch_level "$(< boot.img-os_patch_level)" \
    --pagesize "$(< boot.img-pagesize)" \
    --header_version "$(< boot.img-header_version)" \
    --hashtype "$(< boot.img-hashtype)" \
    --board "$(< boot.img-board)" \
    -o ../boot.img

but it won't boot. I get stuck on the Poco M3 screen. I tried unpacking/repacking the original boot.img with the original kernel just to see if I was repacking wrong but it worked, so my repack is working.

I think the issue might be with dtbo inside the kernel, because my compiled kernel has 28mb vs 32mb from the original one. It's worth noting that the original one is for Android 11 and the one I compiled is for Android 10 but I doubt this is the problem because both are 4.19.x and usually one kernel works over 2 Android versions.

I also tried adding CONFIG_BUILD_ARM64_DT_OVERLAY=y to

vendor/citrus-perf_defconfig but it also won't boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant