Skip to content

Instantly share code, notes, and snippets.

@akarpenko
akarpenko / ffmpeg.rb
Created December 11, 2012 21:45
FFMPEG formula for homebrew with libaacplus Install with: brew install ./ffmpeg.rb --with-libaacplus
require 'formula'
class Ffmpeg < Formula
homepage 'http://ffmpeg.org/'
url 'http://ffmpeg.org/releases/ffmpeg-1.0.tar.bz2'
sha1 'bf1f917c4fa26cf225616f2063e60c33cac546be'
head 'git://git.videolan.org/ffmpeg.git'
option "without-x264", "Disable H264 encoder"
@akarpenko
akarpenko / libaacplus.rb
Created December 11, 2012 21:46
llibaacplus formula for homebrew Install with: brew install ./libaacplus.rb
require 'formula'
class Libaacplus < Formula
homepage 'http://tipok.org.ua/node/17'
url 'http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz'
md5 '3fc15d5aa91d0e8b8f94acb6555103da'
depends_on 'autoconf' => :build
depends_on 'automake' => :build
depends_on 'libtool' => :build
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function j(a,b){this.totalCount=a,this.dataCount=b}function k(){this.buffer=[],this.length=0}function m(){return"undefined"!=typeof CanvasRenderi
@akarpenko
akarpenko / parsesb.patch
Created June 11, 2020 15:40
Patch for sbtools to add parsesb tool
diff --git a/utils/imxtools/sbtools/Makefile b/utils/imxtools/sbtools/Makefile
index e6d064b2a3..af51fabf13 100644
--- a/utils/imxtools/sbtools/Makefile
+++ b/utils/imxtools/sbtools/Makefile
@@ -3,9 +3,11 @@ CC=gcc
CXX=g++
LD=g++
CFLAGS=-O3 -g -std=c99 -Wall `pkg-config --cflags libusb-1.0` $(DEFINES)
-CXXFLAGS=-O3 -g -Wall `pkg-config --cflags libcrypto++` $(DEFINES)
-LDFLAGS=`pkg-config --libs libusb-1.0` `pkg-config --libs libcrypto++`
diff --git a/board/bmw/bmw/Kconfig b/board/bmw/bmw/Kconfig
new file mode 100644
index 0000000000..b83c553d52
--- /dev/null
+++ b/board/bmw/bmw/Kconfig
@@ -0,0 +1,18 @@
+if TARGET_BMW
+
+config SYS_BOARD
+ default "bmw"
diff --git a/board/bmw/bmw/Kconfig b/board/bmw/bmw/Kconfig
new file mode 100644
index 0000000000..b83c553d52
--- /dev/null
+++ b/board/bmw/bmw/Kconfig
@@ -0,0 +1,18 @@
+if TARGET_BMW
+
+config SYS_BOARD
+ default "bmw"
diff --git a/cmd/sf.c b/cmd/sf.c
index d18f6a888c..aee54c4c28 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -318,6 +318,28 @@ static int do_spi_flash_read_write(int argc, char *const argv[])
return ret == 0 ? 0 : 1;
}
+static int do_spi_flash_dump(int argc, char *const argv[]) {
+ int ret = 1;
diff --git a/cmd/sf.c b/cmd/sf.c
index d18f6a888c..ed04f3f011 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -318,6 +318,35 @@ static int do_spi_flash_read_write(int argc, char *const argv[])
return ret == 0 ? 0 : 1;
}
+static int do_spi_flash_dump(int argc, char *const argv[]) {
+ int ret = 1;
import serial
import sys
bytes_received = 0
with open("dump.bin", "wb") as f:
with serial.Serial('/dev/ttyUSB0', 500000, timeout=1) as ser:
ser.write(b'sf probe\n')
print(ser.read(1000))
ser.write(b'sf dump\n')