5. Hardware Spec.
SoC:BroadcomBCM2835(CPU,GPU DSP,SDRAM, USB)
CPU:ARM1176JZF-S核心(ARM11系列)700MHz
GPU: Broadcom VideoCore IV, OpenGL ES 2.0, 1080p 30 h.264/MPEG-4
AVC
RAM: 256MByte (Rev A), 512 MByte (Rev B)
OS:Raspbian Linux, GNU/Linux(Debian, Fedora, Arch Linux ARM),
Android,…
6. Video Codec
Video Codec for MPEG2 and VC-1 need License
You will need to provide your device's internal 16-digit serial
number as part of your order. Your serial number is not the
number printed on your board.
http://www.raspberrypi.com
7. RaspPi pinout (Model B+)
you can learn Linux driver
http:// blog.ittraining.com.tw
9. SoC BCM2835 Address Map
Peripherals are mapped into the kernel virtual address space starting at address 0xF2000000.
#define BCM2835_PERI_BASE 0x20000000
#define BCM2835_GPIO_BASE (BCM2835_PERI_BASE + 0x200000)
10. Linux BSP
Bootloader with Device Tree support
Kernel with Device Tree support
Drivers for SoC and board components
SoC machine specific layer
Root file system for software developers
GNU cross compiler for ARM architecture
xxx Build Environment
11. Pi’s SD Card Layout
3 Embedded Linux components
Boot code
Linux Kernel
Root File system
Boot code
kernel
Root FileSystem
mmcblock0p1
/boot
mmcblock0p2
/
You can access “boot code partition “ in windows , because it is FAT32
14. RaspPi Startup: GPU --> CPU
First stage bootloader --> boot from SD card, and
automatically mount SDcard FAT32 Partition
Second stage bootloader (bootcode.bin) – Read
GPU Firmware (start.elf) on SD card and write to
GPU, and then boot GPU
GPU firmware (start.elf) - Once loaded, this
allows the GPU to start up the ARM.
• An additional file, fixup.dat, is used to configure the
SDRAM partition between the GPU and the ARM. At
this point, the CPU is release from reset and
execution is transferred over.
Linux code - Kernel.img (note: boot parameters:
/boot/cmdline.txt)
15. /proc/cmdline
Linux Kernel boot parameters
dma.dmachans=0x7f35
bcm2708_fb.fbwidth=1920
bcm2708_fb.fbheight=1080
bcm2708.boardrev=0xe
bcm2708.serial=0x67da1f2e
smsc95xx.macaddr=B8:27:EB:DA:1F:2E
sdhci-bcm2708.emmc_clock_freq=250000000
vc_mem.mem_base=0x1ec00000
vc_mem.mem_size=0x20000000
dwc_otg.lpm_enable=0
console=ttyAMA0,115200
kgdboc=ttyAMA0,115200
console=tty1 root=/dev/mmcblk0p2
rootfstype=ext4
elevator=deadline
rootwait
More about RPI BCM2708 Parameters
http://elinux.org/RPI_BCM2708_Parameters#cite_note-15
16. Linux booting flow
1. Boot up with Broadcom Bootcode
2. Initialize the system and peripherals.
3. Launch linux kernel
4. Mount initird (initial ramdisk), if any
5. Mount the real root filesystem
6. Execute init and launch shell
Embedded Linux Course
Execute init
Mount rootfs
Start kernel
Boot code
ARM Linux
GPU
17. Root File system
There are two components to a running Linux system: the
kernel and the root file system
Root file system : mounted as the root directory (/)
To work properly, the root filesystem should include a
minimum set of files to support the system
1) runtime shared libraries from the toolchain : /lib/*.so
2) system configuration files : /etc/*
3) /dev
4) …
Applications
Shared Library
Linux Kernel
Root filesystem
2-17
Embedded Linux Course
18. Root File System Layout
Embedded Linux Course
/
├── bin
├── boot
├── dev
├── etc
├── home
├── lib
├──init
├──firmware
├── modules/<kernel_ver>
├── modprobe.d
├── lost+found
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin
├── selinux
├── srv
├── sys
├── tmp
├── usr
└── var
19. Filesystem Hierarchy Standard (FHS)
2-19
Embedded Linux Course
Directory Description
bin Essential command binaries
boot Static files of the boot loader
dev Device files
etc Host-specific system configuration
lib Essential shared libraries and kernel modules
media Mount point for removeable media
mnt Mount point for mounting a filesystem temporarily
opt Add-on application software packages
sbin Essential system binaries
tmp Temporary files
usr Secondary hierarchy
var Variable data
Root File System Layout
25. Load I2C Driver Module
The I2C ports need to be enabled in Raspbian before
they can be used.
$sudo nano /etc/modules
$sudo nano /etc/modprobe.d/raspi-blacklist.conf
remove a '#' character to this line
To install the I2C utilities:
$sudo apt-get install i2c-tools
$sudo reboot
i2c-bcm2708
i2c-dev
# blacklist i2c-bcm2708
26. Access EEPROM Using I2c-tools
i2cdetect -y 1
EEPROM read/write using i2cset/i2cget
open source I2c-tools
http://www.lm-sensors.org/wiki/I2CTools
28. Run a script on start up
sudo nano /etc/rc.local
Make sure not to miss the & character at the end, otherwise the script will not
run in the background and will make the booting process get stuck in a loop!
29. Backing up your Operating System image
BACKUP
sudo dd bs=4M if=/dev/sdb of=raspbian.img
Restore you system from SD card
sudo dd bs=4M if=raspbian.img of=/dev/sdb