내 컴퓨터에 Vmware를 깔고나서 Ubuntu 9.10을 깔고나서,

mini2440 FriendlyARM CD에 들어있던 linux-kernel-2.9.13을 풀고 나서 메뉴설정이 안되어서

sudo apt-get install libncurses5-dev

를 실행시켜서 libncurses5 라이브러리를 설치하였다.

그리고 나서, make menuconfig로 뭔지 모르는 설정들을 감으로 잡아서 선택하고 나서 컴파일을 해보니

엉뚱한 컴포넌트에서 링크에러가 난다. 서로 연관성이 있는 것을 같이 포함시키지 않은 것이었다.

한마디로 말하면 관련된 것을 다 뺐어야했는데, 하나만 들어갔다는 얘기.....

그래서 어쩔수 없이 'config_n35'라고 되어 있는 menu config 파일을 불러서 config 파일을 만들고 나서 컴파일 하니,

에러 없이 잘 마무리가 되어서 zImage가 나왔다

근데 zImage를 어떻게 하는가?????

찾아보니, uboot에 맞도록 uImage로 만들어 줘야 한단다....

그래서 uImage를 찾아보았더니 그것은 'mkimage'로 만들어 줄 수 있다고 한다.

그래서 Ubuntu에서 mkimage를 쳐보았다.

root@ubuntu:/home/lebych/works/ARM/linux/temp/kernel-2.6.13# mkimage
The program 'mkimage' is currently not installed. You can install it by typing:
apt-get install uboot-mkimage
mkimage: command not found

말인즉슨, mkimage가 안깔려 있으니까, 'apt-get install uboot-mkimage'를 실행하라는 것이다.

물론 su에서이다.

그래서 말대로 실행해 보았다.

그러니 그대로 자기가 알아서 깔아버린다.... 편하군....


root@ubuntu:/home/lebych/works/ARM/linux/temp/kernel-2.6.13# apt-get install uboot-mkimage
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.31-14 linux-headers-2.6.31-14-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
uboot-mkimage
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,720B of archives.
After this operation, 57.3kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com karmic/main uboot-mkimage 0.4 [9,720B]
Fetched 9,720B in 1s (5,839B/s)
Selecting previously deselected package uboot-mkimage.
(Reading database ... 140030 files and directories currently installed.)
Unpacking uboot-mkimage (from .../uboot-mkimage_0.4_i386.deb) ...
Setting up uboot-mkimage (0.4) ...

약간 시간은 걸리지만, 알아서 압축풀고 깔아놓았다.

잘 깔렸는지 실행해 보았다.


root@ubuntu:/home/lebych/works/ARM/linux/temp/kernel-2.6.13# mkimage
Usage: mkimage -l image
-l ==> list image header information
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
root@ubuntu:/home/lebych/works/ARM/linux/temp/kernel-2.6.13#

사용법이 나오는 것을 보니 잘 깔려진 것 같다.

그리고나서 실제이미지를 만드려면 어떻게 서야하는지 찾아보았다.

(7) u-boot에서 사용하기 위해 binary 압축 파일을 uImage file로 만든다.
./mkimage -A arm(우리가 쓰는 임베디드 종류) -O linux -T kernel -C gzip -a(sdram address 올릴 주소) 0x30008000 -e(entry point) 0x30008000 -n(name) "Linux Kernel Image" -d linux.bin .gz
uImage
Link: http://lunatic4.egloos.com/330952(kernel compile하기
)

오늘은 대략 여기까지이다.

Posted by 벅스바니
,