2012年10月22日 星期一

[RPi] Firmware of Raspberry Pi 512MB

最近拿到Rev2的板子,是512MB的,可是讀出來的資訊不太正確,而且還是只能用256MB的RAM
但根據文件的說明,Revision應該要顯示13/14/15,可是現在讀出的是0005

板子上原來裝的是2012-09-18-wheezy-raspbian版本的image,在討論串說更新到最新版本的firmware就能讀到正確的硬體資訊,更新firmware的步驟如下:
0.安裝git-core
$ sudo apt-get install git-core

1.更新套件
$ sudo apt-get update; sudo apt-get upgrade

2.下載rpi-update的script並複製到/usr/bin
$ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update

3.更改權限為可執行
$ sudo chmod +x /usr/bin/rpi-update

4.執行rpi-update
$ sudo rpi-update

5.執行完畢後將在root底下產生一堆檔案
$ sudo ls -la /root/.rpi-firmware

以下步驟要用root權限執行
6.切到boot目錄
$ cd /boot

7.刪除一堆檔案(最新版本的firmware已經不需要這步驟)
$ sudo rm arm*.elf $ sudo rm loader.bin

8.將更新完的binary和data複製到/boot
$ sudo cp /root/.rpi-firmware/start.elf . $ sudo cp /root/.rpi-firmware/fixup*.dat .

9.新增一行gpu使用的memory,例如64
$ sudo vim config.txt
gpu_mem=64

10.重新開機就可以了
$ sudo reboot

可以看到Revision變成000f(16進位的15),而記憶體也變成438MB了,因為有部份拿去給GPU使用了


reference:
* Raspberry Pi Model B Revision 2.0 (512MB) Changes
* Test Whether Raspberry Pi Has 512MB RAM

2012年10月14日 星期日

[阿宅專區] SanDisk SDHC SD記憶卡

最近在玩Raspberry Pi所以需要購買SD卡測試不同的image,因為平常在光華商場買習慣了,也沒有特別上網比價,今天一比才發現我的頭真是太大了!!! 以下都是SanDisk的:

* 16GB Ultra 30MB/s Class 10: 我買360元, 網路價279元
* 16GB Extreme 45MB/s Class 10: 我買580元, 網路價465元
* 16GB Extreme Pro 95MB/s Class 10: 問到16xx元, 網路價1183元

[RPi] Raspberry Pi Rev2 is selling NOW

RPi的rev2要開賣了,大部分的修改細節之前都有公告過了,不過最令人驚訝的是竟然記憶體升級到512MB了,可以從e絡盟網站證實


修改的部份如下:
Reset
A reset circuit has been implemented, although in the standard build the required header is not fitted. Users wishing to use this circuit should fit an appropriate header to P6. Shorting P6 pin 1 to P6 pin 2 will cause the BCM2835 to reset.

USB Output Power
The resetable fuses protecting the USB outputs have been removed. This feature was implemented on some later revision 1.0 PCBs by replacing the fuses with links; revision 2.0 permanently implements this modification. It is now possible to reliably power the RPI from a USB hub that back feeds power, but it is important that the chosen hub cannot supply more than 2.5A under fault conditions.

JTAG Debug Support
Two GPIO pins have been interchanged to allow a missing debug signal (ARM_TMS) to appear on P1 pin 13.
Originally the connections were:
- CAM_GPIO [BCM2835/GPIO27] routed to S5 pin 11
- GPIO_GEN2 [BCM2835/GPIO21] routed to P1 pin 13
The new connections are:
- CAM_GPIO [BCM2835/GPIO21] routed to S5 pin 11
- GPIO_GEN2 [BCM2835/GPIO27] routed to P1 pin 13

I2C Support on P1/P6
The primary and secondary I2C channels have been reversed.
Originally the connections were:
- SCL0 [BCM2835/GPIO1] routed to P1 pin 5
- SDA0 [BCM2835/GPIO0] routed to P1 pin 3
- SCL1 [BCM2835/GPIO3] routed to S5 pin 13
- SDA1 [BCM2835/GPIO2] routed to S5 pin 14
The new connections are
- SCL0 [BCM2835/GPIO1] routed to S5 pin 13
- SDA0 [BCM2835/GPIO0] routed to S5 pin 14
- SCL1 [BCM2835/GPIO3] routed to P1 pin 5
- SDA1 [BCM2835/GPIO2] routed to P1 pin 3

Version Identification Links
The four GPIO signals originally used for version identification have been removed. These were never read by the system software and were redundant.

Additional I/O Expansion
To utilise GPIO signals released by the removal of the version identification links, a new connector site P5 has been added. This carries the four GPIO signals [BCM2835/GPIO28 – BCM2835/GPIO31] named GPIO7 – GPIO10 respectively, along with +5V0, +3V3 and two 0V. Currently this connector is not populated.
This GPIO allocation provides access to one of:
- SDA0, SCL0 (Operating independently of P1 SDA1, SCL1); or
- PCM_CLK, PCM_FS, PCM_DIN, PCM_DOUT or I2S; or
- Four GPIO signals.
This connector is intended to be a suitable attachment point for third-party clock and audio codec boards, and is pinned to be mounted (ideally) on the underside due to connector clash. Pin 1 is marked with the square pad (top left – looking from the top).

+5V0 Leakage from HDMI
Some users have found that connecting an unpowered Raspberry Pi to an HDMI television interferes with the correct operation of CEC for other connected devices. This was fixed on some later revision 1.0 PCBs by removing the ESD protection diode D14; revision 2.0 fixes this issue by connecting the top side of the diode to +5V0_HDMI.

SMSC +1V8
The SMSC 1V8 power has been disconnected from the system supply.

Mounting Holes!
Two 2.5mm (drilled 2.9mm for M2.5 screw) non plated mounting holes have been provided to assist with ATE test mounting. Positions of these holes relative to the bottom left of the PCB (Power Input Corner) are:
- Corner: 0.0mm,0.0mm
- First Mount: 25.5mm,18.0mm
- Second Mount: 80.1mm, 43.6mm
Warning: If used to permanently mount the PCB – do not over tighten screws or drill out to fit larger screws, as this will lead to damage to the PCB.

LED Marking
Two minor changes have been made to the silk screen: - D9 (Yellow LED) graphic changed from the incorrect 10M to 100 - D5 (Green LED) graphic changed from OK to ACT (Activity)


/** update @ 2012-10-16 **/
看到拍賣網站有人在預購

2012年10月7日 星期日

[RPi] X11 Forwarding Over SSH2

拿到Raspberry Pi除了從console登入後開啟X Window也可透過SSH將X遠端傳送過來

environment:
* PC : Ubuntu 10.04
* RPi: 2012-09-18-wheezy-raspbian.img

1.將Ubuntu的X Server權限打開
可以透過command的方式將allowed_users修改為anybody
$ sudo vim /etc/X11/Xwrapper.config
或是dpkg,選擇Anybody即可
$ sudo dpkg-reconfigure x11-common
Because the X server runs with superuser privileges, it may be unwise to permit any user to start it, for security  reasons.  On the other hand, it is even more unwise to run general-purpose X client programs as root, which is what may happen if only root is permitted to start the X server.  A good compromise is to permit the X server to be started only by users logged in to one of the virtual consoles.
Users allowed to start the X server:  
           Root Only    
       Console Users Only      
            Anybody     

2.在Ubuntu下指令,就可以X11 Forwarding Over SSH2了
$ xinit -e ssh -XY user@pi lxsession -- :1

順便紀錄一下幾個指令與文章:
查看目前所使用的window manager(Debian/Ubuntu系列需安裝wmctrl)
$ wmctrl -m
Name: Openbox
Class: 
PID: N/A
Window manager's "showing the desktop" mode: OFF
查看目前所使用的Desktop Environment
$ echo $XDG_CURRENT_DESKTOP
LXDE

這篇講到的tty和:N的確容易搞混,裡面是這樣說的
You may be confusing virtual console numbers, ttyN, with X display numbers, :N. ttyN, where N is typically 1..12, is the console that you see after you press Ctrl+Alt+FN, and tty0 is a special device referring to the current console. :N, where N is typically 0..9, refers to the Nth different X server on the host, usually counting from zero.
這篇對整個X,SSH,Window Managers和Desktop Environments有詳細的說明,並解釋了各種X over SSH的方式與比較其優缺點

reference:
* X Over SSH2 - A Tutorial
* [Howto] Redirect X over SSH to other PC
* 理解 Xwindow

2012年10月1日 星期一

[Tips] 更新字體的cache

今天想說裝個很潮的Gill Sans和LiHei Pro字體,找到ttf也顯示installed,但是在文字選擇卻找不到,後來重新更新cache就解決了
$ sudo fc-cache -fv


reference: Installed entire font family, but only one appears