Steward
分享是一種喜悅、更是一種幸福
手機 - Zinwa Q25 - LineageOS - Build Kernel 5.10.198
參考資訊:
https://github.com/LineageOS/android_device_xelex_Q25
https://github.com/LineageOS/android_kernel_xelex_mt6789
$ cd
$ wget https://github.com/steward-fu/website/releases/download/q25/clang-r416183b.tar.gz
$ git clone https://github.com/LineageOS/android_kernel_xelex_mt6789 -b lineage-23.2 --depth=1
$ cd android_kernel_xelex_mt6789
$ mkdir clang
$ cd clang
$ tar xvf ~/clang-r416183b.tar.gz
$ cd ..
$ sudo fallocate -l 16G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ export PATH=$PWD/clang/bin:$PATH
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ export CROSS_COMPILE_COMPAT=arm-linux-gnueabi-
$ export LLVM=1
$ export LLVM_IAS=1
### sudo ln -s /usr/bin/python3 /usr/local/bin/python
$ clang --version
Android (7284624, based on r416183b) clang version 12.0.5
$ make mrproper
$ wget https://github.com/steward-fu/website/releases/download/q25/lineageos_q25_defconfig
$ cp lineageos_q25_defconfig .config
$ make olddefconfig
$ make Image.gz -j4
$ cd
$ wget https://github.com/steward-fu/website/releases/download/q25/boot_lineageos_usbserial.img
$ git clone --depth=1 https://android.googlesource.com/platform/system/tools/mkbootimg.git
$ python3 mkbootimg/unpack_bootimg.py \
--boot_img boot_lineageos_usbserial.img \
--out out \
--format mkbootimg
$ python3 mkbootimg/mkbootimg.py \
--header_version 4 \
--os_version 16.0.0 \
--os_patch_level 2026-09 \
--kernel android_kernel_xelex_mt6789/arch/arm64/boot/Image.gz \
--ramdisk out/ramdisk \
--cmdline '' \
--output boot-new.img
$ file boot-new.img
boot-new.img: Android bootimg, kernel (0x275c27), ramdisk (0x630)
$ fastboot flash boot boot-new.img