Skip to content

Instantly share code, notes, and snippets.

View ma34s's full-sized avatar

Masashi ma34s

  • Sapporo Hokkaido Japan
View GitHub Profile
: gpio [HWK] get [1]
<6>[ 567.259926] mif: link_pm_irq_handler: ignore request by suspending
<6>[ 567.260728] mif: link_pm_runtime_start: rpm_status: 0
<6>[ 567.261114] mif: iodev_netif_wake: rmnet0
<6>[ 567.261147] mif: iodev_netif_wake: rmnet1
<6>[ 567.261177] mif: iodev_netif_wake: rmnet2
<6>[ 567.261210] mif: link_rx_flowctl_cmd: flowctl CMD_RESUME(00CB)
<6>[ 567.261340] PM: resume of devices complete after 466.542 msecs
<4>[ 567.261973] Restarting tasks ...
<6>[ 567.267624] sec-battery sec-battery: sec_bat_check_temper: recovery count = 0
@ma34s
ma34s / nandroid.c
Created September 7, 2012 03:58
バックアップファイル名を・・・
char timestr[PATH_MAX];
sprintf(backup_path,"/sdcard/clockworkmod/backup/%s_",CURR_ROM_NAME);
strftime(timestr, PATH_MAX, "%F.%H.%M.%S", tmp);
strcat(backup_path,timestr);
@ma34s
ma34s / gist:3923259
Created October 20, 2012 13:23
stmay30さんへ
$ wget http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ sudo tar jxvf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /opt
$ wget http://www.codesourcery.com/sgpp/lite/arm/portal/package5353/public/arm-none-eabi/arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
$ sudo tar jxvf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 -C /opt
$ git clone https://android.googlesource.com/kernel/omap
$ cd omap
$ git checkout -b android-omap-tuna-3.0-mr0 origin/android-omap-tuna-3.0-mr0
$ export ARCH=arm
#ここで$ANDROID_ROOTが設定サれてないので、実行時
@ma34s
ma34s / gist:4139462
Created November 24, 2012 12:25
勘違いでしたが・・・
/*
★勘違いしていた仕様について
 「8bitの変数の立っているビット数を求める」
要素数256で8bit単位処理する方が当然早いが、
4bit単位にしているのは、テーブルサイズを抑えるため
 ※組み込みの癖ですので気にせずに
*/
@ma34s
ma34s / gist:4152686
Created November 27, 2012 06:17
おまじない
mount -o rw,remount /system
mv /system/bin/su /system/bin/ssu
mv /system/xbin/su /system/xbin/ssu
mount -o ro,remount /system
@ma34s
ma34s / build.sh
Created December 19, 2012 15:11
ビルドスクリプトっぽいモノ
#!/bin/bash
#
#run this script at ~/SC04D/omap
#
# ~/SC04D/
# +omap/build.sh (this)
# +ramdisk/
# | +XXXX/
# | +XXXX/
# | +init
@ma34s
ma34s / gist:4584657
Last active December 11, 2015 10:08
32bitと64bitで処理分けるバッチ
IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto x64
:x32
cd %~dp0_x32
SET XCOPY_EXE=XXXXX
goto process
:x64
cd %~dp0_x64
SET XCOPY_EXE=XXXXX
@ma34s
ma34s / gist:4584833
Last active December 11, 2015 10:08
windowsの各Ver毎に処理を分けるバッチ
@echo off
for /f "delims=" %%i in ('ver') do set _VER=%%i
set win_version=%_VER:~-9,3%
if "%win_version%"=="6.2" goto win_8
if "%win_version%"=="6.1" goto win_7
if "%win_version%"=="6.0" goto win_vista
if "%win_version%"=="5.2" goto win_2003
if "%win_version%"=="5.1" goto win_xp
if "%win_version%"=="5.0" goto windows2000
//----------------------------------------------------------------
//ログ入れたコード
int exynos_smc_read_oemflag(u32 ctrl_word, u32 *val)
{
#if 1
register u32 reg0 __asm__("r0");
register u32 reg1 __asm__("r1");
register u32 reg2 __asm__("r2");
register u32 reg3 __asm__("r3");
u32 idx = 0;
@ma34s
ma34s / getfuse.c
Created January 25, 2013 07:59
getfuse.c
/*---------------------------------------------------------------------------**
ma34s. All rights reserved.
**---------------------------------------------------------------------------**
$HeadURL: $
$LastChangedDate:: 2011-07-19 12:39:07 #$
$LastChangedRevision: 22 $
$LastChangedBy: $
**------------------------------------------------------------------------*//**