Skip to content

Instantly share code, notes, and snippets.

View clear-scratch.nix
{
fileSystems."/scratch" = { fsType = "zfs"; device = "ordnungsamd/scratch"; };
systemd.services.clear-scratch = {
script = ''
/run/booted-system/sw/bin/zfs rollback ordnungsamd/scratch@empty
# dropbox is exposed write-only via samba to allow transferring files to my laptop from windows machines
install -dm0700 -o linus /scratch/dropbox
setfacl -m u:dropper:wx /scratch/dropbox
'';
path = [ pkgs.acl ];
View gist:f212446665cca2c9177a88846ad43523
UBNT-BZ.v4.0.80# cat /sys/kernel/debug/clk/clk_summary
clock enable_cnt prepare_cnt rate accuracy phase
----------------------------------------------------------------------------------------
ahb 1 1 258333333 0 0
ddr 0 0 650000000 0 0
cpu 0 0 775000000 0 0
ref 1 1 25000000 0 0
View gist:20a6d16c005b2c1bd10a1061355faf76
ath> bootm 0x84000000
## Booting image at 84000000 ...
Image Name: Linux-5.7.17+
Created: 1980-01-01 0:00:00 UTC
Image Type: MIPS Linux Kernel Image (gzip compressed)
Data Size: 2166040 Bytes = 2.1 MB
Load Address: 80060000
Entry Point: 803fba30
Verifying Checksum at 0x84000040 ...OK
Uncompressing Kernel Image ... OK
View gist:3a8260f24548551806fb264fd04b96d1
$ find firmware -type f -exec sha256sum {} + | wl-copy
b39296a58115f2be5c7f4d856f65f7002839edfda8101ccc18ea579c56ad4816 firmware/isdbtmm.b04
15e2e2571cf59116ebda3da3ac8af6c97d2f2840f13147a9b1828e30ba9bdd02 firmware/securemm.b04
3b9373216c986427625b9cff7ad585ee1b2ef7b8a4b18b9c333a3cbe6bc2418b firmware/goodixfp.b04
fd6e8dd9572931e141f62ab2a91d7a76b687eaa10404b96bd8a8089e44e14274 firmware/cpe_9335.b11
9bccb0fa49e17829b7c4be670319ce0d6035d584990598b5b3d7295c708c1d30 firmware/adsp.b04
87e2719e766166501f833c013025eb87f9c699cce726a315918b781244f67e4f firmware/qmpsecap.b01
49b77a341dd8a77be9fa3a67ab090627430a9cb9e867fed5211e074d9b220b3d firmware/cpe_9335.b29
30baac2bfacb9a0a99b2063fe9b8ad14428b69ac48d3fe84f6c53274985741d8 firmware/modem.b05
9e858cd13a745c5b6684d07899133fadebfb459ed1925fc7ddfd2da7bc131911 firmware/qmpsecap.mdt
View gist:704021fe0ec41bbcaa9c0087d0a2d9cc
Aug 17 10:41:07 beaker-nixos kernel: wcnss_wlan triggered by userspace
Aug 17 10:41:07 beaker-nixos kernel: wcnss_pm_qos_add_request: add request
Aug 17 10:41:07 beaker-nixos kernel: wcnss_pm_qos_update_request: update request 100
Aug 17 10:41:07 beaker-nixos kernel: wcnss_trigger_config: couldn't get snoc_wcnss
Aug 17 10:41:07 beaker-nixos kernel: wcnss_notif_cb: wcnss notification event: 2
Aug 17 10:41:07 beaker-nixos kernel: subsys-pil-tz a21b000.qcom,pronto: wcnss: loading from 0x000000008e800000 to 0x000000008ee57000
Aug 17 10:41:07 beaker-nixos kernel: wcnss_notif_cb: wcnss notification event: 6
Aug 17 10:41:07 beaker-nixos kernel: wcnss: IRIS Reg: 04000004
Aug 17 10:41:07 beaker-nixos kernel: subsys-pil-tz a21b000.qcom,pronto: wcnss: Brought out of reset
Aug 17 10:41:08 beaker-nixos kernel: subsys-pil-tz a21b000.qcom,pronto: wcnss: Power/Clock ready interrupt received
View gist:cae1e052ade5a7fec17487a414eb6cbe
Android Bootloader - UART_DM Initialized!!!
[40] Qseecom Init Done in Appsbl version is 0x1001000
[40] secure app region addr=0x84a00000 size=0x1900000[50] TZ App region notif returned with status:0 addr:84a00000 size:26214400
[50] TZ App log region register returned with status:0 addr:8f777000 size:4096
[60] Qseecom TZ Init Done in Appsbl
[70] Loading cmnlib done
[90] Loading cmnlib64 done
pcba_config : 4
pcba is D2A , normal boot
[110] fastboot: is_unlocked = 1
View suzy.nix
{
services.udev.extraRules = ''
# SuzyQable # SuzyQable
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="5014", GROUP="wheel", MODE="0660"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="501f", GROUP="wheel", MODE="0660"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ENV{GOOGLE_CCD_NAME}="$attr{product}-$attr{busnum}-$attr{devpath}"
SUBSYSTEM=="usb", ENV{GOOGLE_CCD_NAME}!="", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff5001:*", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="tty", ENV{GOOGLE_CCD_NAME}!="", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="50", ATTRS{bInterfaceProtocol}=="01", OPTIONS+="string_escape=replace", SYMLINK+="suzy-$attr{interface}", GROUP="wheel", MODE="0660"
'';
}
View 0-with-tarball.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.linuxManualConfig {
inherit (pkgs) stdenv;
src = ./linux-5.7.7.tar.xz;
version = "5.7.7";
configfile = ./config;
}
View gist:2fbbacca9e5a87c8e540fe9c2418cac2
[ 223.526909] ------------[ cut here ]------------
[ 223.526916] WARNING: CPU: 0 PID: 0 at ../net/core/skbuff.c:616 skb_release_head_state+0x74/0xdc()
[ 223.526923] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.18.71 #2
[ 223.526926] Hardware name: Qualcomm Technologies, Inc. MSM8953 + PMI8950 QRD SKU3 (DT)
[ 223.526929] Call trace:
[ 223.526939] [<ffffffc00008aa70>] dump_backtrace+0x0/0x11c
[ 223.526944] [<ffffffc00008aba0>] show_stack+0x14/0x1c
[ 223.526948] [<ffffffc000e8aa18>] dump_stack+0x80/0xac
[ 223.526953] [<ffffffc0000a56fc>] warn_slowpath_common+0x88/0xb4
[ 223.526958] [<ffffffc0000a5860>] warn_slowpath_null+0x18/0x20
View dnsmasq.conf
port=9053
domain=virt.example.com.
dhcp-fqdn
dhcp-authoritative
auth-sec-servers=ns3.example.com.
auth-peer=::1,127.0.0.1
log-queries
You can’t perform that action at this time.