SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Raspberry Pi tutorials
www.ittraining.com.tw
Outline
Introduction to Raspberry Pi
About Linux BSP
Misc (backup OS image, vcgencmd, …)
Raspberry Pi Education Kit
INTRODUCTION TO RASPBERRY PI
Raspberry Pi (Model B+)
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,…
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
RaspPi pinout (Model B+)
you can learn Linux driver
http:// blog.ittraining.com.tw
Rasp Pi Software Architecture
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)
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
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
lsblk & fdisk -l
/boot
Bootcode
• bootcode.bin (Binary)
• start.elf (Binary)
• fixup.dat (Binary)
• config.txt (read before arm)
Linux kernel boot command
• cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
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)
/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
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
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
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
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
Mount
Edit /etc/fstab
Check “mount” status,, run mount command
Cat /proc/filesystems (support by your kernel)
MISC
/boot/config.txt  like PC BIOS setting
Module Blacklist
/etc/modprobe.d/raspi-blacklist.conf
Raspbian configuration files that prevents
them from being loaded automatically (the
normal setting)
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
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
Screen Shot
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!
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
Communicate with VC ( Broadcom Video Core)
vcgencmd :Command exported from GPU
Firmware
See http://elinux.org/RPI_vcgencmd_usage
root@raspberrypi:/home# vcgencmd commands
commands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init,
vchi_test_exit, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging,
pm_stop_logging, version, commands, set_vll_dir, led_control, set_backlight, set_logging,
get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled,
get_camera, get_mem, measure_clock, measure_volts, measure_temp, get_config,
hdmi_ntsc_freqs, hdmi_status_show, pwm_speedup, force_audio, render_bar, disk_notify,
inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread,
egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, file, vctest_memmap,
vctest_start, vctest_stop, vctest_set, vctest_get"
vcgencmd Examples
Raspberry Pi Education Kit
Read more : http://blog.ittraining.com.tw/2015/03/raspberry-pi_16.html
References
http:// blog.ittraining.comt.tw
http://www.youtube.com/user/itc9988

Weitere ähnliche Inhalte

Was ist angesagt?

Universal Reconfigurable Processing Platform For Space Rev Voice4
Universal Reconfigurable Processing Platform For Space Rev Voice4Universal Reconfigurable Processing Platform For Space Rev Voice4
Universal Reconfigurable Processing Platform For Space Rev Voice4dseagrave
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture Abdullaziz Tagawy
 
Embedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOSEmbedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOS艾鍗科技
 
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek Vasut
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek VasutEmbedded Recipes 2018 - SoC+FPGA update in 2018 - Marek Vasut
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek VasutAnne Nicolas
 
Project ACRN GPIO mediator introduction
Project ACRN GPIO mediator introductionProject ACRN GPIO mediator introduction
Project ACRN GPIO mediator introductionProject ACRN
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition 艾鍗科技
 
Let's Play STM32
Let's Play STM32Let's Play STM32
Let's Play STM32Jay Chen
 
MYC-C7Z015 CPU Module
MYC-C7Z015 CPU ModuleMYC-C7Z015 CPU Module
MYC-C7Z015 CPU ModuleLinda Zhang
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜Ryousei Takano
 
Synopsys User Group Presentation
Synopsys User Group PresentationSynopsys User Group Presentation
Synopsys User Group Presentationemlawgr
 
Control-M 800 - Infrastructure Example
Control-M 800 - Infrastructure ExampleControl-M 800 - Infrastructure Example
Control-M 800 - Infrastructure ExampleOhio University
 
Project ACRN USB mediator introduction
Project ACRN USB mediator introductionProject ACRN USB mediator introduction
Project ACRN USB mediator introductionProject ACRN
 
Snapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSnapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSantosh Verma
 
Project ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationProject ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationGeoffroy Van Cutsem
 
BKK16-TR08 How to generate power models for EAS and IPA
BKK16-TR08 How to generate power models for EAS and IPABKK16-TR08 How to generate power models for EAS and IPA
BKK16-TR08 How to generate power models for EAS and IPALinaro
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Dobrica Pavlinušić
 
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverSFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverLinaro
 
I2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsI2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsMostafa Khamis
 

Was ist angesagt? (20)

Universal Reconfigurable Processing Platform For Space Rev Voice4
Universal Reconfigurable Processing Platform For Space Rev Voice4Universal Reconfigurable Processing Platform For Space Rev Voice4
Universal Reconfigurable Processing Platform For Space Rev Voice4
 
SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture SNAPDRAGON SoC Family and ARM Architecture
SNAPDRAGON SoC Family and ARM Architecture
 
Embedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOSEmbedded TCP/IP stack for FreeRTOS
Embedded TCP/IP stack for FreeRTOS
 
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek Vasut
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek VasutEmbedded Recipes 2018 - SoC+FPGA update in 2018 - Marek Vasut
Embedded Recipes 2018 - SoC+FPGA update in 2018 - Marek Vasut
 
Project ACRN GPIO mediator introduction
Project ACRN GPIO mediator introductionProject ACRN GPIO mediator introduction
Project ACRN GPIO mediator introduction
 
TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition
 
Let's Play STM32
Let's Play STM32Let's Play STM32
Let's Play STM32
 
MYC-C7Z015 CPU Module
MYC-C7Z015 CPU ModuleMYC-C7Z015 CPU Module
MYC-C7Z015 CPU Module
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
 
Synopsys User Group Presentation
Synopsys User Group PresentationSynopsys User Group Presentation
Synopsys User Group Presentation
 
Control-M 800 - Infrastructure Example
Control-M 800 - Infrastructure ExampleControl-M 800 - Infrastructure Example
Control-M 800 - Infrastructure Example
 
Project ACRN USB mediator introduction
Project ACRN USB mediator introductionProject ACRN USB mediator introduction
Project ACRN USB mediator introduction
 
Snapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 ArchitectureSnapdragon SoC and ARMv7 Architecture
Snapdragon SoC and ARMv7 Architecture
 
Hp pro liant dl3xx g7
Hp pro liant dl3xx g7Hp pro liant dl3xx g7
Hp pro liant dl3xx g7
 
CCNA CHAPTER 5 BY jetarvind kumar madhukar
CCNA CHAPTER 5 BY jetarvind kumar madhukarCCNA CHAPTER 5 BY jetarvind kumar madhukar
CCNA CHAPTER 5 BY jetarvind kumar madhukar
 
Project ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationProject ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementation
 
BKK16-TR08 How to generate power models for EAS and IPA
BKK16-TR08 How to generate power models for EAS and IPABKK16-TR08 How to generate power models for EAS and IPA
BKK16-TR08 How to generate power models for EAS and IPA
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driverSFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
 
I2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsI2C-Bus Design and Verification Specs
I2C-Bus Design and Verification Specs
 

Andere mochten auch

The Raspberry Pi JavaFX Carputer
The Raspberry Pi JavaFX CarputerThe Raspberry Pi JavaFX Carputer
The Raspberry Pi JavaFX CarputerSimon Ritter
 
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌Tun-Yu Chang
 
Based on raspberry pi with the application of Stepper
Based on raspberry pi with the application of StepperBased on raspberry pi with the application of Stepper
Based on raspberry pi with the application of Stepper冠宇 陳
 
淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享Tun-Yu Chang
 
Raspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issuesRaspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issuesyeokm1
 
Sophia conf 2013 - Le monde du Raspberry
Sophia conf 2013 - Le monde du RaspberrySophia conf 2013 - Le monde du Raspberry
Sophia conf 2013 - Le monde du RaspberryNicolas Hennion
 
Project humix overview - For Raspberry pi community meetup
Project humix overview - For  Raspberry pi  community meetupProject humix overview - For  Raspberry pi  community meetup
Project humix overview - For Raspberry pi community meetupJeffrey Liu
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry PiLentin Joseph
 
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoTAnderson Cheng
 

Andere mochten auch (9)

The Raspberry Pi JavaFX Carputer
The Raspberry Pi JavaFX CarputerThe Raspberry Pi JavaFX Carputer
The Raspberry Pi JavaFX Carputer
 
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
 
Based on raspberry pi with the application of Stepper
Based on raspberry pi with the application of StepperBased on raspberry pi with the application of Stepper
Based on raspberry pi with the application of Stepper
 
淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享
 
Raspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issuesRaspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issues
 
Sophia conf 2013 - Le monde du Raspberry
Sophia conf 2013 - Le monde du RaspberrySophia conf 2013 - Le monde du Raspberry
Sophia conf 2013 - Le monde du Raspberry
 
Project humix overview - For Raspberry pi community meetup
Project humix overview - For  Raspberry pi  community meetupProject humix overview - For  Raspberry pi  community meetup
Project humix overview - For Raspberry pi community meetup
 
Exploring Raspberry Pi
Exploring Raspberry PiExploring Raspberry Pi
Exploring Raspberry Pi
 
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT
台灣樹莓派 2016/12/26 #17 站在Nas的中心呼喊物聯網 QNAP QIoT
 

Ähnlich wie Raspberry Pi tutorial

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practicalMoabi.com
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2While42
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry PiLloydMoore
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slidesMoabi.com
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery CommandsKevin OBrien
 
Vortex86 Sx Linux How To
Vortex86 Sx Linux How ToVortex86 Sx Linux How To
Vortex86 Sx Linux How ToRogelio Canedo
 
NetBSD on Google Compute Engine (en)
NetBSD on Google Compute Engine (en)NetBSD on Google Compute Engine (en)
NetBSD on Google Compute Engine (en)Ryo ONODERA
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practicalMoabi.com
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep diveNaoto MATSUMOTO
 
Advanced Diagnostics 2
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2Aero Plane
 

Ähnlich wie Raspberry Pi tutorial (20)

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slides
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Vortex86 Sx Linux How To
Vortex86 Sx Linux How ToVortex86 Sx Linux How To
Vortex86 Sx Linux How To
 
NetBSD on Google Compute Engine (en)
NetBSD on Google Compute Engine (en)NetBSD on Google Compute Engine (en)
NetBSD on Google Compute Engine (en)
 
Beagleboard xm-setup
Beagleboard xm-setupBeagleboard xm-setup
Beagleboard xm-setup
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical
 
Building
BuildingBuilding
Building
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep dive
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Advanced Diagnostics 2
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2
 

Mehr von 艾鍗科技

Appendix 1 Goolge colab
Appendix 1 Goolge colabAppendix 1 Goolge colab
Appendix 1 Goolge colab艾鍗科技
 
Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用艾鍗科技
 
02 IoT implementation
02 IoT implementation02 IoT implementation
02 IoT implementation艾鍗科技
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge艾鍗科技
 
2. 機器學習簡介
2. 機器學習簡介2. 機器學習簡介
2. 機器學習簡介艾鍗科技
 
5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 艾鍗科技
 
心率血氧檢測與運動促進
心率血氧檢測與運動促進心率血氧檢測與運動促進
心率血氧檢測與運動促進艾鍗科技
 
利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆艾鍗科技
 
IoT感測器驅動程式 在樹莓派上實作
IoT感測器驅動程式在樹莓派上實作IoT感測器驅動程式在樹莓派上實作
IoT感測器驅動程式 在樹莓派上實作艾鍗科技
 
無線聲控遙控車
無線聲控遙控車無線聲控遙控車
無線聲控遙控車艾鍗科技
 
最佳光源的研究和實作
最佳光源的研究和實作最佳光源的研究和實作
最佳光源的研究和實作 艾鍗科技
 
無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車 艾鍗科技
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning艾鍗科技
 
人臉辨識考勤系統
人臉辨識考勤系統人臉辨識考勤系統
人臉辨識考勤系統艾鍗科技
 
智慧家庭Smart Home
智慧家庭Smart Home智慧家庭Smart Home
智慧家庭Smart Home艾鍗科技
 

Mehr von 艾鍗科技 (20)

Appendix 1 Goolge colab
Appendix 1 Goolge colabAppendix 1 Goolge colab
Appendix 1 Goolge colab
 
Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用
 
02 IoT implementation
02 IoT implementation02 IoT implementation
02 IoT implementation
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge
 
Openvino ncs2
Openvino ncs2Openvino ncs2
Openvino ncs2
 
Step motor
Step motorStep motor
Step motor
 
2. 機器學習簡介
2. 機器學習簡介2. 機器學習簡介
2. 機器學習簡介
 
5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron)
 
3. data features
3. data features3. data features
3. data features
 
心率血氧檢測與運動促進
心率血氧檢測與運動促進心率血氧檢測與運動促進
心率血氧檢測與運動促進
 
利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆
 
IoT感測器驅動程式 在樹莓派上實作
IoT感測器驅動程式在樹莓派上實作IoT感測器驅動程式在樹莓派上實作
IoT感測器驅動程式 在樹莓派上實作
 
無線聲控遙控車
無線聲控遙控車無線聲控遙控車
無線聲控遙控車
 
最佳光源的研究和實作
最佳光源的研究和實作最佳光源的研究和實作
最佳光源的研究和實作
 
無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
人臉辨識考勤系統
人臉辨識考勤系統人臉辨識考勤系統
人臉辨識考勤系統
 
智慧家庭Smart Home
智慧家庭Smart Home智慧家庭Smart Home
智慧家庭Smart Home
 
智能健身
智能健身智能健身
智能健身
 

Kürzlich hochgeladen

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Kürzlich hochgeladen (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

Raspberry Pi tutorial

  • 2. Outline Introduction to Raspberry Pi About Linux BSP Misc (backup OS image, vcgencmd, …) Raspberry Pi Education Kit
  • 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
  • 8. Rasp Pi Software Architecture
  • 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
  • 13. /boot Bootcode • bootcode.bin (Binary) • start.elf (Binary) • fixup.dat (Binary) • config.txt (read before arm) Linux kernel boot command • cmdline.txt dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
  • 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
  • 20. Mount Edit /etc/fstab Check “mount” status,, run mount command
  • 22. MISC
  • 23. /boot/config.txt  like PC BIOS setting
  • 24. Module Blacklist /etc/modprobe.d/raspi-blacklist.conf Raspbian configuration files that prevents them from being loaded automatically (the normal setting)
  • 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
  • 30. Communicate with VC ( Broadcom Video Core) vcgencmd :Command exported from GPU Firmware See http://elinux.org/RPI_vcgencmd_usage root@raspberrypi:/home# vcgencmd commands commands="vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled, get_camera, get_mem, measure_clock, measure_volts, measure_temp, get_config, hdmi_ntsc_freqs, hdmi_status_show, pwm_speedup, force_audio, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, mem_oom, mem_reloc_stats, file, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get"
  • 32. Raspberry Pi Education Kit Read more : http://blog.ittraining.com.tw/2015/03/raspberry-pi_16.html