Skip to content

Instantly share code, notes, and snippets.

@oraccha
oraccha / gist:c5da912c4e3916d86e64
Created February 20, 2015 02:18
DPDK 1.6.0.18 compile error on ubuntu 14.10
$ make install T=${RTE_TARGET}
================== Installing x86_64-default-linuxapp-gcc
Configuration done
== Build scripts
== Build scripts/testhost
== Build lib
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/igb_uio
@oraccha
oraccha / gist:1953183
Created March 1, 2012 20:57
pseudo pkill shell script
qkill() {
if [ `which pkill` ]; then
pkill -f $1
else
kill `ps -ef | grep $1 | grep -v grep | awk '{print $1}'`
fi
}
@oraccha
oraccha / gist:1234344
Created September 22, 2011 08:34
SIMH V3.8-1: add readline support
--- simhv38-1.orig/makefile 2008-11-19 21:53:48.000000000 +0900
+++ simhv38-1/makefile 2011-09-22 17:22:53.000000000 +0900
@@ -12,7 +12,8 @@
OS_CCDEFS = -lrt -lm -D_GNU_SOURCE
endif
endif
- CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I .
+ CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I . -DHAVE_READLINE
+ LDFLAGS = -lreadline
ifeq ($(USE_NETWORK),)
@oraccha
oraccha / gist:1234219
Created September 22, 2011 06:59
trema: pass --unixctl option to ovs-openflowd
diff --git a/ruby/trema/open-vswitch.rb b/ruby/trema/open-vswitch.rb
index 37341e0..ed0a2ca 100644
--- a/ruby/trema/open-vswitch.rb
+++ b/ruby/trema/open-vswitch.rb
@@ -195,6 +195,7 @@ module Trema
"--verbose=ANY:console:err",
"--log-file=#{ log_file }",
"--datapath-id=#{ dpid_long }",
+ "--unixctl=#{ unixctl }",
] + ports_option
@oraccha
oraccha / gist:1234204
Created September 22, 2011 06:50
trema cannot kill vswitch.
$ ./trema kill 0x3
/mnt/hgfs/share/trema/ruby/trema/sub-commands.rb:107:in `kill': undefined method `shutdown!' for nil:NilClass (NoMethodError)
from ./trema:64:in `__send__'
from ./trema:64
from /usr/lib/ruby/1.8/fileutils.rb:121:in `chdir'
from /usr/lib/ruby/1.8/fileutils.rb:121:in `cd'
from ./trema:55
@oraccha
oraccha / gist:1228146
Created September 20, 2011 02:10
Gentoo Prefix bootstrap-prefix patch for a path name included spaces.
--- bootstrap-prefix.sh.orig 2011-09-20 10:45:37.000000000 +0900
+++ bootstrap-prefix.sh 2011-09-20 11:02:52.000000000 +0900
@@ -29,7 +29,7 @@
}
efetch() {
- if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
+ if [[ ! -e "${DISTDIR}"/${1##*/} ]] ; then
if [[ -z ${FETCH_COMMAND} ]] ; then
# Try to find a download manager, we only deal with wget,
@oraccha
oraccha / gist:1063848
Created July 4, 2011 19:52
auto-install.el: ad-hoc fix to use curl instead of wget
--- auto-install.el.orig 2011-07-04 15:55:01.000000000 +0900
+++ auto-install.el 2011-07-04 16:09:02.000000000 +0900
@@ -700,7 +700,7 @@
:type 'boolean
:group 'auto-install)
-(defcustom auto-install-wget-command "wget"
+(defcustom auto-install-wget-command "curl"
"*Wget command. Use only if `auto-install-use-wget' is non-nil."
:type 'string
@oraccha
oraccha / gist:1049736
Created June 27, 2011 20:18
Add vmlinux image support for SuperH
diff --git a/linux/Config.in b/linux/Config.in
index e7d1bd8..94a8cd1 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -131,7 +131,7 @@ config BR2_LINUX_KERNEL_VMLINUX_BIN
config BR2_LINUX_KERNEL_VMLINUX
bool "vmlinux"
- depends on BR2_mips || BR2_mipsel
+ depends on BR2_mips || BR2_mipsel || BR2_sh
@oraccha
oraccha / linux-0.01-rm-3.5-rt20110112a.patch
Created January 12, 2011 09:40
Linux 0.01: fix compile errors with gcc 4.4.5
diff -rc linux-0.01-rm-3.5.orig/fs/Makefile linux-0.01-rm-3.5/fs/Makefile
*** linux-0.01-rm-3.5.orig/fs/Makefile 2008-01-14 05:58:48.000000000 +0900
--- linux-0.01-rm-3.5/fs/Makefile 2011-01-12 18:23:37.336449408 +0900
***************
*** 3,9 ****
CC =gcc
LD =ld
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
! -fno-stack-protector -nostdinc -I../include
CPP =gcc -E -nostdinc -I../include
@oraccha
oraccha / gist:775892
Created January 12, 2011 08:50
Linux 0.01: *p = *current;
include/linux/sched.h:
:
extern struct task_struct *current;
:
kernel/sched.c:
:
union task_union {
struct task_struct task;
char stack[PAGE_SIZE];