Skip to content

Instantly share code, notes, and snippets.

View aep's full-sized avatar
🥬

Arvid E. Picciani aep

🥬
View GitHub Profile
Open On-Chip Debugger 0.9.0 (2016-04-27-23:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Open On-Chip Debugger 0.9.0 (2016-04-27-23:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Open On-Chip Debugger 0.9.0 (2016-04-27-23:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 6t'
@aep
aep / main.rs
Created January 10, 2017 13:48
// this is a translation of https://github.com/aep/ceramic from C++ to rust
//
// since i'm new to rust asking for comments on how well this matches rust's design conventions
mod Ceramic {
extern crate nix;
use std::os::unix::io::RawFd;
use self::nix::unistd::ForkResult;
use self::nix::sys::socket;
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
@aep
aep / link.dot
Created November 2, 2017 15:11
graphviz graph of elfkit link tree with musl
aep@derp: ~/Downloads/bzip2-1.0.6 /usr/lib/ld-2.26.so ./bzip2
bzip2: I won't write compressed data to a terminal.
bzip2: For help, type: `bzip2 --help'.
aep@derp: ~/Downloads/bzip2-1.0.6 gdb --args ./bzip2
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
Toolchain type (Buildroot toolchain) ---> │ │
│ │ *** Toolchain Buildroot Options *** │ │
│ │ (buildroot) custom toolchain vendor name │ │
│ │ C library (musl) --->
x86_64-buildroot-linux-musl-cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-nostdlib" "-Wl,--eh-frame-hdr" "-Wl,-(" "-m64" "/usr/local/rustup/toolchains/nightly-2017-10-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/usr/local/rustup/toolchains/nightly-2017-10-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/usr/local/rustup/toolchains/nightly-2017-10-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "/src/target/x86_64-unknown-linux-musl/release/deps/bla-9c2af5f04af57c66.bla0.rust-cgu.o" "-o" "/src/target/x86_64-unknown-linux-musl/release/deps/bla-9c2af5f04af57c66" "/src/target/x86_64-unknown-linux-musl/release/deps/bla-9c2af5f04af57c66.crate.allocator.rust-cgu.o" "-Wl,--gc-sections" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/src/target/x86_64-unknown-linux-musl/release/deps" "-L" "/src/target/release/deps" "-L" "/usr/local/rustup/toolchains/nightly-2017-10-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown