wayling的聚會手記

2012-05-17

來源: 2012-05-17
vim highlight <div>
http://stackoverflow.com/questions/10088399/how-to-highlight-entire-div-div-in-vim
移動到 <div> 的tag然後按 v a t三個鍵

2012-04-26

來源: 2012-04-26
SD卡可以開機了,但開機過程 rootfs 掛載沒成功
=> 應該是 SD 卡要照某個格式作磁區分割
=> 找 pandaboard 指定的分割方式

2012-04-19

來源: 2012-04-19
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get install updata
sudo apt-get install sun-java6-plugin
要裝這個plugin

2012-03-01

來源: 2012-03-01
限定 gitk 載入的 log 數,不然開 linux kernel tree 會很久.

gitk --max-count=100 --all -- Makefile

2012-02-23

來源: 2012-02-23
wayling: 最近嘗試幫 BeagleBOM 移稙一個 real-time os

static void prvSetupHardware( void )
{
    /* Initialize GPIOs */
    /* GPIO5: 31,30,29,28,22,21,15,14,13,12
     * GPIO6: 23,10,08,02,01 */
    (*(REG32(GPIO1_BASE+GPIO_OE))) = ~(PIN31|PIN30|PIN29|PIN28|PIN22|PIN21|PIN15|PIN14|PIN13|PIN12);
    //(*(REG32(GPIO6_BASE+GPIO_OE))) = ~(PIN23|PIN10|PIN8|PIN2|PIN1);
    /* Switch off the leds */
    (*(REG32(GPIO1_BASE+GPIO_CLEARDATAOUT))) = PIN22|PIN21;
}
void prvToggleOnBoardLED( void )
{
    /* Toggle LED0 */
    unsigned long ulState;
    unsigned volatile int * gpio;
    ulState = (*(REG32 (GPIO1_BASE + GPIO_DATAIN)));
    if( ulState & mainON_BOARD_LED_BIT )
    {
        gpio = (unsigned int *)(GPIO1_BASE + GPIO_SETDATAOUT);
        *gpio = mainON_BOARD_LED_BIT;
    }
    else
    {
        gpio = (unsigned int *)(GPIO1_BASE + GPIO_CLEARDATAOUT);
        *gpio = mainON_BOARD_LED_BIT;
    }
}

http://cs.usfca.edu/~cruse/cs635/cmosram.c

2012-02-09

來源: 2012-02-09
#qemu bridge mode ? 可以讓兩個guest mode linux互ping成功
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 0.0.0.0 promisc up
openvpn —mktun —dev tap0
ifconfig tap0 0.0.0.0 up
openvpn —mktun —dev tap1
ifconfig tap1 0.0.0.0 up
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1
brctl stp br0 off
ifconfig br0 10.10.10.2 netmask 255.255.255.0
linux image用qemu官網提供的
guest 1:
qemu -m 512 -hda linux-0.2.img -net nic -net tap,ifname=tap0,script=no
guest 2:
qemu -m 512 -hda linux-0.2.img -net nic,macaddr=00:01:02:03:04:05 -net tap,ifname=tap1,script=no
PS:
1. ip 記得要設
2. 原本ping不通,發現原來 MAC address會一樣所以一個guest 隨便設一個MAC address

2011-01-06

來源: 2011-01-06
qemu boot 後,在 busybox 裡用 ls 還不會出現中文,但 cat 檔案可以顯示中文
但 ls ?* 可以顯示中文

2010-11-25

來源: 2010-11-25

先裝 busybox
然後用預設的設定,像 kernel 一樣編 config 的設定,只有一個要改,就是
Busybox Settings → Build Options → Build BusyBox as a static binary ( no shared libs ) 要勾起來
然後就用 make 來 build
結束後會產生 _install 目錄
裡面原本只有 bin 跟 sbin , 剩下的要慢慢建
另外要在 linux kernel 的 menuconfig 的
General setup → Initial RAM filesystem and RAM disk ( initramfs/initrd) support
設定成剛剛的 _install 的目錄,即 busybox 的產生目錄
qemu -kernel arch/x86/boot/bzImage -append "vga=788"

2010-10-21

來源: 2010-10-21
http://yurinfore.blogspot.com/2010/10/ibus-pinyin-bopomofo-enter.html

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License