roku device - sets platform

This commit is contained in:
2023-03-06 15:50:56 +00:00
parent 123616f767
commit 8280e09a7d
2 changed files with 36 additions and 4 deletions

View File

@@ -30,6 +30,12 @@ __device_cmd()
echo "$1; exit" | __netcat
}
_roku_device_platform()
{
[ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
__device_cmd "echo \$ROKU_PLATFORM" | tail -1
}
###############################################################################
#
@@ -83,6 +89,30 @@ _roku_audcap()
sox -t raw -r 48000 -b 16 -c 2 -e signed-integer $1.pcm $1.wav
}
###############################################################################
#
# Debug app
#
_roku_debug_attach()
{
PLATFORM=lockhart
[ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
__device_cmd "/tmp/tools/gdbserver :5555 --attach \$(pgrep Application)"
}
_roku_debug()
{
PLATFORM=lockhart
[ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
# __device_cmd "/tmp/tools/gdbserver :5555 --attach \$(pgrep Application)" &
# sleep 2
gdb-multiarch \
-ex "set non-stop off" \
-ex "target remote $ROKU_DEBUG_TARGET:5555" \
-ex "set solib-absolute-prefix $PWD/port/realtek/stark/$ROKU_DEV_TARGET/dist/rootfs" \
-ex "set sysroot $PWD/port/realtek/stark/$ROKU_DEV_TARGET/dist/rootfs"
}
###############################################################################
#
# Work with channels.
@@ -153,9 +183,9 @@ dtail()
# Misc
#
_roku_get()
_roku_wget()
{
[ -z "$1" ] && echo "usage: rokuget <url>" && return 0
[ -z "$1" ] && echo "usage: roku_wget <url>" && return 0
if [ -z "$ROKU_CORP_PASSWORD" ]; then
local USER_PASSWORD="--ask-password"
else