Skip to content

Instantly share code, notes, and snippets.

@sigmaris
sigmaris / build_qemu_debian_image.sh
Last active Mar 9, 2021
Automate the installation of Debian Buster on a x86_64 QEMU 4.0.0 VM hosted on macOS
View build_qemu_debian_image.sh
#!/bin/bash -e
if [ "$(uname -s)" != "Darwin" ]
then
echo "This script is for building a Debian x86_64 image to use on MacOS"
exit 1
fi
TEMP="$(mktemp -d build.XXXXX)"
cp preseed.cfg $TEMP
@sigmaris
sigmaris / libreELEC_nightly_20210206-dc904cd.txt
Last active Feb 7, 2021
kernel WARNING from kodi software decoding
View libreELEC_nightly_20210206-dc904cd.txt
[ 826.656405] ------------[ cut here ]------------
[ 826.656435] WARNING: CPU: 2 PID: 965 at drivers/gpu/drm/drm_gem.c:1096 drm_gem_mmap_obj+0x1a8/0x208
[ 826.656438] Modules linked in: snd_usb_audio rockchip_rga hci_uart hantro_vpu(C) rockchip_vdec(C) btbcm videobuf2_dma_contig videobuf2_dma_sg bluetooth v4l2_h264 snd_hwdep v4l2_mem2mem videobuf2_vmalloc ecdh_generic snd_usbmidi_lib videobuf2_memops pwm_fan videobuf2_v4l2 phy_rockchip_pcie snd_rawmidi ecc videobuf2_common spi_rockchip ipv6 fuse
[ 826.656504] CPU: 2 PID: 965 Comm: kodi.bin Tainted: G WC 5.10.11 #1
[ 826.656507] Hardware name: Pine64 RockPro64 v2.1 (DT)
[ 826.656513] pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--)
[ 826.656518] pc : drm_gem_mmap_obj+0x1a8/0x208
[ 826.656523] lr : drm_gem_mmap_obj+0x7c/0x208
[ 826.656526] sp : ffff8000126d3be0
[ 826.656529] x29: ffff8000126d3be0 x28: 0000000000000008
@sigmaris
sigmaris / python3-ldap-gssapi.py
Created Sep 10, 2014
Authenticate to LDAP using python3-ldap and python-gssapi
View python3-ldap-gssapi.py
import gssapi
from ldap3 import Connection, SASL_AVAILABLE_MECHANISMS
from ldap3.protocol.sasl.digestMd5 import sasl_digest_md5
from ldap3.protocol.sasl.external import sasl_external
from ldap3.protocol.sasl.sasl import send_sasl_negotiation, abort_sasl_negotiation
SASL_AVAILABLE_MECHANISMS.append('GSSAPI')
def sasl_gssapi(connection, controls):
@sigmaris
sigmaris / bl31.dump
Created Feb 17, 2020
ATF compiled with GCC 9.2.0 suspend exception
View bl31.dump
This file has been truncated, but you can view the full file.
build/rk3399/debug/bl31/bl31.elf: file format elf64-littleaarch64
build/rk3399/debug/bl31/bl31.elf
architecture: aarch64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000040000
Program Header:
LOAD off 0x0000000000010000 vaddr 0x0000000000040000 paddr 0x0000000000040000 align 2**16
@sigmaris
sigmaris / gist:5efb95190cbdf6e2114ce5f3c6847376
Created Feb 18, 2020
Exception when u-boot tries to read SRAM at 0xff8c1000
View gist:5efb95190cbdf6e2114ce5f3c6847376
=> md.l ff8c1000 1
ff8c1000:"Synchronous Abort" handler, esr 0x96000010
elr: 000000000027a5b4 lr : 000000000027a530 (reloc)
elr: 00000000f7f945b4 lr : 00000000f7f94530
x0 : 0000000000000009 x1 : 0000000000000000
x2 : 000000000000003a x3 : 00000000ff8c1000
x4 : 0000000000000000 x5 : 00000000f7fae6b1
x6 : 0000000000000004 x7 : 00000000f5effe70
x8 : 00000000f5effd30 x9 : 0000000000000008
x10: 00000000ffffffd0 x11: 0000000000000006
@sigmaris
sigmaris / ATF_suspend_exception.txt
Last active Feb 17, 2020
Exception in TF-A on RK3399 when entering suspend
View ATF_suspend_exception.txt
root@rockpro64:~# systemctl suspend
root@rockpro64:~# [ 318.410767] PM: suspend entry (deep)
[ 318.418836] Filesystems sync: 0.007 seconds
[ 318.420855] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 318.422615] OOM killer disabled.
[ 318.422618] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 318.425750] rk_gmac-dwmac fe300000.ethernet eth0: Link is Down
[ 318.452553] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 318.456607] sd 0:0:0:0: [sda] Stopping disk
[ 318.904800] Disabling non-boot CPUs ...
@sigmaris
sigmaris / atf_boot_log.txt
Created Feb 16, 2020
Boot log from ATF in debug mode on Rockpro64
View atf_boot_log.txt
U-Boot TPL 2020.04-rc2-00057-g6cef09d6f6 (Feb 16 2020 - 13:03:20)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
@sigmaris
sigmaris / proc iomem
Created Feb 16, 2020
Linux's view of memory in /proc/iomem
View proc iomem
00200000-f7ffffff : System RAM
02080000-0324ffff : Kernel code
03250000-0332ffff : reserved
03330000-03480fff : Kernel data
3bfff000-3fffefff : reserved
f1000000-f4ffffff : reserved
f5a11000-f5a1ffff : reserved
f5a22000-f5efcfff : reserved
f60ff000-f615efff : reserved
f615f000-f675ffff : reserved
@sigmaris
sigmaris / added_debugging.log
Last active Nov 16, 2019
Rockpro64 panic after reboot with mainline kernel
View added_debugging.log
[ 0.000000][ T0] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000][ T0] Linux version 5.4.0-rc1-gc5bd8fa4431f-sigmaris (root@a29a4080688d) (gcc version 8.3.0 (Debian 8.3.0-2)) #sigmaris SMP PREEMPT Sun Oct 6 15:58:04 UTC 2019
[ 0.000000][ T0] Machine model: Pine64 RockPro64
[ 0.000000][ T0] earlycon: uart8250 at MMIO32 0x00000000ff1a0000 (options '')
[ 0.000000][ T0] printk: bootconsole [uart8250] enabled
[ 0.000000][ T0] cma: Reserved 16 MiB at 0x00000000f7000000
[ 0.000000][ T0] NUMA: No NUMA configuration found
[ 0.000000][ T0] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff]
[ 0.000000][ T0] NUMA: NODE_DATA [mem 0xf67ec800-0xf67edfff]
[ 0.000000][ T0] Zone ranges:
View u-boot.its
/*
* This is a generated file.
*/
/dts-v1/;
/ {
description = "FIT image for U-Boot with bl31 (TF-A)";
#address-cells = <1>;
images {