顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2015年3月3日 星期二

[bug] make modules_prepare



Symptom:
- when compiling the driver, there maybe exist issue like :
......
In file included from include/linux/gfp.h:4:0,
                 from include/linux/slab.h:12,
                 from include/linux/percpu.h:5,
                 from include/asm/local.h:4,
                 from include/linux/module.h:19,
                 from
AX88179_178A_LINUX_DRIVER_v1.13.0_SOURCE/ax88179_178a.c:30:
include/linux/mmzone.h:18:26: fatal error: linux/bounds.h: No such file or directory
 #include <linux/bounds.h>
                          ^
.........

Root Cause:
- Header file miss.

Solution:
- go to kernel folder, issue the command:
make modules_prepare 
- after that, go back to make driver again

ref:
https://forums.gentoo.org/viewtopic-t-819002-start-0.html



2015年3月1日 星期日

[bug] Linux kernel menuconfig issue

symptom:
Makefile:434: *** mixed implicit and normal rules.  Stop.
Makefile:1551: *** mixed implicit and normal rules.  Stop.

root cause:
old Makefile format

solution:
(434) config %config: scripts_basic outputmakefile FORCE
(1551) / %/: prepare scripts FORCE

-->
(434) %config: scripts_basic outputmakefile FORCE
(1551) %/: prepare scripts FORCE

ref:
http://www.cnblogs.com/jevan/archive/2011/03/20/1989199.html


Linux online ebook

src:
http://www.linuxtopia.org/online_books/index.html

notes:
- 15'3/2:
  [1] this website lists some many Linux ebook including Andorid, iOS....etc. It's a great place for reference.
  [2] motiviation for this website is : kernel in a nutshell

2015年1月13日 星期二

Btier


src:
http://sourceforge.net/projects/tier/
http://www.lessfs.com/wordpress/
http://searchstorage.techtarget.com/definition/Automated-storage-tiering-AST

Relative term:
Automated storage tiering (AST)


notes:
- a open source for storage tiering



experiment for DRBD

src:
http://download.ithome.com.tw/article/index/id/2164

note:
- experiment for DRBD


2014年9月1日 星期一

iostat

src:
http://sebastien.godard.pagesperso-orange.fr/index.html

notes:

------------------------
- Utility for IO statistics

2014年7月12日 星期六

reset Linux root password

src:
http://blog.miniasp.com/post/2012/06/12/How-to-reset-root-password-for-Ubuntu-CentOS-Debian-FreeBSD.aspx

notes:

--------

如何重設 CentOS 的 root 密碼
標準作業流程:
  1. 進入 GRUB 開機選單,選擇預設的開機項目即可,直接按下 e 進入開機參數編輯視窗
  2. 找到 kernel 開頭的這一行(通常在第二行),並按下 e 編輯這一行
  3. 在此行最後面加上一個空白字元與 single 字串,並按下 Enter 鍵確定並回到 GRUB 開機選單
  4. 最後按下 b 開機,接著即可免密碼以 root 身份登入 shell

2014年6月30日 星期一

How To Write Linux PCI Drivers


src:
http://galileo.phys.virginia.edu/~rjh2j/l2beta/software/pci.txt

mypdf:
https://drive.google.com/file/d/0B543p5wfySTQamN1ODIyQ09wN00/edit?usp=sharing


mynotes:



----------------------------------

2014年5月23日 星期五

红帽专家解读:虚拟化技术KVM和XEN的区别

src:
http://www.cioage.com/art/201007/88938.htm

notes:
14'5/23 :
- KVM is Full Virtualization, XEN is w/ additional Para Virtualization.
- RedHat will focus on KVM instead of XEN in the future

-----------
红帽专家解读:虚拟化技术KVM和XEN的区别
出处:CIOAge.com 文: 凌云通 评论( 0 )条 论坛 博客
导读:从架构上讲,xen是自定制的hypervisor,对硬件的资源管理和调度,对虚拟机的生命周期管理等,都是从头开始写的。 KVM全称是Kernel-based Virtual Machine, kernel代表的是Linux kernel。KVM是一个特殊的.....
问:想请问一下KVM的虚拟化技术和原来的XEN虚拟化技术有什么区别,而且在今后redhat是否不会在redhat里在集成XEN的功能,而转向对KVM的支持。
答:XEN目前支持Full Virtualization(全虚拟化) 和 Para Virtualization.
Full Virtualization的好处在于现有的x86架构的操作系统可以不用修改,直接运行在虚拟机上。 Para Virtualization的好处是性能好,但是虚拟机上运行的操作系统内核要修改。
目前主流的厂家的虚拟化重点都是放在Full Virtualization上面。
KVM采用的是Full Virtualization,需要CPU支持VT。 如何确认你的CPU是否支持VT,查看cpu flag, intel cpu flag 会有 "vmx" , amd cpu flag 会有 "svm".
从架构上讲,xen是自定制的hypervisor,对硬件的资源管理和调度,对虚拟机的生命周期管理等,都是从头开始写的。  KVM全称是Kernel-based Virtual Machine, kernel代表的是Linux kernel。KVM是一个特殊的模块,Linux kernel加载此模块后,可以将Linux kernel 变成hypervisor,因为Linux kernel已经可以很好的实现对硬件资源的调度和管理,KVM只是实现了对虚拟机生命周期管理的相关工作。 KVM的初始版本只有4万行代码,相对于xen的几百万行代码显得非常简洁。
更多关于KVM架构的信息,请参考KVM白皮书:
http://www.linuxinsight.com/files/kvm_whitepaper.pdf
红帽在2007年发布RHEL5,采用的是xen来提供虚拟化功能。从红帽RHEL5.4开始,xen和kvm同时存在。 RHEL5上的xen,红帽会支持到2014年。 后续红帽的重点会放在KVM上面。
(以上问题由红帽中国解决方案架构师/红帽认证架构师 李华 先生解答)
【责任编辑:凌云通 TEL:(010)68479336】

2014年4月10日 星期四

MySQL launch in Linux

src:?

notes:

----------

Stop MySQL Server
  1. # /etc/init.d/mysqld stop
Start MySQL Server
  1. # /etc/init.d/mysqld start
Restart MySQL Server
  1. # /etc/init.d/mysqld restart

2014年3月13日 星期四

HOWTO:The Linux Bootdisk

src:
http://www.linux.org.tw/CLDP/HOWTO/admin/Bootdisk-HOWTO/index.html

notes:


-------------

2013年8月7日 星期三

remove windows new line & carrier return symbol


[bash, Perl] A script to remove new line & carrier return symbol derived from Windows



#!/bin/bash
# Shell script to find out all the files under a directory and
#its subdirectories. This takes into consideration only those files
#or directories which do not have spaces or newlines in their names

# how to use it?
#    bash remove_cr.sh your_directoryname

DIR=`pwd`/$1

function list_files()
{
    if !(test -d $1)
    then echo $1; return;
    fi

    cd $1
    echo; echo `pwd`:; #Display Directory name

    for i in * ## [TODO] this will list all of files in the directory?
    do
               if test -d $i  #if dictionary
                then
                    list_files $i #recursively list files
                    cd ..
                else
                    echo $i; #Display File name
                    perl -p -i -e 's/\r\n$/\n/g' $i   ## use Perl to replace end \r\n with \n
                fi

    done
}

## if no argument input, then start from current directory ($# : number of argument input )
if [ $# -eq 0 ]
then list_files .
exit 0
fi



for i in $*
do
    DIR=$1
    list_files $DIR
    shift 1 #To read next directory/file name
done


## $* means whole arguments , shift could help to shift argement to next one.
## http://linuxpoison.blogspot.tw/2012/07/bash-script-using-shift-statement-to.html