Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Barlow telent

View GitHub Profile
View postmarketos-dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.16.0-postmarketos-qcom-msm8953 (pmos@build) (aarch64-alpine-linux-musl-gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219, GNU ld (GNU Binutils) 2.38) #1 SMP PREEMPT Thu Mar 3 08:28:04 UTC 2022
[ 0.000000] Machine model: Motorola G5 Plus (potter)
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000081800000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node memory@81800000, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000ffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xff9f1b40-0xff9f3fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x00000000ffffffff]
View no-touchscreen-dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.18.3 (nixbld@localhost) (gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.38) #1-mobile-nixos SMP PREEMPT Tue Jan 1 00:00:00 UTC 1980
[ 0.000000] Machine model: Motorola G5 Plus (potter)
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000081800000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node memory@81800000, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000ffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xff9f1a40-0xff9f3fff]
[ 0.000000] Zone ranges:
View gist:05b202fbfe75ec5991d0fb611cfde5a1
{ lib, pkgs, config, ... }:
let
inherit (lib.strings) makeBinPath;
app = pkgs.callPackage ../mobile-nixos/examples/hello/app {};
hello-gui = pkgs.mobile-nixos.stage-1.script-loader.wrap {
name = "hello-gui";
applet = "${app}/libexec/app.mrb";
env = {
PATH = "${makeBinPath (with pkgs;[
systemd # journalctl
View odroid-n2-text-mode.nix

Symptoms

boots to grub menu, but when any option selected it says

unaligned pointer 0x8c6ebc159a4294f5
Aborted. Press any key to exit.

Pressing a key resets the board

Sources

View lib.fnl
;; lib.fnl
;; surely there is a better way to do this
(fn next-key [tbl current-key]
(let [first (next tbl)
n
(accumulate [is-next nil
id view (pairs tbl)
:until (and is-next (not (= is-next current-key)))]
View configuration.nix
{ config, lib, pkgs, ... }:
let
inherit (lib) mkForce;
in
{
imports =
let mobile = fetchTarball {
name = "mobile-nixos";
url = "https://codeload.github.com/NixOS/mobile-nixos/tar.gz/c45932ae53aa0c5da9cfddd25e7cbb503f472147";
@telent
telent / just.fnl
Created Feb 5, 2022
A minimal web browser
View just.fnl
(local lgi (require :lgi))
(local inspect (require :inspect))
(local Gtk lgi.Gtk)
(local WebKit2 lgi.WebKit2)
(let [current-url "https://terse.telent.net"
window (Gtk.Window {
:title "Just browsing"
:default_width 800
View dial.fnl
(local lgi (require :lgi))
(local dbus (require :dbus_proxy))
(local GLib lgi.GLib)
(local GV lgi.GLib.Variant)
(local variant dbus.variant)
;; https://www.freedesktop.org/software/ModemManager/api/latest/ref-dbus.html
(local modem-manager
(dbus.Proxy:new
{
View gist:d47e47d9d4f3586ebd9fc1fd70e16cb6
(local lgi (require :lgi))
(local gtk lgi.Gtk)
(let [window (gtk.Window {
:title "My window"
:default_width 400
:default_height 400
})]
(window:show_all))
View firefox.nix
# nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./. {}' ; nix-env -i result/
{ stdenv
, lib
, fetchzip
, wrapFirefox
, firefox-esr-unwrapped
, fetchFirefoxAddon }:
with { inherit (builtins) readFile replaceStrings; };
let