All Projects → thefloweringash → Kevin Nix

thefloweringash / Kevin Nix

NixOS for the Samsung Chromebook Plus (kevin)

Labels

Projects that are alternatives of or similar to Kevin Nix

Nixos Generators
Collection of image builders [[email protected]]
Stars: ✭ 355 (+1872.22%)
Mutual labels:  nixos, nix
system
Declarative NixOS system configuration for all my machines
Stars: ✭ 14 (-22.22%)
Mutual labels:  nix, nixos
dotfiles
My NixOS dotfiles
Stars: ✭ 21 (+16.67%)
Mutual labels:  nix, nixos
microvm.nix
NixOS MicroVMs
Stars: ✭ 136 (+655.56%)
Mutual labels:  nix, nixos
Awesome Nix
😎 A curated list of the best resources in the Nix community [[email protected]]
Stars: ✭ 388 (+2055.56%)
Mutual labels:  nixos, nix
nixexprs
nix stuff
Stars: ✭ 13 (-27.78%)
Mutual labels:  nix, nixos
Devos
NixOS Framework
Stars: ✭ 338 (+1777.78%)
Mutual labels:  nixos, nix
nixcrates
DEPRECATED reads rust-lang/crates.io-index and outputs nix expressions into fractalide/nix-crates-index
Stars: ✭ 14 (-22.22%)
Mutual labels:  nix, nixos
Nix.dev
An opinionated guide for developers wanting to get things done with Nix.
Stars: ✭ 300 (+1566.67%)
Mutual labels:  nixos, nix
tix
[WIP] A type system for nix
Stars: ✭ 59 (+227.78%)
Mutual labels:  nix, nixos
django-nixos
NixOS/NixOps configuration for Django
Stars: ✭ 21 (+16.67%)
Mutual labels:  nix, nixos
Cachix
Command line client for Nix binary cache hosting:
Stars: ✭ 322 (+1688.89%)
Mutual labels:  nixos, nix
nix-bash-completions
Bash completion for the Nix command line tools
Stars: ✭ 39 (+116.67%)
Mutual labels:  nix, nixos
Dotfiles
And I say hey, what's going on?
Stars: ✭ 348 (+1833.33%)
Mutual labels:  nixos, nix
nix-new-rails-app
Initialize Rails applications using Nix and development environments (nix-shell)
Stars: ✭ 27 (+50%)
Mutual labels:  nix, nixos
dotnix
Shackled within an elaborate prison of my own design.
Stars: ✭ 35 (+94.44%)
Mutual labels:  nix, nixos
nixos-config
My NixOS configuration
Stars: ✭ 23 (+27.78%)
Mutual labels:  nix, nixos
nixos-on-arm
Cross Compiling NixOS to ARM as a replacement for Yocto
Stars: ✭ 129 (+616.67%)
Mutual labels:  nix, nixos
dconf2nix
🐾 Convert Dconf files (e.g. Gnome Shell) to Nix, as expected by Home Manager
Stars: ✭ 51 (+183.33%)
Mutual labels:  nix, nixos
Morph
NixOS deployment tool
Stars: ✭ 303 (+1583.33%)
Mutual labels:  nixos, nix

NixOS on Samsung Chromebook Plus

This project is a configuration of NixOS that renders it bootable on a Samsung Chromebook Plus in the form of a image that can be dumped to a microSD card and booted directly. The majority of the effort was accomplished by the Arch Linux ARM project, which builds an appropriate kernel, which was imported directly.

Status

Weekend hobby project. Works for me.

Building

nix-build release.nix -A sdImage

Or try ./simple-build.sh.

Installation

  1. Place device in Developer Mode
  2. Dump image to SD card.
  3. Insert into Chromebook.
  4. Boot with Ctrl-U.

Post installation configuration

Use the standard nixos-generate-config command to generate the hardware and filesystem configuration file. In the main configuration file (configuration.nix), include the two modules from this repository's modules/ directory, which adds in the kernel package, and the depthcharge bootloader integration. In you main configuration.nix, specify your desired kernel. For example:

{ config, lib, pkgs, ... }:
{
  include = [
    ./kevin-nix/modules
  ];

  boot.kernelPackages = pkgs.linuxPackages_gru_4_4;

  boot.loader.depthcharge.enable = true;
  boot.loader.depthcharge.partition = "/dev/disk/by-partlabel/kernel";
}

nixos-rebuild switch

The boot process scans the media for a partition designated as a kernel, using attributes stored in GPT.

This kernel partition (kpart) is a Flattened Image Tree (fit) image including the kernel, a set of dtbs, the initrd, and the kernel command line.

The depthcharge module will will produce a kernel partition (kpart) file as part of the toplevel system, and on switch will write its contents to the kernel partition.

The kernel partition is not a GC root. If you remove old versions of your system profile, you may render your environment unbootable.

Generated partition layout

$(nix-build --no-out-link -E 'import <nixpkgs> { overlays = [ (import ./packages) ]; }' -A vboot_reference)/bin/cgpt show $(readlink -f ./result/sd-image/*.img)

       start        size    part  contents
           0           1          PMBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        2048      131072       1  Label: "kernel"
                                  Type: ChromeOS kernel
                                  UUID: 534078AF-3BB4-EC43-B6C7-828FB9A788C6
                                  Attr: priority=10 tries=5 successful=1
      133120     4393031       2  Label: "NIX_SD"
                                  Type: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
                                  UUID: 0340EA1D-C827-8048-B631-0C60D4478796
     4526151          32          Sec GPT table
     4526183           1          Sec GPT header

Notice the additional metadata for the kernel partition Attr: priority=10 tries=5 successful=1.

Versions

Tested against nixpkgs f607771d0f5.

Future work

  • Make a fit image containing uboot, which can then use the standard extlinux-based boot flow.

  • Use a vanilla kernel. It is expected that 4.16 will include support that enables the display without additional patches.

  • Use depthcharge's fallback features to have multiple bootable profiles.

  • Build the open source Mali kernel module from ARM that matches the binary libmali.so available from rockchip.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].