RADME.md + fastboot2 + build scripts.
This commit is contained in:
@@ -24,12 +24,19 @@ EOF
|
|||||||
|
|
||||||
build()
|
build()
|
||||||
{
|
{
|
||||||
BUILD_PLATFORM=marlin
|
local BUILD_PLATFORM=marlin
|
||||||
ENABLE_ICECC=0
|
local ENABLE_ICECC=0
|
||||||
JOBS=$(nproc)
|
local JOBS=$(nproc)
|
||||||
TARGET=all
|
local TARGET=all
|
||||||
BUILD_MODE=dev
|
local BUILD_MODE=dev
|
||||||
PAX_DEBUG=on
|
local PAX_DEBUG=on
|
||||||
|
local OPTIONS=
|
||||||
|
|
||||||
|
local BUILD_ROOT=$(git rev-parse --show-toplevel)/os
|
||||||
|
if [ "$?" -ne "0" ]; then
|
||||||
|
BUILD_ROOT=$(p4 -Ztag -F %clientRoot% info)/os
|
||||||
|
fi
|
||||||
|
echo $BUILD_ROOT
|
||||||
|
|
||||||
# args=$(getopt fhstuec $*)
|
# args=$(getopt fhstuec $*)
|
||||||
# if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
@@ -39,11 +46,17 @@ build()
|
|||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
unittests)
|
||||||
|
TARGET=build-tests-all
|
||||||
|
PAX_DEBUG=off
|
||||||
|
BUILD_PLATFORM=hostunittests
|
||||||
|
;;
|
||||||
unity|\
|
unity|\
|
||||||
native)
|
native)
|
||||||
PAX_DEBUG=off
|
PAX_DEBUG=off
|
||||||
BUILD_PLATFORM=$1
|
BUILD_PLATFORM=$1
|
||||||
;;
|
;;
|
||||||
|
reno|\
|
||||||
bailey|\
|
bailey|\
|
||||||
marlin|\
|
marlin|\
|
||||||
madison)
|
madison)
|
||||||
@@ -62,9 +75,19 @@ build()
|
|||||||
addon-checksum-check|\
|
addon-checksum-check|\
|
||||||
clean|\
|
clean|\
|
||||||
clobber|\
|
clobber|\
|
||||||
|
build-tests-all|\
|
||||||
|
build-tests-ZipMountServerTest|\
|
||||||
|
build-tests-FuseServerTest|\
|
||||||
|
build-tests-PluginPackageManagemnetPluginUnitTests|\
|
||||||
clobber-all)
|
clobber-all)
|
||||||
TARGET=$1
|
TARGET=$1
|
||||||
;;
|
;;
|
||||||
|
build-integration-tests)
|
||||||
|
OPTIONS+="BUILD_INTEGRATION_TESTS=true"
|
||||||
|
;;
|
||||||
|
here)
|
||||||
|
BUILD_ROOT="."
|
||||||
|
;;
|
||||||
nopax)
|
nopax)
|
||||||
PAX_DEBUG=off
|
PAX_DEBUG=off
|
||||||
;;
|
;;
|
||||||
@@ -83,19 +106,15 @@ build()
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
local GIT_ROOT=$(git rev-parse --show-toplevel)
|
|
||||||
if [ "$?" -ne "0" ]; then
|
|
||||||
GIT_ROOT=$(p4 -Ztag -F %clientRoot% info)
|
|
||||||
fi
|
|
||||||
echo $GIT_ROOT
|
|
||||||
|
|
||||||
make \
|
make \
|
||||||
ENABLE_ICECC=$ENABLE_ICECC \
|
ENABLE_ICECC=$ENABLE_ICECC \
|
||||||
BUILD_MODE=$BUILD_MODE \
|
BUILD_MODE=$BUILD_MODE \
|
||||||
PAX_DEBUG=$PAX_DEBUG \
|
PAX_DEBUG=$PAX_DEBUG \
|
||||||
BUILD_PLATFORM=$BUILD_PLATFORM \
|
BUILD_PLATFORM=$BUILD_PLATFORM \
|
||||||
|
$OPTIONS \
|
||||||
-j $JOBS \
|
-j $JOBS \
|
||||||
-C $GIT_ROOT/os $TARGET
|
-C $BUILD_ROOT $TARGET
|
||||||
#make ENABLE_ICECC=1 PAX_DEBUG=on BUILD_PLATFORM=$1 -j $(nproc) -C os all
|
#make ENABLE_ICECC=1 PAX_DEBUG=on BUILD_PLATFORM=$1 -j $(nproc) -C os all
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Swizz Army Knife
|
||||||
|
|
||||||
|
## Install
|
||||||
|
Simply upload to /nvram/san and that's it.
|
||||||
|
|
||||||
|
## Run
|
||||||
|
In order to load functions just run
|
||||||
|
```
|
||||||
|
>source /nvram/san
|
||||||
|
```
|
||||||
|
|
||||||
|
For possible commands type
|
||||||
|
```
|
||||||
|
>san_help
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cheats
|
||||||
|
|
||||||
|
### Setup debug mode.
|
||||||
|
```
|
||||||
|
rokusetup dev on
|
||||||
|
saveenv
|
||||||
|
reset
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Setup network from uBoot.
|
||||||
|
```
|
||||||
|
usb start
|
||||||
|
rokusetup net auto
|
||||||
|
rokusetup tftpserver <TFTP server>
|
||||||
|
rokusetup coreserver <TFTP server>
|
||||||
|
saveenv
|
||||||
|
reset
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
env set ipaddr 192.168.0.62
|
||||||
|
env set serverip 192.168.0.64
|
||||||
|
env set gatewayip 192.168.0.1
|
||||||
|
env set netmask 255.255.252.0
|
||||||
|
saveenv
|
||||||
|
usb start
|
||||||
|
ping 192.168.0.64
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
usb start
|
||||||
|
tftpboot acramfs.marlin.bin
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
usb start
|
||||||
|
rokuflash tftp acramfs.marlin.bin
|
||||||
|
```
|
||||||
|
|
||||||
41
san
41
san
@@ -2,7 +2,9 @@
|
|||||||
set -o vi
|
set -o vi
|
||||||
# set -x
|
# set -x
|
||||||
|
|
||||||
SERVER_IP=192.168.0.64
|
if [ -z $SAN_SERVER_IP ]; then
|
||||||
|
SAN_SERVER_IP=192.168.0.64
|
||||||
|
fi
|
||||||
|
|
||||||
DESCR=""
|
DESCR=""
|
||||||
descr(){
|
descr(){
|
||||||
@@ -17,7 +19,7 @@ san_help()
|
|||||||
printf "$DESCR\n"
|
printf "$DESCR\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
UPDATE_SAN="wget -O /nvram/san http://$SERVER_IP/roku/san/san"
|
UPDATE_SAN="wget -O /nvram/san http://$SAN_SERVER_IP/roku/san/san"
|
||||||
descr " update_san - update this script."
|
descr " update_san - update this script."
|
||||||
descr " Manually: $UPDATE_SAN"
|
descr " Manually: $UPDATE_SAN"
|
||||||
update_san()
|
update_san()
|
||||||
@@ -29,7 +31,7 @@ update_san()
|
|||||||
descr " upload - upload through tftp. e.g. upload /dev/ltcore"
|
descr " upload - upload through tftp. e.g. upload /dev/ltcore"
|
||||||
upload()
|
upload()
|
||||||
{
|
{
|
||||||
[ -e $1 ] && tftp -r $(basename $1) -l $1 -p $SERVER_IP
|
[ -e $1 ] && tftp -r $(basename $1) -l $1 -p $SAN_SERVER_IP
|
||||||
}
|
}
|
||||||
|
|
||||||
descr " upload_core - upload /dev/ltcore"
|
descr " upload_core - upload /dev/ltcore"
|
||||||
@@ -51,6 +53,11 @@ factory_reset()
|
|||||||
touch /nvram/factoryresetflag2 && reboot
|
touch /nvram/factoryresetflag2 && reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
descr " disable_wd - disable watchdog"
|
||||||
|
disable_wd()
|
||||||
|
{
|
||||||
|
sh -c "while true ; do noreset; sleep 5; done" &
|
||||||
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Firmware flash.
|
# Firmware flash.
|
||||||
@@ -85,7 +92,7 @@ download_from_buildarea()
|
|||||||
|
|
||||||
download_firmware()
|
download_firmware()
|
||||||
{
|
{
|
||||||
ACRAMFS_URL="http://$SERVER_IP/roku/$1"
|
ACRAMFS_URL="http://$SAN_SERVER_IP/roku/$1"
|
||||||
echo "Downloading ${ACRAMFS_URL}"
|
echo "Downloading ${ACRAMFS_URL}"
|
||||||
wget -O ${ACRAMFS} ${ACRAMFS_URL}
|
wget -O ${ACRAMFS} ${ACRAMFS_URL}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@@ -271,6 +278,8 @@ descr " enable_fastboot - "
|
|||||||
enable_fastboot()
|
enable_fastboot()
|
||||||
{
|
{
|
||||||
su app -c "ConfigService -so fw.fastboot.capture.snapshot=true"
|
su app -c "ConfigService -so fw.fastboot.capture.snapshot=true"
|
||||||
|
su app -c "ConfigService -so fw.fastboot.force.enable.snapshot=true"
|
||||||
|
fastboot_reset
|
||||||
}
|
}
|
||||||
|
|
||||||
descr " disable_fastboot - "
|
descr " disable_fastboot - "
|
||||||
@@ -280,6 +289,20 @@ disable_fastboot()
|
|||||||
fastboot_reset
|
fastboot_reset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
descr " enable_fastboot2 - "
|
||||||
|
enable_fastboot2()
|
||||||
|
{
|
||||||
|
su app -c "ConfigService -so fw.fastboot.snapshot-after-precompile=true"
|
||||||
|
fastboot_reset
|
||||||
|
}
|
||||||
|
|
||||||
|
descr " disable_fastboot2 - "
|
||||||
|
disable_fastboot2()
|
||||||
|
{
|
||||||
|
su app -c "ConfigService -so fw.fastboot.snapshot-after-precompile=false"
|
||||||
|
fastboot_reset
|
||||||
|
}
|
||||||
|
|
||||||
descr " fastboot_reset - "
|
descr " fastboot_reset - "
|
||||||
fastboot_reset()
|
fastboot_reset()
|
||||||
{
|
{
|
||||||
@@ -344,16 +367,20 @@ alias ll='ls -la'
|
|||||||
#
|
#
|
||||||
# Done
|
# Done
|
||||||
#
|
#
|
||||||
|
descr " setup_san - "
|
||||||
|
setup_san()
|
||||||
|
{
|
||||||
grep /nvram/san /nvram/autostart > /dev/null
|
grep /nvram/san /nvram/autostart > /dev/null
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
cat > /nvram/autostart << EOF
|
cat > /nvram/autostart << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
/sbin/udhcpc -i eth0 -s /etc/udhcpc.sh
|
SAN_SERVER_IP=192.168.0.64
|
||||||
ifconfig
|
|
||||||
sh -c "while true ; do noreset; sleep 5; done" &
|
|
||||||
source /nvram/san
|
source /nvram/san
|
||||||
|
disable_wd
|
||||||
|
#setup_network
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
san_help
|
san_help
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user