Main wrapper

Main wrapper

Postby octessence » Sun Nov 08, 2009 11:50 am

Someone over at mpcclub was interested in using the main wrapper to send WOL packets so I put up some intructions on the Wiki:

http://wiki.opentvix.com/Main_Wrapper
TViX M-6500 + TViX M-4000 (Bricked)
octessence
Member
 
Posts: 320
Joined: Sat Apr 26, 2008 5:54 pm
Location: Germany (UK expat)

Re: Main wrapper

Postby petersm » Sun Nov 15, 2009 5:39 am

It's looks like there are some problem....

Here is what I did
1: I copy the file main_wrapper_0.1.1.tar.gz to /tvix (from windows)
2: gzip the file
3: untar the file
4.copy the file "main_wrapper.so" from the main_wrapper dir that was created from the tar command to /tvix
5 backup main to main.org
6 modify the main with the new settings.
7. put my wake_tower.sh script in to /tvix, and add that path to main script
8 create the file on USB, wrapmain

Its looks like there are a problem with the mount command , mount -t vfat /dev/sda1 /tmp/mnt/usb1, and therefore never execute the new feature...

and what about the wrapmain.log ? when running that line manually nothing happens , its never finished, don't come back to the prompt.


BR
Peter
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Re: Main wrapper

Postby octessence » Sun Nov 15, 2009 8:27 pm

Maybe your USB stick is formatted as ntfs and not vfat. If it isn't mounting correctly, it would explain why the command to access freezes. You can try running that command on the command line, but don't mount it to /tmp/mnt/usb1 because this is done automatically.

Try this to see if you can mount it using vfat:

Code: Select all
mkdir -p /tmp/mnt/test
mount -t vfat /dev/sda1 /tmp/mnt/test
ls /tmp/mnt/test


if this doesn't show the contents of the stick, try this if it's formatted ntfs:

Code: Select all
mkdir -p /tmp/mnt/test
mount -t ufsd /dev/sda1 /tmp/mnt/test
ls /tmp/mnt/test


If the usb stick is working and you can browse it from the TViX OSD, you can have a look how it is being mounted using:

Code: Select all
df -h


or

Code: Select all
mount


Le me know how you get on.
TViX M-6500 + TViX M-4000 (Bricked)
octessence
Member
 
Posts: 320
Joined: Sat Apr 26, 2008 5:54 pm
Location: Germany (UK expat)

Re: Main wrapper

Postby petersm » Mon Nov 16, 2009 4:43 pm

Ok it like this, I have boot the tvix with a vfat format USB stic in the tvix

Doing df-h I got this
root@TViX:~$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock11 31.0M 25.9M 5.1M 84% /mnt/jffs2_apps
/dev/mtdblock12 20.0M 4.5M 15.5M 22% /mnt/jffs2_fonts
/dev/hda5 465.8G 449.0G 16.7G 96% /opt/opentvix
/dev/hda5 465.8G 449.0G 16.7G 96% /tmp/mnt/disk1
root@TViX:~$ ls /tmp/mnt/

And I can see the USB stick in the GUI


No USB are mounted ??

Trying this
root@TViX:~$ mkdir -p /tmp/mnt/test
root@TViX:~$ mount -t vfat /dev/sda1 /tmp/mnt/test/
mount: mounting /dev/sda1 on /tmp/mnt/test/ failed


and this
root@TViX:~$ mount -t ufsd /dev/sda1 /tmp/mnt/test/
mount: mounting /dev/sda1 on /tmp/mnt/test/ failed


????


EDIT

Tried to format as NTFS now I can mount it with mount -t ufsd /dev/sda1 /tmp/mnt/test/
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Re: Main wrapper

Postby hasse69 » Mon Nov 16, 2009 6:06 pm

Looks strange! Have you changed anything in /etc/fstab file ?
The /dev/sda1 should show up in the df ??
This is my df after boot
Code: Select all
root@TViX:~$ df
Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock11          31.0M     25.9M      5.1M  84% /mnt/jffs2_apps
/dev/mtdblock12          20.0M      4.5M     15.5M  22% /mnt/jffs2_fonts
/dev/hda1               931.5G    242.6G    688.9G  26% /opt/opentvix
/dev/sda1               121.5M     26.8M     94.7M  22% /tmp/mnt/usb1
/dev/hda1               931.5G    242.6G    688.9G  26% /tmp/mnt/disk1
192.168.0.10:/tvixhd1
                        100.0G     83.9G     16.1G  84% /net/tvixhd1
fuse                    931.5G    242.6G    688.9G  26% /tmp/mnt/disk4
fuse                    931.5G    242.6G    688.9G  26% /tmp/mnt/disk1/video
fuse                    931.5G    242.6G    688.9G  26% /tmp/mnt/disk1/audio
fuse                    931.5G    242.6G    688.9G  26% /tmp/mnt/disk1/photo

My USB stick is FAT32 formatted.
M-6500 [BadEIP_M-6x00_1.5.19-R1]
hasse69
Member
 
Posts: 520
Joined: Mon Oct 20, 2008 8:06 pm
Location: Sweden

Re: Main wrapper

Postby petersm » Mon Nov 16, 2009 6:36 pm

No changes have been made, but with a NTFS formated usb it's looks like this.
So now I have it mounted
But no success with the modified main file, if you have one can you post that here ?

root@TViX:~$ df
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock11 31.0M 25.9M 5.1M 84% /mnt/jffs2_apps
/dev/mtdblock12 20.0M 4.5M 15.5M 22% /mnt/jffs2_fonts
/dev/hda5 465.8G 449.0G 16.7G 96% /opt/opentvix
/dev/sda1 62.5M 7.7M 54.8M 12% /tmp/mnt/usb1
/dev/hda5 465.8G 449.0G 16.7G 96% /tmp/mnt/disk1
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Re: Main wrapper

Postby petersm » Mon Nov 16, 2009 6:42 pm

Mine main file looks like this
I have modified my temporary mount to my internal disc. And I have a NTFS formated USB

start_dvico_main()
{
mount -t ufsd /dev/sda1 /tmp/mnt/disk1/usbmount
if [ -f /tmp/mnt/disk1/usbmount/wrapmain ]; then
exec > /tmp/mnt/disk1/usbmount/wrapmain.log 2>&1
export MAINWRAP_MONITOR_IR=1
export MAINWRAP_KEY_REC=/root/wake_tower.sh
LD_PRELOAD=$TVIX_ROOT/main_wrapper.so $TVIX_ROOT/main.dvico $* &
else
umount /tmp/mnt/disk1/usbmount
$TVIX_ROOT/opentvix/exec $TVIX_ROOT/main.dvico $* &
fi
}
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Re: Main wrapper

Postby octessence » Mon Nov 16, 2009 9:38 pm

Does it work now?
TViX M-6500 + TViX M-4000 (Bricked)
octessence
Member
 
Posts: 320
Joined: Sat Apr 26, 2008 5:54 pm
Location: Germany (UK expat)

Re: Main wrapper

Postby petersm » Tue Nov 17, 2009 11:21 am

No :-(
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Re: Main wrapper

Postby petersm » Tue Nov 17, 2009 5:21 pm

Done some more test, AND its looks like that is ok to mount using /dev/sda not /dev/sda1

But no success, add two lines using touch but neither of this files are on the USB after boot so its looks like its never go in to the start_dvico_main()
See below .....

start_dvico_main()
{
mount -t vfat /dev/sda /tmp/mnt/disk1/usbmount

if [ -f /tmp/mnt/disk1/usbmount/wrapmain ]; then
exec > /tmp/mnt/disk1/usbmount/wrapmain.log 2>&1
export MAINWRAP_MONITOR_IR=1
export MAINWRAP_KEY_REC=/root/wake_tower.sh
LD_PRELOAD=$TVIX_ROOT/main_wrapper.so $TVIX_ROOT/main.dvico $* &
touch /tmp/mnt/disk1/usbmount/succes.txt
else
touch /tmp/mnt/disk1/usbmount/no_succes.txt
umount /tmp/mnt/disk1/usbmount
$TVIX_ROOT/opentvix/exec $TVIX_ROOT/main.dvico $* &
fi
}


Below are from my boot.log, some permission denied ????

Code: Select all
root@TViX:/opt/opentvix$ more boot.log
[Tue Nov 17 19:15:44 UTC 2009] --- opentvix_init: Tue Nov 17 19:15:44 UTC 2009
[Tue Nov 17 19:15:44 UTC 2009] --- update_opentvix:
[Tue Nov 17 19:17:42 UTC 2009]     No update found
[Tue Nov 17 19:17:42 UTC 2009] --- make_directories:
[Tue Nov 17 19:17:44 UTC 2009] --- remount_flash:
[Tue Nov 17 19:17:45 UTC 2009] --- creating symlinks:
[Tue Nov 17 19:17:56 UTC 2009] --- start_daemons:

[Tue Nov 17 19:17:56 UTC 2009] starting: /opt/opentvix/etc/init.d/S00paths

[Tue Nov 17 19:18:10 UTC 2009] starting: /opt/opentvix/etc/init.d/S10crond
Starting cron daemon...

[Tue Nov 17 19:18:11 UTC 2009] starting: /opt/opentvix/etc/init.d/S15portmap
/opt/opentvix/init: line 191: /opt/opentvix/etc/init.d/S15portmap: Permission denied

[Tue Nov 17 19:18:11 UTC 2009] starting: /opt/opentvix/etc/init.d/S20sshd
Starting ssh daemon...

[Tue Nov 17 19:18:11 UTC 2009] starting: /opt/opentvix/etc/init.d/S25autofs
/opt/opentvix/init: line 191: /opt/opentvix/etc/init.d/S25autofs: Permission denied

[Tue Nov 17 19:18:11 UTC 2009] starting: /opt/opentvix/etc/init.d/S40httpd
Starting http daemon...

[Tue Nov 17 19:18:11 UTC 2009] starting: /opt/opentvix/etc/init.d/S50fuse
Loading fuse module.
Mounting fuse control filesystem.

[Tue Nov 17 19:18:12 UTC 2009] starting: /opt/opentvix/etc/init.d/S60dvdfs
TviX 6500 with BadEIP_M-6x00_1.5.11-Seres_unlocked+NOBDTrail_R2.fwp
petersm
Member
 
Posts: 30
Joined: Sun Nov 15, 2009 5:26 am
Location: Sweden

Next

Return to Solutions

Who is online

Users browsing this forum: No registered users and 1 guest