diff --git a/README.md b/README.md index 7fdcb5509d..8d097da60b 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,111 @@ -![Kodi Logo](docs/resources/banner.png) - -
- - website - • - docs - • - community - • - add-ons - -
- - - -- -
- -## Getting Started -Kodi's developers work hard to make it support a large range of devices and operating systems. We provide final as well as development builds. To get started, head over to the **[downloads section](https://kodi.tv/download)** and simply select the platform that you want to install it on. A **[quick start guide](https://kodi.wiki/view/quick_start_guide)** to help you get acquainted with Kodi is available in our wiki. - -## How to Contribute -Kodi is created by users for users and **we welcome every contribution**. There are no highly paid developers or poorly paid support personnel on the phones ready to take your call. There are only users who have seen a problem and done their best to fix it. This means Kodi will always need the contributions of users like you. How can you get involved? - -* **Coding:** Developers can help Kodi by **[fixing a bug](https://github.com/xbmc/xbmc/issues)**, adding new features, making our technology smaller and faster and making development easier for others. Kodi's codebase consists mainly of C++ with small parts written in a variety of coding languages. Our add-ons mainly consist of python and XML. For more information, please have a look at our **[contributing guide](docs/CONTRIBUTING.md)**. -* **Helping users:** Our support process relies on enthusiastic contributors like you to help others get the most out of Kodi. The #1 priority is always answering questions in our **[support forums](https://forum.kodi.tv/)**. Everyday new people discover Kodi, and everyday they are virtually guaranteed to have questions. -* **Localization:** Translate **[Kodi](https://www.transifex.com/teamxbmc/kodi-main/)**, **[add-ons](https://www.transifex.com/teamxbmc/xbmc-addons/)** and **[skins](https://www.transifex.com/teamxbmc/xbmc-skins/)** into your native language. -* **Add-ons:** **[Add-ons](https://kodi.tv/addons)** are what make Kodi the most extensible and customizable entertainment hub available. **[Get started building an add-on](https://kodi.tv/create-an-addon)**. -* **Documentation:** Kodi's **[wiki pages](https://kodi.wiki/)** are the hub for information about Kodi and surrounding ecosystem. Help make our documentation better by writing new content or correcting existing material. - -**Not enough free time?** No problem! There are other ways to help Kodi. - -* **Spread the word:** Share Kodi with the world! Tell your friends and family about how Kodi creates an amazing entertainment experience. Stay up to date on the latest stories about Kodi reading our **[news](https://kodi.tv/blog)** section, follow us on **[Twitter](https://twitter.com/koditv)** and **[Facebook](https://www.facebook.com/XBMC/)**, or **star Kodi's repo** if you want to follow development. -* **Donate:** We are always happy to receive a **[donation](https://kodi.tv/contribute/donate)**. Donations are typically used for travel to attend conferences, any necessary paperwork and legal fees, and the yearly XBMC Foundation Developers Conference, where a great deal of coding and planning for the following year occurs. Donations may also be used to purchase necessary hardware and licenses for developers, along with t-shirts, stickers, and other accessories for conferences. -* **Buy Kodi merchandise:** Purchasing Kodi gear helps just as much as a donation, and you get something in return! Checkout our **[store](https://kodi.tv/store)** for Kodi branded gear. We regularly add new products so check back often. - -## Building -Kodi uses CMake as its building system but instructions are highly dependent on your operating system and target platform. Fortunately **[we've got you covered](docs/README.md)**. - -## Acknowledgements -Kodi couldn't exist without - -* All the **[contributors](https://github.com/xbmc/xbmc/graphs/contributors)**. Big or small a change, it does make a difference. -* All the developers that write the fantastic **software and libraries** that Kodi uses. We stand on the shoulders of giants. -* Our **[fantastic community](https://forum.kodi.tv/)** for the never ending support, inspiration, feedback, and for keeping us on our toes when we screw up! -* **[Our sponsors](https://kodi.tv/sponsors)**. Without them, keeping a huge project like this alive would be next to impossible. - -## License -Kodi is **[GPLv2 licensed](LICENSE.md)**. You may use, distribute and copy it under the license terms. - - - - - - +# Kodi on the Steam Link + +This repo contains the Steam Link port of Kodi. + +## Installation + +1. Download the latest release from https://github.com/garbear/kodi-steamlink/releases. +2. Copy archive to the folder `steamlink/apps/` on a USB drive (FAT32 or EXT4). +3. Insert the drive into the Steam Link and power-cycle. It will take approximately 2 minutes to install the 80MB archive. +4. When the Steam Link boots, Kodi should appear on the home screen. + +## Building Kodi + +To build Kodi, follow the steps at: https://github.com/ValveSoftware/steamlink-sdk/tree/master/examples/kodi + +## Debugging + +Kodi may crash when launched from the Steam Link homescreen due to a PulseAudio conflict. Until this is fixed, Kodi must be run from the command line. + +#### Enable SSH + +1. Create a non-empty file on the USB drive at `steamlink/config/system/enable_ssh.txt` +2. Insert the drive and power on the Steam Link +3. SSH into the Steam Link as root using an SSH client, e.g. `ssh root@10.0.0.103` +4. The password is `steamlink123` + +#### Changing Steam Link builds + +If you need to test Kodi on a build different from the latest public beta, follow these steps: + +1. Place the build number (e.g. `600`) in a text file on a USB drive at `steamlink/config/system/update_branch.txt` +2. Insert the drive and power on the Steam Link + +To revert back to the latest public beta build: + +1. Place the word `beta` in a text file on a USB drive at `steamlink/config/system/update_branch.txt` +2. Insert the drive and power on the Steam Link + +#### Kill the Steam Link launcher and launch Kodi + +If you are on the **public build (566)**, enter the commands: + +```bash +killall powermanager.sh powermanager app_run.sh shell + +cd /home/apps/kodi && ./kodi.sh +``` + +If you are on the **beta build (597 or later)**, enter the commands: + +```bash +killall powermanager.sh powermanager shell.sh shell + +cd /home/apps/kodi && ./kodi.sh +``` + +#### Viewing the log + +If you launched Kodi from the **Steam Link launcher**, use the command: + +```bash +tail -F /home/apps/kodi/.home/.kodi/temp/kodi.log +``` + +If you launched Kodi from the **command line**, use the command: + +```bash +tail -F /home/steam/.kodi/temp/kodi.log +``` + +#### Remote debugging via GDB + +To get a stack trace, run `gdbserver` on the Steam Link and connect via local `gdb`. This is explained here: https://github.com/ValveSoftware/steamlink-sdk + +`build_steamlink.sh` can be modified to make this easier. See [this commit](https://github.com/garbear/steamlink-sdk/commit/kodi-debug%5E) and [this commit](https://github.com/garbear/steamlink-sdk/commit/kodi-debug). + +Before building Kodi, modify the startup script to run `gdbserver`. Find the line with the Kodi command and prefix it with `gdbserver :8080 ` like [this](https://github.com/garbear/kodi-steamlink/commit/steamlink-gdb). + +#### Debugging locally using Valgrind + +To track down a memory corruption bug, perform a "depends" build of Kodi. This will use the same libraries as the Steam Link instead of relying on system libraries. + +First, create a writable folder `/opt/kodi-deps`. Then clone this repo and run: + +```bash +cd tools/depends +./bootstrap +./configure --with-toolchain=/usr --prefix=/opt/kodi-deps --host=x86_64-linux-gnu +make +cd ../.. +``` + +Before compiling Kodi, modify the startup script to launch Kodi under Valgrind. You should prefix the Kodi command with `valgrind --leak-check=yes ` like [this](https://github.com/garbear/kodi-steamlink/commit/steamlink-valgrind). + +Next, compile Kodi via CMake: + +```bash +mkdir build +cd build +/opt/kodi-deps/x86_64-linux-gnu-native/bin/cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_TOOLCHAIN_FILE=/opt/kodi-deps/x86_64-linux-gnu/share/Toolchain.cmake \ + -DCMAKE_INSTALL_PREFIX=$HOME/kodi-steamlink \ + ../project/cmake +make +make install +``` + +You can substitute the installation folder (`$HOME/kodi-steamlink`) for a prefix of your choice. + +Finally, run the resulting startup script at `$HOME/kodi-steamlink/bin/kodi`.