이것Do! 저것Do!!

* 참조

http://technote.kr/158

https://www.slideshare.net/he4722/ss-71711590

https://ysoh.wordpress.com/2016/05/21/ubuntu-16-04-kernel-%EC%BB%A4%EB%84%90-%EC%BB%B4%ED%8C%8C%EC%9D%BC/

http://ydseo.tistory.com/27


16.04 LTS를 설치한 후 http://technote.kr/158의 내용을 따라하면서 소스를 받으려고 했는데 에러가 계속 발생하면서 안되더라.


이것저것 시도를 해 보다가 해결이 되었는데 원인이 무엇인지는 잘 모르겠다. 추측컨데...


1. 일단 root 계정 생성

$ sudo passwd root


2. http://technote.kr/158에서의 설명처럼 'Ubuntu Software'를 실행하여 소스를 받을 수 있도록 설정 변경


3. 컴파일에 필요한 패키지 설치

$ sudo apt-get install build-essential libncurses5 libncurses5-dev bin86 kernel-package -y


이렇게 하고 나니 소스 다운로드가 되었던 것 같다.


4. 소스 다운로드

$ sudo apt-get source linux-image-$(uname -r)

...

$ cd linux-hwe-4.10.0/


5. 현재 config 복사

$ sudo cp /boot/config-4.10.0-28-generic .config


6. 커널 빌드

$ sudo make-kpkg -j2 --initrd --append-to-version=-test-kernel kernel_image


중간에 ssl 관련하여 한 번 에러가 나면서 중단이 되었는데 libssl-dev를 설치해 주고 다시 하니까 성공!!


7. ssl 설치

$ sudo apt-get install libssl-dev

$ sudo make-kpkg -j2 --initrd --append-to-version=-test-kernel kernel_image


제대로 빌드가 되면 상위 디렉토리에 .deb파일이 만들어진다. 'dpkg -i' 커맨드로 설치.