Skip to content

Instantly share code, notes, and snippets.

View orangecms's full-sized avatar
🐢
Hack the planet!

Jiji Freya Daniel Maslowski orangecms

🐢
Hack the planet!
View GitHub Profile
@orangecms
orangecms / freebse-pkg-base.md
Last active October 21, 2026 13:00
FreeBSD 15 and the switch to pkg-base

FreeBSD 15: Switching to pkg-base

FreeBSD had been designed to keep some things separate: a "base" system and additional software. However, it is unlike a modern, image-based system.

Everything could be modified by the user, and you need to figure out how. It would require multiple tools to manage different parts of the (file) system.

This confuses me a lot, especially when an extra package would override or add to the base system, such as a driver (availalbe as a "kmod", in FreeBSD terms).

@orangecms
orangecms / ip-camera.md
Created January 10, 2026 21:21
IP camera running custom kernel
Starting kernel ...

undefined instruction
pc : [<80008008>]          lr : [<8841e2c4>]
sp : 883bf4f8  ip : 00000000     fp : 883c040b
r10: 8848978c  r9 : 7fde7101     r8 : 883bffe0
r7 : 883bffc4  r6 : 00001f40     r5 : 884917cc  r4 : 00000000
r3 : 00000064  r2 : 80000100     r1 : 00001f40  r0 : 56190527
Flags: nzCv IRQs off FIQs off Mode SVC_32
@orangecms
orangecms / bdiffstat
Created October 11, 2025 20:16
bdiffstat
#!/bin/sh
DIFF=`cmp -l "$1" "$2" | wc -l`
SIZE=`ls -l "$1" | awk '{print $5}'`
STAT=`echo | awk "{print 100*$DIFF/$SIZE}"`
echo "$DIFF / $SIZE bytes differ (${STAT}%)"
@orangecms
orangecms / go-syscall-catchup.md
Last active October 13, 2025 14:27
Golang Linux to use new syscalls
@orangecms
orangecms / goarm.log
Created August 23, 2025 21:02
Go on Arm goes 💥
futexwakeup addr=0x547a08 returned -38
SIGSEGV: segmentation violation
PC=0x55e04 m=2 sigcode=1 addr=0x1006
goroutine 0 gp=0x14025a8 m=2 mp=0x142c808 [idle]:
runtime.futexwakeup(0x547a08, 0x1)
runtime/os_linux.go:100 +0x6c fp=0x1445f94 sp=0x1445f68 pc=0x55e04
runtime.notewakeup(0x547a08)
runtime/lock_futex.go:32 +0x60 fp=0x1445fa8 sp=0x1445f94 pc=0x2846c
runtime.startlockedm(0x1402128)
@orangecms
orangecms / linux-uboot-arm64-dts-broadcom.diff
Last active May 15, 2025 09:03
diffing device trees between projects
diff '--color=auto' -x Makefile -rush OS/linux/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts firmware/u-boot/arch/arm/dts/bcm2711-rpi-4-b.dts
--- OS/linux/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2025-05-03 13:33:57.953289410 +0200
+++ firmware/u-boot/arch/arm/dts/bcm2711-rpi-4-b.dts 2023-02-21 20:44:21.319965771 +0100
@@ -1,2 +1,262 @@
// SPDX-License-Identifier: GPL-2.0
-#include "arm/broadcom/bcm2711-rpi-4-b.dts"
+/dts-v1/;
+#include "bcm2711.dtsi"
+#include "bcm2711-rpi.dtsi"
+#include "bcm283x-rpi-usb-peripheral.dtsi"
@orangecms
orangecms / rk3566.sh
Created March 26, 2025 11:23
RK3566 mask ROM
#!/bin/sh
# have rkbin and xrock in the same directory
# https://github.com/rockchip-linux/rkbin
# https://github.com/xboot/xrock
# Run this in the xboot directory.
# Have rkbin in the same parent directory.
_BDIR=../rkbin/bin/rk35
# DRAM init binary
@orangecms
orangecms / soc-vendors.md
Last active March 30, 2025 22:13
SoC vendors
  • Allwinner
  • Amlogic
  • Broadcom
  • Rockchip
  • TI
  • HiSilicon
  • MediaTek
  • Qualcomm
  • Samsung
  • NXP
@orangecms
orangecms / us2td
Created January 3, 2025 01:57
stupid scripts because mpv is broken on RPi4 and cvlc is the way to go >_<
#!/bin/env python3
# convert time in microseconds to a human readable timestamp, e.g. 0:13:37.000123
from datetime import timedelta
import sys
ts=int(sys.argv[1])
td=timedelta(microseconds=ts)
print(str(td))
@orangecms
orangecms / diff.md
Created October 29, 2024 01:22
diff of GX650PY and G733PYV firmware images

see PSPReverse/PSPTool#63

Diffing G733PYV323.rom vs GX650PY319.rom

Second gen (after Picasso/Raven Ridge) vs Second gen (after Picasso/Raven Ridge)
IMC Firmware                                  both empty
Gigabit ethernet firmware                     both empty
XHCI firmware                                 both empty
Fam 17 Model 00-0f BIOS                       both empty