Skip to content

Instantly share code, notes, and snippets.

View robertfoss's full-sized avatar

Robert Foss robertfoss

View GitHub Profile
@robertfoss
robertfoss / .config
Created January 20, 2022 16:48
HDK888 Downstream Kconfig
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.4.86 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Android (6877366 based on r383902b1) clang version 11.0.2 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_LD_IS_LLD=y
CONFIG_CLANG_VERSION=110002
CONFIG_CC_CAN_LINK=y
@robertfoss
robertfoss / .gitconfig
Created February 27, 2021 11:39
git b4
[alias]
b4 = "!f() \
{\
b4 am $1 -l -o /tmp/ 2>&1 | \n\
$( \n\
mbx=$( \n\
awk '/^Writing .*\\.mbx/{ print $2 }' \n\
); \n\
[ -z \"$mbx\" ] || \n\
git am \"$mbx\" 1>&2; \n\
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.7.0-rc3 Kernel Configuration
#
#
# Compiler: aarch64-linux-gnu-gcc (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=80400
#!/usr/bin/env python3
import cv2
import numpy
import argparse
# MIPI 10-bit packed Bayer format
# This is a single-plane, 10-bit per pixel, densely packed.
# Each 4 consecutive pixels are packed into 5 bytes (40 bits).
# Each one of the first 4 bytes contains the top 8 bits of each pixel.
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#!/bin/bash
set -e
function finish {
sudo udisksctl unmount -b $LOOP_PATH
sudo udisksctl loop-delete -b $LOOP_PATH
img2simg $IMG_INPUT $SIMG_OUTPUT
echo "Updated image $SIMG_OUTPUT"
}
#!/bin/bash
# Exit on any error
set -e
# Script expects path of kernel repo to be `linux` and located next to the location of this script
# Normally configured using
$PRODUCT=db845c
@robertfoss
robertfoss / vendor_diff_size_linux.sh
Created February 6, 2020 14:27
Compare the diff size between upstream and vendor kernels
#!/bin/bash
# This script is intended to be run from an already existing linux git repo.
# Remove crud from version name
function clean_version()
{
echo $(echo "$1" | cut -f1 -d"-" )
}
#!/usr/bin/python3
import argparse
import os
import sys
import subprocess
def runTest(testName, startIdx):
ret = 0
glctsPath = args.list + "/../../../../../../.."
#!/bin/bash
# This script is intended to be run from an already existing linux git repo.
# Remove crud from version name
function clean_version()
{
echo $(echo "$1" | cut -f1 -d"-" )
}