發表文章

目前顯示的是 6月, 2025的文章

使用 GParted 出現 Invalid argument during seek for read on /dev/sda

使用 gdisk 將 GPT 的備份分割表重新寫入到新磁碟的末尾。 修復步驟如下: gdisk /dev/sdX 輸入 x 進入專家模式 輸入 e 將備份分割表移動到新磁碟的尾端 輸入 w 寫入變更 Ref: https://www.dotpointer.ga/?section=notes&view=note&id_notes=195

How to build Android Kernel with Clang.

Download Clang: user@hostname$ cd ~/ user@hostname$ wget https://github.com/Neutron-Toolchains/clang-build-catalogue/releases/download/10032024/neutron-clang-10032024.tar.zst -O clang.tar.zst Extract clang.tar.zst user@hostname$ mkdir -p ~/clang user@hostname$ unzstd -d clang.tar.zst user@hostname$ tar -xf clang.tar -C ~/clang Setting ENV value user@hostname$ export PATH="$HOME/clang/bin:$PATH" user@hostname$ export ARCH=arm64 user@hostname$ export SUBARCH=ARM64 user@hostname$ export KBUILD_BUILD_USER="username" user@hostname$ export KBUILD_BUILD_HOST="userhost" user@hostname$ export KBUILD_BUILD_TIMESTAMP="$(date)" Clone Kernel Source code user@hostname$ git clone --depth=1 https://github.com/sunsky131221/kernel_sm8250 -b next-susfs kernel_sm8250 user@hostname$ cd kernel_sm8250 Setting Kernel config user@hostname$ make O=out vendor/apollo_defconfig user@hostname$ make O=out menuconfig Building user@hostname$ make O=out CC=clang -j$(nproc --all) ...