Skip to content

Instantly share code, notes, and snippets.

View xingrz's full-sized avatar

XiNGRZ xingrz

View GitHub Profile
@xingrz
xingrz / CMakeLists.txt
Created October 23, 2023 08:06
Build CH569EVT with CMake
cmake_minimum_required(VERSION 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR riscv32)
set(CMAKE_C_COMPILER_FORCED 1)
set(CMAKE_CXX_COMPILER_FORCED 1)
@xingrz
xingrz / UBOOT.md
Created October 15, 2023 13:24
Raspberry Pi 4B, U-Boot, Zephyr
@xingrz
xingrz / README.md
Last active April 21, 2022 06:00
Typed NodeJS.EventEmitter
const emitter: TypedEventEmitter<{
  start: () => void;
  stop: () => void;
  progress: (progress: number) => void;
}> = new EventEmitter();

emitter.on('progress', (progress) => {
  // foo
});
@xingrz
xingrz / Makefile
Created January 1, 2020 14:31
Extract an update.zip
SOURCE := $(TARGET).zip
MOUNT := $(TARGET)/.mount
BOOT := $(TARGET)/boot
SYSTEM := $(TARGET)/system
VENDOR := $(SYSTEM)/vendor
BOOT_IMG := $(TARGET)/boot.img
@xingrz
xingrz / roomservice.xml
Last active January 25, 2024 11:13
Build minimal-manifest-twrp/platform_manifest_twrp_omni on macOS 10.14
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Re-add removed Darwin toolchain -->
<project path="prebuilts/clang/host/darwin-x86" name="platform/prebuilts/clang/host/darwin-x86" groups="pdk,darwin" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" groups="pdk,darwin,arm" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" groups="pdk,darwin,arm" clone-depth="1" />
<project path="prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" groups="pdk,darwin" clone-depth="1" />
<project path="prebuilts/go/darwin-x86" name="platform/prebuilts/go/darwin-x86" groups="darwin,pdk,tradefed" clone-depth="1" />
<project path="prebuilts/python/darwin-x86/2.7.5" name="platform/prebuilts/python/darwin-x86/2.7.5
@xingrz
xingrz / Makefile
Last active April 11, 2022 14:49
Extract a system-as-root update.zip
SOURCE := $(TARGET).zip
MOUNT := $(TARGET)/.mount
BOOT := $(TARGET)/boot
ROOT := $(TARGET)/system
VENDOR := $(ROOT)/vendor
PAYLOAD_BIN := $(TARGET)/payload.bin
function get_build() {
if [[ "$MK_BUILD" ]]; then
echo $MK_BUILD
elif [[ "$LINEAGE_BUILD" ]]; then
echo $LINEAGE_BUILD
elif [[ "$CM_BUILD" ]]; then
echo $CM_BUILD
fi
}
{
"Image_Build_IDs": {
"adsp": "ADSP.VT.4.0-00313-SDM660-1",
"apps": "LA.UM.6.1.r1-09900-sdm660.0-1",
"boot": "BOOT.XF.1.4-00235-S660LZB-1",
"btfm": "BTFM.CHE.2.1.1.c2-00037-QCACHROMZ-1",
"cdsp": "CDSP.VT.1.0-00210-SDM660-1",
"common": "SDM660.LA.1.0-00511-STD.PROD-1.119506.1.121167.1",
"cpev2": "CPE.TSF.2.0-00006-W9335AAAAAAAZQ-1",
"glue": "GLUE.SDM660_LA.1.0-00171-NOOP_TEST-1",
{
"Image_Build_IDs": {
"adsp": "ADSP.VT.4.0-00313-SDM660-1",
"apps": "LA.UM.6.1.r1-09900-sdm660.0-1.124834.1.125998.1",
"boot": "BOOT.XF.1.4-00235-S660LZB-1",
"btfm": "BTFM.CHE.2.1.1.c2-00037-QCACHROMZ-1.124834.1.125998.1",
"cdsp": "CDSP.VT.1.0-00210-SDM660-1",
"common": "SDM660.LA.1.0-00511-STD.PROD-1.125998.4.128983.2",
"cpev2": "CPE.TSF.2.0-00006-W9335AAAAAAAZQ-1",
"glue": "GLUE.SDM660_LA.1.0-00171-NOOP_TEST-1",
{
"Image_Build_IDs": {
"adsp": "ADSP.VT.4.0-00313-SDM660-1",
"apps": "LA.UM.6.1.r1-09900-sdm660.0-1.124834.1.125998.1",
"boot": "BOOT.XF.1.4-00235-S660LZB-1",
"btfm": "BTFM.CHE.2.1.1.c2-00037-QCACHROMZ-1.124834.1.125998.1",
"cdsp": "CDSP.VT.1.0-00210-SDM660-1",
"common": "SDM660.LA.1.0-00511-STD.PROD-1.125998.4.128983.2",
"cpev2": "CPE.TSF.2.0-00006-W9335AAAAAAAZQ-1",
"glue": "GLUE.SDM660_LA.1.0-00171-NOOP_TEST-1",