Skip to content

Instantly share code, notes, and snippets.

View ayufan's full-sized avatar

Kamil Trzciński ayufan

View GitHub Profile
@ayufan
ayufan / boot0.log
Created January 3, 2017 15:17
Pine A64 boot0 fails to start u-boot
boot0 commit : 0bc348ab272ad81a4faf128ef38f4724f36fded6
boot0 version : 4.0.0
set pll start
set pll end
rtc[0] value = 0x00000000
rtc[1] value = 0x00000000
rtc[2] value = 0x00000000
rtc[3] value = 0x00000000
rtc[4] value = 0x00000000
static int i2cB_clock( void )
{
int sample = 0;
sunxi_lcd_delay_us(5);
IIC_SCLB_HIGH();
sunxi_lcd_delay_us(5);
IIC_SCLB_LOW();
return (sample);
}
[ 179.656929] PM: suspend devices took 1.150 seconds
[ 179.662376] [pm]prepare
[ 179.665735] PM: late suspend of devices complete after 0.698 msecs
[ 179.673403] PM: noirq suspend of devices complete after 0.726 msecs
[ 179.680385] [pm]prepare_late
[ 179.685731] Disabling non-boot CPUs ...
[ 179.691857] CPU1: shutdown
[ 179.694838] psci: CPU1 killed.
[ 179.703237] CPU2: shutdown
package main
import (
"crypto/tls"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"

Keybase proof

I hereby claim:

  • I am ayufan on github.
  • I am ayufan (https://keybase.io/ayufan) on keybase.
  • I have a public key whose fingerprint is 0442 B363 40A3 074D 812A 6A20 1E99 8518 0FCF BA1E

To claim this, I am signing this object:

@ayufan
ayufan / qemu-arm64.bash
Last active July 6, 2017 11:05
Run KVM machine on AARCH64
set -xe
dd if=/dev/zero of=flash0.img bs=1M count=64
dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
dd if=/dev/zero of=flash1.img bs=1M count=64
wget -c http://ftp.ubuntu-tw.net/ubuntu-cloud-images/xenial/current/xenial-server-cloudimg-arm64-uefi1.img
sudo apt-get install qemu-system-arm qemu-efi
sudo qemu-system-aarch64 -enable-kvm -m 1024 -cpu host -M virt -nographic -pflash flash0.img -pflash flash1.img -drive if=none,file=xenial-server-cloudimg-arm64-uefi1.img,id=hd0 -device virtio-blk-device,drive=hd0 -netdev type=tap,id=net0 -device virtio-net-device,netdev=net0,mac=00:01:02:03:04:05
@ayufan
ayufan / 0013-for-speteck-4G-ddr.patch
Created September 5, 2017 08:49
rock64-speteck-4gb.patch
From 71b77f7f6a331cba94f4c92c2671f116994403ea Mon Sep 17 00:00:00 2001
From: tug <tug@skyth-tek.com>
Date: Mon, 4 Sep 2017 15:40:02 +0800
Subject: [PATCH 13/13] for speteck 4G ddr
Signed-off-by: tug <tug@skyth-tek.com>
---
.../boot/dts/rk322xh-dram-default-timing.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@ayufan
ayufan / rock64_fix_android.sh
Created September 8, 2017 14:26
Rock64 IRQs for Android
echo 2 >/proc/irq/$(busybox awk -F":" "/ehci/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g')/smp_affinity
echo 2 >/proc/irq/$(busybox awk -F":" "/ohci/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g')/smp_affinity
echo 2 >/proc/irq/$(busybox awk -F":" "/dwc_otg/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g')/smp_affinity
echo 4 >/proc/irq/$(busybox awk -F":" "/xhci/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g')/smp_affinity
echo 8 >/proc/irq/$(busybox awk -F":" "/eth0/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g')/smp_affinity
CPU0 CPU1 CPU2 CPU3
6: 0 0 0 0 ROCKCHIP_GPIO_CHIP rk805
7: 0 0 0 0 rk805 rk816_pwrkey_rise
@ayufan
ayufan / rock64_fix_android.sh
Last active September 8, 2017 14:34
Rock64 IRQs for Android
map_irqs() {
aff="$1"
shift
for name in $@; do
for irq in $(busybox awk -F":" "/$name/ {print \$1}" </proc/interrupts | busybox sed 's/\ //g'); do
echo $aff > "/proc/irq/$irq/smp_affinity"
done
done
}
@ayufan
ayufan / sopine-iozone-emmc-5.1.txt
Created October 13, 2017 20:26
SoPine eMMC 5.1 performance (running on SDR mode)
Iozone: Performance Test of File I/O
Version $Revision: 3.429 $
Compiled for 64 bit mode.
Build: linux
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,