The document outlines an embedded Linux BSP training organized by YoctoTutor and RuggedBoard, covering various topics like embedded OS components, boot loaders, Linux kernel, and root file systems. It includes details on different embedded systems classifications, the boot process, and provides instructions for compiling U-Boot and Linux kernel for the RuggedBoard. Additionally, it discusses the use of various tools and libraries for programming and demonstrates the experience of the presenter, Vasu, in embedded technologies.
Agenda
• Introduction toEMBEDDED LINUX
• Embedded OS Components
• eLinux Boards / SBC’s
• Boot Loaders (U-BOOT, Barebox)
• Linux Kernel
• ROOTFS & Build Systems
• Embedded Programming on RB-A5D2x Linux
• Linux Internal
• Demos
• Open Discussion
3.
Embedded Systems Classification
MCUBased
Very Low Power
Small Code (KB’s)
Baremetal
Small RTOS
MPU Based
High Speed (200MHz till 1GHz)
OS + Application Code
MPU+ Based
Special Co-Processors
Very High Computation Power
Special Hardware Accelerator
Engines like TPU, VPU, GPU’s
S1.0 S2.0 S3.0
Mostly uses Cortex-M4
having BLE comm and few
sensors need companion
mobile
Mostly uses Cortex-A7, 4G
comm friendly UI, make
calls, check emails etc …
Mostly uses Cortex-53, 4G
and advance AI/ML
capabilities to process the
data on-device and generate
analytics & feedback
Bootloader
Boot Process
ON PC:
PowerOn-> BIOS ( POST, Bootstraploader) -> MBR -> Bootloader -> Kernel -> RFS
ON RuggedBOARD:
1. Power On SBC
2. SOC BootROM Code will exec
3. BootCFG Pins will define the bootdevice ( NAND, NOR, SDCARD ..... )
4. From Bootdevice first piece of code (PBL) loaded in SRAM and executed
5. PBL responsible for External RAM Init and loads the BL to External RAM and execute.
6. BL will load the kernel and executes
7. Kernel boots and mounts the RootFS and finally executes the init binary
8. Init will follow init rc scripts to start services and applications
14.
U-boot Source
Browse Source:https://github.com/rugged-board/uboot-rba5d2x
Compiling U-Boot for RuggedBOARD
#Set the toolchain path first
$ . env_setup.sh
# Download uboot Source
$ git clone https://github.com/rugged-board/uboot-rba5d2x.git
$ cd uboot-rba5d2x
$ git checkout origin/uboot-rba5d2x
# Compile u-boot bootloader
make
# Configure u-boot bootloader for RB-A5D2x
$ make rugged_board_a5d2x_mmc1_defconfig # For SD Card
Or
$ make rugged_board_a5d2x_qspiflash_defconfig # For NOR Boot
#Configure for RuggedBOARD-A5D2x
$source sources/poky/oe-init-build-env
$ vi conf/local.conf
# Edit MACHINE ?= "rugged-board-a5d2x-sd1“
Yocto Compilation
#Compile
$ bitbake rb-sd-core-image-minimal # For SD Card Images
Or
$ bitbake rb-nor-core-image-minimal # For NOR Flash Images
#Images for SD Card
$ cd tmp/deploy/images/rugged-board-a5d2x-sd1/
#Follow Boot from SD Card Tutorial..
#Images for NOR
$ cd tmp/deploy/images/rugged-board-a5d2x/
#Follow NOR Flashing Tutorial..
21.
eLinux Interface Programming
importmraa
import time
gpio_1 = mraa.Gpio(61)
gpio_1.dir(mraa.DIR_OUT)
while True:
gpio_1.write(1)
time.sleep(1)
gpio_1.write(0)
time.sleep(1)
Sensor Programming using UPM Library on Linux
Embedded Interface Programming using MRAA
Library on Linux
from upm import pyupm_mcp9808 as MCP9808
# Instantiate the Infrared-Thermopile Sensor on I2C on bus 1
mySensor = MCP9808.MCP9808(2,0x18)
print("Temperature : "+str(mySensor.getTemp()))
22.
Linux Internals
1. LinuxShell commands
2. Linux Shell Scripting
3. Process ( fork, exec, clone )
4. Threads
5. IPC ( Inter Process Communication)
Pipe, FiFO, MsgQ, SharedMemory, Semaphores , Socket
6. Socket Programming
7. Concepts ( Scheduler, Memory Mgmt, FileSystem )
Boot Process
Flash Memory
MainMemory / DDR
SRAM in SOC
AT91 Bootstrap
U-Boot
Kernel
Mounts on
/
Kernel
U-Boot
AT91 Bootstrap
Device Tree Bin(DTB)Device Tree Bin(DTB)
Root FS
26.
Next Sessions
1. U-BootPorting using RuggedBOARD-A5D2x
2. Linux Kernel Porting using RuggedBOARD-A5D2x
a. Source Code walkthrough & Code flow
b. Kconfig Kernel Configuration System
c. Adding Custom driver
3. Yocto BSP using RuggedBOARD-A5D2x
4. How to design your own Single Board Computer using phyCORE-A5D2x. [HW Design]
5. Building Gateway Hardware and Open Source Linux Stacks for Gateway. [HW Design]
To get update’s follow RuggedBOARD on LinkedIn, Youtube, Twitter, Facebook &
Instagram links are on next slide …
B Vasu Dev
ABOUTVasu
Vasu has 15+ Years of industry experience in Embedded Technologies mainly on ARM & Linux, he
has worked at major MNC’s like LG, Wipro, MIC Electronics and is currently heading PHYTEC INDA,
a subsidiary of PHYTEC Messtechnik GmbH GERMANY as Managing Director. PHYTEC serves as
OEM for many electronic and embedded companies to develop and deploy their products at the
lowest possible time with high reliability and quality using ARM based SOMs (System On Modules )
& SBCs (Single Board Computers). The industry verticals he was engaged are Industrial
Automation, Mobility & Energy, Medical/Healthcare, Retail market.
Apart from his technical work, he is an active coach & guide for Embedded developers and actively
spend his time to train the developers on Embedded Linux, Yocto, IoT, Android System
Development. He is the master mind behind RuggedBOARD Open Source Hardware Platform. Vasu
as a mentor helped many start-ups to build their products and position them in market.
Managing Director
PHYTEC Embedded Pvt Ltd
vasu.b@phytec.in
+91-9535504414
Presenter Profile