Skip to content

Instantly share code, notes, and snippets.

View hberntsen's full-sized avatar

Harm Berntsen hberntsen

  • The Netherlands, Earth
View GitHub Profile
@hberntsen
hberntsen / tftpboot.kermit
Created July 22, 2022 10:31
ckermit script to tftpboot the Arcadyan WE420223-99 with an kernel + initramfs
#!/usr/bin/ckermit
# Serial port setup. These settings will likely need to be
# changed to match the configuration of your workstation
# and the ARM board you're working with.
set line /dev/ttyUSB0
set serial 8n1
set speed 57600
# General C-Kermit settings. These probably don't need to change.
@hberntsen
hberntsen / password_emu.py
Created July 22, 2022 08:26
Emulates the password entry function of the Arcadyan WE420223-99 U-Boot
# based on https://www.shielder.com/blog/2022/03/reversing-embedded-device-bootloader-u-boot-p.2/
from unicorn import *
from unicorn.mips_const import *
from unicorn.unicorn_const import *
import subprocess
import ctypes
import sys
libc = ctypes.CDLL("libc.so.6")
@hberntsen
hberntsen / we420223-99_overlay.dts
Last active October 9, 2022 18:26
Arcadyan WE420223-99 overlay for Raspberry Pi
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
@hberntsen
hberntsen / install-ubuntu.sh
Last active August 22, 2019 04:56
Debian P910nd server for multiple printers
#!/bin/sh
pacaur -Syu brother-hl2030
sudo lpadmin -p 'Brother' -v 'socket://printers:9101' -m 'Brother HL-2030 for CUPS' -P /usr/share/cups/model/HL2030.ppd -o 'Resolution=1200x600dpi' -o 'TonerSaveMode=off' -E
@hberntsen
hberntsen / Dockerfile
Created January 27, 2016 09:02
i-librarian Dockerfile
FROM php:5.6-apache
RUN apt-get update
RUN apt-get install -y libfreetype6-dev libsqlite3-dev\
libjpeg62-turbo-dev \
poppler-utils tesseract-ocr ghostscript pdftk git && \
docker-php-ext-install gd pdo_sqlite
RUN git clone https://github.com/mkucej/i-librarian .
@hberntsen
hberntsen / sslmgr.Dockerfile
Last active August 29, 2015 14:21
sslmgr docker
#git clone https://github.com/sgielen/sslmgr
#docker build -t sslmgr .
#mkdir -p ssl/private ssl/certs
#docker run -v $(pwd)/ssl:/etc/ssl -ti --rm sslmgr sslmgr help
from debian:jessie
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y libmodule-build-perl make gcc libssl-dev openssl vim cpanminus
RUN cpanm Test::Directory
RUN cpanm Crypt::OpenSSL::X509