Skip to content

Instantly share code, notes, and snippets.

@drinkcat
drinkcat / Xorg.1.log
Created February 20, 2014 17:08
Xorg log, precise on C720
[ 7066.401]
X.Org X Server 1.11.3
Release Date: 2011-12-16
[ 7066.402] X Protocol Version 11, Revision 0
[ 7066.402] Build Operating System: Linux 2.6.42-23-generic x86_64 Ubuntu
[ 7066.402] Current Operating System: Linux localhost 3.8.11 #1 SMP Wed Jan 29 23:31:03 PST 2014 x86_64
[ 7066.402] Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 2097152 verity payload=PARTUUID=67be82bf-b5a2-6a49-bfda-aa142d9cb337/PARTNROFF=1 hashtree=PARTUUID=67be82bf-b5a2-6a49-bfda-aa142d9cb337/PARTNROFF=1 hashstart=2097152 alg=sha1 root_hexdigest=f7d8ec0d0c9f9b58cac161fa9707cefed2593e66 salt=c1076dcdf8200314877740fef74339266fbdf60b93e0907492df7d6414c3dafc" noinitrd vt.global_cursor_default=0 kern_guid=67be82bf-b5a2-6a49-bfda-aa142d9cb337 add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lap
@drinkcat
drinkcat / testsig.sh
Last active August 29, 2015 13:59
Test if kernel is signed
verifykernelsig() {
dev_debug_vboot -c -i "`rootdev -s -d`" | tee /tmp/dev_debug_vboot
echo "Checking output:"
cat /tmp/dev_debug_vboot | mawk '
!/^ / {
label = ""
}
/^Kernel / {
sub(/:$/, "", $2)
( "blkid -o value -s PARTLABEL " $2) | getline label
@drinkcat
drinkcat / 2014-06-13_02-21-12_drinkcat_chroagh_x11test.tmp_35.html
Last active August 29, 2015 14:02
OpenGL machine vs release matrix
<html><body><pre>
2014-06-13_02-21-12_drinkcat_chroagh_x11test.tmp_35/
</pre><table border=1>
<tr><td></td>
<td>wheezy</td>
<td>jessie</td>
<td>sid</td>
<td>kali</td>
<td>precise</td>
<td>saucy</td>
@drinkcat
drinkcat / downgrade.sh
Last active August 29, 2015 14:02
Downgrade Mesa to version 8 for >precise on kernel 3.4
echo -n "libegl1-mesa_8.0.4-0ubuntu0.7_amd64.deb libegl1-mesa-drivers_8.0.4-0ubuntu0.7_amd64.deb libgl1-mesa-dri_8.0.4-0ubuntu0.7_amd64.deb libgl1-mesa-glx_8.0.4-0ubuntu0.7_amd64.deb libglapi-mesa_8.0.4-0ubuntu0.7_amd64.deb libgles2-mesa_8.0.4-0ubuntu0.7_amd64.deb" | xargs -d' ' -I{} wget http://mirrors.kernel.org/ubuntu/pool/main/m/mesa/{}
wget http://mirrors.kernel.org/ubuntu/pool/main/libd/libdrm/libdrm-nouveau1a_2.4.46-1ubuntu0.0.0.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/llvm-3.0/libllvm3.0_3.0-4ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/u/udev/libudev0_175-0ubuntu9.5_amd64.deb
sudo apt-get install libwayland0
sudo dpkg -r --force-depends libwayland-egl1-mesa
sudo dpkg -i *.deb
@drinkcat
drinkcat / x11-downgrade
Last active August 29, 2015 14:03
Downgrade Mesa to version 8 for >precise on kernel 3.4 (improved)
#!/bin/sh -e
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Add this target by using -T /path/to/x11-downgrade at install/update time
#
# This target is easily removed by running
# rm /etc/apt/sources.list.d/precise.list
# rm /etc/apt/preferences.d/precise-mesa-pin
@drinkcat
drinkcat / debootstrap.log
Created August 17, 2014 03:29
sid bootstrap error
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing description
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 5 package 'dpkg':
missing architecture
Selecting previously unselected package base-passwd.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack .../base-passwd_3.5.33_amd64.deb ...
Unpacking base-passwd (3.5.33) ...
dpkg: base-passwd: dependency problems, but configuring anyway as you requested:
base-passwd depends on libc6 (>= 2.8); however:
@drinkcat
drinkcat / gist:8209d412a25a1a0f79f6
Created October 7, 2014 20:25
Mount ext4 loop/dm device on FAT32
#!/bin/sh
set -e -x
losetup /dev/loop10 ext4.bin_01
losetup /dev/loop11 ext4.bin_02
size1=$(blockdev --getsz /dev/loop10)
size2=$(blockdev --getsz /dev/loop11)
dmsetup create crouton << EOF
0 $size1 linear /dev/loop10 0
@drinkcat
drinkcat / lastseen.sh
Created January 7, 2015 19:06
Last time a given Chromium OS was active in any stable channel
#!/bin/sh -e
set -e
wget http://cros-omahaproxy.appspot.com/history -O history
grep "stable-channel" history | awk -F, '
{
"date -d\"" $1 "\" +\"%s\"" | getline date
version=$2
@drinkcat
drinkcat / gist:6482317
Last active December 22, 2015 13:58
awk version of branch matching
ADHD_HEAD="`awk '
BEGIN {
crosver = "'"$CROS_VER"'"
crosvers[0] = crosver
while (sub(/\.[^.]*$/, "", crosver))
crosvers[length(crosvers)] = crosver
bestmatch = length(crosvers)-1
}
sub(/refs\/heads\//, "", $2) {
@drinkcat
drinkcat / gist:6559868
Created September 14, 2013 08:12
Intellij Idea Community Edition console output
OpenJDK Runtime Environment (IcedTea 2.3.9) (ArchLinux build 7.u21_2.3.9-4-armv7h)
OpenJDK Zero VM (build 22.0-b10, mixed mode)
WARNING: You are launching the IDE using OpenJDK Java runtime.
ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either IDEA_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
See http://ow.ly/6TuKQ for more info on switching default JDK.