Example of mounting string:
mount -t cifs //<yor_ip>/test/web /home/web -o user=user
For mounting of portal while STB starting, it is necessary to add next string in script ./test.sh
Example of test.sh file (there is only part of file):
if [ -n "$upd_ver" ]; then echo "The update number version: $upd_ver" img_version_now=`fw_printenv Image_Version 2>/dev/null` img_version_now=${img_version_now#Image_Version=} if [ "$upd_ver" -eq "$img_version_now" ]; then echo "The number version's equal" else # We need update /usr/bin/update_img.sh $upd_ver $upd_url $upd_mode fi fi ############### Mounting of portal from SMB ##################################### mount -t cifs //<yor_ip>/test/web /home/web -o user=user ################################################################################# if [ "$PORTAL_1$PORTAL_2$PORTAL_DHCP" ]; then echo "Loading start page..." /usr/share/qt-4.6.0/stbapp -qws -display directfb file:///home/web/index.html else echo "Error loading portal. Service Page" /usr/share/qt-4.6.0/stbapp -qws -display directfb /home/web/services.html fi
Place files of portal on the server with NFS access to directory with files.
String of mounting:
mount -o nolock <your_IP>:/srv/test/web /home/web
For mounting of portal while STB starting, it is necessary to add next string in script ./test.sh
Example of test.sh file (there is only part of file):
if [ -n "$upd_ver" ]; then echo "The update number version: $upd_ver" img_version_now=`fw_printenv Image_Version 2>/dev/null` img_version_now=${img_version_now#Image_Version=} if [ "$upd_ver" -eq "$img_version_now" ]; then echo "The number version's equal" else # We need update /usr/bin/update_img.sh $upd_ver $upd_url $upd_mode fi fi ############### Mounting of portal from NFS ##################################### mount -o nolock <your_IP>:/srv/test/web /home/web ################################################################################# if [ "$PORTAL_1$PORTAL_2$PORTAL_DHCP" ]; then echo "Loading start page..." /usr/share/qt-4.6.0/stbapp -qws -display directfb file:///home/web/index.html else echo "Error loading portal. Service Page" /usr/share/qt-4.6.0/stbapp -qws -display directfb /home/web/services.html fi
Example based on OS Ubuntu Server 12.04 LTS x86.
Packets: nfs-kernel-server
, isc-dhcp-server
, openbsd-inetd
, tftpd, tftp
More detailed information about firmware loading from DHCP: Firmware loading from DHCP
option ntp-servers 10.1.1.1; option domain-name-servers 10.1.1.1; authoritative; option subnet-mask 255.255.255.0; default-lease-time 600; max-lease-time 7200; allow bootp; ############################################################# # Option for Infomir ############################################################# option space Infomir; option Infomir.autostart code 1 = text; option Infomir.bootargs code 2 = text; option Infomir.mcip code 3 = ip-address; option Infomir.mcport code 4 = integer 16; option Infomir.oppubfile code 9 = text; option Infomir.mcip_img code 10 = ip-address; option Infomir.mcport_img code 11 = integer 16; option Infomir.mcip_mng code 12 = ip-address; option Infomir.mcport_mng code 13 = integer 16; option Infomir.ip_log code 14 = ip-address; option Infomir.port_log code 15 = integer 16; option Infomir.logo_x code 16 = integer 16; option Infomir.logo_y code 17 = integer 16; option Infomir.bg_color code 18 = integer 32; option Infomir.fg_color code 19 = integer 32; option Infomir.VerNumber code 20 = text; option Infomir.DateTime code 21 = text; option Infomir.portal_dhcp code 22 = text; option Infomir.timezone code 23 = text; option Infomir.update_url code 24 = text; option Infomir.update_sboot code 25 = text; option Infomir.update_ver code 26 = text; option Infomir.update_mode code 27 = text; option Infomir.update_sboot_ver code 28 = text; ############################## BOOT MAG250 ################################################ ###### kernel loading from tftp with rootfs, which is mounted from NFS class "MAG250_boot" { match if (( option vendor-class-identifier="InfomirMAG250boot")); filename "mag250/uImage_mag250"; //kernel location next-server 10.1.1.1; option root-path "10.1.1.1:/srv/mag250"; //rootfs location option ntp-servers 10.1.1.1; vendor-option-space Infomir; } ############################## NETWORK #################################### subnet 10.1.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; next-server 10.1.1.1; pool { range 10.1.1.10 10.1.1.254; next-server 10.1.1.1; option ntp-servers 10.1.1.1; } }
Connect to STB via SSH
run next command:
killall stbapp /usr/share/qt-4.6.0/stbapp -qws -display directfb /home/web/services.html
Connect to STB via SSH
run next command:
killall stbapp /usr/share/qt-4.6.0/stbapp -qws -display directfb http://your_ip/you_portal/index.html
For version lower than 0.2.16 - it is necessary to make changes in /home/web/vars.js
var debug=0
change to var debug=1
For version 0.2.18 and higher - it is necessary to set environment variable debug=1
(1 - enabled, 0 or empty value - disabled)