S?nce there is no real device at /dev/sda4, your script is not work.
If you change script to use sda1, and placing real usb flash to the port will make your script work.
For make it work without real flash device, you needed to load Virtual USB device to sda4
LN52B750
-
- Official SamyGO Developer
- Posts: 1700
- Joined: Fri Oct 02, 2009 8:52 am
- Location: Austria/Vienna (no Kangaroos here)
- Contact:
Re: LN52B750
the source for the modules are since years in the kernel.gagpcool wrote:Ok so I tried to adopt your vusb scripts for my use. Btw the fake usb device is pretty cool idea. Are you releasing the source for the kernel module by any chance?
documentation at:
http://www.linux-usb.org/gadget/file_storage.html
for your mount problem:
it looks like you write first to /dtv/usb/log and after then you mount your cifs-share. -> not selectable under media.p
mount first the share than you can write the notification to /dtv/usb/log
hth
arris
-
- Official SamyGO Developer
- Posts: 1700
- Joined: Fri Oct 02, 2009 8:52 am
- Location: Austria/Vienna (no Kangaroos here)
- Contact:
Re: LN52B750
think you misunderstood me,gagpcool wrote:I tried both ways and it doesn't seem to make a difference.
Almost seems like that by the time I add the entry to the log, the auto detection code has maybe already parsed the log file. Also I can't do it before the vusb.sh running because then the code overwrites the /dtv/usb/log file with just its automated entry.
I even tried putting the vusb.sh call after the smb mount but before adding to the log file and that didn't help either.
Anyone have any other ideas.
Gagan
the order for loading:
- vusb.sh
- mount windows shares
- write notification about mounted shares to log file
Code: Select all
#!/bin/sh
#Load cifs.ko module
insmod /mtd_rwarea/cifs.ko
/mtd_rwarea/vusb.sh
SERVER_IP=192.168.0.254
SHARE=testshare
SD_NUM=4
SD_DR=sda
USERNAME=gagpcool
PASSWORD=default
SMB_BASE_MOUNT_PATH=/dtv/usb/smb
#Create directory structure on virtual usb memory:
mkdir -p $SMB_BASE_MOUNT_PATH
mkdir -p $SMB_BASE_MOUNT_PATH/$SHARE
if [ `mount | grep -c $SMB_BASE_MOUNT_PATH/$SHARE` == 0 ]; then
mount -o user=$USERNAME,password=$PASSWORD -t cifs //$SERVER_IP/$SHARE $SMB_BASE_MOUNT_PATH/$SHARE && \
$(echo "[sdh]
Vendor : Linux
Product : TestShare
Serial : Q80VQLFL
Devpath : 8
Lun : 0
MountDir : /dtv/usb/smb
Filesystem : vfat
" >> /dtv/usb/log)
fi
arris
-
- Official SamyGO Developer
- Posts: 1700
- Joined: Fri Oct 02, 2009 8:52 am
- Location: Austria/Vienna (no Kangaroos here)
- Contact:
Re: LN52B750
can you try the following:gagpcool wrote:Well I copied your script as is into cifs_mount.sh but it still doesn't show up. As I said almost seems like the log file is getting parsed by the /mtd_boot/usb_mount/ scripts before the new entry into log file makes it. The problem is if I remove the sleep 3 in the vusb.sh file then it seems to only have the sda entry and not the sdh entry (its looks like it overwrites the entry in the log file if I write it out before they write it out).
GP
umount windows-share
remove directory /dtv/usb/smb (if realy never mounted!!)
remove modules g_file_storage dummy_hcd cifs
than execute
sh -x /mtd_rwarea/SamyGo.sh
and please post the output, also the output from dmesg (lines from last "g_file_storage gadget: File-backed for SamyGO, version: 28 November 2005")
arris