Skip to content

Instantly share code, notes, and snippets.

View zeldin's full-sized avatar

Marcus Comstedt zeldin

View GitHub Profile
@zeldin
zeldin / external_link_ppc64.patch
Created March 21, 2019 09:18
golang patch to enable external linking on ppc64
@zeldin
zeldin / hello.s
Created December 4, 2018 18:54
Small ppc32 assembler program that will run on Linux without any 32-bit libs
# compile with: gcc -m32 -static -nostdlib -o hello hello.s
.text
.globl _start
_start:
bl 1f
1:
@zeldin
zeldin / gist:8418c17f489c2240c2cb9cb900bcb4c3
Last active August 26, 2018 13:42
DK5Q firmware upload format
FW upload starts with a packet of type 8:
byte 0 : 00
byte 1 : 08 = FW upload start command
byte 2 : 03 = packet sequence number
byte 3 : 01 = upload protocol version? Must be 1
byte 4-5 : 00 00 = total number of bytes (16-bit little endian), 0 means 64K (max size)
byte 6-7 : 7e 04 = total number of data blocks (16-bit little endian)
byte 8-9 : 00 00 = ? (not used)
byte 10: 39 = bytes of flash data per data block (decimal: 57) (not used)