32비트 라즈비안 커널
커널 빌드 (arm32_rpi_kernel_build.sh)
#!/bin/bash
KERNEL=kernel8
echo "configure build output path"
TOP_PATH=$( cd "$(dirname "$0")" ; pwd )
OUTPUT="$TOP_PATH/out32"
BUILD_LOG="$TOP_PATH/rpi_build_log.txt"
rpi_build_start_time=`date +%s`
pushd linux > /dev/null
make ARCH=arm O=$OUTPUT CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig -j16 2>&1
make ARCH=arm O=$OUTPUT CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs -j16 2>&1 | tee $BUILD_LOG
popd > /dev/null
커널 설치 (arm32_rpi_kernel_install.sh)
#!/bin/bash
echo "configure build output path"
TOP_PATH=$( cd "$(dirname "$0")" ; pwd )
OUTPUT="$TOP_PATH/out32"
sudo make modules_install
sudo cp $OUTPUT/arch/arm/boot/dts/*.dtb /boot/
sudo cp $OUTPUT/arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp $OUTPUT/arch/arm/boot/zImage /boot/kernel7l.img
64비트 라즈비안 커널
커널 빌드 (arm64_rpi_kernel_build.sh)
#!/bin/bash
KERNEL=kernel8
echo "configure build output path"
TOP_PATH=$( cd "$(dirname "$0")" ; pwd )
OUTPUT="$TOP_PATH/out64"
BUILD_LOG="$TOP_PATH/rpi_build_log.txt"
rpi_build_start_time=`date +%s`
pushd linux > /dev/null
make ARCH=arm64 O=$OUTPUT CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig -j16 2>&1
make ARCH=arm64 O=$OUTPUT CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs -j16 2>&1 | tee $BUILD_LOG
popd > /dev/null
커널 설치 (arm64_rpi_kernel_install.sh)
#!/bin/bash
echo "configure build output path"
TOP_PATH=$( cd "$(dirname "$0")" ; pwd )
OUTPUT="$TOP_PATH/out64"
BUILD_LOG="$TOP_PATH/rpi_build_log.txt"
rpi_build_start_time=`date +%s`
sudo make modules_install
sudo cp $OUTPUT/arch/arm64/boot/dts/broadcom/*.dtb /boot/
sudo cp $OUTPUT/arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm64/boot/Image.gz /boot/kernel8.img
<From:>
https://www.raspberrypi.com/documentation/computers/linux_kernel.html
#!/bin/bash
echo "configure build output path"
TOP_PATH=$( cd "$(dirname "$0")" ; pwd )
OUTPUT="$TOP_PATH/out64"
BUILD_LOG="$TOP_PATH/rpi_build_log.txt"
rpi_build_start_time=`date +%s`
sudo make modules_install
sudo cp $OUTPUT/arch/arm64/boot/dts/broadcom/*.dtb /boot/
sudo cp $OUTPUT/arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm64/boot/Image.gz /boot/kernel8.img
<From:>
https://www.raspberrypi.com/documentation/computers/linux_kernel.html
'리눅스 커널의 구조와 원리 > 2. 라즈베리 파이 설정' 카테고리의 다른 글
gzip의 분할 압축 명령어 사용하기 (0) | 2023.12.01 |
---|---|
[GIT] initial configuration GIT (0) | 2023.09.11 |
64비트 기존 라즈비안 이미지 위치 (0) | 2023.09.08 |
[정보] 라즈비안 이미지 백업 위치 (0) | 2023.08.27 |
[리눅스] 라즈비안(데비안): vi(vim) 에디터 visual mode 삭제 (0) | 2023.05.23 |