Skip to content

Instantly share code, notes, and snippets.

@ssvb
ssvb / gist:9078129
Created February 18, 2014 19:28
memtester + glmark2-es2 test on cubietruck & linux-sunxi 3.479 kernel
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4.79-sun7i-00002-g9fdabc4-dirty (ssvb@i7) (gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.3, pie-0.5.5) ) #1 SMP PREEMPT Tue Feb 11 20:37:59 EET 2014
[ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun7i
[ 0.000000] Memory Reserved:
[ 0.000000] SYS : 0x43000000 - 0x4300ffff ( 64 kB)
[ 0.000000] G2D : 0x50000000 - 0x50ffffff ( 16 MB)
const char *vertex_shader_source =
"uniform mat4 modelviewprojectionMatrix;\n"
"\n"
"attribute vec4 in_position; \n"
"attribute vec2 in_coord; \n"
" \n"
"varying vec2 coord; \n"
" \n"
"void main() \n"
"{ \n"
@ssvb
ssvb / gist:ca2bd3a38b1db4e96e7d
Created May 26, 2014 21:03
Cubietruck dqs_gating_delay
== Cubietruck & FAST_MBUS ==
before dqs gate training: rslr0=00000000, rdgr0=00000055
after dqs gate training: rslr0=00000249, rdgr0=000000AA
dqs_gating_delay=06060606
== Cubietruck without FAST_MBUS ==
before dqs gate training: rslr0=00000000, rdgr0=00000055
after dqs gate training: rslr0=00000249, rdgr0=000000AA
@ssvb
ssvb / gist:acae1dcb6156f4118733
Created September 23, 2014 20:35
dmesg from noname 10" tablet
<6>[ 0.000000] Booting Linux on physical CPU 0
<5>[ 0.000000] Linux version 3.4.0+ (mono@mono-linux.com) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70) ) #2 SMP PREEMPT Fri Apr 25 18:26:17 CST 2014
<4>[ 0.000000] Machine: gs702c
<4>[ 0.000000] xml_buf_start_phys:0x428d8c0, xml_buf_len:0x3f000
<4>[ 0.000000] bin_cfg_xml_buf_start_phys:0x428e760, bin_cfg_xml_buf_len:0x9000
<4>[ 0.000000] pinctrl_buf_start_phys:0x207c000, pinctrl_buf_len:0xad60
<4>[ 0.000000] tag: dvfslevel: 0x40710503
<4>[ 0.000000] tag: icversion: 0x43
<4>[ 0.000000] board_opt 0, flags 0x0
<4>[ 0.000000] tag: boot_dev 0
@ssvb
ssvb / gist:1652ad034c3247c84d6f
Created October 6, 2014 13:54
Primo81 meminfo
DRAM Clock: 720MHz
/*
* DRAM COM Registers
*/
SDR_COM_CR = 0x005339e4;
SDR_COM_000 = 0x005339e4;
SDR_COM_CCR = 0x00000015;
SDR_COM_004 = 0x00000015;
SDR_COM_008 = 0x00022040;
SDR_COM_MFACR = 0x00800302;
@ssvb
ssvb / 0001-HACK-Enable-MUSB-CDC_COMPOSITE-in-sun7i-defconfig.patch
Created October 7, 2014 20:40
0001-HACK-Enable-MUSB-CDC_COMPOSITE-in-sun7i-defconfig.patch
From f45b37f97e552654bdd01df7cccff1f1cf2a039d Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Date: Tue, 7 Oct 2014 00:09:56 +0300
Subject: [PATCH] HACK: Enable MUSB & CDC_COMPOSITE in sun7i defconfig
Also change tristate->bool in order to be able to statically
compile CDC_COMPOSITE.
---
arch/arm/configs/sun7i_defconfig | 28 +++++-----------------------
drivers/usb/musb/Kconfig | 16 ++++++++--------
crossdev --l 1.19.0 -oO /var/overlays/crossdev --without-headers --g 4.7.2 --genv 'USE="-fortran -mudflap -nls -openmp multilib" EXTRA_ECONF="--with-mode=thumb --with-cpu=cortex-m4 --with-float=hard --with-fpu=fpv4-sp-d16"' --b 2.22-r1 -s4 -t arm-none-eabi"
--genv 'USE="-fortran -mudflap -nls -openmp multilib" EXTRA_ECONF="--with-cpu=cortex-a8 --with-float=hard --with-fpu=neon"' -s4 -t armv7a-hardfloat-linux-gnueabi
crossdev --binutils 2.23.2 --kernel 3.13 --libc 2.19-r1 --gcc 4.8.2 --genv 'USE="-fortran -mudflap -nls -openmp multilib" EXTRA_ECONF="--with-cpu=cortex-a8 --with-float=hard"' -t arm-none-linux-gnueabi
cryptsetup -v --cipher serpent-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sdb
From: http://www.semanticlab.net/index.php/Encryption_hacks
@ssvb
ssvb / gist:1234b339474de8bb3d8a
Created December 4, 2014 15:06
1680x1050 EDID info
[ 63.004] (II) NOUVEAU(1): EDID for output VGA-1
[ 63.004] (II) NOUVEAU(1): Manufacturer: GSM Model: 4e47 Serial#: 379039
[ 63.004] (II) NOUVEAU(1): Year: 2007 Week: 2
[ 63.004] (II) NOUVEAU(1): EDID Version: 1.3
[ 63.004] (II) NOUVEAU(1): Analog Display Input, Input Voltage Level: 0.700/0.700 V
[ 63.004] (II) NOUVEAU(1): Sync: Separate SyncOnGreen
[ 63.004] (II) NOUVEAU(1): Max Image Size [cm]: horiz.: 43 vert.: 27
[ 63.004] (II) NOUVEAU(1): Gamma: 2.20
[ 63.004] (II) NOUVEAU(1): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
[ 63.004] (II) NOUVEAU(1): First detailed timing is preferred mode
@ssvb
ssvb / test.S
Created December 23, 2014 13:07
Test of the radare2 graphviz graphs
/* gcc -c test.S */
#ifdef __arm__
.syntax unified
#define sub subs
#define jz beq
#define jmp b
#define ret bx lr