2013年4月6日 星期六

很慶幸有這次這樣自己嚇自己的經驗,醫生說: 不要隨便想到cancer啦  哈
這幾天真的想超多…想超遠,想著自己還有很多未完成的事
想著要怎麼交待自己的後事
我還想著如果醫生真的宣布我中獎… 我不知道會不會腳軟
誰又會在我身邊 一起聽這個壞消息? 她又會是什麼反應?

電視的職棒,床上的老伴在睡
我喜歡這個時刻: 明明有人陪,有吵雜的電視,但還可以偷到與自己相處的小時光

買了 dyson,買了濾水壺 ,希望能讓身旁的人健康,盡自己一點心力

2013年3月30日 星期六

orz ... rtcsa 網頁忽然爆了…接到dw的電話…
感覺很急…但我一時無法handle…  整個有點狀況外…
看來一個全能博士生不是那麼容易的…


今天打了三場lol,有點無聊了
也浪費時間,至少打完之後都是這個想法  哈
blas ,要看他個元件的cpu cost,所以把code從simulator中抽出
以為很簡單,但做下去才發現,我不是那麼會~  …
大多的事都一樣: 做了才發現問題,做了才會學到
困難在眼前,我一步都不能躲~


左眼皮一直跳…,好幾天了…,是用眼過度,還是真的好事將近?

洗好澡了,好舒服

2013年3月23日 星期六

BLAS審回來了
major revise…有點小緊張…但相信只是我努力不夠使然
如果90%努力,我甚至連revise回來的mail都不擔心~  

要改快一點,因為BLAS掌握度還不足以讓我自信萬分
一切都還是未知數

養兵千日用在一時
平常的修養,往往在最緊急的時刻能顯現出來。

-----------
麻豆善化交界,有不錯的風景…
意外的風景 感覺nice


-------
盡量在寫東西的時候
不要被外物所擾,隨心所慾地寫


2013年3月21日 星期四

今天coding時數算多,但實際產出卻不多
九成是功力的問題…
我還欠很多知識債勒…

怪怪,最近一直有要中風的感覺…neck一直很不舒服…
昨天開玩笑式地跟老婆交待一下後事要怎麼辦 哈…

也好久沒寫寫東西了,總是給自己一堆理由…
其實寫寫東西根本也花不到什麼時間,還可以練一下超可笑的無蝦米打字…
重點是…可以好好整理一下自己的生活…自己的心情
寫在這一定是最好的…正因為沒人會看,即便看到也不一定知道是我…
所以我可以暢所卻言? oh

比較值得一提的是…
系辦小姐猜我是博班生…還連忙說不是因為長像= =
而是我"穩重" 哈哈… 她應該是全世界第一人說我穩重的…
看來…我不說話的時候真的很騙人

2012年10月8日 星期一

GDB script

http://wiki.csie.ncku.edu.tw/embedded/schedule

很有趣的lab...  by jserv

1.用qemu模擬某個板子
2.寫個app去call driver API讓 UART 顯示 hello
3.看似簡單,但實際要比賽誰的app寫的短…(處理動作最好全權交給 GDB)
4.方法: 透過 gdb 來追蹤程式 




2012年7月3日 星期二

"轉" SSD的初使化 (用hdpara去erase整個SSD)




passing the block ranges you want to TRIM instead of start and count and the SSD device in place of /dev/sda. It has the advantage of being fast and not writing zeros on the drive. Rather, it simply sends TRIM commands to the SSD controller letting it know that you don't care about the data in those blocks and it can freely assume they are unused in its garbage collection algorithm.
You probably need to run this command as root. Since this command is extremely dangerous, as it can immediately cause major data loss, you also need to pass --please-destroy-my-drive argument tohdparm (I haven't added this to the command line to prevent accidental data loss caused by copy and paste.)
In the above command line, /dev/sda should be replaced with the SSD device you want to send TRIM commands to. start is the address of the first block (sector) to TRIM, and count is the number of blocks to mark as free from that starting address. You can pass multiple ranges to the command.
Having personally done it with hdparm v9.32 on Ubuntu 11.04 on my laptop with a 128GB Crucial RealSSD C300, I have to point out an issue: I was not able to pass the total number of disk blocks (0:250069680) as the range. I manually (essentially "binary searched" by hand) found a large enough value for block count that worked (40000) and was able to issue TRIM commands on a sequence of 40000 ranges to free up the entire disk. It's possible to do so with a simple shell script like this (tested on Ubuntu 11.04 under root):
 # fdisk -lu /dev/sda

 Disk /dev/sda: 128.0 GB, 128035676160 bytes
 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
 ...  
to erase the entire drive, take that total number of sectors and replace 250069680 in the following line with that number and run (add --please-destroy-my-drive):
 # i=0; while [ $i -lt 250069680 ]; do echo $i:40000; i=$(((i+40000))); done \
 | hdparm --trim-sector-ranges-stdin /dev/sda
And you're done! You can try reading the raw contents of the disk with hexedit /dev/sda before and after and verify that the drive has discarded the data.

Of course, even if you don't want to use Linux as the primary OS of the machine, you can leverage this trick by booting off a live CD and running it on the drive.