GithubHelp home page GithubHelp logo

jetba / rock5b-nixos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aciceri/rock5b-nixos

0.0 0.0 0.0 165 KB

Opinionated NixOS modules and building infrastructure for Radxa Rock5B

Shell 2.52% Nix 97.48%

rock5b-nixos's Introduction

NixOS on Radxa Rock 5B

This repo contains my opinionated infrastructure to run NixOS on the Radxa Rock 5B. It also provides a substituer (powered by Cachix) and it supports cross compilation.

How to flash the eMMC

A no brain automatic flashing script is in progress, meanwhile:

# delete all partitions on /dev/sda (assuming it is the eMMC)
$ nix build .#uboot
$ sudo dd if=result/shared.disk-image.img of=/dev/sda
$ nix build .#rootfs
# create a new partion /dev/sda2 in the remaining free space
$ sudo dd if=$(readlink result) of=/dev/sda2 status=progress
# mark /dev/sda2 as legacy bootable (for example using fdisk advanced options)

I haven’t tested (yet) booting from other devices but I heard of people being able to do so.

Panfork

Mesa is overriden with panfork by a Nix overlay, a panfrost fork supporting the Mail G610, another Nix module automatically loads the proprietary firmware blob (which is redistributed by this flake).

I’ve tried to rebuild Sway with it and it seems to work but I can’t guarantee anything since it’s not something that I use on this board. Softwares depending on Mesa need to be rebuilded then, personally I only use Kodi for now.

Kodi

I’ll try to maintain a working Kodi supporting hardware acceleration. Unfortunately I couldn’t override kodi from nixpkgs because of how the Nix code is written, many dependencies that I needed to change were hardcoded and not passed using the callPackage idiom.

I had to override ffmpeg and mpp with Rockchip forks. Unfortunately for mpp I had to use this further fork (thanks @martivo). I also have to thank @amazingfate that guided me in solving the problems encountered (many).

To get hardware acceleration you need to start kodi (which is built to be used with GBM as a standalone application) with an user in the video group (UDEV rules are provided in a Nix module in this flake) and you must enable “DRM PRIME acceleration” and set the “render method” to “direct to plane” in the player settings of kodi. This way I’ve been able to play 4k h264 and h265/hvec videos, only following two problems are noticed:

  • Cannot play videos with HDR (no crash but video is black)
  • When UI elements appear during playback (for instance when you pause a movie) the video gets black. As soon as they disappear video reappears. The playback is not stopped, audio doesn’t stop, only the video is altered. Not the end of the world but a bit annoying.

rock5b-nixos's People

Contributors

aciceri avatar jetba avatar kireinahoro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.