Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / BananaPi-BPI-R4-Gentoo.md
Last active July 3, 2024 22:21
Gentoo on Banana Pi BPI-R4

Initial Bootstrap

Notes

Access to the serial console is likely mandatory for this, though it could potentially be done purely via SSH. There will be no way to debug issues in case the system does not come up.

These steps describe how to ultimately boot Gentoo on the board, with the bootloader(s) in NAND and Gentoo and the Kernels on an NVMe SSD.

Building kernel and u-boot

@BtbN
BtbN / __init__.py
Last active April 2, 2023 16:26
play-all-addon
from anki.hooks import wrap
from aqt.main import AnkiQt
import aqt.sound as aqt_sound
import aqt.browser.previewer as aqt_previewer
import aqt.reviewer as aqt_reviewer
import aqt.clayout as aqt_clayout
def my_play_clicked_audio(pycmd, card, _old):
@BtbN
BtbN / npp.sh
Created October 28, 2021 18:24
function npp() {
args=()
for v in "$@"; do
if [[ "$v" == /mnt/?/* ]]; then
args+=( "${v:5:1}:${v:6}" )
else
args+=( "$v" )
fi
done
test -z "${args[*]}" && return
task:xfs_io state:S stack: 0 pid:841684 ppid:841677 flags:0x00004001
Call Trace:
__schedule+0x3e9/0x660
? rpc_task_release_transport+0x42/0x60
schedule+0x46/0xb0
schedule_timeout+0x20e/0x2a0
? nfs4_call_sync_custom+0x23/0x30
wait_for_completion_interruptible+0x80/0x120
nfs42_proc_copy+0x505/0xb00
? find_get_pages_range_tag+0x211/0x270
.visible .entry Subsample_Bicubic_uchar(
.param .u64 Subsample_Bicubic_uchar_param_0,
.param .u64 Subsample_Bicubic_uchar_param_1,
.param .u32 Subsample_Bicubic_uchar_param_2,
.param .u32 Subsample_Bicubic_uchar_param_3,
.param .u32 Subsample_Bicubic_uchar_param_4,
.param .u32 Subsample_Bicubic_uchar_param_5,
.param .u32 Subsample_Bicubic_uchar_param_6,
.param .u32 Subsample_Bicubic_uchar_param_7
)
#
# -- High Performance Computing Linpack Benchmark (HPL)
# HPL - 2.3 - December 2, 2018
# Antoine P. Petitet
# University of Tennessee, Knoxville
# Innovative Computing Laboratory
# (C) Copyright 2000-2008 All Rights Reserved
#
# -- Copyright notice and Licensing terms:
#
================================================================================
HPLinpack 2.3 -- High-Performance Linpack benchmark -- December 2, 2018
Written by A. Petitet and R. Clint Whaley, Innovative Computing Laboratory, UTK
Modified by Piotr Luszczek, Innovative Computing Laboratory, UTK
Modified by Julien Langou, University of Colorado Denver
================================================================================
An explanation of the input/output parameters follows:
T/V : Wall time / encoded variant.
N : The order of the coefficient matrix A.
@BtbN
BtbN / get_cur_song.py
Last active June 4, 2020 19:49
get_cur_song.py
#!/usr/bin/env python3
import os
import sys
import spotipy
import spotipy.util as util
import webbrowser
from flask import Flask
def fake_open(url):
raise webbrowser.Error("")
@BtbN
BtbN / # zfs get -H -o value keystatus;
Created January 9, 2020 21:31
# zfs get -H -o value keystatus;
# zfs get -H -o value keystatus
-
available
available
available
available
available
available
available
available
@BtbN
BtbN / etcportagepatchessys-kernelgentoo-sourcesexport_kernel_fpu_functions.patch
Created October 6, 2019 18:56
/etc/portage/patches/sys-kernel/gentoo-sources/export_kernel_fpu_functions.patch
From 245e0f743d814c9ff2d1c748175e321301eb16cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <[email protected]>
Date: Thu, 2 May 2019 05:28:08 +0100
Subject: [PATCH] x86/fpu: Export __kernel_fpu_{begin,end}()
This partially undo commit:
12209993 x86/fpu: Don't export __kernel_fpu_{begin,end}()
We need this symbol in zfs for AES-NI/AVX support.