이번에는 git clone 명령어로 특정 커밋으로 소스 코드를 변경하는 과정을 알아봅시다.
돌아가려는 커밋은 6/13/2018 날짜입니다.
commit 5762758699e1ddab22bf4c14eb225941761c52c8
Author: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Wed Jun 13 15:21:10 2018 +0100
net: lan78xx: Disable TCP Segmentation Offload (TSO)
TSO seems to be having issues when packets are dropped and the
remote end uses Selective Acknowledge (SACK) to denote that
data is missing. The missing data is never resent, so the
connection eventually stalls.
There is a module parameter of enable_tso added to allow
further debugging without forcing a rebuild of the kernel.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
먼저 다음 명령어로 최신 라즈비안 리눅스 커널 소스를 다운로드 받습니다.
git clone --depth=3000 https://github.com/raspberrypi/linux
--depth=1 대신 --depth=3000 명령어를 입력합시다.
소스를 받는데 10분 정도 시간이 걸립니다.
소스를 다 받고 난 다음 "cd linux" 명령어로 linux 폴더로 이동한 다음 git log 명령어로 커밋을 봅시다.
확인하니 리눅스 커널 4.14.68버전입니다.
commit 8c8666ff6c1254d325cfa300d16f9928b3f31fc0
Merge: 3dc96a2 ee13f7e
Author: popcornmix <popcornmix@gmail.com>
Date: Wed Sep 5 15:26:48 2018 +0100
Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y
commit ee13f7edca5838436feefde90ed1b2ebb07c4184
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Wed Sep 5 09:26:42 2018 +0200
Linux 4.14.68
다음 명령어로 브랜치와 커밋 해시(돌아가려는 커밋) 값을 입력합니다.
git checkout -b raspbian_liunx 5762758699e1ddab22bf4c1
raspbian_liunx 는 브랜치 이름이고 5762758699e1ddab22bf4c1 는 커밋 메세지에서 보이는 커밋 해시 정보입니다.
6/13/2018 커밋으로 돌아가려는 겁니다.
(where)
commit 5762758699e1ddab22bf4c14eb225941761c52c8
Author: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Wed Jun 13 15:21:10 2018 +0100
net: lan78xx: Disable TCP Segmentation Offload (TSO)
git branch 명령어를 입력하니 raspbian_liunx 브랜치가 생성됐습니다.
austindh.kim:~/src/test_raspbian_src/linux$ git checkout -b raspbian_liunx 5762758699e1ddab22bf4c1
Switched to a new branch 'raspbian_liunx'
austindh.kim:~/src/test_raspbian_src/linux$ git branch
* raspbian_liunx
rpi-4.14.y
다시 git log 명령어를 입력하면 현재 커밋을 다음과 같이 볼 수 있습니다.
austindh.kim:~/src/test_raspbian_src/linux$ git log
commit 5762758699e1ddab22bf4c14eb225941761c52c8
Author: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Wed Jun 13 15:21:10 2018 +0100
net: lan78xx: Disable TCP Segmentation Offload (TSO)
TSO seems to be having issues when packets are dropped and the
remote end uses Selective Acknowledge (SACK) to denote that
data is missing. The missing data is never resent, so the
connection eventually stalls.
There is a module parameter of enable_tso added to allow
further debugging without forcing a rebuild of the kernel.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
라즈비안은 한 달에 2번 주기로 계속 리눅스 커널 버전이 업그레이드됩니다. 보통 실전 리눅스 프로젝트는 리눅스 커널 버전을 자주 바꾸지 않습니다.
주의할 점
다음과 같은 커밋이 보이면 "Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y"와 같은 머지 커밋으로 돌아가야 합니다.
commit 58eb131ce78d1976dad26c21bd75a7da290cd6aa
Merge: 4fca48b 2c6025e
Author: popcornmix <popcornmix@gmail.com>
Date: Tue Jun 5 17:28:54 2018 +0100
Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y
commit 2c6025ebc7fd8e0a8ca785d778dc6ae25225744b
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue Jun 5 11:42:00 2018 +0200
Linux 4.14.48
만약 Author: Greg Kroah-Hartman 커밋으로 돌아가면 다음 컨피그 파일이 빠져 있어 라즈베리파이 커널 빌드를 못합니다.
./arch/arm/configs/bcm2709_defconfig
'리눅스 커널의 구조와 원리 > 2. 라즈베리 파이 설정' 카테고리의 다른 글
[펌] 라즈베리파이 4 Model B 시작하기 (0) | 2023.05.23 |
---|---|
[리눅스][유틸리티] rsync: 서버간 파일 복사 (0) | 2023.05.23 |
라즈베리안 설정 과정 (0) | 2023.05.23 |
[라즈베리파이] sd 카드 포멧 (0) | 2023.05.23 |
라즈베리파이(Raspberry Pi) 한글 설정 (0) | 2023.05.23 |