README.md update
This commit is contained in:
91
README.md
91
README.md
@@ -1,19 +1,96 @@
|
|||||||
# Swizz Army Knife
|
# Swiss Army kNife
|
||||||
|
Command line environment to build/flash and debug roku firmware.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
Simply upload to /nvram/san and that's it.
|
Source .profile.roku.dev in your .bashrc.
|
||||||
|
|
||||||
## Run
|
### Install web server
|
||||||
In order to load functions just run
|
Some of commands rely on a web server accessible by device.
|
||||||
|
Install an Nginex server, and make sure that your working directory is available
|
||||||
|
through it. Currently, the script expects that all files are accessable under
|
||||||
|
http://<ip of your workstation>/roku/
|
||||||
|
|
||||||
|
My Nginx configuration is:
|
||||||
```
|
```
|
||||||
>source /nvram/san
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
# Add index.php to the list if you are using PHP
|
||||||
|
index index.html index.htm index.nginx-debian.html;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# First attempt to serve request as file, then
|
||||||
|
# as directory, then fall back to displaying a 404.
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /roku/ {
|
||||||
|
alias /home/vahagn/roku/;
|
||||||
|
index index.html index.htm;
|
||||||
|
autoindex on;
|
||||||
|
types {
|
||||||
|
text/plain cc;
|
||||||
|
text/plain cpp;
|
||||||
|
text/plain h;
|
||||||
|
text/plain mk;
|
||||||
|
text/plain md;
|
||||||
|
text/plain *;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For possible commands type
|
## Usage
|
||||||
|
When a new console opened, setup the device that you want to work with. For
|
||||||
|
that run: `roku device <ip address>` e.g.
|
||||||
|
|
||||||
```
|
```
|
||||||
>san_help
|
mknik:17:41:54 ~/roku/san@master$ roku device 192.168.0.194
|
||||||
|
device: 192.168.0.194
|
||||||
|
platform: lockhart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This will set environment variables for the device ( e.g. `ROKU_DEV_TARGET` )
|
||||||
|
And now you could use the commands below.
|
||||||
|
|
||||||
|
If this is the first time you are using the device (after factory reset) or
|
||||||
|
you have updated SAN, then you need to run `roku san update`. (Assuming you have
|
||||||
|
web server installed and san is accessible from http://<ip>/roku/san). This
|
||||||
|
copies san to /nvram/san and configures the device e.g. turns off fastboot,
|
||||||
|
disables failsafe and etc.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|--|--|
|
||||||
|
| roku telnet | to telnet to device |
|
||||||
|
| roku telnet 8080 |- to telnet to 8080 port of the device |
|
||||||
|
| roku reboot | reboot device |
|
||||||
|
| roku flash | flash acramfs from http://<ip>/roku/main |
|
||||||
|
| roku log | logs through ethernet |
|
||||||
|
| roku audcap <filename> | capture audio from audio mixer of device |
|
||||||
|
| roku build | build firmware |
|
||||||
|
| roku gdb attach | run gdb server on the device |
|
||||||
|
| roku gdb | attach to gdb server from workstation |
|
||||||
|
| roku .... | etc |
|
||||||
|
|
||||||
|
|
||||||
|
## The name
|
||||||
|
Initially only 'san' was crafted and was used directly from the device. One
|
||||||
|
would need to get a shell on the device, source it and then use it on the device.
|
||||||
|
It had to be tiny auxilary script to perform repeating tasks, hence the name
|
||||||
|
Swiss Army Knife.
|
||||||
|
Later I have realised that I could manipulate the device directly from my
|
||||||
|
command line. All I need is to save it's IP address somewhere. That's how the
|
||||||
|
rest was born.
|
||||||
|
|
||||||
## Cheats
|
## Cheats
|
||||||
|
|
||||||
### Setup debug mode.
|
### Setup debug mode.
|
||||||
|
|||||||
Reference in New Issue
Block a user