2010/07/22

[Linux] Ubuntu 10.04 的文字模式

其實應該不是說是文字模式,而是怎麼在 ubuntu 10.04 裡面stop gdm 。

很簡單,就在 /etc/default/grub 裡面把原本的這行:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
改成
GRUB_CMDLINE_LINUX_DEFAULT="text"
然後再 sudo update-grub2 就可以了。

2010/07/08

[Linux] 好文推:從 2.4 到 2.6

這篇文章很值得想在 Linux Kernel 上工作的同學參考:

http://www.ibm.com/developerworks/cn/linux/l-module26/index.html

我的問題只是 module_param 的時候出了問題,所以參考它的說明修改 2.4 版本時的 code,範例如下:


#include <linux/module.h>
#ifdef LINUX26
#include <linux/moduleparam.h>
#endif

int debug = 0;
char *mode = "800x600";
int tuner[4] = {1, 1, 1, 1};
#ifdef LINUX26
int tuner_c = 1;
#endif
#ifdef LINUX26
MODULE_PARM(debug, "i");
MODULE_PARM(mode, "s");
MODULE_PARM(tuner,"1-4i");
#else
module_param(debug, int, 0644);
module_param(mode, charp, 0644);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
module_param_array(tuner, int, &tuner_c, 0644);
#else
module_param_array(tuner, int, tuner_c, 0644);
#endif
#endif



更新: 嘖,怎麼沒有第一時間看出來:
#ifdef LINUX26
MODULE_PARM(debug, "i");
MODULE_PARM(mode, "s");
MODULE_PARM(tuner,"1-4i");
#else


這段寫反了,應該 LINUX26 都小寫的才對。

[Windows] git-bash 底下的工具

因為工作轉到 Windows 平台上的關係,所以很多工具改到 Windows 上面運作,跟著在 TortoiseGit 底下使用 git-bash 來維護自己的專案原始碼。結果就是裝了前面提過的 auto-hotkey 使用熱鍵來提昇自己的平台操作速度; 但除了 hotkey...