Ubuntu 15.04 Build Single Module

Get source code from apt-get sudo apt-get source linux-3.19.0
change directory to linux source code and type following commands cd linux-3.19.0
copy current kernel config as .config in current folder (or you can config it by typing make oldconfig) cp /boot/config-`name -r` .config
type following commands for parparations sudo make prepare sudo make scripts
copy Modules.symvers to current folder cp /usr/src/liunx-headers-&(uname -r)/Module.symvers .
compile specified module (ex. I'd like to rebuild block module) sudo make M=drivers/block

Vim with ctag & taglist

Just follow below instructions to install ctags & taglist under vim.

Install vim and ctags
sudo apt-get install vim ctags vim-scripts

Install taglist via
vim-addons install taglist

Compiling Kernel under CentOS 6

Step 1. Install Development Packege.

At least, you need to install gcc & ncurses-devel

yum install gcc ncurses-devel

For someone, they might need more development packages, you could just type below command to install all of the popular kits.

yum groupinstall "Development Tools"

Step 2. Download Kernel Source code

http://www.kernel.org/

Step 3. setup config

It's better to copy the configuration file from your system(if you don't have any idea to setup it)

cp /boot/config-`uname -r` ./config

If you don't have any additional settings, just exit and save the configuration 
make menuconfig


Step 4. Compiling

(Here is an example under 8 Cores CPU)
make -j8


Step 5. Installing Kernel

make modules_install install

You could check your kernel verion via "uname -r" after rebooting.

VirtualBox Guest Additions on CentOS 6

You'd need following package for compile VirtualBox guest additions yum install gcc kernel-headers make kernel-devel`uname -r`

Intel Turbo Boost Status - turbostat

If you want to check the CPU frequency under Turbo Boost mode, you can install linux-tools-common package to check your CPU info.


Installation
sudo apt-get install linux-tools-common
sudo apt-get install linux-tools-3.2.0-30

Start turbostat
sudo modprobe msr
sudo turbostat

Screenshot
cr CPU    %c0  GHz  TSC    %c1    %c3    %c6  %pc3  %pc6
          14.91 3.71 3.51  85.09   0.00   0.00  0.00  0.00
   0   0  25.44 3.71 3.51  74.56   0.00   0.00  0.00  0.00
   0   4  25.58 3.71 3.51  74.42   0.00   0.00  0.00  0.00
   1   1  16.98 3.71 3.51  83.02   0.00   0.00  0.00  0.00
   1   5   7.84 3.71 3.51  92.16   0.00   0.00  0.00  0.00
   2   2  13.78 3.71 3.51  86.22   0.00   0.00  0.00  0.00
   2   6   8.07 3.71 3.51  91.93   0.00   0.00  0.00  0.00
   3   3  11.81 3.71 3.51  88.19   0.00   0.00  0.00  0.00
   3   7   9.79 3.71 3.51  90.21   0.00   0.00  0.00  0.00

minicom

Linux底下的Hyperterminal,安裝方式如下:

sudo apt-get install minicom

登入至minicom主畫面後按下Ctrl+A,再按下Z鍵就會看到如上的設定選單了。

Boot USB Drive in VirtualBox

VirtualBox官方認為Boot from USB Drive的使用需求不高,所以截至至今(VirtualBox 4.x)這個功能仍然沒有加上去,但是我們可以透過以下的方式,使用Rawdisk的原理來達成使用USB Drive開機的功能。

取得磁碟標籤:
sudo fdisk -l
透過上面的指令來取得你的USB Drive的位置,已我的為例:/dev/sdb

建立虛擬硬碟vmdk:
sudo VBoxManage internalcommands createrawvmdk -filename ~/USB.vdi -rawdisk /dev/sdb
輸入完上面的指令後在~/底下就可以找到USB.vdi這個檔案,檔案很小應該不超過1MB。

啟動VirtualBox:
sudo VirtualBox
因為接下來的步驟需要直接存取/dev/sdb的權限,所以必須以root的身份來啟動VirtualBox


在IDE Controller裡新增Disk,將USB.vdi加進去,設定完畢之後你就可以以USB來開機了。

透過以上的方式,就可以將系統安裝至USB裡面,然後透過VirtualBox去直接啟動USB內的系統,這樣子就可以達成Portable USB OS的功能,讓資料永遠都是存在USB裡面,但是同時又兼具Host/Guest啟動的用途。

Orange - data analysis tool

Installation pip install orange3 Run orange python -m Orange.canvas