(망고210) 디버깅 UART Port 1 에서 2번으로 변경
cd m210_u134_mrvl8787_wifilinux_130620
"include/configs/mango210.h"을아래와 같이 수정
#define CONFIG_SERIAL3 1 /* we use UART1 on SMDKC110 */
./build_uboot
SD로 부팅한 후 u-boot에서아래와 같이
MANGO210 # fast
Host linux PC 에서
# cd image
# sudo ./fastboot flash bootloadermango210_uboot_uart2.bin
UART2에 3핀 시리얼케이블을 연결한 후 PC에서 터미널 프로그램을 실행한다.
CM-V210 : 1, 6번 ON
망고210 : 1 2 번 ON
Nand로 부팅을 합니다.
이제 커널을 수정 해 보자
cd m210_k35_mrvl8787_wifilinux_130620/
$ ./build_kernel
컴파일을 한번 합니다.
[icanjji@icanjji-pcm210_k35_mrvl8787_wifilinux_130620]$ export ARCH=arm
[icanjji@icanjji-pcm210_k35_mrvl8787_wifilinux_130620]$ exportCROSS_COMPILE=arm-none-linux-gnueabi-
[icanjji@icanjji-pcm210_k35_mrvl8787_wifilinux_130620]$ export PATH=$PATH:/opt/arm-2009q3/bin
$ make menuconfig
System Type --->
(2) S3C UART to use for low-level messages
Kernel hacking --->
(2) S3C UART to use for low-level debug
설정을 합니다.
$ cp .configmango210_7inch_mrvl8787_uart2_android_defconfig
$ cpmango210_7inch_mrvl8787_uart2_android_defconfig arch/arm/configs/
$ vi build_kernel
#makemango210_7inch_mrvl8787_android_defconfig
makemango210_7inch_mrvl8787_uart2_android_defconfig
$ ./build_kernel
빌드를 합니다.
$ cd ../image/
$ mv zImage zImage_uart2
Nand로 부팅 후
u-boot에서
ANGO210 # fast
Fastboot: employ default partitioninformation
[Partition table on NAND]
ptn 0 name='bootloader' start=0x0len=0x100000(~1024KB)
ptn 1 name='kernel' start=0x100000len=0x500000(~5120KB)
ptn 2 name='linuxfs' start=0x600000 len=N/A(Yaffs)
Host PC linux 에서 아래와 같이 수행을 합니다.
# sudo ./fastboot flash kernel zImage_uart2
커널이 제대로 되었는지 확인하기 위해서
MANGO210 # setenv bootcmd "nand read20008000 100000 500000;bootm 20008000"
MANGO210 # setenv bootargsroot=/dev/mtdblock2 rootfstype=yaffs2 init=/sbin/init console=ttySAC2,115200
수행 후
MANGO210 # boot
을 수행하면 커널이 로딩되면서, panic이 발생을 합니다.
s5p-tvout s5p-tvout: hpd status is cableremoved
DBUG_PORT must not use AFC!
yaffs: dev is 32505858 name is"mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) ondevice 31:2.
Freeing init memory: 156K
Failed to execute /sbin/init. Attempting defaults...
Kernel panic - not syncing: No initfound. Try passing init= option tokernel. See Linux Documentation/init.txt for guidance.
Rebooting in 5 seconds..
이유는 파일 시스템을 Write하지 않았기 때문이다.
파일 시스템을 Write 해 보자
다시 보드를 리셋 후 u-boot에서 아무키나 누른 후 아래와 같이수행을 합니다.
MANGO210 # fast
리눅스 PC에서
sudo ./fastboot flash linuxfsm210_simplefs_mrvl8787_111110.yaffs2
파일 시스템이 Write가 된다.
u-boot에서 다시
setenv bootcmd "nand read 20008000100000 500000;bootm 20008000"
setenv bootargs root=/dev/mtdblock2rootfstype=yaffs2 init=/sbin/init console=ttySAC2,115200
saveenv
boot
위의 순서대로 반드시 수행을 한다.
어 그런데 shell은 uart1에서수행이 된다.
파일 시스템을 수정을 해야 한다.
리눅스 PC에서
$ cd image
$ mkdir rootfs
$ cd rootfs
$ sudo tar xf ../rootfs.tar
$ vi etc/inittab
에서 아래와 같이 수정을 합니다.
#T1:12345:respawn:/sbin/getty -L -n -l/root/nologin ttySAC1 115200 vt100
T1:12345:respawn:/sbin/getty -L -n -l/root/nologin ttySAC2 115200 vt100
수정 후 yaffs2 이미지를 만들어야 합니다.
안드로이드 컴파일하면
$ cp ./host/linux-x86/bin/mkyaffs2image~/work/mango210/m210_linux_mrvl8787_130620/image/
Copy를 하면 됩니다.
없으면 첨부된 mkyaffs2image를 사용하기 바랍니다.
$ cd image
$ sudo ./mkyaffs2image rootfsm210_simplefs_mrvl8787_uart2_130716.yaffs2
다시 리부팅 합니다.
리부팅 하기전에
MANGO210 # print
mtdpart=80000 400000 3000000
bootdelay=3
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
ipaddr=192.168.1.121
serverip=192.168.1.2
gatewayip=192.168.1.1
netmask=255.255.255.0
bootcmd=nand read 20008000 100000500000;bootm 20008000
bootargs=root=/dev/mtdblock2rootfstype=yaffs2 init=/sbin/init console=ttySAC2,115200
Environment size: 311/16380 bytes
“bootcmd”와 “bootargs”를확인 바랍니다.
부팅이 panic나면
“nand scrub” 후 다시Write하기 바랍니다.
u-boot에서
$ nand scrub
$ fastboot
Host PC Linux에서
[root@icanjji-pc image]# sudo ./fastbootflash bootloader mango210_uboot_uart2.bin
sending 'bootloader' (244 KB)...
OKAY [ 0.271s]
writing 'bootloader'...
OKAY [ 0.376s]
finished. total time: 0.647s
[root@icanjji-pc image]# sudo ./fastbootflash kernel zImage_uart2 sending 'kernel' (4564 KB)...
OKAY [ 2.333s]
writing 'kernel'...
OKAY [ 3.959s]
finished. total time: 6.292s
[root@icanjji-pc image]# sudo ./fastbootflash linuxfs m210_simplefs_mrvl8787_uart2_130716.yaffs2
댓글 없음:
댓글 쓰기