g_file_storage 모듈 사용 특정 디렉토리를 이동식디스크로 인식 어떻게 하나요?
안녕하세요~
g_file_storage 모듈 사용 특정 디렉토리를 이동식디스크로 인식 시키려고 합니다.
사용하고 있는 보드는 S3C 6410 보드이며 커널버전은 2.6.28입니다.
6410보드에 SD 카드나 USB 메모리를 아래와 같이 인식시킨뒤 gadget을 테스트 해보았습니다.
insmod g_file_storage.ko file=/dev/mmcblk0p1 removable=1 stall=0
insmod g_file_storage.ko file=/dev/ubi0 removable=1 stall=0
타겟보드를 윈도우에 연결시 각각 SDCard영역과 USB 메모리 영역으로해서
이동식디스크로 인식하는 것을 확인 할 수 있었습니다.
그런데 SDCard 및 USB메모리가 아닌 시스템상에 특정 디렉토리를 지정(예: /file_storage)하거나 아니면 전체 시스템을
이동식 디스크로 인식 시키려고 하는데 도무지 안되서 조언을 얻고자 질문을 올리게 되었습니다.
df 실행해보니 다음과 같이 출력되었습니다.
ubi0:rootfs 863456 118208 740188 14% /
/dev/uba1 7917540 3722268 4195272 47% /mnt/udisk
/dev/mmcblk0p1 971196 96732 874464 10% /mnt/sdcard
tmpfs 98160 0 98160 0% /dev/shm
그래서 전체를 인식시켜볼려고 루트영역이 ubi0:rootfs로 되어 있어서 아래와 같이 해보니 안되더군요
[root@Real6410 /root]# insmod g_file_storage.ko file=/dev/ubi0 removable=1 stall=0
<6>g_file_storage gadget-lun0: invalid file type: /dev/ubi0
g_file_storage gadget-lun0: invalid file type: /dev/ubi0
s3c-udc: bind to driver g_file_storage --> error -22
s3c-udc: bind to driver g_file_storage --> error -22
insmod: cannot insert 'g_file_storage.ko': invalid parameter