Skip to content

Instantly share code, notes, and snippets.

View hyphop's full-sized avatar
😁
be happy

Art Nikpal hyphop

😁
be happy
View GitHub Profile
@hyphop
hyphop / vim4-coreelec-create-oowow-image.md
Last active October 12, 2022 06:35
vim4-coreelec-create-oowow-image

How-to prepare oowow-image with meta information

# setup
IMAGE=CoreELEC-Amlogic-ne.arm-20.0-Nexus_nightly_latest-Khadas_VIM4.img.gz

# download original image
wget https://relkai.coreelec.org/oowow/$IMG

# unpack and rename to common filename style
@hyphop
hyphop / 0001-config-boards-VIM4.conf-user-can-define-UBOOT_DEFCON.patch
Created January 6, 2022 03:33
0001-config-boards-VIM4.conf-user-can-define-UBOOT_DEFCON.patch
From bb92b64da8e0b3673cbf907a0bef4da384b03909 Mon Sep 17 00:00:00 2001
From: Artem Lapkin <art@khadas.com>
Date: Thu, 30 Dec 2021 12:35:48 +0800
Subject: [PATCH] config/boards/VIM4.conf: user can define UBOOT_DEFCONFIG
UBOOT_GIT_BRANCH LINUX_GIT_BRANCH
Signed-off-by: Artem Lapkin <art@khadas.com>
---
config/boards/VIM4.conf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@hyphop
hyphop / VIM4 uboot mmc read problem.txt
Created August 18, 2021 02:51
VIM4 uboot mmc read problem
kvim4# mw 1000 0 aa; load mmc 0 1000 /extlinux/extlinux.conf; md 1000 aa
556 bytes read in 3 ms (180.7 KiB/s)
00001000: 7b92369b c3b5956b f63e5948 7c99cef0 .6.{k...HY>....|
00001010: 14e85752 570a444c 540c2f93 376ac390 RW..LD.W./.T..j7
00001020: c92e0ee2 534b6141 0a7151c6 ccf93547 ....AaKS.Qq.G5..
00001030: cbeaa320 2299eb7f cd775e52 ff535f64 ......"R^w.d_S.
00001040: c55ba374 df591f2e d918832c a1706e8c t.[...Y.,....np.
00001050: c6103652 c80d3461 c0f407d8 1d380da4 R6..a4........8.
00001060: 2cb9b5c6 2ef47e31 2ceb751a c0a560e4 ...,1~...u.,.`..
00001070: c4db67f8 b74a43dd c4d1829b b74a43dd .g...CJ......CJ.
@hyphop
hyphop / i2s vim3l dtb.txt
Last active August 9, 2021 08:20
i2s vim3l
cd /boot/dtb
cp kvim3l_linux.dtb kvim3l_linux.dtb.org
dtc -Idtb kvim3l_linux.dtb > kvim3l_linux.dts
dtc -Idtb kvim3l_linux.dtb > kvim3l_linux.dts.org
# need to change this node aml-audio-card,dai-link@0 / codec
# need only output i2s
# grep -B19 -A4 "sound-dai = <0x71 0x71 0x73>;" kvim3l_linux.dts
sed "s/sound-dai = <0x71 0x71 0x73>;/sound-dai = <0x71>;/" kvim3l_linux.dts.org > kvim3l_linux.dts
dtc -Odtb kvim3l_linux.dts > kvim3l_linux.dtb
# DONE
@hyphop
hyphop / advanced XZ compression (XZE).md
Last active July 16, 2021 11:10
advanced XZ compression (XZE)
@hyphop
hyphop / freebsd.nvme.boot.log
Created July 12, 2021 07:03
freebsd.nvme.boot.log
growfs: /: cannot reload filesystem: Input/output error
Setting hostuuid: 33613334-3230-3237-6336-643030633930.
Setting hostid: 0x8aff0c18.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Starting file system checks:
Cannot find file system superblock
Cannot find file system superblock
Warning! Some of the devices might not be available; retrying
Restarting file system checks:
root@Khadas:/boot# file initrd.img-5.12.0
initrd.img-5.12.0: LZ4 compressed data (v0.1-v0.9)
root@Khadas:/boot# file uInitrd
uInitrd: u-boot legacy uImage, uInitrd, Linux/ARM 64-bit, RAMDisk Image (Not compressed), 39022725 bytes, Thu Jun 3 02:05:32 2021, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xACF3EFC5, Data CRC: 0x261ED017
root@Khadas:/boot# uname -a
Linux Khadas 5.12.0 #1.0.6 SMP Thu Jun 3 08:59:05 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
root@Khadas:/boot# lsmod
Module Size Used by
zram 40960 8
snd_soc_hdmi_codec 24576 1
@hyphop
hyphop / upgrade_mcu.sh
Last active April 29, 2021 01:48
upgrade_mcu.sh
#!/bin/bash
# one-line usage
# /bin/bash -c "$(curl -jkL https://gist.githubusercontent.com/hyphop/e0f61b9368b22c9dc806171af3346e2b/raw/777fce5586d8921e719f382f8ac3b1da55cb2204/upgrade_mcu.sh)"
echo "[i] Tone Board MCU upgrade (online script) - PRESS ANY KEY or Escape by Ctrl+C"
read l
cd ~
mkdir tone_upgrade
@hyphop
hyphop / tone2usb.txt
Created March 29, 2021 03:07
tone 2 usb
lsusb -v -d3353:a002
Bus 003 Device 009: ID 3353:a002 Khadas Tone2 Pro
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2