uboot 용 헤더가 들어있는 이미지는 uImage, 커널컴파일을한 후의 바이너리는 zImage 입니다.
두 이미지에 따른 커널 loading이 다음과 같이 다릅니다.

1. uImage를 이용한 커널 이미지 올리기

* uImage = u-boot용 kernel header + kernel image

* mkImage uImage 참고
 mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n 
"MontaVista Linux 2.6.10" -d arch/arm/boot/zImage uzImage.bin 

-l = => list image header information
mkimage -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)



1-1. u-boot용 커널 헤더 구조
typedef struct image_header {
uint32_t ih_magic; /* Image Header Magic Number */
uint32_t ih_hcrc; /* Image Header CRC Checksum */
uint32_t ih_time; /* Image Creation Timestamp */
uint32_t ih_size; /* Image Data Size */
uint32_t ih_load; /* Data Load  Address */
uint32_t ih_ep; /* Entry Point Address */
uint32_t ih_dcrc; /* Image Data CRC Checksum */
uint8_t ih_os; /* Operating System */
uint8_t ih_arch; /* CPU architecture */
uint8_t ih_type; /* Image Type */
uint8_t ih_comp; /* Compression Type */
uint8_t ih_name[IH_NMLEN]; /* Image Name */
} image_header_t;

1-2. 커널 loading 과정
->main_loop
...
->run_command
...기
->do_bootm
* 헤더정보(ih_comp)를 이용하여 커널 압축해제
* 헤더정보(ih_load)를 이용하여 압축해제후 RAM으로 올린다.
* 헤더정보(ih_os)를 이용하여 OS 별 함수로 분기한다. ->do_bootm_linux
->do_bootm_linux
* 헤더정보(ih_ep)를 이용하여 램에 올라간 커널 entrypoint로 제어 옮김 


2-1. 커널 loading 과정 (tftp 이용)
# cp arch/arm/boot/zImage /tftpboot
->do_tftpb
# tftp 30008000 zImage (TARGET)

2-1. 램에 올라간 이미지의 entrypoint로 제어 옮김 (head.s)
->do_go
# go 30008000 (TARGET)
번호 제목 글쓴이 날짜 조회 수
공지 [공지] 커널 스터디 관련 Q&A 게시판 입니다. [5] woos 2016.04.09 2197
1685 cell simulator에 관해 궁금함이.. [5] 성진모 2007.06.19 10124
1684 java virtual machine 에 관심있으신 분 계신가염? [6] 이수연 2008.04.04 10101
1683 저희들 활동이 궁금하세요? [6] diogenes 2010.03.02 10060
1682 [자료]Make, 쉘 관련 한글 사이트와 자료 올려 드립니다. [2] 석헌영 2009.03.16 10060
1681 11월 1일 모임 및 각자 할 일들~! [1] 조용락 2008.11.04 9982
1680 [토의] 스터디 진행 [11] 맥주 2008.03.31 9950
1679 오늘 수고하셨습니다! [2] 변유준 2007.06.17 9941
1678 어셈 발표 자료 [1] file 김종화 2007.06.16 9933
1677 3/7일 스터디는 Intel Processor 세미나 참석으로 대체 하도록 하겠습니다. [2] 석헌영 2009.03.06 9920
1676 powerpc-elf64bit자료올립니다. [2] file 김종화 2007.05.23 9904
1675 powerpc 어셈 [1] 김종화 2007.06.14 9888
1674 4/11 스터디 참석 확인 부탁드립니다. [3] 석헌영 2009.04.09 9879
» uboot에서의 커널 이미지 로딩 과정(개략) [2] 유경환 2011.08.08 9863
1672 4/25 일 스터디 참석 확인 부탁 드립니다. [3] 석헌영 2009.04.24 9845
1671 멤버정리 [1] 백창우 2009.04.28 9832
1670 x86_64 컴파일 하신분?? [4] 송형주 2007.04.17 9803
1669 어제 잘 들어가셨습니까~? [5] 변유준 2007.06.04 9794
1668 남표씨~ CVS commit~ [1] 김기태 2008.03.15 9774
1667 이번주 스터디 참여 [1] 변유준 2007.05.21 9739
1666 크윽 [3] 김종화 2007.06.25 9735
XE Login