Skip to content

Instantly share code, notes, and snippets.

# 选一个磁盘空间充足的目录
mkdir -p ~/ohos-toolchain && cd ~/ohos-toolchain
# 用 llvm-toolchain manifest 初始化(只拉工具链所需仓库,不是完整 OHOS)
repo init -u https://gitcode.com/openharmony/manifest.git -b master -m llvm-22.0.0-toolchain.xml
repo sync -c
# 拉取 LFS 大文件(prebuilts 等)
repo forall -c 'git lfs pull'
https://drive.google.com/file/d/19SJClvnG3pss3srksbFvmZw-byvbB9Ap/view?usp=sharing
$ cat harmonybrew.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJOKcXSBZ1MmsHeDvp7YiqlQ6OhpnhcMHYpHZhdbIBtK harmonybrew
@liangqi
liangqi / gist:3276be964fa394d5daaf2f2ead7737de
Created April 24, 2026 17:40
AI coding - test project - python3 convert meson to cmake
Create a python 3 project to convert meson project to cmake.
* using lexer and parser approach.
Reference:
* meson project: https://github.com/mesonbuild/meson/
* cmake2meson script: https://github.com/mesonbuild/meson/blob/master/tools/cmake2meson.py
Example meson projects:
* https://gitlab.freedesktop.org/wayland/wayland
debian: (not shudders by default)
su
usermod -a -G sudo liangqi
sudo apt install openssh-server net-tools
sudo systemctl enable ssh
sudo systemctl start ssh
sudo apt install -y zsh build-essential perl python3 git
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@liangqi
liangqi / gist:7dcd842183e59db960af1937f2eda9cc
Created February 27, 2025 09:44
glmark2-wayland hang after [terrain] on Thinkpad T14s Gen6 Snapdragon
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 dir=WRITE type=TRANSLATION source=CCU (3736059565,3736059565,3736059565,3736059565)
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 dir=WRITE type=UNKNOWN source=CCU (3736059565,3736059565,3736059565,3736059565)
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 dir=WRITE type=UNKNOWN source=CCU (3736059565,3736059565,3736059565,3736059565)
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 dir=WRITE type=UNKNOWN source=CCU (3736059565,3736059565,3736059565,3736059565)
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 dir=WRITE type=UNKNOWN source=CCU (3736059565,3736059565,3736059565,3736059565)
Feb 27 10:42:17 snapdragon-tp-t14s kernel: *** gpu fault: ttbr0=000000089be9f000 iova=0000000000000040 di
@liangqi
liangqi / gist:208e52cc8be6be2fe617d68ca043dce4
Created August 22, 2024 12:10
glmark2 result on Raspberry Pi OS (arm64) on rpi5(real)
$ glmark2-wayland
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Broadcom
GL_RENDERER: V3D 7.1
GL_VERSION: 3.1 Mesa 23.2.1-1~bpo12+rpt3
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
@liangqi
liangqi / gist:fb8bd2eb279e335944a67c77997af596
Created August 20, 2024 12:27
vkmark result on Ubuntu 24.04 (arm64) on M1 Mac mini(real)
$ vkmark
ERROR: VkInstanceCreateInfo::pApplicationInfo::apiVersion has value of 0 which is not permitted. If apiVersion is not 0, then it must be greater than or equal to the value of VK_API_VERSION_1_0 [VUID-VkApplicationInfo-apiVersion]
=======================================================
vkmark 2017.08
=======================================================
Vendor ID: 0x10005
Device ID: 0x0
Device Name: llvmpipe (LLVM 17.0.6, 128 bits)
Driver Version: 1
Device UUID: 32342e312e307e707265323032343032
@liangqi
liangqi / gist:dcad13da007c92360a6c698be8b4f1f1
Created August 20, 2024 12:26
glmark2 result on Ubuntu 24.04 (arm64) on M1 Mac mini(real)
$ glmark2-wayland
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: Apple M1 (G13G B1)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 24.1.0~pre20240228-1asahi2.24.04
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
@liangqi
liangqi / gist:3c2b5ff7b5ee92224ba503f842bb4631
Created April 12, 2024 19:55
glmark2 result on ubuntu 24.04 beta(arm64) on MBP M3 Max(UTM)
$ glmark2
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: virgl (ANGLE (Apple, Apple M3 Max, OpenGL 4.1 Metal - 88))
GL_VERSION: 2.1 Mesa 24.0.3-1ubuntu4
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
Surface Size: 800x600 windowed