Skip to content

Instantly share code, notes, and snippets.

import os
foundpath = 0
def recursive_list( pathname ):
global foundpath
dirs = os.listdir( pathname )
if '.git' in dirs:
return
if not dirs:
diff --git a/common/Makefile b/common/Makefile
index ad7cb4f..8eee015 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -168,6 +168,8 @@ COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o
COBJS-$(CONFIG_UPDATE_TFTP) += update.o
COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
+COBJS-y += cmd_pmic.o
+
@checko
checko / gist:5001745
Created February 21, 2013 03:12
some source code from Cyanogen Mod 7. Vold. add support for exfat
int Fat::check(const char *fsPath) {
bool rw = true;
SLOGI("Fat::check\n");
if (access(FSCK_MSDOS_PATH, X_OK) || access(FSCK_EXT_PATH, X_OK)) {
SLOGW("Skipping fs checks\n");
return 0;
}
int pass = 1;
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
int main(int argc, char* argv[])
{
int fd;
int err;
char buf;
@checko
checko / gist:4596fcff004c22693bad
Created November 19, 2015 08:57
tinyalsa_hal remove MMAP and replace pcm_write
diff --git a/alsa/tinyalsa_hal.c b/alsa/tinyalsa_hal.c
index a4644ac..2b85b88 100644
--- a/alsa/tinyalsa_hal.c
+++ b/alsa/tinyalsa_hal.c
@@ -16,7 +16,7 @@
/* Copyright (C) 2012-2015 Freescale Semiconductor, Inc. */
#define LOG_TAG "audio_hw_primary"
-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 0
@checko
checko / gitlab-raspberrypi.sh
Created October 27, 2015 08:08 — forked from emersion/gitlab-raspberrypi.sh
Gitlab install on Raspberrypi (cross-compiling)
# Gitlab install instructions: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
# Cross-compiling on Rpi: https://raspberrypi.stackexchange.com/questions/1/how-do-i-build-a-gcc-4-7-toolchain-for-cross-compiling
apt-get update -y
apt-get upgrade -y
apt-get install -y sudo
apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate
apt-get install -y git-core
diff --git a/core/Makefile b/core/Makefile
index a1428ed..ec64ced 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -117,10 +117,9 @@ endef
define default-locale-region
$(word 3, 3, $(call default-locale, $(1)))
endef
-
BUILDINFO_SH := build/tools/buildinfo.sh
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager connection type],
[associated radio-type],[priority] -->
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,1"</item>
<item>"mobile,0,0,0"</item>
<item>"mobile_mms,2,0,2"</item>
<item>"mobile_supl,3,0,2"</item>
usb 2-1: USB disconnect, address 2
usb 2-1.3: USB disconnect, address 3
irq 18: nobody cared (try booting with the "irqpoll" option)
[<c009958c>] (unwind_backtrace+0x0/0xf0) from [<c00fcb64>] (__report_bad_irq+0x30/0x8c)
[<c00fcb64>] (__report_bad_irq+0x30/0x8c) from [<c00fcd08>] (note_interrupt+0x148/0x1d0)
[<c00fcd08>] (note_interrupt+0x148/0x1d0) from [<c00fd9a4>] (handle_level_irq+0xfc/0x188)
[<c00fd9a4>] (handle_level_irq+0xfc/0x188) from [<c009406c>] (asm_do_IRQ+0x6c/0x8c)
[<c009406c>] (asm_do_IRQ+0x6c/0x8c) from [<c0094a8c>] (__irq_svc+0x4c/0xcc)
Exception stack(0xd918dd20 to 0xd918dd68)
dd20: d911c960 d9649660 00000070 00000001 00000000 d97d34b0 d9649660 d9649660
00020848 <strcat>:
char *
strcat(char *s, const char *append)
{
char *save = s;
for (; *s; ++s);
20848: b510 push {r4, lr}
2084a: 4602 mov r2, r0
2084c: e000 b.n 20850 <strcat+0x8>