#!/bin/sh # # Mount the roku SDK under a cross-compile environment. # usage() { echo "" echo "Usage: $0 " echo " Path to roku SDK cramfs image." echo " Directory where to mount the SDK." echo "" echo "e.g: $0 /opt/roku/SDK/rokudev.cramfs /mnt/rokudev" exit 1 } CRAMFS="$1" if test "$CRAMFS" = ""; then usage; fi if test ! -f "$CRAMFS"; then usage; fi MOUNTPOINT="$2" if test "$MOUNTPOINT" = ""; then usage; fi if test ! -d "$MOUNTPOINT" ; then usage; fi /sbin/losetup /dev/loop0 "$CRAMFS" mount -t auto -o ro /dev/loop0 "$MOUNTPOINT" exit 0