From e1bbd03df6324936fb63e676f562e47e51b0a837 Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Mon, 17 Feb 2025 23:56:27 +0100 Subject: foo --- server.nix | 66 +++++++++++++++++++++++++------------------------------------- 1 file changed, 27 insertions(+), 39 deletions(-) (limited to 'server.nix') diff --git a/server.nix b/server.nix index 906e2c6..b0d4e61 100644 --- a/server.nix +++ b/server.nix @@ -1,13 +1,13 @@ -{ lib, fetchurl, writeText, libguestfs-with-appliance, pkgsCross, qemu +{ fetchurl, writeText, libguestfs-with-appliance, pkgsCross, qemu , runCommand, cpio, writeShellApplication, sshPassword, sshPort, httpPort }: let - updateName = "remarkable-ct-prototype-image-3.16.1.0-ferrari-public"; + updateName = "remarkable-production-memfault-image-3.14.1.9-rm2-public"; updateArchive = fetchurl { url = # TODO: this is not an official source. might be worth authenticating the updates "https://storage.googleapis.com/remarkable-versions/${updateName}.swu"; - hash = "sha256-cwx2qcvxZBX0wAprYKls8P+gthwJJQTceVIO+qdPm/w="; + hash = "sha256-8zlAGdv+w2KO7BruRQLQC9ivGSHtK82e36ASIeRF3zI="; }; xochitlConfig = writeText "xochitl.conf" '' @@ -36,24 +36,24 @@ let ExecStart=/usr/bin/xochitl --system Restart=always # required to make xochitl run - # Environment=LD_PRELOAD=/usr/lib/libfakefbdev.so # TODO uncomment? + Environment=LD_PRELOAD=/usr/lib/libfakefbdev.so [Install] WantedBy=multi-user.target ''; - fakefbdev = pkgsCross.aarch64-multiplatform.gcc11Stdenv.mkDerivation { + fakefbdev = pkgsCross.armv7l-hf-multiplatform.gcc11Stdenv.mkDerivation { name = "fakefbdev"; src = ./fakefbdev; installFlags = [ "DESTDIR=${placeholder "out"}" ]; }; - kernel = pkgsCross.aarch64-multiplatform.linux; + kernel = pkgsCross.armv7l-hf-multiplatform.linux_5_4; rootfsImage = runCommand "rm-rootfs.ext4" { nativeBuildInputs = [ cpio ]; } '' cpio -i --file ${updateArchive} - gzip -dc ${updateName}.ext4.verity.gz > $out + gzip -dc ${updateName}.ext4.gz > $out ''; diskImage = runCommand "rm-disk.qcow2" { @@ -64,17 +64,16 @@ let guestfish --rw --blocksize=512 --add $out <