Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I void warranties and ask companies for their GPL source code.

Hal Martin halmartin

💭
I void warranties and ask companies for their GPL source code.
View GitHub Profile
@halmartin
halmartin / debootstrap_ubuntu_debian.md
Created August 25, 2022 15:12
debootstrap Ubuntu from Debian
View debootstrap_ubuntu_debian.md

Problem

You want to install a recent version of Ubuntu from Debian using debootstrap (say, from the Hetzner recovery OS) but you keep getting the following error:

base-files
E: Tried to extract package, but file already exists. Exit...

After consulting the debootstrap.log in the target, you find an error that looks similar to the following:

@halmartin
halmartin / sds1000xe.py
Created May 22, 2022 18:47
Siglent SDS1000X-E license key recovery
View sds1000xe.py
#!/usr/bin/python3
import re
import string
import hashlib
# adapted from https://www.eevblog.com/forum/testgear/unlocking-siglent-sds1104x-e-step-by-step/msg1973306/
def getkeys(scopeid, serialno, memdumpfile):
"""
Parse a memory dump from a Siglent 1000X-E oscilloscope and return a dict containing
license keys. The 'activebw' key is the one that is currently active in the 'scope
@halmartin
halmartin / board_table.txt
Created September 25, 2021 10:15
Meraki product identifiers
View board_table.txt
static const struct board_table_element board_table[] = {
{ "meraki_MS220-48 600-21030", MERAKI_BOARD_MS220_48 },
{ "meraki_MS220-48LP 600-21040", MERAKI_BOARD_MS220_48LP },
{ "meraki_MS220-48FP 600-21050", MERAKI_BOARD_MS220_48FP },
{ "meraki_MS220-24 600-20030", MERAKI_BOARD_MS220_24 },
{ "meraki_MS220-24P 600-20040", MERAKI_BOARD_MS220_24P },
{ "meraki_MS320-24 600-20050", MERAKI_BOARD_MS320_24 },
{ "meraki_MS320-24P 600-20060", MERAKI_BOARD_MS320_24P },
@halmartin
halmartin / firmware_upgrades
Created June 27, 2021 13:11
Meraki Dashboard release notes
View firmware_upgrades
<!DOCTYPE html>
<html class='no-js'>
<head>
<script>window.NREUM||(NREUM={});NREUM.info={"beacon":"bam-cell.nr-data.net","errorBeacon":"bam-cell.nr-data.net","licenseKey":"ec197d872d","applicationID":"32971086","transactionName":"J1xbFUBbClVWQRhaUQpSUgQdWxReUl1eTVEQWloPHVIPS15EVkVVO0ZFBkBVAlxA","queueTime":1,"applicationTime":346,"agent":""}</script>
<script>(window.NREUM||(NREUM={})).loader_config={xpid:"UQYBWFBACwEJU1BSDwc=",licenseKey:"ec197d872d",applicationID:"32971086"};window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o||e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,n){function r(t){try{c.console&&console.log(t)}catch(e){}}var o,i=t("ee"),a=t(29),c={};try{o=localStorage.getItem("__nr_flags").split(","),console&&"function"==typeof console.log&&(c.console=!0,o.indexOf("dev")!==-1&
@halmartin
halmartin / uboot.txt
Created April 5, 2021 19:29
MS220 u-boot preamble
View uboot.txt
U-Boot 2019.10 (Mar 28 2021 - 20:41:55 +0000)
MSCC VCore-III MIPS 24Kec
Model: Cisco Meraki MS220-8P
DRAM: 128 MiB
Loading Environment from SPI Flash... SF: Detected mx25l12805d with page size 256 Bytes, erase size 64 KiB, total 16 MiB
OK
In: serial@10100000
Out: serial@10100000
Err: serial@10100000
@halmartin
halmartin / bootlog.txt
Created April 5, 2021 09:00
luton 3.18.123 u-boot
View bootlog.txt
Filename 'vmlinuz'.
Load address: 0x81000000
Loading: #################################################################
#################################################################
#####################################T ############################
#################################################################
#################################################################
#################################################################
##################################
178.7 KiB/s
@halmartin
halmartin / HPE-CX3-ALOM-lspci.txt
Created March 28, 2021 11:04
HPE Connect-X3 ALOM lspci verbose output
View HPE-CX3-ALOM-lspci.txt
01:00.0 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3]
Subsystem: Mellanox Technologies Device 18db
Physical Slot: 4
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7a00000 (64-bit, non-prefetchable) [size=1M]
Region 2: Memory at f6000000 (64-bit, prefetchable) [size=8M]
Expansion ROM at f7900000 [disabled] [size=1M]
@halmartin
halmartin / lspci.txt
Last active January 2, 2021 18:50
533FLR-T lspci output
View lspci.txt
01:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM57810 10 Gigabit Ethernet (rev 10)
Subsystem: Hewlett-Packard Company FlexFabric 10Gb 2-port 533FLR-T Adapter
Physical Slot: 4
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f5800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at f5000000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at f6010000 (64-bit, prefetchable) [size=64K]
@halmartin
halmartin / bootlog.txt
Created December 28, 2020 21:52
Meraki MX80 buildroot firmware
View bootlog.txt
U-Boot 2009.11-00043-gf4c39d3-serengeti_DEV_1.19.01 (Feb 15 2012 - 10:40:18)
CPU: AMCC PowerPC 460 APM86290 at 1000 MHz PLB=500 MHz
(SOC=1000 AXI=250 AHB=166 APB=83 EBC=100)
Internal PCI arbiter disabled
32 kB I-Cache 32 kB D-Cache
Board: Fullerene-2 - Meraki Fullerene Cloud Managed Router
I2C: ready
DRAM: -2 GB at 800MHz
Default enable MDIO for ETH0
@halmartin
halmartin / fullerene.dts
Created December 19, 2020 14:44
Meraki fullerene dts extracted from firmware image
View fullerene.dts
/dts-v1/;
/ {
#address-cells = <0x2>;
#size-cells = <0x1>;
model = "apm,apm862xx";
compatible = "apm,apm862xx";
dcr-parent = <0x1>;
aliases {