[이번 주 2012.7.14 스터디 공지]
토요일날 뵈요.
이번주 7월 14일 선릉역 토즈 22인 부스
위치 : http://map.naver.com/local/siteview.nhn?code=18468993
시간 : 15:00~22:00
7월 21일 선릉역 토즈
7월 28일 선릉역 토즈
8월 4일 선릉역 토즈
진도 : Arm developer guide chapter 12.5 부터
댓글 10
-
최만희
2012.07.13 23:25
-
이홍우
2012.07.14 21:34
오늘 결정된.. 책 끝나고 계획.. 입니다.
- uboot 분석. 간단한 자료로... 예전 버전의 uboot으로.
- git : 기본 사용 시나리오 익숙해지기
- qemu 를 이용하여 리눅스 커널 트레이스하기..
그리고., 타겟 보드는.. 원하는 사람만 구해서 사용하기로 했습니다~~~
odroid-x는 jtag 포트가 없다고하니니.. 회사에 있는 디버거 붙여보실 분들은 다른 보드로 하시는게 좋을거 같다는 얘기도.. 했었고,
우리 팀에는 panda board, beaglebone, beagleboard xm 가지고 있는 분들이 있으니..
새로 구매하실 분들은 이 보드중 하나로 하시면 좋을거 같아요
진도는 556 페이지까지 나갔습니다.
고생하셨어요..
-
이홍우
2012.07.16 00:09
어제 모임에서 말씀드렸던 사이트입니다.
http://balau82.wordpress.com/2012/03/31/compile-linux-kernel-3-2-for-arm-and-emulate-with-qemu/
그리고..
http://www.iamroot.org/xe/73993 에 있는 김태훈님 댓글과 pdf자료 참고했구요..
우선, 저는 아래처럼 따끈한 커널을 받았구요..
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
커널 vexpress_defconfig 에서 kgdb option을 다 켰어요...
그리고, gdb로 qemu에서 실행되는 커널에 브레이크 포인트 잡았구요...
qemu 실행시에 -S 옵션을 주고 실행한뒤..
gdb에서 target remote :1234로 연결하고, 브레이크 포인트 설정 이후, c(continue)해서.. 원하는 커널 코드에 브레이크 포인트를 걸 수 있었어요.
qemu-system-arm -M vexpress-a9 -m 1024M –snapshot -s -S -kernel ../linux/arch/arm/boot/zImage -initrd rootfs.img.gz -serial stdio -append “root=/dev/ram init=/sbin/init console=ttyAMA0 debug”
여기까지 하시면서 안되는 부분이 있으면 알려주세요~~
-
은두
2012.07.20 02:15
ramdisk 를 busybox로 만드실때busybox는 default 로 dynamically linked 컴파일 됩니다.이것 때문에 안되것 같습니다..^^;올바르게 실행되려면 관련 so 파일도 disk안에 넣어주고 런타임시 로딩할수 있게 세팅해주면됩니다.이게 귀찮으면 static으로 컴파일해 주면 되는데요,make menuconfig 에서 Busybox settings->Build Options->Build BusyBox as static~~~~이라고 나오는 부분을 체크하고 컴파일 하면됩니다.(링킹할때 에러뜨면 RPC옵션을 끄고 하세요.. 라이브러리와 안맞는게 있나봐요.)static으로 하니까 shell 까지 잘뜨네요.ramdisk 만드는 부분은 전 아래 주소를 참고해서 만들었습니다.http://www.ibm.com/developerworks/linux/library/l-initrd/index.html정리해서 올리도록 할게요.이제 gdb를 해봐야겠네요..아 그리고 qemu-system-arm append 에서 init 은 줄필요 없을것 같습니다. 없으면 자동으로 /sbin/init로 찾아가는것 같네요.root=/dev/ram 도 없어도 잘되던데.. 어떤 역활을 하는지는 모르겠네요. -
은두
2012.07.19 01:38
덕분에 많은 진전이 있었는걸요.
부끄러워할것까진 없습니다 ^^
같이 삽질해보아요~
-
이홍우
2012.07.19 01:22
저도 잘 모르겠어요...
이후로 진행한게 하나도 없어서요.
부끄럽습니다.
-
은두
2012.07.19 00:07
그리고 질문이 qemu 실행 시 linux 로 넘겨주는 command 에서
root=/dev/ram init=/sbin/init 에서
/sbin/init은 부트 프로세스의 나머지 부분을 초기화 시켜주고 유저 환경을 세팅해주는것으로 알고 있는데요.
경로에 있는것으로 확인이 되는데 못찾는 이유를 모르겟네요..;;;
그리고 root=/dev/ram 은 ram disk 디바이스 파일일거고 mknod 로 만들줘야 되는것이 아닌가요?
-
은두
2012.07.18 23:51
initrd를 만들기 위해 두가지 방법을 사용했는데요.. 모두 실패네요..;;
첫번째 방법은
balau사이트에서 홍우님이 올린 댓글 대로 busybox로 rootfs만들었습니다.
해보았는 아래와 같이 뜨면서 안되네요.. 홍우님과 같은 에러메시지 같은데 어떻게 해결하셨나요?
#0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 43
input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/mb:kmi1/serio1/input/input1
List of all partitions:
No filesystem could mount root, tried: ext3 ext2 cramfs vfat
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[<80014600>] (unwind_backtrace+0x0/0xf8) from [<8031a158>] (panic+0x88/0x1c0)
[<8031a158>] (panic+0x88/0x1c0) from [<80422d90>] (mount_block_root+0x1e8/0x22c)
[<80422d90>] (mount_block_root+0x1e8/0x22c) from [<80422fa8>] (mount_root+0xe8/0x108)
[<80422fa8>] (mount_root+0xe8/0x108) from [<80423128>] (prepare_namespace+0x160/0x1b8)
[<80423128>] (prepare_namespace+0x160/0x1b8) from [<804229d4>] (kernel_init+0x1d4/0x214)
[<804229d4>] (kernel_init+0x1d4/0x214) from [<8000f02c>] (kernel_thread_exit+0x0/0x8)
또 다른 방법으로
dd if=/dev/zero of=roofs.img bs=1k count=4096
mke2fs roofs.img
이렇게 해서 mount 한다음에 busybox _install 을 copy 해서 umount하고 gzip 으로 압축했는데.. mount는 된것 같지만 init를 못찾네요..
#0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 43
input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/mb:kmi1/serio1/input/input1
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
Freeing init memory: 176K
Failed to execute /bin/init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<80014600>] (unwind_backtrace+0x0/0xf8) from [<8031a158>] (panic+0x88/0x1c0)
[<8031a158>] (panic+0x88/0x1c0) from [<80319f08>] (init_post+0xa0/0xc4)
[<80319f08>] (init_post+0xa0/0xc4) from [<804229d8>] (kernel_init+0x1d8/0x214)
qemu: terminating on signal 2 from pid 4043
qemu 실행은 다음과 같이 했습니다.sudo qemu-system-arm -M vexpress-a9 -m 1024M -snapshot -kernel ./zImage -initrd ./rootfs.img.gz -serial stdio -append "root=/dev/ram init=/sbin/init console=ttyAMA0 debug" -
이홍우
2012.07.17 13:15
pro-git 번역이 오픈되어 있습니다~
-
구본규
2012.07.23 17:39
저도 빌드 해보았습니다.
buildroot는 이전글에 올린 방법으로 성공했고,
이번에는 linaro qemu, linaro 2012.04 toolchain, busybox-1.20.2, kernel 3.5.0-rc7 (git HEAD) 로 시도했습니다.
busybox-1.20.2
config는 특별한 것은 없고, 송은두님처럼 static library를 선택하고, ARCH와 CROSS_COMPILE을 지정해 주었습니다.
$ make && make install
$ cd _install
$ find . | cpio -o --format newC > ../rootfs.img
$ gzip -c rootfs.img > rootfs.img.gz
kernel은 아래 설정으로 빌드했습니다.
"General setup"
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
Support initial ramdisks compressed using gzip
busybox는 minimal 실행파일만 만들어 주므로 필요한 다른 디렉토리와 파일을 생성하는 스크립트를 작성해 사용하면 편리합니다.
[참고]
부팅시 커널에 전달하는 boot parameters에 대한 내용입니다.
http://oreilly.com/linux/excerpts/9780596100797/kernel-boot-command-line-parameter-reference.html
http://www.kernel.org/doc/man-pages/online/pages/man7/bootparam.7.html
busybox를 이용한 initramfs 제작 참고 링크입니다.
http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | [공지] 스터디 관련 알림 용도의 게시판입니다. | woos | 2016.04.09 | 428 |
925 | 7월 4일 장소 [1] | 윤진훈 | 2010.07.09 | 8803 |
924 | 7월 12일 장소 공지입니다 | 남현우 | 2008.07.01 | 8787 |
923 | [공지] 5월 10일 스터디 진도 | 송형주 | 2008.05.08 | 8778 |
922 | 장소 공지입니다. [6] | 남현우 | 2008.05.08 | 8757 |
921 | 이번 주(6.20) 장소 | 윤진훈 | 2010.06.19 | 8729 |
920 | 장소 공지입니다. [4] | 남현우 | 2008.06.19 | 8509 |
919 | 장소 공지입니다. [7] | 남현우 | 2008.05.27 | 8385 |
918 | 장소 공지입니다. [3] | 남현우 | 2008.06.26 | 8377 |
917 | 장소 공지입니다. [2] | 남현우 | 2008.05.15 | 8348 |
916 | 다음주 장소 공지 및 일정 조사입니다. [6] | 남현우 | 2008.06.07 | 8184 |
915 | 장소관련 [2] | 김경태 | 2010.04.13 | 8095 |
914 | 11/27 스터디 장소 안내.... | 양현철 | 2010.11.25 | 8067 |
913 | 8일 스터디 장소 빌려는 놨습니다. [6] | 양현철 | 2011.01.03 | 7861 |
» | [014 - 2012.7.14 스터디 공지] [10] | 은두 | 2012.07.13 | 7801 |
911 | 1/22 스터디 공지 (시간/장소변경) [4] | Jason | 2011.01.18 | 7414 |
910 | 스터디 장소 섭외 [6] | Jason | 2010.04.07 | 7356 |
909 | 02/12 스터디 장소 공지입니다. [2] | 박상호 | 2011.02.09 | 7344 |
908 | 이번주 스터디 장소?? [1] | 윤진훈 | 2010.04.10 | 7301 |
907 | [공지] 반장임당 ^^ [7] | 조은지 | 2010.04.07 | 7141 |
906 | 1월 29일 장소 공지해드립니다 [1] | 양현철 | 2011.01.24 | 7072 |
.
내일 회사 일 때문에 불참석합니다. 열공하세요~