Skip to content

Instantly share code, notes, and snippets.

View telent's full-sized avatar

Daniel Barlow telent

View GitHub Profile
(fn sleep [x] (: (io.popen (.. "sleep " (tostring x))) :close)) ;; simulate a slow process
(fn tick-producer []
(coroutine.wrap
(fn []
(var i 0)
(while (< i 10)
(set i (+ 1 i))
(coroutine.yield i)
(sleep 1)
/run/uncaught-logs/current:@400000000000014d0ac6a4d9 int.link.dhcpc udhcpc: broadcasting discover
/run/uncaught-logs/current:@40000000000001500b02481e int.link.dhcpc udhcpc: broadcasting discover
/run/uncaught-logs/current:@400000000000015338118555 int.link.dhcpc udhcpc: broadcasting discover
/run/uncaught-logs/current:@400000000000016a0e95f42a int.link.dhcpc udhcpc: broadcasting discover
/run/uncaught-logs/current:@400000000000016a0f736e03 int.link.dhcpc udhcpc: broadcasting select for 192.16
8.8.223, server 192.168.8.1
/run/uncaught-logs/current:@400000000000016a10b2bb34 int.link.dhcpc udhcpc: lease of 192.168.8.223 obtaine
d from 192.168.8.1, lease time 3600
/run/uncaught-logs/current:@400000000000016a1461834e s6-rc: info: service int.link.dhcpc successfully star
ted
diff --git a/drivers/gpu/drm/panel/msm8953-generated/panel-boe-bs052fhm-a00-6c01.c b/drivers/gpu/drm/panel/msm8953-generated/panel-boe-bs052fhm-a00-6c01.c
index db43159eaf89..72a34d9e1280 100644
--- a/drivers/gpu/drm/panel/msm8953-generated/panel-boe-bs052fhm-a00-6c01.c
+++ b/drivers/gpu/drm/panel/msm8953-generated/panel-boe-bs052fhm-a00-6c01.c
@@ -3,6 +3,7 @@
// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
// Copyright (c) 2013, The Linux Foundation. All rights reserved. (FIXME)
+#include <linux/backlight.h>
#include <linux/delay.h>
[ 19.622226] ------------[ cut here ]------------
[ 19.622230] Unbalanced enable for IRQ 31
[ 19.622248] WARNING: CPU: 7 PID: 2542 at kernel/irq/manage.c:789 __enable_irq+0x4c/0x7c
[ 19.622270] Modules linked in: wcnss_ctrl q6asm_dai q6routing q6voice_dai q6afe_dai q6voice q6afe_clocks q6adm q6asm q6afe q6cvs q6cvp q6mvm q6core snd_q6dsp_common q6voice_common apr pdr_interface qrtr_smd panel_boe_bs052fhm_a00_6c01(+) venus_dec venus_enc videobuf2_dma_contig videobuf2_memops msm crct10dif_ce snd_soc_apq8016_sbc rmi_i2c qcom_rng snd_soc_qcom_common rmi_core qrtr snd_soc_msm8916_digital qcom_wcnss_pil qcom_q6v5_pas gpu_sched drm_display_helper venus_core drm_kms_helper v4l2_mem2mem videobuf2_v4l2 qcom_q6v5_mss qcom_spmi_temp_alarm rtc_pm8xxx videobuf2_common qcom_spmi_vadc qcom_q6v5 qcom_pon qcom_sysmon reboot_mode qcom_vadc_common drm snd_soc_msm8916_analog qmi_helpers videodev qcom_common qcom_pil_info drm_panel_orientation_quirks mc mdt_loader rmtfs_mem socinfo
[ 19.622461] CPU: 7 PID: 2542 Comm: kwo
"qemu-system-mips"
"-M"
"malta"
"-echr"
"16"
"-m"
"272"
"-device"
"loader,file=run-vm-q0Bfcl,addr=0x90000000"
"-serial"
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Odroid C2 with Tow-Boot uses UEFI boot but has an MBR
# partition (not GPT) because the hardware needs firmware blobs
@telent
telent / sms.fnl
Created September 16, 2022 15:18
(local fcntl (require "posix.fcntl"))
(local posix (require "posix"))
(local { : read : write } (require "posix.unistd"))
(local {: tcgetattr : tcsetattr : tcdrain
: CLOCAL : CREAD
: ICANON : ECHO : ECHOE : ISIG
: OPOST
} (require "posix.termio"))
(local { : nanosleep } (require "posix.time"))
(local { : view } (require "fennel"))
block->blocknum = blocknum;
err = bio_read(cache->dev, block->ptr, (off_t)blocknum * cache->block_size, cache->block_size );
if(block->ptr == (void *)0x8f76c0e4) {
char * p = ((char *)block->ptr);
thread_sleep(1);
while((p < (char *) 0x8f76d0e4) && (*p != 0x99))
p++;
p-=4;
dprintf(SPEW, "%x: %x %x %x %x %x %x %x %x %d %d\n",
{ config, pkgs, lib, ... }:
# nixos/mobile-nixos don't currently (June 2022) update the kernel and
# initrd used by the bootloader when nixos-rebuild is run. This is a
# workaround until they do. Mount your boot filesystem somewhere
# and run "refresh-bootfs /path/to/mounted/bootfs" after switching
# configuration
let
inherit (config.mobile.outputs) recovery stage-0;
[ 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]