Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
DOWNLOAD_DIR=$HOME/test/download
OVERLAY_DIR=$HOME/test/overlay
mkdir -p $DOWNLOAD_DIR
cd $DOWNLOAD_DIR
set -e
for i in $(apt-get install --quiet --yes --print-uris python3-autopilot unity8-autopilot ubuntu-ui-toolkit-autopilot python3-evdev gir1.2-gconf-2.0 gir1.2-glib-2.0 gir1.2-ibus-1.0 gir1.2-upstart-app-launch-2 python3-autopilot-trace| grep http | cut -d\ -f1| sed -e "s/'//g")
@sergiusens
sergiusens / batch.go
Created August 15, 2014 13:12
gmail batch request
/*
Author: Sergio Schvezov
Calling this will dump a response similar to:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Alternate-Protocol: 443:quic
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: multipart/mixed; boundary=batch_mtD6I8ONpCM=_AAPHSI2gDBg=
@sergiusens
sergiusens / install_from_recovery
Last active August 29, 2015 14:05
Install from recovery
function install_from_recovery {
adb shell mkdir /mnt
adb shell mount /data/ubuntu.img /mnt
adb push "$1" /mnt/
adb shell PATH=/bin:/usr/bin:/sbin:/usr/sbin chroot /mnt /usr/bin/dpkg -i "/$1"
adb shell "rm /mnt/$1"
adb shell sync
adb shell umount /mnt
adb shell rmdir /mnt
adb reboot
@sergiusens
sergiusens / set_preferred_context
Created September 29, 2014 21:24
Set a preferred context
package main
import (
"fmt"
"os"
"launchpad.net/go-dbus/v1"
)
func main() {
@sergiusens
sergiusens / rfc-oem.md
Last active August 29, 2015 14:14
RFCs for snappy

OEM snappy package

The oem snappy package is a snappy package type that is used to setup and personalize the system according to an OEM.

It covers a broad range, such as the software stack with it’s configuration and hardware enablement.

There can only be one snappy package of type oem and it can only be installed during image provision.

@sergiusens
sergiusens / packages_v2.md
Last active August 29, 2015 14:14
rfc: webdm api

Requesting packages

This api is used to work against snap packages. The packages api mixes up results from the store and installed system.

Searching and listing

To get all packages

GET /api/v2/packages/
@sergiusens
sergiusens / devel-proposed_to_devel-proposed.md
Last active August 29, 2015 14:18
Snappy revno 4 candidate testing for bbb

Using the version -1 technique

Update Test: Check that system by updated to latest rootfs version

(BeagleBoneBlack)ubuntu@localhost:~$ snappy list -v
Name             Date       Version Developer  
ubuntu-core*     2015-04-10 119                
ubuntu-core      2015-04-10 119                
beagleboneblack* 2015-04-10 1.4     sergiusens 

(BeagleBoneBlack)ubuntu@localhost:~$ snappy list --updates

@sergiusens
sergiusens / autopilot.sh
Created April 16, 2015 22:06
Disable autopilot
#!/bin/sh
CONFIG=/tmp/core_config
snappy config ubuntu-core > "$CONFIG"
sed -i 's/autopilot: .*$/autopilot: false/' > "$CONFIG"
sudo snappy config ubuntu-core "$CONFIG"
@sergiusens
sergiusens / snapcraft.yaml
Last active November 2, 2015 18:11
source replacement
sources:
repo: <string>
type: <string>
tag: <string>
branch: <string>
commit-id: <string>

Snappy for Devices porting guide

This guide will get you started on porting snappy to your device. It covers setting the tools on your development machine and walks you through the basics of snappy porting by looking at the runtime requirement of a snappy system from a partition layout perspective. It will then go in depth explaining what is needed to make a snappy bootloader, kernel and initrd and will touch briefly on the requirements for installing/flashing images using ubuntu-device-flash.

Getting started

First of all, you should make sure you have enabled the Snappy Tools PPA, as explained in the snappy introduction.