Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import asyncio
import sys
import pexpect
@asyncio.coroutine
def run():
cmd = ' '.join([
sys.executable,
'-c \'raise SystemExit("Blorp")\''
/* Compile with "gcc -o weirdness weirdness.c" */
#include <stdio.h>
int main(void)
{
fprintf(stderr, "Blorp.\n");
}
#!/usr/bin/env python3
import asyncio
import sys
import pexpect
@asyncio.coroutine
def run():
p = pexpect.spawn('./weirdness')
while True:
#!/usr/bin/env python3
import asyncio
import sys
import pexpect
@asyncio.coroutine
def run():
p = pexpect.spawn('./weirdness')
while True:
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
ylims = (-50, 150)
fig = plt.figure()
axes = fig.add_axes([0.12,0.1,0.83,0.85])
axes.set_yscale("linear")
axes.yaxis.set_major_locator(MultipleLocator(base=10))
axes.set_ylim(ylims)
@detly
detly / config
Created January 12, 2016 06:30
live-build config
#!/bin/sh
set -e
if [ -z "${HAN_APT_CACHE}" ] ; then
MIR_PREFIX="http://"
else
MIR_PREFIX="${HAN_APT_CACHE}/"
fi
[2016-02-09 21:20:04] lb build
P: live-build 5.0~a11
P: Building config tree for a debian/wheezy/armhf system
[2016-02-09 21:20:04] lb bootstrap
P: Setting up cleanup function
[2016-02-09 21:20:05] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2016-02-09 21:20:05] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
@detly
detly / config
Created February 14, 2016 01:55
#!/bin/sh
set -e
GENERAL_BUILD_OPTIONS="--gzip-options '-9 --rsyncable' --security false"
lb config noauto ${GENERAL_BUILD_OPTIONS} "${@}"

Things to try:

  • Copy DTB (device tree) to root of live media
  • Copy everything from /boot in chroot to root of live media (why not?)
  • Move kernel image to kernel.img instead of using config.txt entry
    • What about the initrd?

Notes:

  • live-build binary hooks are executed in build/binary
[2017-01-16 06:23:28] lb build
P: live-build 1:20161216
P: Building config tree for a debian/jessie/armhf system
[2017-01-16 06:23:28] lb bootstrap
P: Setting up cleanup function
[2017-01-16 06:23:28] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2017-01-16 06:23:28] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.