2015年4月14日 星期二
2015年4月9日 星期四
Change the Audio Output on Raspberry Pi
1. Install related package
# sudo apt-get install alsa-utils
2. Modify the audio path on Raspberry Pi
# sudo amixer cset numid=3 X
Where X is as following:
0 = Auto
1 = 3.5 mm Audio Jack
2 = HDMI
numid=1,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=4,iface=MIXER,name='Capture Switch'numid=5,iface=MIXER,name='Mic Boost (+20dB)'numid=6,iface=MIXER,name='Mic Boost2 (+20dB)'numid=7,iface=MIXER,name='Mic Switch'
numid=8,iface=MIXER,name='Sidetone Playback Volume'numid=9,iface=MIXER,name='ADC High Pass Filter Switch'
numid=10,iface=MIXER,name='Store DC Offset Switch'numid=11,iface=MIXER,name='Capture Source'numid=12,iface=MIXER,name='Playback De-emphasis'numid=13,iface=MIXER,name='Input Mux'numid=16,iface=MIXER,name='Output Mixer HiFi Playback Switch'numid=14,iface=MIXER,name='Output Mixer Line Bypass Switch'numid=15,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
How to setup a VNC Server in Raspberry Pi ?
1. Install x11vnc package
# sudo apt-get install x11vnc
2. Setup your password
# x11vnc –savepasswd
3. Establish a VNC connection with 1920x1080 resolution and background execution
# x11vnc –geometry 1920x1080 –bg
4. Disconnect all of the VNC connections
# x11vnc –R stop
5. Change the the default resolution of Raspberry Pi
# vim /boot/config.txt
uncomment the ‘#’ tag in front of the following string
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=68
hdmi_mode=1 640x350 85 Hz hdmi_mode=2 640x400 85 Hz hdmi_mode=3 720x400 85 Hz hdmi_mode=4 640x480 60 Hz hdmi_mode=5 640x480 72 Hz hdmi_mode=6 640x480 75 Hz hdmi_mode=7 640x480 85 Hz hdmi_mode=8 800x600 56 Hz hdmi_mode=9 800x600 60 Hz hdmi_mode=10 800x600 72 Hz hdmi_mode=11 800x600 75 Hz hdmi_mode=12 800x600 85 Hz hdmi_mode=13 800x600 120 Hz hdmi_mode=14 848x480 60 Hz hdmi_mode=15 1024x768 43 Hz DO NOT USE hdmi_mode=16 1024x768 60 Hz hdmi_mode=17 1024x768 70 Hz hdmi_mode=18 1024x768 75 Hz hdmi_mode=19 1024x768 85 Hz hdmi_mode=20 1024x768 120 Hz hdmi_mode=21 1152x864 75 Hz hdmi_mode=22 1280x768 Reduced blanking hdmi_mode=23 1280x768 60 Hz hdmi_mode=24 1280x768 75 Hz hdmi_mode=25 1280x768 85 Hz hdmi_mode=26 1280x768 120 Hz Reduced blanking hdmi_mode=27 1280x800 Reduced blanking hdmi_mode=28 1280x800 60 Hz hdmi_mode=29 1280x800 75 Hz hdmi_mode=30 1280x800 85 Hz hdmi_mode=31 1280x800 120 Hz Reduced blanking hdmi_mode=32 1280x960 60 Hz hdmi_mode=33 1280x960 85 Hz hdmi_mode=34 1280x960 120 Hz Reduced blanking hdmi_mode=35 1280x1024 60 Hz hdmi_mode=36 1280x1024 75 Hz hdmi_mode=37 1280x1024 85 Hz hdmi_mode=38 1280x1024 120 Hz Reduced blanking hdmi_mode=39 1360x768 60 Hz hdmi_mode=40 1360x768 120 Hz Reduced blanking hdmi_mode=41 1400x1050 Reduced blanking hdmi_mode=42 1400x1050 60 Hz hdmi_mode=43 1400x1050 75 Hz hdmi_mode=44 1400x1050 85 Hz hdmi_mode=45 1400x1050 120 Hz Reduced blanking hdmi_mode=46 1440x900 Reduced blanking hdmi_mode=47 1440x900 60 Hz hdmi_mode=48 1440x900 75 Hz hdmi_mode=49 1440x900 85 Hz hdmi_mode=50 1440x900 120 Hz Reduced blanking hdmi_mode=51 1600x1200 60 Hz hdmi_mode=52 1600x1200 65 Hz hdmi_mode=53 1600x1200 70 Hz hdmi_mode=54 1600x1200 75 Hz hdmi_mode=55 1600x1200 85 Hz hdmi_mode=56 1600x1200 120 Hz Reduced blanking hdmi_mode=57 1680x1050 Reduced blanking hdmi_mode=58 1680x1050 60 Hz hdmi_mode=59 1680x1050 75 Hz hdmi_mode=60 1680x1050 85 Hz hdmi_mode=61 1680x1050 120 Hz Reduced blanking hdmi_mode=62 1792x1344 60 Hz hdmi_mode=63 1792x1344 75 Hz hdmi_mode=64 1792x1344 120 Hz Reduced blanking hdmi_mode=65 1856x1392 60 Hz hdmi_mode=66 1856x1392 75 Hz hdmi_mode=67 1856x1392 120 Hz Reduced blanking hdmi_mode=68 1920x1200 Reduced blanking hdmi_mode=69 1920x1200 60 Hz hdmi_mode=70 1920x1200 75 Hz hdmi_mode=71 1920x1200 85 Hz hdmi_mode=72 1920x1200 120 Hz Reduced blanking hdmi_mode=73 1920x1440 60 Hz hdmi_mode=74 1920x1440 75 Hz hdmi_mode=75 1920x1440 120 Hz Reduced blanking hdmi_mode=76 2560x1600 Reduced blanking hdmi_mode=77 2560x1600 60 Hz hdmi_mode=78 2560x1600 75 Hz hdmi_mode=79 2560x1600 85 Hz hdmi_mode=80 2560x1600 120 Hz Reduced blanking hdmi_mode=81 1366x768 60 Hz hdmi_mode=82 1080p 60 Hz hdmi_mode=83 1600x900 Reduced blanking hdmi_mode=84 2048x1152 Reduced blanking hdmi_mode=85 720p 60 Hz hdmi_mode=86 1366x768 Reduced blanking
6. Install VNC client and connect to Raspberry Pi
YourSVNServerIP:5900
Thank you.
2014年12月11日 星期四
How to compile UDK2014 (UEFI Development Kit 2014)
Please make sure your computer has already installed Visual Studio 2008 or higher version 2010 and remember to install X64 compiler for generating X64 programs before compiling UDK2014.
If you want to complie EDK or EDK II
=> How To Build EDK & EDK II Environment In Easy Way
Download the following files :
1. Download UDK2014 source code from Sourceforge.
http://sourceforge.net/projects/edk2/files/UDK2014_Releases/
2. Download the GNU Patch.
http://gnuwin32.sourceforge.net/packages/patch.htm
3. Download http://www.openssl.org/source/openssl-0.9.8zb.tar.gz from http://www.openssl.org/source/
The following are the steps to compile UDK2014.
1. Unzip UDK2014.SP1.Complete.MyWorkSpace.zip to current folder.
2. Unzip UDK2014.SP1.MyWorkSpace.zip to current folder.
3. Unzip BaseTools(Windows).zip to MyWorkSpace folder.
4. Unzip openssl-0.9.8zb.tar.gz to MyWorkSpace\CryptoPkg\Library\OpensslLib folder using administrator privilege.
5. Copy the patch.exe in patch-2.5.9-7-bin.zip to MyWorkSpace\CryptoPkg\Library\OpensslLib\openssl-0.9.8zb folder.
6. Follow the instructions according to G:\UDK2014\MyWorkSpace\CryptoPkg\Library\OpensslLib\Patch-HOWTO.txt. (Remember to use the administrator privilege while executing commands)
7. The remaining steps.
~ Thank you ~
2014年1月23日 星期四
2013年2月21日 星期四
2012年9月27日 星期四
如何開啟A20位址線 ?
Assembly code
In al, 0x92
Or al, 2
Out 0x92, al
Another way is to use the BIOS.
INT 15, 2401
mov ax, 0x2401
int 0x15
2011年9月28日 星期三
如何製作虛擬Floppy.img的GRUB開機介面
平台 : Ubuntu(Virtualbox) Windows7
工具 : Bochs
1.開啟終端機,創立一個資料夾,並進入該資料夾
2.製作Floppy.img (兩者皆可)
# dd if=/dev/zero of=Floppy.img bs=1024 count=1440
# dd if=/dev/zero of=Floppy.img bs=512 count=2880
3.格式化Floppy.img
# mkdosfs Floppy.img
4.建立一個讓Floppy.img可以掛在的目錄 floppy
# mkdir floppy
5.掛載Floppy.img
# mount –o loop Floppy.img floppy
6.來這裡抓GRUB原始檔
7. 解壓縮(用0.96)
# tar zxvf grub-0.96-i386-pc.tar.gz
8.複製GRUB目錄
# sudo cp –r grub-0.96-i386-pc/* floppy
9.卸載floppy
# sudo umount floppy
10.安裝Grub
# sudo apt-get install grub
11.進入GRUB修改
# grub
12.輸入下列資訊
grub> device (fd0) floppy.img
grub> root (fd0)
grub> setup (fd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/fat_stage1_5" exists... yes
Running "embed /boot/grub/fat_stage1_5 (fd0)"... failed (this is not fatal)
Running "embed /boot/grub/fat_stage1_5 (fd0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit
13.把檔案複製回Window7介面,開啟Bochs載入floppy.img 如圖設定
14.執行畫面
到此就告一段落
(1) 如果已經開發好作業系統者,做完第8個步驟後,加入menu.lst與kernel.elf於指定位址
kernel.elf (boot/kernel.elf)
menu.lst ( boot/grub/menu.lst )
title DclabOS
root (fd0)
kernel /boot/kernel.elf
boot
(2)然後接著做步驟9之後的動作即可
PS : 作業系統只輸出 Test Output to monitor. …
搞定收工 !
訂閱:
文章 (Atom)