2014-12-20

Windows 7 行動作業中心發出警告:視訊硬體錯誤 (Video Hardware Error)

來源 Windows
摘要 視訊硬體錯誤
日期 ‎2014/‎8/‎7 下午 09:53
狀態 未報告
描述 您的視訊硬體發生問題,導致 Windows 停止正常運作。

問題簽章
問題事件名稱:    LiveKernelEvent
作業系統版本:    6.1.7601.2.1.0.256.4
地區設定識別碼:    1028

問題的額外資訊
BCCode:    117
BCP1:    FFFFFA80073AF4E0
BCP2:    FFFFF88006E46D10
BCP3:    0000000000000000
BCP4:    0000000000000000
OS Version:    6_1_7601
Service Pack:    1_0
Product:    256_1

========= BCCode 117 代表意義, 及可能解法 =====================

BCCode: 117     0x00000117
The VIDEO_TDR_TIMEOUT_DETECTED bug check has a value of 0x00000117. This indicates that the display driver failed to respond in a timely fashion.
BCCode: 117     0x00000117  <-- read this link
http://www.faultwire.com/solutions-fatal_error/The-display-driver-failed-to-respond-in-timely-fashion-0x00000117-*1276.html

1. Update the Video driver - also look for BIOS and low level chipset drivers at the System Maker's (motherboard maker's for custom systems).
2. Check for Viruses/Malware.
3. Check the hard drive for errors - run Checkdisk
4. Change the power supply

=========================================================

如何檢視行動作業中心記錄 : 行動作業中心->維護->檢視可靠性歷程記錄->檢視方式:週(W)

2014-12-19

Event ID 1530 -Avira Antivirus

In Event Viewer is the following error Event ID 1530:
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
DETAIL -
1 user registry handles leaked from \Registry\User\S-1-5-   _Classes:
Process 1788 (\Device\HarddiskVolume1\Program Files (x86)\Avira\AntiVir Desktop\avguard.exe) has opened key \REGISTRY\USER\S-1-5-21-1856070677-1184215578-1670999655-1001_CLASSES\SOFTWARE\Microsoft\Windows\CurrentVersion
Source
They suggest to uninstall Sandboxie and check whether error will still happen, and it still does after Sandboxie is completely removed. Always on shutdown, always event 1530.
After playing with Avira settings, I found out that disabling option "protect files and registry entries from manipulation" stops event 1530, with or without Sandboxie installed.

2014-12-18

VIA High Definition音效晶片 VT2021 驅動解決方案 @ Windows 7 x64

部份主機版其內建音效卡是採用High Definition音效晶片。
在Windows XP 下必須安裝Microsoft 所提供的更新(SP1/SP2=KB888111,SP3=KB835221),否則只辨認出無法辨識的裝置或無法安裝驅動程式。

而且還要安裝Microsoft UAA Bus Driver for High Definition Audio, 之後再安裝音效卡驅動程式

Windows Vista / 7 已支援High Definition Audo, 並已內建 UAA Bus Driver for High Definition Audio, 所以當未安裝驅動程式下會辨認出High Definition Audo裝置,只要安裝驅動程式即可。可參考 AIDA64 所產生之報告內容.
如果希望得到最好的音效,建議到主機版官網下載最新的驅動程式。

安裝方式如下:

控制台->裝置管理員->音效視訊及遊戲控制器->High Definition Audio 裝置 (按右鍵)
-> 更新驅動程式軟體->手動尋找並安裝驅動程式軟體
i.e. : VIA audio driver (驅動程式被下載後解壓縮之目錄)-> VIAHDAud -> Present -> Drivers -> HDWin764

2014-05-24

修改 Blogger 的字型、行距、字距

要改 Blogger 的字型,首先先來認識中文字型的英文名稱

◎Linux作業系統
       文泉驛正黑    :WenQuanYi Zen Hei
       全字庫正楷體:TW-Kai
◎Mac OS作業系統
       黑體-繁  :Heiti TC
       儷黑 Pro :LiHei Pro
       標楷體   :BiauKai
◎Windows作業系統
       微軟正黑體 :Microsoft JhengHei
       新細明體  :PMingLiU
       細明體   : MingLiU
       標楷體   :DFKai-sb

了解之後,開始來改字型,到【範本】→【編輯HTML】中,按【Ctrl】鍵+【F】鍵,輸入關鍵字 px ,按【Enter】鍵,如下圖

2014-05-24_125840

就搜尋出的第一個結果的重點來解釋一下
<Variable name="body.font" description="Font" type="font"
default="normal normal 13px Arial, Tahoma, Helvetica, FreeSans, sans-serif"value="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/>
body.font是內文字型,default是預設值,value是指定值,會優先執行value,若找不到,再執行default,所以我們若要改內文的字型為,在Linux作業系統顯示全字庫正楷體 (TW-Kai),在Mac OS作業系統顯示標楷體 (BiauKai),在Windows作業系統顯示微軟正黑體 (Microsoft JhengHei),就要改value值。
將原本的
value="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, sans-serif"
改為
value="normal normal 16px Arial, TW-Kai, BiauKai, Microsoft JhengHei, sans-serif"
若只要優先顯示微軟正黑體,則只要在, sans-serif前插入, Microsoft JhengHei即可,如下
value="normal normal 16px Arial, Tahoma, Helvetica, FreeSans, Microsoft JhengHei, sans-serif"
要注意在字型前要空一格,這樣就可以了。下面還有各區塊,可依此類推改字型。
header.font
description.font
tabs.font
date.font
post.title.font
widget.title.font
widget.font
要改行距、字距。到【範本】→【自訂】→【進階】→【新增CSS】中新增以下字串
.post-body {
font-size:100%;
color:#222222;
line-height: 1.8em;
letter-spacing: 0.8px;
}
font-size:文字大小
color:文字顏色
line-height:行距
letter-spacing:字距
以上數值皆可依您需要做更改,改好後,按【套用至網誌】就完成了,如下圖

2014-05-24_130202

若只要改行距、字距,新增以下字串即可
.post-body {
line-height: 1.8em;
letter-spacing: 0.8px;
}
line-height:行距
letter-spacing:字距
以上數值皆可依您需要做更改

2014-05-22

How does a kernel mount the root partition?

非常值得參考的一份文件為 Jserv 所寫的深入理解 Linux 2.6 的 initramfs 機制 (上). 以下是對 initrd 與 initramfs 的概念性比較:

  initrd initramfs
Image 壓縮過的檔案系統 (如 ext2 + gzip) 封裝過的檔案 (cpio + gzip)
實做途徑 block device (RAM disk) tmpfs
首先執行的程式 /linuxrc /init

掛載 rootfs 方式

將欲載入的 rootfs 掛載於某個目錄,再 pivot_root 切換 rootfs 使用 switch_root

 

In ancient times, the kernel was hard coded to know the device major/minor number of the root fs and mounted that device after initializing all device drivers, which were built into the kernel. The rdev utility could be used to modify the root device number in the kernel image without having to recompile it.

Eventually boot loaders came along and could pass a command line to the kernel. If the init= argument was passed, that told the kernel where the root fs was instead of the built in value. The drivers needed to access that still had to be built into the kernel. While the argument looks like a normal device node in the /dev directory, there obviously is no /dev directory before the root fs is mounted, so the kernel can not look up a dev node there. Instead, certain well known device names are hard coded into the kernel so the string can be translated to the device number. Because of this, the kernel can recognize things like /dev/sda1, but not more exotic things like /dev/mapper/vg0-root or a volume UUID.

Later, the initrd came into the picture. Along with the kernel, the boot loader would load the initrdimage, which was some kind of compressed filesystem image ( gzipped ext2 image, gzipped romfs image, squashfs finally became dominant ). The kernel would decompress this image into a ramdisk and mount the ramdisk as the root fs. This image contained some additional drivers and boot scripts instead of a real init. These boot scripts performed various tasks to recognize hardware, activate things like raid arrays and LVM, detect UUIDs, and parse the kernel command line to find the real root, which could now be specified by UUID, volume label and other advanced things. It then mounted the real root fs in /initrd, then executed the pivot_root system call to have the kernel swap / and /initrd, then exec /sbin/init on the real root, which would then unmount /initrd and free the ramdisk.

Finally, today we have the initramfs. This is similar to the initrd, but instead of being a compressed filesystem image that is loaded into a ramdisk, it is a compressed cpio archive. A tmpfs is mounted as the root, and the archive is extracted there. Instead of using pivot_root, which was regarded as a dirty hack, the initramfs boot scripts mount the real root in /root, delete all files in the tmpfs root, then chroot into /root, and exec /sbin/init.

2014-05-15

MTD related

2014-05-15_064449

Reference :

1. Memory Technology Devices

2014-05-05

如何為嵌入式開發建立交叉編譯環境

隨著消費類電子產品的大量開發和應用和Linux操作系統的不斷健壯和強大,嵌入式系統越來越多的進入人們的生活之中,應用範圍越來越廣。

在裁減和定製Linux,運用於你的嵌入式系統之前,由於一般嵌入式開發系統存儲大小有限,通常你都要在你的強大的pc機 上建立一個用於目標機的交叉編譯環境。這是一個由編譯器、連接器和解釋器組成的綜合開發環境。交叉編譯工具主要由 binutils、gcc 和 glibc 幾個部分組成。有時出於減小 libc 庫大小的考慮,你也可以用別的 c 庫來代替 glibc,例如 uClibc、dietlibc 和 newlib。建立一個交叉編譯工具鏈是一個相當複雜的過程,如果你不想自己經歷複雜的編譯過程,網上有一些編譯好的可用的交叉編譯工具鏈可以下載。 ex : Introduction to Cross Compilation .

本文我們將以建立針對arm的交叉編譯開發環境為例來解說整個過程,其他的體系結構與這個相類似,只要作一些對應的改動。我的開發環境是,宿主機 i386-redhat-7.2,目標機 arm。

整個過程如下

1. 下載源文件、補丁和建立編譯的目錄
2. 建立內核頭文件
3. 建立二進制工具(binutils)-  GNU Binutils 的主要工具有兩個,一個是連接程序ld,另外一個是彙編程序as。其主要目的是為GNU 系統,提供彙編和連接工具。
4. 建立初始編譯器(bootstrap gcc)
5. 建立c庫(glibc)
6. 建立全套編譯器(full gcc)