0. ubuntu 20.04.4 LTS x64

1. 의존 패키지 설치 Install Dependent Packages (defconfig 및 menuconfig 빌드를 위함)
sudo apt-get install build-essential libncurses5-dev python

2. 커널 소스 다운로드 Download the appropriate kernel source for your device.
Galaxy Tab S6 Lite : git clone https://github.com/LineageOS/android_kernel_samsung_gta4xl

3. 크로스 컴파일러 다운로드 후 경로 설정 Set path after downloading cross-compiler
git clone https://github.com/Shubhamvis98/toolchains

export PATH="/home/code/toolchains/clang-r428724/bin:/home/code/toolchains/aarch64-linux-android-4.9/bin:$PATH"
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
export CLANG_TRIPLE=aarch64-linux-gnu-

4. 커널 소스 디렉토리로 이동 Go to the kernel source path
make clean
make mrproper
make exynos9611-gta4xlwifi_defconfig
make menuconfig  -> 실행 후 <Save> 클릭 

5. 컴파일 Build it
make -j16 CC=clang

6. 커널 소스 수정 (오류 발생 시) Modifying kernel sources (in case of error)
Open Makefile


KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
   -fno-strict-aliasing -fno-common -fshort-wchar \
   -Werror-implicit-function-declaration \
   -Wno-format-security \
   -Werror \    <------------- 해당 라인 삭제 delete this line
   -std=gnu89

+ Recent posts