Skip to content

Instantly share code, notes, and snippets.

@KunYi
KunYi / rgtool.go
Created November 10, 2023 07:32
DHI800 Oscilloscope option license generator
package main
/*
the code from https://gitlab.com/riglol/rigolee/hdo-tools
modify for DHO800
*/
import (
"bytes"
"crypto/aes"
"encoding/binary"
"errors"
@KunYi
KunYi / docker-compose.yml
Created August 1, 2023 07:43
for iotsharp & iotgateway testing
version: '3.4'
services:
pgsql:
image: postgres
restart: always
ports:
- 5432:5432
volumes:
- ./data/postgresql:/var/lib/postgresql/data
environment:
@KunYi
KunYi / entrycontainer.sh
Last active July 17, 2023 09:36
entry container for android 6 with intel platform
#!/bin/bash
WORKSPACE=$PWD
docker run --privileged -it \
--rm \
--volume=${WORKSPACE}:/droid \
--hostname droid-build \
android-build-trusty:latest
exit 0
@KunYi
KunYi / build-container4droid6.sh
Created July 17, 2023 09:10
build container for droid6 development
#!/bin/bash
cp ~/.gitconfig ./gitconfig
docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) --tag android-build-trusty:latest .
@KunYi
KunYi / Dockerfile
Created July 17, 2023 09:08
Dockerfile for build Android 6/Intel platform
FROM ubuntu:14.04
ARG userid
ARG groupid
ARG username
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev \
gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev \
lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python openjdk-7-jdk \
&& apt-get install -y python mingw32 tofrodos \
&& apt-get install -y squashfs-tools efitools bc ccache tesseract-ocr \
@KunYi
KunYi / qemu_4.2.log
Created January 27, 2023 11:24
use ubuntu-dev-tools to get qemu source
kunyi@civ-build:/tmp$ pull-lp-source qemu focal
Found qemu 1:4.2-3ubuntu6.24 in focal
Public key not found, could not verify signature
Downloading qemu_4.2.orig.tar.xz from archive.ubuntu.com (59.340 MiB)
Downloading qemu_4.2-3ubuntu6.24.debian.tar.xz from archive.ubuntu.com (0.305 MiB)
gpgv: Signature made Thu Dec 8 20:22:20 2022 CST
gpgv: using RSA key B35EBCD35C6717BC0ADEB08AEC873ACED468723C
gpgv: issuer "[email protected]"
gpgv: Can't check signature: No public key
dpkg-source: warning: failed to verify signature on ./qemu_4.2-3ubuntu6.24.dsc
@KunYi
KunYi / mdio_reg.c
Created November 9, 2022 03:52
using MDIO to access PHY registers
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/mii.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <linux/sockios.h>
@KunYi
KunYi / .bashrc
Created October 21, 2022 05:26
my bashrc settings backup
# for golang
if [ -x /usr/local/go/bin ]; then
export PATH=$PATH:/usr/local/go/bin
fi
# for launch colorful minicom
alias minicom='minicom -c on -R utf8'
# download cache of yocto
if [ -d ~/yocto_cache/download ]; then
@KunYi
KunYi / Forlink OK6254-C U-Boot.log
Created October 16, 2022 07:15
Forlink OK6254-C Single Board Bootloader message!
@KunYi
KunYi / Build TI AM62x Kernel for Android.log
Created September 16, 2022 07:27
build TI AM625x Kernel for Android
kunyi@kunyi-ThinkPad-P53:/tmp/a53$ cd ${YOUR_PATH}/ti-kernel-aosp/
kunyi@kunyi-ThinkPad-P53:~/08_03_00/ti-kernel-aosp$ export DIST_DIR=${YOUR_PATH}/ti-aosp/device/ti/am62x-kernel/kernel/5.10
kunyi@kunyi-ThinkPad-P53:~/08_03_00/ti-kernel-aosp$ export BUILD_CONFIG=./imgtech-module/build.config.imgtech
kunyi@kunyi-ThinkPad-P53:~/08_03_00/ti-kernel-aosp$ build/build.sh
========================================================
Setting up for build
+ cd common
+ make LLVM=1 DEPMOD=depmod O=/home/kunyi/08_03_00/ti-kernel-aosp/out/android13-5.10/common mrproper
make[1]: Entering directory '/home/kunyi/08_03_00/ti-kernel-aosp/out/android13-5.10/common'
CLEAN arch/arm64/crypto