우분투&민트 커널 업그레이드

민트도 우분투의 브랜치 배포판 중에 하나이기 때문에 동일하다. 어짜피 뿌리는 데비안계열이니...


1. 공식 메인라인 이용방법
https://wiki.ubuntu.com/Kernel/MainlineBuilds

mkdir v3.5.4-quantal
cd v3.5.4-quantal
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-headers-3.5.4-030504_3.5.4-030504.201209142010_all.deb

-32비트의 경우-
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-headers-3.5.4-030504-generic_3.5.4-030504.201209142010_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-image-3.5.4-030504-generic_3.5.4-030504.201209142010_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-image-extra-3.5.4-030504-generic_3.5.4-030504.201209142010_i386.deb

-64비트의 경우-
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-headers-3.5.4-030504-generic_3.5.4-030504.201209142010_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-image-3.5.4-030504-generic_3.5.4-030504.201209142010_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5.4-quantal/linux-image-extra-3.5.4-030504-generic_3.5.4-030504.201209142010_amd64.deb


sudo dpkg -i *.deb


2. 직접 빌드 방법.

https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

직접 커널에서 받아서 빌드하는 방법이 있다.
먼저 필요한 패키지 설치부터...
sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev


git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

git checkout COMMIT

cp /boot/config-`uname -r` .config

여기서 '가 아니고 `이다. ~표시키에 있는`이다.

make oldconfig

yes '' | make oldconfig

make menuconfig

make clean

make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom

Change to one directory level up (this is where the linux-image and linux-header .deb files were put):

cd ..

sudo dpkg -i *.deb

Now install the .deb files. In this example, the files are linux-image-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb and linux-headers-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb. You may receive warnings about '/lib/firmware/2.6.24-rc5-custom/' - this is expected and will only be problematic if the driver you are trying to test requires firmware:


You are now ready to boot into your new kernel. Just make sure you select the new kernel when you boot:

sudo reboot


sudo dpkg -i linux-image-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb
sudo dpkg -i linux-headers-2.6.24-rc5-custom_2.6.24-rc5-custom-10.00.Custom_i386.deb

  INSTALL debian/headertmp/usr/include/uapi/ (0 file)
  INSTALL debian/headertmp/usr/include/asm/ (65 files)
hostname: Name or service not known
make[1]: *** [deb-pkg] Error 1
make: *** [deb-pkg] Error 2


이런에러가 나와서 /etc/hosts에 로컬호스트 이름 다른게 있어서 수정함.
127.0.1.1 simon-VB

그러면 해결됨.

 

3. make.kpkg를 이용하는 방법

이 방법은 아래 강좌를 보고 알게되었다. 그러나 아직 해보지는 않았다. 동일하게 가능할 것 같다.

http://forum.falinux.com/zbxe/index.php?_filter=search&mid=lecture_tip&search_target=title&search_keyword=%EC%BB%A4%EB%84%90&document_srl=864227

 

최근 AP 제조사들이 BSP(Board Support Package)를 배포할 때 Bitbake 기반의 Yocto나 OpenEmbedded를 많이 쓴다. 편리하기는 한데 기존의 Makefile에 익숙한 사람들은 생소해서 쉽지 않다. Makefile도 쉽지 않은데 ㅎㅎ^^;;

참고로 Yocto는 오픈소스 임베디드 빌드 시스템을 위한 프로젝트인데 아래 공식사이트가 있다.

https://www.yoctoproject.org/

OpenEmbedded 역시 비슷하게 오픈소스 임베디드 빌드 시스템이다. 

http://www.openembedded.org/wiki/Main_Page

그런데 둘의 차이를 잘 모르겠다. bitbake기반이라 비슷하다는 것 말고는...


암튼 아래 사이트에 나오는 데로 따라해보았다.

http://www.crashcourse.ca/wiki/index.php/BitBake_Tutorial

아래 bitbake로도 다양한 명령어를 줄 수 있다.

1. 환경 변수들을 리스팅한다.
bitbake -e core-image-minimal

2. 레시피의 버전을 리스팅한다.

bitbake -s

3. 소스를 미리 패치할 수 있다.
$ bitbake -c fetch core-image-minimal
$ bitbake -c fetchall core-image-minimal

4. 태스크들을 리스팅한다.
$ bitbake -c listtasks strace
$ bitbake -c listtasks virtual/kernel

그리고 여기만한 매뉴얼이 없는것 같다.
http://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html


아래대로 재빨리 해본다.
http://cafe.naver.com/prosumernote/153723




로보티즈 OpenCM9.04을 리눅스에서 사용해볼까했는데 이런 다운로드를 할 수가 없다.^^;;;

그리고 포트 자체가 권한 문제로 툴에서 활성화가 안된다. 이런..

보통 리눅스에는 USB를 udev라는 데몬이 핫플러그를 지원하는데 이놈이 ttyACM장치를 등록하면서

권한을 rw-rw----로 해놓는다. 그래서 툴같이 Other 계정은 접근이 안된다.


이럴때는 udev rule을 이용해서 장치가 연결되면 항상 권한을 666으로 설정하도록 수정한다.

먼저 ttyACM이 어떤 정보를 담는지 아래 명령어로 확인한다.

$  udevadm info -a -n /dev/ttyACM0

SUBSYSTEM=="tty"

ATTRS{idVendor}=="fff1"
ATTRS{idProduct}=="ff48"

ATTRS{product}=="ROBOTIS Virtual COM Port"

...

$ sudo vi /etc/udev/rules.d/51-robotis.rules

히안하게 vid, pid를 넣고 하면 안된다. 아래처럼 하니깐 된다.
SUBSYSTEM=="tty", ATTRS{product}=="ROBOTIS Virtual COM Port", MODE="0666", SYMLINK+="robotis%n"


아래는 다시 리로드...
$  sudo udevadm control --reload-rules
$  sudo udevadm trigger

아래 명령이 제일 확실한 것 같다.
sudo /etc/init.d/udev restart

자 그리고 다시 확인해보라 권한이 666인지..

$  ls -al /dev/ttyACM0



+ Recent posts