Skip to content

Instantly share code, notes, and snippets.

@hxmuller
hxmuller / program-spi-nor-with-u-boot.md
Last active February 5, 2023 22:37
Program the SPI NOR flash on a Pinebook Pro using a micro SD card and u-boot

Program SPI NOR Flash on Pinebook Pro with u-boot on micro SD Card

TL;DR: This describes the process, hardware, and software used to perform in-circuit programming of the 128Mbit SPI NOR flash (flash) in the Pinebook Pro (PBP) using u-boot on a micro SD Card.

Warning

You, the user of this information bear ALL responsibility for ANY outcome of its use, whether negative or positive.

The flash (identified below) this document refers to is rated for a minimum 100000 program/erase cycles. Exercising it beyond that limit will likely require its replacement which is non-trivial.

@hxmuller
hxmuller / construct-serial-usb-audio-jack-cable.md
Last active September 18, 2020 23:15
Build your own serial USB to audio jack cable for the Pinebook Pro

How to Construct a Serial USB to Audio Jack Cable

for the Pinebook Pro (and others?)

I bought a CH341 USB Serial to Audio cable at the same time I ordered the Pinebook Pro. What I discovered was that the CH341 chip had difficulty keeping up with the 1.5Mbit speed the Pinebook Pro communicates at.

I had a FT232RL USB UART device available and built a new cable, this gist describes how.

@hxmuller
hxmuller / program-spi-nor-with-raspi.md
Last active May 3, 2024 10:41
Program the SPI NOR flash on a Pinebook Pro using a Raspberry Pi

Program SPI NOR Flash on Pinebook Pro with a Raspberry Pi

TL;DR: This describes the process, hardware, and software used to perform in-circuit programming of the 128Mbit SPI NOR flash in the Pinebook Pro using a Raspberry Pi.

Warning

You, the user of this information bear ALL responsibility for ANY outcome of its use, whether negative or positive. My success in this operation can be attributed to the following factors:

  • Attention to detail
  • Curiousity
NR==4 {cn1=$1} # column name
NR==6 {cu1=$1} # column unit
END {print cn1" ("cu1"),"}
NR==4 {cn1=$1} # column name
NR==6 {cu1=$1} # column unit
END {print cn1" ("cu1"),"}
@hxmuller
hxmuller / update Debian Jessie systemd to backports without breakage
Created January 30, 2017 01:49
update Debian Jessie systemd to backports without breakage
# Although I never use aptitude, I found it very useful today to update
# systemd to backports without system breakage. I define system breakage
# as attempting to upgrade a package which then removes a bunch of
# important packages.
#
# These were the commands I ran to get the final command. I will have to
# create a fresh Jessie install and rerun them to provide an explanation
# for each change:
#
# $ which aptitude
@hxmuller
hxmuller / create vcgencmd command list from Raspberry Pi
Created January 19, 2017 16:18
create vcgencmd command list from Raspberry Pi
# This creates a sorted single column list of commands which can be used with
# vcgencmd.
# The output of vcgencmd commands is a single variable with commands separated
# by commas.
#
# The cut command treats everything within the quotations as a single field and
# prints that.
#
# The awk command is instructed to use ', ' as a record separator, then prints
@hxmuller
hxmuller / create list of Debian minimal base system packages
Last active December 12, 2016 15:58
create list of Debian minimal base system packages
# NOTE: create Debian minimal base system in debian_minbase first
ls debian_minbase/var/cache/apt/archives | cut -f1 -d_ | sed '/^partial/d' > filename
@hxmuller
hxmuller / create Debian minimal base system
Created December 12, 2016 15:31
create Debian minimal base system
# NOTE: to create a Debian base system, omit the --variant=minbase option
mkdir debian_minbase
sudo debootstrap --variant=minbase jessie debian_minbase/ http://httpredir.debian.org/debian
@hxmuller
hxmuller / list reverse dependencies for Debian package
Created October 21, 2016 10:12
list reverse dependencies for Debian package
# apt-cache - query the APT cache
# rdepends shows a listing of each reverse dependency a package has
# --no-suggests omit suggests dependencies
# --no-conflicts omit conflicts dependencies
# --no-breaks omit breaks dependencies
# --no-replaces omit replaces dependencies
# --no-enhances omit enhances dependencies
# --installed limit the output to packages which are currently installed
# --recurse make recursive so all packages mentioned are printed once