Skip to content

Instantly share code, notes, and snippets.

View danielml3's full-sized avatar

Daniel danielml3

View GitHub Profile
@danielml3
danielml3 / crunch-blocking.sh
Last active November 17, 2024 09:12
Crunches perf-stat data for comparing dgemm block sizes
#!/bin/bash
set -e
matrix=$1
[ -z $matrix ] && exit 1
perf_output_file=perf_output.tmp
events="L1-dcache-loads,L1-dcache-stores,L1-dcache-load-misses,LLC-loads,LLC-stores LLC-load-misses,LLC-store-misses,duration_time"
#!/system/bin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/25-customprops.sh
#
. /postinstall/tmp/backuptool.functions
case "$1" in
@danielml3
danielml3 / kernel-build.sh
Last active November 21, 2024 06:26
Build a QCOM GKI kernel with external modules and generate the module.load files
#!/bin/bash
set -e
KERNEL_TOOLS=/home/daniel/android/lineage-21.0/prebuilts/kernel-build-tools/linux-x86/bin/
CLANG_PATH=/home/daniel/android/lineage-21.0/prebuilts/clang/host/linux-x86/clang-r487747c/bin/
export PATH="$KERNEL_TOOLS:$CLANG_PATH:$PATH"
TARGET=$1
@danielml3
danielml3 / flash_all_ofp.py
Created August 26, 2023 11:00
Python script for generating a flash_all.sh shell script from a decompressed OFP to flash all A/B & super partitions
import xml.etree.ElementTree as ET
import os
tree = ET.parse('ProFile.xml')
fastboot_cmds = ["fastboot set_active a"]
def AppendFastbootCmd(partition, image):
cmd = "fastboot flash %s %s" % (partition, image)
fastboot_cmds.append(cmd)