2012年1月10日 星期二

多檔案組成的程式 by Hsian Studio
http://hsian-studio.blogspot.com/2008/09/blog-post_126.html

2011年1月8日 星期六

在 Linux 上建立 helloDriver.ko for Android

參考:http://telesky.pixnet.net/blog/post/6969608


1. 先準備 helloDriver.c and Makefile
====================================================================================
helloDriver.c

#include
#include

MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void)
{
printk(KERN_INFO "Hello, world\n");
return 0;
}

static void hello_exit(void)
{
printk(KERN_INFO "Goodbye, cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);


Makefile

KERNELDIR := /home/____/_____/982_Android/kernel/
PWD :=$(shell pwd)

ARCH=arm
CROSS_COMPILE=/home/____/_____/991_Android/other/vanilla/tools/arm-eabi-4.2.1/bin/arm-eabi-
CC=$(CROSS_COMPILE)gcc
LD=$(CROSS_COMPILE)ld

obj-m := hello.o

modules:
$(MAKE) -C $(KERNELDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) modules

clean:
rm *.o *.ko *.mod.c *.markers *.order *.symvers



2. 在 /home/____/_____/982_Android/kernel/ 裡修改 Makefile
====================================================================================

ARCH := arm
CROSS_COMPILE := /home/____/_____/991_Android/other/vanilla/tools/arm-eabi-4.2.1/bin/arm-eabi-


$ make mrproper
$ make oldconfig
全部enter
$ make modules_prepare


3. 回到 helloDriver.c 所在的目錄
====================================================================================
$ make
這樣就會得到 helloDriver.ko

$ file helloDriver.ko

2009年5月28日 星期四

魔鬼終結者4 未來救贖



























































爆炸很多
機器人很多
馬可仕萊特你是好人
約翰康納好帥
阿諾的戲份好少

結論:
莎拉康納 where are you?

2008年11月17日 星期一

GNU graph -- 小巧好用的畫圖程式

http://sealmemory.blogspot.com/2008/10/gnu-graph.html

2008年11月14日 星期五

把ISO檔放在硬碟讀取

http://playubuntu.blogspot.com/2008/11/ubuntu20.html

完整備份Ubuntu已安裝的應用程式清單

這裡有教你如何完整備份Ubuntu已安裝的應用程式清單,
以及重灌後的還原:

http://hehe2.net/linuxhowto/howto-fresh-ubuntu-install-without-losing-your-current-settings/


1. 備份/home/user (如果/home是獨立分割區可以省略這步)

2. 備份應用軟體清單:
sudo dpkg --get-selections > /home/user/package.selections


3. 重灌好後還原應用軟體:
sudo dpkg --set-selections /home/package.selections && apt-get dselect-upgrade

2008年11月10日 星期一

回覆: 壓縮檔內出現中文亂碼

先新增zh_TW.Big5的locale...
sudo gedit /var/lib/locales/supported.d/zh

加入:
zh_TW.Big5 Big5

接著再執行...
sudo locale-gen


最後...
LANG=zh_TW.Big5 file-roller