FirefoxOS/RPiB2: Difference between revisions

debugging section
(flashing process)
(debugging section)
Line 217: Line 217:
  out/target/product/rpib2/ramdisk.img => boot
  out/target/product/rpib2/ramdisk.img => boot


== Debuging ==
== Debugging ==
TBD
The Raspberry Pi serial port consists of two signals (a 'transmit' signal, TxD and a 'receive' signal RxD) made available on the GPIO header. To connect to another serial device, you connect the 'transmit' of one to the 'receive' of the other, and vice versa. You will also need to connect the Ground pins of the two devices together.
 
If you wish to connect your Pi to a PC with a USB port, the simplest option is to use a USB-to-serial cable which uses 3.3V logic levels (e.g. the [http://www.adafruit.com/products/954 Adafruit 954] cable, the [http://www.ftdichip.com/Products/Cables/RPi.htm FTDI TTL-232R-RPI] cable, or the [http://www.mysticengineering.com/debug.buddy/pi.usage.html Debug Buddy] ultimate serial port). These can be simply plugged in directly to the GPIO header (see illustration).
 
*For using the ''Adafruit 954'' cable on [[Windows]], see [[Adafruit 954 USB serial cable]].
 
===Linux terminal set up===
 
If your PC is running Linux, you will need to know the ''port name'' of its serial port:
 
* Built-in (standard) Serial Port: the Linux standard is  '''/dev/ttyS0''', '''/dev/ttyS1''', and so on
* USB Serial Port Adapter: '''/dev/ttyUSB0''', '''/dev/ttyUSB1''', and so on.
** Some types of USB serial adapter may appear as '''/dev/ttyACM0''' ...
 
You will need to be a member of the ''dialout'' group to access this port (for later releases the required group is ''tty''). You can check which is needed with:
ls -l /dev/ttyUSB0
and you will see something like "crw-rw----T 1 root dialout ...", ''c'' means character device, and root can 'read,write' and the group ''dialout'' can 'read,write' to the port and everyone else cannot access it.
 
To find out if you, the current user, is in the group dialout, use the command:
 
id
 
If you do not see ''dialout'' listed, add yourself with the command
sudo usermod -a -G dialout ''username''
 
You then have a choice of terminal emulation programs:
 
==== Using GNU Screen ====
 
Enter the command below into a terminal window
  screen ''port_name'' 115200
 
To exit GNU screen, type Control-A k.
 
==== Using Minicom ====
 
Run minicom with the following parameters:
 
minicom -b 115200 -o -D Port_Name
 
You can exit minicom with Control-A x
 
===Windows terminal set-up===
 
Users of Windows Vista or later will need to download a terminal program, for instance [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY], or [http://en.wikipedia.org/wiki/Tera_Term TeraTerm]. Users of XP and below can choose between using ''PuTTY'' and the built-in ''Hyperterminal.''
 
PuTTY users simply need to choose 'serial', select the correct COM port and set the speed, as shown in the dialog below.
 
[[File:Putty-settings.png]]
 
If you are unsure of the COM port, run [[https://en.wikipedia.org/wiki/Device_manager Device Manager]] and look under 'Ports'. USB-attached serial adapters should have the name of the adapter shown (the Adafruit cable comes up as 'Prolific USB-to_Serial Comm Port'.
 
===Connect All The Things===
The Console lead has four female connections that can be plugged directly onto the GPIO header of the Raspberry Pi. The Adafruit USB console cable has 3.3V logic, so its safe to use with your Pi.
 
[[File:Putty-settings.png]]
 
For this experiment, the serial lead is going to power the Raspberry Pi. So, DO NOT attach the Pi's USB power adapter. If you would rather power the Pi from your USB power adapter then leave the Red lead from the Serial lead un attached.
 
The important thing here is to only power it from one source, the USB power adaptor or the Console Lead BUT NOT BOTH.
 
Attach the leads as shown below:
 
[[File:Putty-settings.png]]
 
The connections are to the outside pin connections of the GPIO header.
 
* The red lead should be connected to 5V,
* The black lead to GND,
* The white lead to TXD.
* The green lead to RXD.
 
 
===Boot messages===
 
If your connection is set up correctly, when the Pi is booted you should see many messages as the system comes up:
Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.27+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #250 PREEMPT Thu Oct 18 19:03:02 BST 2012
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113792
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xf bcm2708.serial=0xcc5c4b6d smsc95xx.macaddr=B8:27:EB:5C:4B:6D sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
 
and so on. Eventually, you should see a login prompt:
 
Android raspi2 ttyAMA0
rpib2@hostname$
 
You can then log in as you would with a keyboard and screen.


== Need Help? ==
== Need Help? ==
Confirmed users
38

edits