Skip to content

Instantly share code, notes, and snippets.

From: Mike Kasick <mike@kasick.org>
Date: Mon, 12 Sep 2011 16:59:13 -0400
Add --load-hardboot option and support KEXEC_HARDBOOT flag.
diff --git a/jni/kexec/kexec-syscall.h b/jni/kexec/kexec-syscall.h
--- a/jni/kexec/kexec-syscall.h
+++ b/jni/kexec/kexec-syscall.h
@@ -78,6 +78,7 @@
#!/bin/sh -e
# move /init to main_init and add trampoline binary
# to launch multirom
# Also must be done to support multirom:
# - edit /sbin/mkinitramfs to copy init as main_init
# - add script to copy new boot image to multirom folder to /etc/initramfs/post-update.d/
# - disable initramfs-tools update?
MINKVER="2.6.24"
PREREQ=""
% Když budete cokoli psát: ukládejte starší verze vždy odděleně, abyste se
% k nim mohli kdykoli vrátit. Kusy textu, které jste se rozhodli nepoužít, taky ukládejte do zvláštního souboru. Smazat se to dá vždycky, ale psát to znova je opruz.
% A POŘÁD ZÁLOHUJTE. POŘÁD !!!
\documentclass[12pt, a4paper, oneside]{article}
% velikost písma, stránky, typ dokumentu -- detaily viz literatura
\usepackage{czech} % nastavení češtiny
%\usepackage[latin2]{inputenc}
@Tasssadar
Tasssadar / joy.diff
Created August 13, 2012 21:26
Fix for kernel joystick bug
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 26043cc..11f24b4 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -318,9 +318,14 @@ static int joydev_generate_startup_event(struct joydev_client *client,
event->value = !!test_bit(joydev->keypam[event->number],
input->key);
} else {
+ int evnum = client->startup - joydev->nkey;
+ int val = input_abs_get_val(input, joydev->abspam[evnum]);
@Tasssadar
Tasssadar / py_snake.py
Created June 10, 2012 13:32
Python implementation of Snake game for Lorris
from random import *
MOVE_UP = 0
MOVE_DOWN = 1
MOVE_LEFT = 2
MOVE_RIGHT = 3
STEP_LEN = script.height
terminal.clear()
@Tasssadar
Tasssadar / lorris_mac.diff
Created June 2, 2012 23:57
Patch for lorris to make it compilable under Mac OS X
diff --git a/dep/SDL/include/SDL_main.h b/dep/SDL/include/SDL_main.h
index 3312cb6..38564a3 100644
--- a/dep/SDL/include/SDL_main.h
+++ b/dep/SDL/include/SDL_main.h
@@ -51,8 +51,9 @@
* }
* @endcode
*/
-#ifndef USING_PCH
+#if !defined USING_PCH && !defined(Q_OS_MAC)
diff --git a/src/connection/connection.cpp b/src/connection/connection.cpp
index 3b9d95b..a62adee 100644
--- a/src/connection/connection.cpp
+++ b/src/connection/connection.cpp
@@ -25,7 +25,7 @@
#include "../WorkTab/WorkTab.h"
Connection::Connection()
- : m_type(0), m_state(st_disconnected), m_refcount(1), m_removable(true)
+ : m_type(0), m_state(st_disconnected), m_refcount(1), m_tabcount(0), m_removable(true)
@Tasssadar
Tasssadar / protocol.js
Created March 30, 2012 19:40
Lorris (JavaScript) implementation of our communication protocol
var SMSG_POT_VALUES_8 = 0x00; // (int8_t x, int8_t y) pro kazdy joystick, min -128, max 127
var SMSG_POT_VALUES_16 = 0x01; // (int16_t x, int16_t y) pro kazdy joystick, min -32768, max 32787
var SMSG_BINARY_VALUES = 0x02; // (uint8_t count, uint8_t values...) hodnoty napr. z tlacitek, count je pocet,
// values muze byt vice bytu podle poctu tlacitek
var SMSG_SET_MOTOR_POWER_8 = 0x03; // (int8_t right, int8_t left) hodnoty pro nastaveni motoru, min -128, max 127
var SMSG_SET_MOTOR_POWER_16 = 0x04; // (int16_t right, int16_t left) hodnoty pro nastaveni motoru, min -32768, max 32767
var SMSG_GET_VALUES = 0x05; // (uint8_t valueType) typ hodnoty, viz Prikazy clienta.
// Dalsi data jsou potreba v pripade CMSG_RANGE_VALUE a CMSG_COLOR_VALUE,
// kdy struktura vypada takto: (uint16_t valueType, uint8_t sensorId)
var CMSG_BOA
@Tasssadar
Tasssadar / snake.js
Created March 15, 2012 19:58
JavaScript implementation of Snake game for Lorris
var MOVE_UP = 0;
var MOVE_DOWN = 1;
var MOVE_LEFT = 2;
var MOVE_RIGHT = 3;
var STEP_LEN = script.height;
clearTerm();
var timer = newTimer();
@Tasssadar
Tasssadar / kindle_eink.sh
Created December 27, 2011 12:31
This script will change between two eink modes - normal and fast-redraw with ungly font on predefined key sequence. Currently it is 2x back 2x home.
#!/bin/sh
# This script will change between two eink modes - normal and fast-redraw with ungly font
# on predefined key sequence. Currently it is 2x back 2x home.
# It also can show battery level in % - that is 2x home, look at the bottom of the screen
# It is for Kindle 4
#
# Key codes
# 158 1 - back
# 29 1 - keyboard
# 102 1 - home