Skip to content

Instantly share code, notes, and snippets.

View orangecms's full-sized avatar
🐢
Hack the planet!

Daniel Maslowski orangecms

🐢
Hack the planet!
View GitHub Profile
@orangecms
orangecms / mask_rom_bootlog.txt
Last active May 5, 2024 20:06
Milk-V Duo S (SG2000) firmware
boot_log_len: 2353
>>> BEGIN OF BOOT LOG
C. I:V/6da499f8/7vcz:g2a3d7b10/0/4418000.
SCS/0/0. I:ep_swinfo.
I:sw_info=0x0
I:EP:0x3050134/0x0.
I:EP:0x305013c/0x0.
I:EP:0x3050144/0x0.
I:EP:0x305014c/0x0.
@orangecms
orangecms / oreboot-jh7110-dtfs-uboot.log
Last active April 8, 2024 00:34
VF2 upstream boot log
oreboot 🦀 bt0
boot mode: UART
RISC-V arch 8000000000000007
RISC-V core vendor: SiFive (0x0489)
RISC-V implementation: 21G1.02.00 / llama.02.00-general (0x04210427)
RISC-V hart ID 1
vout clk axi: 0x00000000
vout clk core: 0x00000000
vout clk ahb: 0x00000000
vout_reset_status: 0x00000000
@orangecms
orangecms / NBD8016R-PL-V2.md
Created July 19, 2020 19:06
NBD8016R-PL-V2 NVR (Network Video Recorder) firmware

HiSilicon-based NVR (Network Video Recorder)

Acronyms

AHD - Analog High Definition NVR - Network Video Recorder DVR - Digital Video Recorder IPC - IP Camera

Research

@orangecms
orangecms / coreboot-p34v2.md
Last active March 21, 2024 14:33
Porting guide for coreboot: GIGABYTE P34G v2 / Schenker XMG C404

Porting coreboot to a Haswell / Lynx Point laptop: GIGABYTE P34G v2

This mainboard was sold by Schenker XMG as C404, while the original model name by GIGABYTE is P34G v2.

The board schematics are not publicly available. However, from another laptop board's schematics, we can learn a bit about the components it should have: laptop mainboard schematics

autoport

@orangecms
orangecms / build.sh
Created January 30, 2024 00:10
build Zephyr for VF2 / JH7110
#!/bin/bash
# get a toolchain; the one in current Ubuntu is not suitable, so use Zephyr's
# TOOLCHAIN_DL_BASE=https://github.com/zephyrproject-rtos/sdk-ng/releases/download
# TOOLCHAIN_VER=v0.16.5-rc1
# TOOLCHAIN_TAR=toolchain_linux-x86_64_riscv64-zephyr-elf.tar.xz
# wget $TOOLCHAIN_DL_BASE/$TOOLCHAIN_VER/$TOOLCHAIN_TAR
# tar -xf $TOOLCHAIN_TAR
TOOLCHAIN_DIR=$(pwd)/riscv64-zephyr-elf
@orangecms
orangecms / xlsx2json.sh
Created July 15, 2017 08:03
Convert xlsx spreadsheets to JSON :)
#!/bin/bash
# Preconditions:
# Before using this script, you need to have additional tools. Preferably, use
# your system package manager to install `csv2json`, `jsonlint` and `xslx2csv`.
# Alternatively, if you have `node`, `npm`, `python` and `pip`, run
# `npm i -g csv2json jsonlint && pip install xlsx2csv` for the unclean way.
# WARNING: You may have to adjust your `$PATH` then and you will need to track
# updates yourself. Do this at your own risk only.
@orangecms
orangecms / notes.md
Created January 16, 2024 14:53
UEFI hacking workshop

Abstract

We take a look at UEFI platform initialization firmware such as found on many current mainboards like laptops, desktops and servers.

Many security flaws, such as the recently discovered LogoFAIL vulnerability, expose both consumers and organizations to severe risks.

What strategies are there to find such issues, and how do we exploit them?

Description

From 482094ba156b7257ed88c396872e022bc299d629 Mon Sep 17 00:00:00 2001
From: Daniel Maslowski <cyrevolt@gmail.com>
Date: Fri, 8 Dec 2023 21:36:37 +0000
Subject: [PATCH] www/minio: downgrade to RELEASE.2022-10-24T18-35-07Z
This is the tagged commit: `bd099f5e71d0ea511846372869bfcb280a5da2f6`
Using the release timestamp and hash to identify the module (variable
GO_MODULE)
errors when running `make makesum`, because the Go proxy does not know
@orangecms
orangecms / dts-preprocess.sh
Last active September 28, 2023 07:26
Preprocess DTS includes and flatten the tree
#!/bin/sh
# https://stackoverflow.com/a/50658776
_INC="-I include -I arch/riscv/include"
_TMP=/tmp/resolved.dts
_OUT=/tmp/recompiled.dts
cpp -nostdinc $_INC -undef -x assembler-with-cpp "$1" $_TMP
# sed -i '/^#.*/d' $_TMP
@orangecms
orangecms / boot.log
Last active September 28, 2023 07:25
S905X4 TV-Box with AOSP Arm64 kernel
����SC2:BL:fb9e82;ID:0056000142A21C05;FEAT:30F:1FFE0000:B002F:1;POC:FF;RCY:0;OVD:0;DFU:0;eMMC:0;RD-0:0;CHK:0;RVK-N:8000;RVK-C:8000;RVK-A:800;RVK-C:8800;RVK-A:800;RVK-C:8800;RVK-N:8000;RVK-C:8800;SCS:0;RVK-N:00004000;RVK-C:0000c800;RVK-N:00002000;RVK-C:0000e800;
build in ddr magic:ddr4
OTP_LIC00 : 0f0300000000fe1f2f000b0000000000
OTP_LIC10 : 00820700aa01fe00ff00001f00400300
OTP_LIC20 : ffffffbf00000000c280000000000001
OTP_LIC30 : 000000f201000000ff0200f207000000
TE: 181407
BL2 Built : 20:42:11, Aug 9 2021. sc2 griscure-review-sc2-bl2-08032020-120-g922477b - jenkins@walle02-sh