Sitemap
A list of all the posts and pages found on the site. For you robots out there is an XML version available for digesting as well.
Pages
Page Not Found
Page not found. Your pixels are in another canvas.
About
Minimal Mistakes is a flexible two-column Jekyll theme.
Posts
Multiroom Audio Streaming with Snapcast
Build and install snapcast
Create Documentation Website with Docusaurus
npx create-docusaurus@latest yocto.dev classic cd yocto.dev npx docusaurus start
gitlab server with docker-compose
Install gitlab with docker-compose
Install Gitea with Docker
docker-compose
Share adb device with another computer
Android adb device was attached to laptop(C1) running Ubuntu, the other computer also with Ubuntu installed, we call it C2.
Run clang 15 executable on legacy device
For a suspected memory leak issue on a legacy device running OpenWrt build with gcc-8, I need a toolchain with leak sanitizer support, so I try to generate o...
Linux Auto test with Linaro Test-definition
Prepare Test Environment Ubuntu 22.04
Linux Tracing with Perfetto
Build perfetto git clone https://github.com/google/perfetto -b v43.1 git clone https://android.googlesource.com/platform/external/perfetto/ && cd per...
Build Flutter App for Embedded Linux
Flutter SDK git clone https://github.com/sony/flutter-elinux.git sudo mv flutter-elinux /opt/ export PATH=$PATH:/opt/flutter-elinux/bin:/opt/flutter-elinux/f...
Sentry Native for MIPS Linux
Prerequisite
Linux C Crash Reporting with Sentry
Preparation
Analyzing Linux C Code with CodeChecker
Install CodeChecker and dependencies
Analyzing Linux C Code with Facebook Infer
Build infer ```sh sudo apt install libstdc++-12-dev linux-libc-dev:i386 gcc-multilib sudo ln -sf /usr/include/x86_64-linux-gnu/asm /usr/include/asm git clone...
Create Toolchain with Crosstool-NG
Preparation sudo apt install -y flex help2man libtool-bin bison libncurses5-dev wget -c http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar...
Test Linux on ROC-RK3328-CC with LTP
Cross compile ltp
Yocto for Firefly ROC-RK3328-CC
Add machine roc-rk3328-cc
Detect Memory Leak with gperftools
Build libtcmalloc
Using perf-tools in embedded linux
perf-tools is a collection of performance analysis tools based on perf events developed by Brendan Gregg, perf-tools are widely used on linux server and can ...
Build Linux Perf for MIPS
The perf tool has been tested with ingenic T40.
Memo for Cross Compile
vmstat
Calibre Powered Online Book Store
Generate Calibre Database
Execute Shell Script on Boot
I have built a rootfs with buildroot, rootfs is squashfs with overlayfs support for ease of writting configuration files such as dropbear that needs write pe...
Make Selfhosted Services Public
If you are hosting services at home and want to be accessed from outside, there are couple of options: Cloudflare Tunnel frp nps ngrok
Fixing Authentication Error on Login
This issue happens when I trying to using some app, and cannot failed to install it’s dependancies, commplaining about python3, so I uninstalled python3, apt...
Connect to Home Computer over SSH through Cloudflare
I need to work on my personal projects outside sometimes, when I need to access to my home computer I use RustDesk, but the key map for Ubuntu and macOS are ...
Upload Files to Cow Transfer with Command Line
cowTransfer-uploader is a command line tool that can be used as part of automation, here is the example of how to get download URL and secret code: ```sh mem...
Embedded Linux Process Supervision
For making a real world product, robustness is very important, some process may crash occasionally, this is possible even if the system is passed all kinds o...
Build Famliy Album with PhotoPrism
After I uploaded my photos to nextcloud, I realized, nextcloud is probably not a good choice for hosting photos, so this time I try to manage these photos wi...
File Sharing with File Browser
Previously, I use cowtransfer to share files with our partners, thanks to cowtransfer-uploader, it is very convenient for automation, this changed recently, ...
fzf reports ‘parse error near `done’
This is a long last issue that happens every time I open a new tab or open iTerm, I thought it was a issue of fzf, and it is not, actually, because reinstall...
Create OpenWrt Style of Patch with Quilt
OpenWrt using its own format of patch file which can be created with quilt. Before creating patches for OpenWrt, we need to create a configuration file for q...
NextCloud with Docker
Previously I deployed a nextcloud container in digitalocean droplet for my note synchronization. This time I want use nextcloud to hold all my documents and ...
Setup Jenkins with Docker
Jenkins is one of the most popular continuous integration solution, I use it both for work and personal project, it provides webUI interface, to save to conf...
Setup Build Environment with Vagrant
As a system engineer, I have to manage various build envrionmets, build all the projects against one Ubuntu version became imposssible, one change for one pr...
Build Toolchain for MIPS
There are many ways to create a toolchain, the most easiest way to do this might be with buildroot, always grab the latest long term support release from off...
Copy Files to Target Board with Dropbear
I got a board with a minimal rootfs, I don’t know how it was created, I have no source code and the rootfs is squashfs, so nothing can be changed, the good t...
Sync Things with Syncthing
I use Syncthing to sync my notes from work desktop compute to vps server, so I can continue my work at home, syncthing is pretty easy to setup and use.
Taking Notes with Vim
I’ve been using Joplin for about 3 months, I love it, than any other note taking apps. Everything works fine until this Tuesday afternoon (around 3:20 PM to ...
Build Embedded Linux System with Yocto Project
Prepare for build yocto project
Joplin: My New Note-taking Solution
Update: I switched to vim+git for note-taking this week because Joplin deleted a lot of my notes by accident, I put this post here for reference only, I m...
Reboot Android Device without Using reboot
Command
When I am writing plugin for workload automation, I met a issue that execution will fail when I want to enter android recovery mode with: self.target.execute...
Cheatsheet
tmux
One-Liners
Bash
Setup Development Environment with Ansible
Prerequsite
Build Your Own Private Cloud with NextCloud
After trying many note taking apps I decide to use Joplin which is an open source project, there are many options out there for synchronizing the notes via O...
Monitoring Android with Prometheus and Grafana
Android operation system is becoming more and more complicated as time goes by, some system issues are hard to diagnostic, and not easy to reproduce, Android...
Monitoring Embedded Devices with Munin
Recently I was debugging a system hang problem on arm board, I reproduced this issue once, and noticed when this occurred, the interrupts on can interface is...
Blink Sketch on ESP8266
Making blink LED working with Arduino on ESP8266 is incredibly easy, with just a few clicks, of course you need to install Arduino IDE first, download the la...
Run MicroPython on ESP8266
MicroPython is a python implementation aimed to be running on MCUs such as ESP8266/ESP32, stm32 etc, all the ports can be found here, the following will only...
Build NodeMCU Firmware for ESP8266
NodeMCU is one of the most popular firmware for ESP8266 and ESP32 wifi SoCs, the firmware is written in c and has Lua interpreter builtin which is based on L...
Run Zephyr RTOS on ESP32
IoT gains too much attention these years, there are various RTOS are claimed to IoT OS, Zephyr OS is one of them, it is originated from WindRiver and is a pr...
Wireless debugging with esplink
Serial console is always an very important tool when doing low level development such as kernel or bootloader, the most commonly used are the USB to serial c...
Understanding Timing Parameters in Nand Flash Controller
The NAND flash used in mini2440 is from Samsung, the part number is K9F2G08U0C, the meaning of it is defined in Samsung Part Number Decoder, we can get the b...
New Year’s Resolution - 2021
Wireless to UART Bridge
Fix a Build Breakage on Inline Function
I’ve done a lot of work on u-boot-2010.09 for MINI2440 to make development process more comfortable, unfortunately, the archived u-boot images were deleted b...
U-Boot: Boot FIT Kernel Image
The way build ramdisk is not an option for me, load both uImage and ramdisk with U-Boot seems not a good way either, and as uImage is a legacy format, there ...
Curated List of Reasons for Boards Stuck on “Starting kernel …”
Machine id mismatch
Bring Latest Linux Kernel to MINI2440
Poring Linux kernel to board is much easier than the age of version 2.6, I want to make an update my school projects, part of this procedure involves the ker...
Build Hello World with Automake
There are lot of IDEs out there can build apps or libraries for you, but this is not the way I like, I prefer the command line, today I am gonna show you how...
Turn Your Raspberry Pi into a JTAG Adapter
I have several Raspberry Pis in hand, they are all not being used for a very long time because of the poor performance of the MMC controller, but it doesn’t ...
Learning Resources
This is a list of resources I used for expanding my knowledge on U-Boot, kernel and other stuff related embedded system.
The ARM Instruction Set
Mnemonic Instruction Action ADC Add with carry Rd: = Rn + Op2 + Carry ADD ...
Internet slangs from mailing list
Abbreviation Meaning IIUC If I Understand Correctly NIH Not Invented Here ...
U-Boot: Understanding lowlevel_init
MINI2440 has two SDRAM chips on board, different version have different chipset, my SDRAM is EM63A165TS-6G from EtronTech, the pin and timing is compatible w...
U-Boot: Understanding Start.S
U-Boot is a universal bootloader for many architectures, the U-Boot image build against current version (u-boot-2020.10) cannot fit the size of stepping zone...
Debugging Mini2440 with OpenOCD
Bring board up for the first time, it usually involves debugging with JTAG, in this post I will be using OpenJTAG for mini2440, showing how to load program w...
Smart Home: Install Home Assistant Supervised
Previously I installed HassOS, it works pretty well except the fact that it is a black box for me at some extent, this time, I take a step further and try to...
An Incomplete Guide to Docker
Install docker on Armbian
Manage Local Media with Jellyfin
Jellyfin is an open source local media management system, it is descended from Emby which is now goes commercial, it can fetch metadata from various website ...
Share Mouse and Keyboard Across Computers with Barrier
Six years ago I use synergy (ver1.5.1) for sharing keyboard and mouse with other computers, which is great, then it became a commercial software, after upgra...
An Introduction to Local Development with Docker Container
Previously I wrote a post about how to setup TV box as a development machine, I cannot take a box everywhere I go, because it is not that convenient to find ...
Build Your Personal English Learning Assistant with Android
I want to improve my English, one way to do this is watching documentaries on TV, but subtitles distract me from the video themselves, I get this around by m...
Smart Home: Install Home Assistant on Docker
This is a quick setup of home assistant with docker compose.
Awesome Apps and Tools
VIM vimrc is the ultimate Vim configuration (vimrc), the author is also the founder of Doist.
A List of Common Reasons for Segmentation Faults
Segment fault are common issues for native developers, it is caused by accessing memory location that is not allowed to, I’m gonna list the possible reasons ...
Reading Notes on BPF Performance Tools
Ch 1 Introduction Ch 2 Technology Background Ch 3 Performance Analysis Ch 4 BCC Ch 5 bpftrace Ch 6 CPUs Ch 7 Memory Ch 8 File Systems Ch 9...
Reading Notes on Systems Performance
Ch 1 Introduction Ch 2 Methodology Ch 3 Operating Systems Ch 4 Observability Tools Ch 5 Applications Ch 6 CPUs Ch 7 Memory Ch 8 File Systems...
Quick File Transfer with QR code
From time to time, I need to transfer files from computer to my android phone, install apk for example, I can use the app store if the app can be found there...
Internet Connection Sharing with Armbian
I need to work while travelling in the following couple of months, so I need all my devices connected to the internet, N1 has a Ethernet port and wireless mo...
Enable pstore for kernel oops/panic dumping
Debugging devices without serial console is big challenge especially for kernel panic issues, pstore (persistent store) writes kernel messages before system ...
Phicomm N1 Box High CPU Usage Due to IRQ-42
While playing Armbian with Phicomm N1 box, I found kernel thread irq/42-0.200908 have very high cpu usage thus cause the load average to around 2, this is a ...
gdb cheatsheet
breakpoint
What Does Tainted Flags Mean in Oops Messages
[ 81.890105] CPU: 3 PID: 890 Comm: insmod Tainted: G O 4.19.108-v8+ #1
Install Pi-hole with Docker on Phicomm N1
Install required packages ```bash $ sudo apt install docker.io -y $ sudo apt install docker-compose -y $ sudo apt install lighttpd -y
Markdown Cheatsheet
Preserve white spaces In macOS, you need to press⌥ Opt+Space
Remove Git Commit from History
Occasionally, you may want to remove a commit from github/gitlab, for example, I pushed a commit to switched the jekyll theme from minima to minimal mistakes...
Random Kernel Debugging Tips
All-zero address shown when do cat /proc/modules echo 0 > /proc/sys/kernel/kptr_restrict # or with sysctl sysctl kernel.kptr_restrict=0
Setup Development Environment on Phicomm T1
Basic Setup
Syzkaller: Coverage-guided Kernel Fuzzer
Syzkaller is a coverage-guided fuzzer for Linux kernel, it was mainly developed by Dmitry Vyukov, and with many other developers, it’s under active developme...
Kernel Debugging With Kgdb
In Kernel memory debugging techniques, we talked about using script decode_stacktrace.sh to translate addresses to lines, or if only interested in one entry ...
Random MacOS Tips
Disable subtitles in VLC by default Go to VLC ➜ Preferences ➜ Subtitles / OSD, enter none in the text box labeled Preferred subtitle language, this works fo...
Highlight Job Description Keywords with WordCloud
Visual images are always more attractive than pure numbers or statistics, that’s why WordCloud are so popular, I am considering look for a new job, and gathe...
Play Armbian OS with Phicomm Box
Armbian is an operation system based on Debian and Ubuntu, created for ARM-based development boards, it also supports a wide variety of TV boxes, and a lot o...
A Proxy to Make Github Access Fly
It is well known that, accessing github in China is a torture, cloning a github repository takes too much time, especially for big project like linux kernel,...
Phicomm R1 Smart Speaker Revived
Wireless Configuration Most smart devices such as speakers, sockets, air conditioners are headless embedded devices, these devices need to be connected to th...
Smart Home: Control Android TV with esphome and androidtv
For a very long time, I want to setup an system that can turn on the TV every morning when I get up and play some video files for English learning, I know I ...
Smart Home: Motion Detection with Android IP Webcam
Home security is always the most import part for smart home system, in this blog post, I will show you how to turn an old android phone into a webcam, and wi...
Smart Home: Getting Started with Home Assistant on Raspberry Pi
Various types of smart devices designed for smart home are developed, part of them can be connected to apple HomeKit, or connected to vendor’s ECO-system, th...
DNS resolution broken after uninstalling Pi-hole
After uninstalling the Pi-hole, I cannot access internet, and not even ping any domain name, finally, I found the nameserver in /etc/resolv.conf was changed ...
Track down the source of android toast
There are many ways to tell which app sends a toast, the most quickest way is to install third-party app such as Toast Source or Toaster, if you don’t want t...
Android procfs demystified – cpuinfo
From cpuinfo in procfs, we get a lot information about the cpu on board, how many cores, architecture etc, here is an example output of cpuinfo of RPI 3B+: `...
Analyzing Android with Battery Historian
Battery Historian is a tool for inspecting battery related issues, it works on android 5.0 and above, this can also be used for analyzing performance since b...
Debugging kernel with dynamic debug
Dynamic debug is a great feature for kernel debugging, kernel must be compiled with CONFIG_DYNAMIC_DEBUG option, if it was enabled, all pr_debug(), dev_dbg()...
Android procfs demystified – sysrq-trigger
The magic SysRq key is a key combination(Alt+SysRq+<cmd>) implemented by linux kernel, it is usually used to get more information for further investiga...
Turn vim into an IDE with spf13-vim
I’ve been using vim for a very long time, my vimrc file is based on Amix’s with minor modifications, I think it’s time to move forward embracing excellent pr...
Correct misspelled commands with thefuck
No one can guarantee that he never make mistakes while using command line, even an experienced user.
Fix apt autoremove report Unmet dependencies
After upgrading my computer to Ubuntu 18.04, I wanna remove unused packages, so I do an apt autoremove, unfortunately it failed with below messages: sudo apt...
Control your Android devices with scrcpy
scrcpy is an open source project developed by Genymobile, it can be used to display and control of your android devices over adb connection. The following fe...
The differences between android build variants
item/flavor eng user userdebug ro.secure 0 1 1 security.perf_harden ...
Android performance monitoring with bcc
Build kernel with bpf support In order to use bpf, kernel should be at least build with these options: +CONFIG_BPF=y +CONFIG_BPF_SYSCALL=y +CONFIG_BPF_EVENTS...
Running LineageOS 16 on Raspberry Pi 3B
Setup Build Environment Follow instructions in Running Android Oreo on Raspberry Pi 3B to setup build environment under Ubuntu.
Scheduling task with crontab
I think schduling a job with crontab should be easy for me, as I am a veteran linux user, the truth is I don’t know crontab, totally.
Kernel memory debugging techniques
Linux kernel has many memory related debug tools to help kernel developers find out memory related issues, these tools are included in upstream kernel: Ke...
Raspberry pi 3B+ arm64 kernel boot message
rpi3:/ # dmesg [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.14.129-v8+ (fdbai@fdbai-desktop) (gcc version 5.4.0 20160609 (...
Learning Linux Shell
Check if a direcotry exists
Android native memory debugging
malloc_debug
Limiting resource usage with cgroups on Android
cgroups on Android cgroups(control groups for short) was created by Google engineers, and was merged into the mainline at 2008 in version 2.6.24, it was main...
Automate FTP transfer with shell script
Android build process takes a very long time, especially on low end computers, after build complete, I wanna transfer the final image to ftp server for furth...
Running LineageOS on Raspberry Pi 3B
Setup Build Environment Follow instructions in Running Android Oreo on Raspberry Pi 3B to setup build environment under Ubuntu.
What I’ve learned from wa output
Workload-automation is a great tool for benchmark automation, it utilizes tools in sdk and android system, including aapt, pm, am etc through devlib, this po...
How to add assets to android apk file
I need to update a firmware binary which was packaged into apk file, unfortunately I do not have the source code of this apk, so I cannot just do mm to regen...
How to do make debugging
Verbose output
How to Debug Shell Scripts
In order to find out where the problem is with my script, I often use echo for debugging, print line number with echo ${LINENO}, but it is not a optimium way...
Running Android Oreo on Raspberry Pi 3B
Setup Build Environment (Ubuntu 16.04)
Find Out Who Deleted a File
Previously I wrote a post about how to use ftrace via trace-cmd, now here comes a real world example showing how to find who deleted a file in Android system.
Generate Call & Caller Graphs with Doxygen
Installation Doxygen using dot from graphviz to generate graphs, install doxygen and its dependency: sudo apt install doxygen -y sudo apt-get install graphvi...
Using Git Like a Pro – aliases
Aliases are created through the use of the git config command, and will be saved to $HOME/.gitconfig, use below two commands to see a list of aliases:
How to split subdirectory into a separate git repository
In this post, I’ll show you how to split tools/perf in linux tree into an separate git repository without losing the commit history.
Using Gerrit on Ubuntu
Install Gerrit First download the latest version of gerrit from Gerrit Releases site:
Shell - batch revert and push to gerrit
This post illustrates how to revert a commit in many branches, say 100 for example, and then push to gerrit server with reviewers added.
Bypass Censorship with v2ray
Server side of v2ray
Build Home Router with OpenWrt – Setup SS Server
Ubuntu 16.04 Shadowsocks 2.8.2 Python 2.7.15rc1
Build Home Router with OpenWrt – Add shadowsocks
Add related packages
Build Home Router with OpenWrt – Add adblock
Add required packages make menuconfig Network » adblock Network » tcpdump LuCI » 3. Applications » luci-app-adblock
Build Home Router with OpenWrt – Add aira2
Add packages make menuconfig Network » File Transfer » aria2 Network » Download Manager » webui-aria2 LuCI » 3. Applications » luci-app-aria2
Build Home Router with OpenWrt – Add miniDLNA
Add miniDLNA related packages
Build Home Router with OpenWrt – USB Storage Auto Mount
Block mount Add CONFIG_PACKAGE_block-mount=y to target/linux/brcm2708/configs/rpi3b_defconfig to get block mount support
Build Home Router with OpenWrt – Add Web Interface
Luci is the default web interface for managing openwrt base home routers, integrate luci with the following patch: diff --git a/target/linux/brcm2708/configs...
Build Home Router with OpenWrt – Setup Wireless
Wireless Setup
Build Home Router with OpenWrt – Works as a Router
In the previous post, We run openwrt image on Raspberry Pi 3B, but that is only bring openwrt up, it is not a router.
Running OpenWrt on Raspberry Pi 3
Checking out OpenWrt code git clone https://www.github.com/openwrt/openwrt
Analyzing Android Boot Time with Bootchart and Systrace
Introduction Bootchart is a great tool for performance analysis and visualization of the Linux/Android boot process, it consists of two parts: data collectio...
Linux Command Cheat Sheet
Basic ```shell find files created today find . -type f -daystart -ctime -1
Must have cool online services
Cool online services
Build kernel image for Raspberry Pi 3B
Download source code git clone --depth=1 https://github.com/raspberrypi/linux.git
Android performance profiling tool - simpleperf
Introduction simpleperf is a native performance profiling tool for Android, like the name indicated, simpleperf is a simplified version of linux-tools-perf w...
An introduction to android systrace
what is systrace
Tracing kernel using ftrace
Ftrace
import code to empty git repo
I am planning to make android pie runnning on our latest proudct, Continuous Integration team has initialized all the git project, inside citrix, but there i...
open source perf tools
Tools Description avocado Avocado is a next generation testing framework inspired by Autotest ...
Enable zram on Android
What is zram Kernel Documentation says it is Compressed RAM based block devices.
Setup Android Development Environment on MacOS
Install Java
Vim tips from zzapper
Best of Vim Tips zzapper 16 Years of Vi + 10+ years of Vim and still learning 31Aug18 : Last Update (Now in VIM Help Format :h helptags) ###These Tips are no...
Android cheatsheet
dumpsys
git cheatsheet
Create a tag git tag -a v1.0 -m "milestone: v1" git push --tags
Awesome websites
Technology News
Create new post with jekyll-compose
Installation