顯示具有 linux kernel 標籤的文章。 顯示所有文章
顯示具有 linux kernel 標籤的文章。 顯示所有文章

2011年2月8日 星期二

android kernel menuconfig

in BSP directory:

source build/envsetup.sh
make ONE_SHOT_MAKEFILE=`pwd`/kernel/AndroidKernel.mk kernelconfig

2011年1月13日 星期四

linux dfs 參數

路徑為/sys/devices/system/cpu/cpu0/cpufreq/

有下列檔案:
./cpuinfo_min_freq(CPU最小頻率)
./cpuinfo_max_freq(CPU最大頻率)
./scaling_min_freq(DFS最小頻率)
./scaling_max_freq(DFS最大頻率)
./affected_cpus
./related_cpus
./scaling_governor(設定DFS方法)
./scaling_driver
./scaling_available_governors(顯示DFS方法)
./scaling_setspeed(設定CPU頻率)
./scaling_cur_freq(顯示目前CPU頻率)
./stats
./stats/total_trans
./stats/time_in_state
./stats/trans_table
./ondemand(若scaling_governor設為ondemand則會用到此資料夾的參數)
./ondemand/sampling_rate_max(最大取樣頻率)
./ondemand/sampling_rate_min(最小取樣頻率)
./ondemand/sampling_rate(設定取樣頻率)
./ondemand/up_threshold(CPU使用率大於此值則升頻)
./ondemand/down_differential(CPU使用率小於此值則降頻)
./ondemand/ignore_nice_load
./ondemand/powersave_bias(下面詳細解釋)


==============================================================

in /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias

說明
http://osdir.com/ml/kernel.cpufreq/2006-07/msg00137.html


這個值的範圍為0-1000,代表0.1%-100%

假設現在系統要切到2GHz

若powersave_bias設為100(10%),
則這次會先跳到1.8G(比預期目標少10%)

2010年10月18日 星期一

2009年2月24日 星期二

ubuntu style kernel install

1.install:
build-essential
make-kernels
libncurse

linux-header
linux-source

2.make menuconfig

3.make-kpkg clean

4.make-kpkg --initrd kernel_image kernel_headers

5.sudo dpkg -i linux-image-<source version>_<source
version>-10.00.Custom_i386.deb linux-headers-<source version>_<source
version>-10.00.Custom_i386.deb

2009年1月21日 星期三

Fwd: linux核心編譯,增加新核心

詳情參考鳥哥
http://linux.vbird.org/linux_basic/0540kernel.php


1.取得原始碼
kernel.org

2.設定
$ make menuconfig
最好載入目前設定(/boot/config......)再修改

3.編譯
$ make

4.安裝模組
$ make modules_install
會安裝到/lib/modules/核心版本/
(所以如果編跟本來同版本的話會用到同一個資料夾 最好備份原來的)

5.核心檔案放在:
原始碼/arch/i386/boot/bzImage
複製到/boot/內以供開機使用
檔名最好改成"vmlinux_核心版本"以供辨認

6.建立initrd(Initial RAM Disk)
initrd 可以將 /lib/modules/.... 內的『開機過程當中一定需要的模組』包成一個檔案
確保可以順利掛載root,這樣其他的module就可以在/lib/modules/裡找到了
$ mkinitrd initrd_`uname -r` `uname -r`
會產生檔名為initrd_`uname -r`.EL的檔案
(不一定要`uname -r`,自己取名,因為通常要做的版本跟自己現在用的不一樣)

7.複製system.map
$ cp 原始碼/System.map /boot/System.map.版本號
這樣才不會稿混

8.修改grub
$ vi /boot/grub/menu.lst
複製一份本來可以用的
然後改一下設定
把initrd和kernel的檔案改成新編好的

9.reboot & try it