Skip to content

Instantly share code, notes, and snippets.

BFSR_ADDR = "0xE000ed29"
BFSR_LEN = "b"
BFSR_BITS = [
"IBUSERR",
"PRECISERR",
"IMPRECISERR",
"UNSTKERR",
"STKERR",
"LSPERR",
"Reserved",
diff --git a/cvescan/constants.py b/cvescan/constants.py
index 0be4fcf..15b5fff 100644
--- a/cvescan/constants.py
+++ b/cvescan/constants.py
@@ -107,3 +107,12 @@ UCT_URL = "https://people.canonical.com/~ubuntu-security/cve/%s"
UCT_DATA_URL = (
"https://people.canonical.com/~ubuntu-security/cvescan/ubuntu-vuln-db-%s.json.bz2"
)
+
+SUPPORTED_RELEASES = [
@oholiab
oholiab / demo.md
Last active July 30, 2020 15:01
Dumping from a Tilda Mk 3

Start the session (obviously replacing jlink with whatever interface you're using)

> openocd -c 'interface jlink' -c 'transport select swd' -c 'source [find target/stm32l4x.cfg]' -c 'init'
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
swd
adapter speed: 500 kHz
adapter_nsrst_delay: 100

The problem

I have yet to successfully establish an SWD connection with the PineTime. I am currently using a Segger J-Link EDU Mini, and have previously attempted using the SPI fork of openocd with a Pi 3. I bought the J-Link new in order to debug this specific problem.

Currently, the PineTime won't boot to anything and has a blank screen with no backlight.

Attempting to connect over SWD with any of the tools mentioned with output below turns the backlight and motor on (thankfully the motor is on the back face of the watch so doesn't fire until you attach it)

I've rebuilt the wiring for my flashing setup several times to eliminate the possibility of miswiring or shorts.

~/openocd-spi/tcl> sudo ../src/openocd -c 'debug_level 3; interface bcm2835spi; bcm2835spi_speed 31200; source [find target/nrf52.cfg]'
Open On-Chip Debugger 0.10.0+dev-01130-g9d1b46f5 (2020-07-22-12:27)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Debug: 13 18 command.c:143 script_debug(): command - interface interface bcm2835spi
Debug: 15 18 command.c:354 register_command_handler(): registering 'bcm2835spi_speed'...
Info : 16 18 transport.c:117 allow_transports(): only one transport option; autoselect 'swd'
Debug: 17 18 command.c:354 register_command_handler(): registering 'swd'...
Debug: 18 18 bitbang.c:402 bitbang_swd_init(): bitbang_swd_init
@oholiab
oholiab / Makefile
Created March 7, 2019 19:17
Makefile to build recent emacs as an unprivileged user
# This Makefile will build and install emacs with gnutls and nettle for an
# unprivileged user. Emacs files will be located in ~/emacs, shared files for
# nettle and gnutls will be in ~/build/emacs/libs. This is kinda just where
# they landed, I'll maybe relocate it all under ~/.local
#
# It should be run in ~/build/emacs
#
# The selection of dependencies is based on what wasn't installed on the Ubuntu
# Xenial server I was running it on
#
{
"name": "mosh"
, "path": "/usr/bin/mosh"
, "reject_user_args": false
, "is_sandboxed_terminal": true
, "default_params": [
]
, "xserver": {
"enabled": true
, "notifications": true
@oholiab
oholiab / gist:52e913caa0a6ea12695518e764a16bd0
Created August 7, 2016 19:05
half assed attempt at IRC on the EMF TiLDA 3
import wifi
import socket
import ure
import ubinascii
import pyb
import uhashlib
uid = str(ubinascii.hexlify(uhashlib.sha256(pyb.unique_id()).digest()), 'ascii')
HOST="irc.freenode.net"
PORT=6667
@oholiab
oholiab / gagtest.rs
Created March 13, 2016 16:10
Redirect logging to stdout (or other file) example
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate gag;
use gag::Redirect;
use std::fs::File;
use std::os::unix::io::FromRawFd;
mattc@s023:~ > cat > pete.sh
q=""
for i in $@; do
q="${msg}$i%20"
done
echo ${msg#*0}
mattc@s023:~ > bash pete.sh a bunch of shit biscuits
mattc@s023:~ > sed -i -E 's/msg/q/g' pete.sh
mattc@s023:~ > bash pete.sh a bunch of shit biscuits