SlideShare a Scribd company logo
Open Enea Linux 
BeagleBone Black 
Hands-on workshop
About us... 
 Founded in 1968, Stockholm 
 World’s third largest player in real-time 
operating systems 
 Broad ecosystem of partners 
 ARM, Texas Instruments, Freescale,... 
 Broad ecosystem of customers 
 Ericsson, Nokia, Electrolux, ... 
Did you know that... 
Sweden’s first e-mail is 
sent over the internet to 
Enea (April 7, 1983)? 
What we do... 
 Software Products 
 Software services 
 Training 
Did you know that... 
 Linux 
 RTOS 
 Embedded Mgmt and HA 
 Embedded data bases 
Enea is the only Linux 
Foundation authorized 
training parter in Europe?
Embedded Linux 
 Main factors when choosing an OS for embedded systems: 
 Acquisition cost 
 Source code availability 
 Linux is the most widely used OS in embedded devices 
 World of embedded Linux is very fragmented 
 Over 200 distros 
 Different kernel versions, packages, build systems, tools 
Tools 
Package Package 
Linux Kernel 
Package 
Package Package 
Package Package 
Linux Kernel 
Tools 
Package Package 
Package Package 
Package Package 
Package Package 
Linux Kernel 
Open Source 
Tools 
Package Manager 
Package Package 
Linux Kernel 
Package 
Package 
Package 
Package 
Package 
Package 
*Embedded Market Forecasters’ surveys
What’s Open Enea Linux 
Yocto compatible embedded Linux distribution 
All prebuilt binaries available 
- Linux images 
- Toolchain/SDK 
Package repository infrastructure 
Exclusively open source tools 
Instructions and video tutorials 
Community 
- Interact with Eneans an other community members
Workshop fundamentals
Workshop material 
64b Linux Machine 
BeagleBone Black 
4/8GB microSD card 
+ adapter 
USB to TTL cable 
Mini USB cable 
Hardware Accessories 
USB stick
Workshop Part 1 
9:30 to 10:30 
 Bulk binaries to computer 
 Prepare SD card 
 Serial Connection 
 Boot OEL 
SERIAL  Configure Package Manager
Step 1 – Bulk binaries 
Copy binaries locally 
- OEL Images 
- SDK/Toolchain 
- Enea Linux Eclipse 
$ cd 
$ mkdir OEL 
$ cd OEL 
$ cp -r -v /media/ENEAUSB/* . 
*You might find ENEAUSB under /media/<user>/ENEAUSB 
Browse directory 
$ ls –la 
drwx------ 2 user user 4096 Oct 24 16:19 boot 
drwx------ 2 user user 4096 Oct 24 16:20 partition1 
drwx------ 2 user user 4096 Oct 24 16:20 partition2 
drwx------ 2 user user 4096 Oct 30 14:12 scripts 
drwx------ 2 user user 4096 Oct 24 16:20 toolchain 
drwx------ 2 user user 4096 Oct 24 16:19 tools 
*You can now remove the USB stick safely
Step 2 – Connect microSD card 
Connect your microSD card to your computer using an SD adapter or a memory card 
reader. Observe which device it registers as by checking your dmesg log: 
$ dmesg | tail 
[17622.977436] mmc0: new SDHC card at address aaaa 
[17622.977810] mmcblk0: mmc0:aaaa SL32G 29.7 GiB 
[17622.989858] mmcblk0: p1 p2 
[17623.410434] EXT4-fs (mmcblk0p2): recovery complete 
[17623.414702] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) 
*Note that this MicroSD card contains 2 partitions in /dev/mmcblk0 
Your SD card might have only one or no partition at all. 
Alternatively, you can also list your existing devices this way: 
$ ls /dev/mmc* 
$ ls /dev/sd* 
/dev/mmcblk0p1 
/dev/mmcblk0p2 
*If you are using an SD car adapter 
*If you are using an SD car reader 
(might be called something like sdf, sdb,…)
Step 3 – Partition microSD card 
Unmount existing partitions (if applicable) 
$ sudo umount /dev/<device_name>* 
Begin partitioning the microSD card 
$ sudo fdisk /dev/<device_name> 
Command (m for help): m 
Command action 
a toggle a bootable flag 
b edit bsd disklabel 
c toggle the dos compatibility flag 
d delete a partition 
l list known partition types 
m print this menu 
n add a new partition 
o create a new empty DOS partition table 
p print the partition table 
q quit without saving changes 
s create a new empty Sun disklabel 
t change a partition's system id 
u change display/entry units 
v verify the partition table 
w write table to disk and exit 
x extra functionality (experts only) 
*Note that you need to replace /dev/<device_name> with your actual device name
Step 3 – Partition microSD card 
Partition 1 
From beginning 
To sector 4095 
Initialize a new partition table by selecting o, then verify the partition 
table is empty by selecting p 
Partition 1: Create a boot partition by selecting n for ‘new’, then p for 
‘primary’, and 1 to specify the first partition. Press enter to accept the 
default first sector and specify 4095 for the last sector 
Change the partition type to FAT16 by selecting t for ‘type’ and e for 
‘W95 FAT16 (LBA)’ 
Set the partition bootable by selecting a then 1 
Partition 2: Create the data partition for the root file system by 
selecting n for ‘new’, then p for ‘primary’, and 2 to specify the second 
partition. Accept the default values for the first and last sectors by 
pressing enter twice 
Partition 2 
From sectr 4095 
To end 
*If you make a mistake, you can always initialize the partition table by selecting o, and start from scratch
Step 3 – Partition microSD card 
Press p to ‘print’ the partition table. It should look similar to the 
one below: 
Disk /dev/sdb: 7948 MB, 7948206080 bytes 
255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors 
Units = sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk identifier: 0xafb3f87b 
Device Boot Start End Blocks Id System 
/dev/sdb1 * 2048 4095 1024 e W95 FAT16 (LBA) 
/dev/sdb2 * 4096 15523839 7759872 83 Linux 
Now you can commit the changes by selecting w to ‘write’ the 
partition table and exit fdisk 
Partition 1 
From beginning 
To sector 4095 
Partition 2 
From sectr 4095 
To end 
*You might get a warning after this, but do not worry.
Step 3 – Partition microSD card 
Partition 1 
vfat 
Partition 2 
ext4 
Check your partition names: 
$ ls -l /dev/<device_name>* 
brw-rw---- 1 root disk 179, 0 Oct 30 14:28 /dev/mmcblk0 
brw-rw---- 1 root disk 179, 1 Oct 30 14:28 /dev/mmcblk0p1 
brw-rw---- 1 root disk 179, 2 Oct 30 14:28 /dev/mmcblk0p2 
Format partition 1 as FAT: 
$ sudo mkfs.vfat /dev/<partition1> 
… and partition 2 as ext4: 
$ sudo mkfs.ext4 /dev/<partition2> 
<device_name> 
<partition1> 
<partition2> 
*Remember that our device name is mmcblk0 because we are using the SD adapter
Step 4 – Populate microSD card 
Partition 1 
MLO, u-boot, 
uEnv.txt 
Mount both partitions: 
$ sudo mkdir /mnt/partition1 
$ sudo mkdir /mnt/partition2 
$ sudo mount -t vfat -v /dev/<partition1> /mnt/partition1 
$ sudo mount -t ext4 -v /dev/<partition2> /mnt/partition2 
Populate both partitions: 
$ cd ~/OEL/ 
$ sudo cp -r partition1/* /mnt/partition1/ 
$ cd partition2 
$ sudo tar -xvjf core-image-minimal-rpm-beaglebone.tar.bz2 -C /mnt/partition2 
$ sudo cp -r -v ../boot/* /mnt/partition2/boot/ 
$ sudo cp -r -v ../scripts/* /mnt/partition2/home/root/ 
Now synchronize and unmount: 
$ sync 
$ sudo umount -v /mnt/partition1 
$ sudo umount -v /mnt/partition2 
Partition 2 
Filesystem, 
OEL images 
*Replace <partition1> and <partition2> with the devices found in the previous step 
*Takes a while…
Step 5 – Serial Connection 
We will use minicom to talk to our BeagleBone Black. Install it first: 
POWER SERIAL 
$ sudo apt-get install minicom 
Now, insert the micro SD card in the BeagleBone Black board … 
.. and connect it to the host using a USB TTL serial cable as explained in 
the next slide 
*Minicom is a text-based serial port communications program 
*Alternatively you can install it via the Synaptic Package Manager 
1
Pin connection: 
- Pin1 (black): Ground 
- Pin4 (green): Receive 
- Pin5 (white): Transmit
Step 5 – Serial Connection 
We need to find out the name of the port that minicom will listen to: 
POWER SERIAL 
$ dmesg | grep tty 
... 
[110831.397736] usb 3-2: pl2303 converter now attached to ttyUSB0 
*Note that our serial port is ttyUSB0, yours might be different 
Now, let’s configure minicom: 
$ sudo minicom -s
Step 5 – Serial Connection 
Select Serial port set up and configure: 
- Serial Device 
- Bps/Par/Bits 
- Hardware Flow Control 
- Software Flow Control 
POWER SERIAL 
+-----[configuration]------+ 
| Filenames and paths | 
| File transfer protocols | 
| Serial port setup | 
| Modem and dialing | 
| Screen and keyboard | 
| Save setup as dfl | 
| Save setup as.. | 
| Exit | 
| Exit from Minicom | 
+---------------------------+ 
+------------------------------------------------------------+ 
| A - Serial Device : /dev/<serial_port> | 
| B - Lockfile Location : /var/lock | 
| C - Callin Program : | 
| D - Callout Program : | 
| E - Bps/Par/Bits : 115200 8N1 | 
| F - Hardware Flow Control : No | 
| G - Software Flow Control : No | 
| | 
| Change which setting? | 
+------------------------------------------------------------+
Step 5 – Serial Connection 
Save set up as default (dfl) so that you can start listening to the serial 
connection at a later point in time: 
POWER SERIAL 
+-----[configuration]------+ 
| Filenames and paths | 
| File transfer protocols | 
| Serial port setup | 
| Modem and dialing | 
| Screen and keyboard | 
| Save setup as dfl | 
| Save setup as.. | 
| Exit | 
| Exit from Minicom | 
+---------------------------+ 
Then “exit from minicom”, and start serial connection: 
$ sudo minicom
Step 6 - Erase eMMC flash 
Pressing the USER/BOOT button when powering on will temporarily change the boot order, But for the sake of 
simplicity, you might want to erase the eMMC on the Black, so that it boots off automatically from the SD card 
Power on board by connecting the USB to miniUSB cable and see the console 
prompt in minicom. Get to u-boot command prompt by interrupting the initial boot 
process (follow verbose instructions) and erase the eMMC: 
ERASE 
U-Boot 2014.07 (Jul 18 2014 - 14:49:15) 
I2C: ready 
DRAM: 512 MiB 
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 
Net: not set. Validating first E-fuse MAC 
cpsw, usb_ether Hit any key to stop autoboot: 
U-boot# mmc dev 1 
U-boot# mmc erase 0 512 USER/BOOT 
BUTTON 
*We are using BBB revision C, we have experienced boot issues with previous revisions 
*Some of you might already have it deleted since we have been testing some of the boards
Step 7 – Boot OEL 
Connect the board to the network and reboot: 
U-boot# reset 
OEL should boot automatically. Log in as root and do not forget to 
change your password: 
... 
Starting syslogd/klogd: done 
Stopping Bootlog daemon: bootlogd. 
Starting tcf-agent: OK 
Open Enea Linux 2014-01-01 beaglebone /dev/ttyO0 
beaglebone login: root 
root@beaglebone:~# passwd 
*Make sure you set a password, otherwise Eclipse will complain later when creating a remote ssh connection
Step 8 – Configure Package Manager 
Check internet conection and make sure you have been given an ip address: 
# ifconfig eth0 
Let’s configure the package manager. Execute script and select option 1: 
20.000 packages 
for the beagle 
# chmod 700 smart_config.sh 
# ./smart_config.sh 
Open Enea Linux script: 
Smart package manager configurator 
1) Configure Smart 3) Show Configuration 
2) Reset Configuration 4) Quit 
Please enter your choice: 1 
*You can also show or reset the configuration in case you need to do some trouble-shooting 
And update the package manager metadata: 
# smart update
Step 9 – Customize your distro 
openssh 
It is time you start customizing your OEL distro... Search for any 
package you like. Let’s say you need to ssh your board: 
# smart search ssh 
You will find openssh. Go ahead and install it: 
# smart install openssh 
You can now test an ssh connection from the host: 
$ ssh root@<board_ip> 
*You might need to reboot the BeagleBone so that the ssh client starts up 
You done? 
Try and install some packages that you are familiar with... 
For instance, an alternative to vi editor. Can you find and install 
nano editor? 
REBOOT 
BUTTON
Break 10:30 – 11:00 
Join Open Enea Linux mailing list today and 
win a BeagleBone Black
Workshop Part 2 
11:00 to 12:00 
Toolchain/SDK 
Eclipse 
SSH 
ping.c 
 Install Toolchain 
 Install Eclipse 
 Create a remote connection 
 Create an ADT project 
 Remote Debugging with ping
Step 10 – Install Toolchain 
First of all, we need to install the toolchain. Type this on the host. 
Note that we are chosing opt/oel-beagle/ as target directory, which is relative: 
$ cd ~/OEL/toolchain/ 
$ sudo chmod 775 oel-eglibc-x86_64-core-image-minimal-cortexa8hf-vfp-neon-toolchain-2014-01-01.sh 
$ ./oel-eglibc-x86_64-core-image-minimal-cortexa8hf-vfp-neon-toolchain-2014-01-01.sh 
Enter target directory for SDK (default: /opt/oel/2014-01-01): opt/oel-beagle/ 
You are about to install the SDK to "/home/<user>/OEL/toolchain/opt/oel-beagle". Proceed[Y/n]?Y 
Extracting SDK...done 
Setting it up...done 
SDK has been successfully set up and is ready to be used. 
*Note that opt/oel-beagle is a relative directory, the toolchain is actually installed here: 
/home/<user>/OEL/toolchain/opt/oel-beagle
Step 11 – Install Eclipse 
Let’s extract the Enea Linux Eclipse toolsuite: 
$ cd ~/OEL/tools 
$ tar –xvzf Enea-Linux-Eclipse_4.0.tar.gz 
And start it in the background: 
$ cd eclipse 
$ ./eclipse & 
Select your workspace folder: /home/<user>/workspace 
Click OK and close welcome tab 
/home/<user>/workspace
Step 12 – Remote Connection 
Now we are going to connect Eclipse to our target. 
Eclipse supports several types of remote connections: in Open Enea Linux, SSH connection is used. 
This type of connection requires that a corresponding service (openssh) is enabled and running on the target. 
1. Window → Open Perspective → 
Other → Remote System Explorer 
2. File → New → Other → Remote System Explorer 
→ Connection
Step 12 – Remote Connection 
4. Enter Host name (IP address of the beagle) and 
Connection Name (bbb) → Finish 
3. Select SSH Only 
Enter IP address here 
bbb
Step 12 – Remote Connection 
5. To verify the remote connection, go to the Remote 
Systems window tab and expand your connection. 
Expand 
6. It may ask for login information for the 
initial ssh connection. Enter user and passwd. 
Now your bbb Root file system should have 
expanded completely and you should be able 
to browse it.
Step 13 – Tools Set up 
Set up general cross compiler preferences. Go to: 
Window → Preferences → Yocto Project ADT 
→ Cross Compiler Options: 
- 1. Select Standalone pre-built toolchain and configure the following: 
- 2. Toolchain Root Location: /home/<user>/OEL/toolchain/opt/oel-beagle 
- 3. Sysroot Location: /home/<user>/OEL/toolchain/opt/oel-beagle/sysroots/ 
- 4. Target Architecture: “cortexa8hf-vfp-neon-oel-linux-gnueabi” 
- 5. Click OK 
.../opt/oel-beagle/ 
.../opt/oel-beagle/sysroots/
Step 14 – Create ADT Project 
1. File → New → Project: 
Expand C/C++ Project and select C Project 
2. Expand Yocto Project ADT Autotools Project and 
select Hello World ANSI C Autotools Project 
Project name: “ping” 
Use default location 
Click Next 
ping 
/home/<user>/workspace/ping 
*Default location should be /home/<user>/workspace/ping
Step 14 – Create ADT Project 
3. Fill in Author → Finish 4. Open C/C++ perspective
Step 14 – Create ADT Project 
$ cp ~/OEL/tools/ping.c ~/workspace/ping/src/ping.c 
5. Now we need to replace the generated 
file with our own ping file. Type on host: 
6. And double check that the file has been replaced in Eclipse: 
Double click ping.c 
ping.c
Step 15 – Cross Compile 
Right click on project name (ping in our case) → Reconfigure Project 
Check for “Operation Successful” in Eclipse Configure Console window.
Step 15 – Cross Compile 
Right click on project name (ping) → Build Project 
Verify logs in CDT Build Console to ensure it has built, and see resulting binaries in Project Explorer window 
*You can select the various Eclipse consoles 
by clicking the dropdown console button
Step 16 – Remote Debugging 
1. Run → Debug Configurations → Expand C/C++ Remote Application 
and select Ping_gdb_arm-oel-linux-gnueabi 
3. Type “/home/root/ping” 
ping 
src/ping 
*This tells Eclipse to deploy the ping binary in the root home folder of the target 
2. Select connection: bbb 
4. Do not click on Debug yet… 
/home/root/ping
Step 16 – Remote Debugging 
5. Arguments Tab → Add 127.0.0.1 to ping to ourselves. 
6. Click Debug and open debug perspective 
127.0.0.1
Step 16 – Remote Debugging 
7. This should launch a debug session and break your program at the entry into the main function
Step 16 – Remote Debugging 
8. To run a simple test, set a breakpoint at line 688 (Shortcut to find line: CTRL + L) 
9. Then go to Run → Resume (Shortcut for resume: F8) 
*Repeat this step a few times, and see 
that it breaks at every reply 
Ping.c 
Ping 
Ping 
*Double-click here
More About Tools 
More advanced User space debugging 
Kernel Debugging (KDBG) 
- shares serial connection 
- needs kernel sources and vmlinux file – kernel debug image 
- uses SysRq magic commands to put the kernel into debugging mode 
- rest is normal GDB debugging 
- scheduling/execution control are still sensitive areas 
- possible to debug kernel modules 
- need to provide GDB with module mapping data 
- needs special kernel configs: 
CONFIG_KGDB=y 
CONFIG_KGDB_SERIAL_CONSOLE=y 
CONFIG_DEBUG_INFO=y 
- support for debugging shared objects 
- support for debugging multicore applications 
- attach to applications at runtime 
- debug large scale projects with separate build systems
Tools Overview
Tools Overview
Thanks 
Join Open Enea Linux mailing list today and 
win a BeagleBone Black

More Related Content

What's hot

Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
RuggedBoardGroup
 
Atari ST - History of The OS
Atari ST - History of The OSAtari ST - History of The OS
Atari ST - History of The OS
Frédéric Sagez
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
 
3.1.computer foundations
3.1.computer foundations3.1.computer foundations
3.1.computer foundations
Miriam Baig
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
RuggedBoardGroup
 
How to build and load linux to embedded system
How to build and load linux to embedded systemHow to build and load linux to embedded system
How to build and load linux to embedded system
Игорь Медведев
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
Macpaul Lin
 
Computer Hardware
Computer HardwareComputer Hardware
Computer Hardware
dheeraj87
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
LloydMoore
 
Linux io
Linux ioLinux io
Linux io
Sagar Janagonda
 
Boot cd
Boot cdBoot cd
Placa mãe – fabricantes
Placa mãe – fabricantesPlaca mãe – fabricantes
Placa mãe – fabricantes
Samira Magalhaes
 
Free bsd visually
Free bsd visuallyFree bsd visually
Free bsd visually
Gohar Sultan
 
Mother board
Mother boardMother board
Mother board
dwivedibrothers
 
Linux Shell Scripting Presantion
Linux Shell Scripting PresantionLinux Shell Scripting Presantion
Linux Shell Scripting Presantion
SameerNimkar
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
RajKumar Rampelli
 
Diskmanager112
Diskmanager112Diskmanager112
Diskmanager112
Roger Jowett
 
Soft skill-( ICT)part-1
Soft skill-( ICT)part-1Soft skill-( ICT)part-1
Soft skill-( ICT)part-1
balvant1973
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
Anando Kumar Paul
 
Netup
NetupNetup

What's hot (20)

Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Atari ST - History of The OS
Atari ST - History of The OSAtari ST - History of The OS
Atari ST - History of The OS
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
3.1.computer foundations
3.1.computer foundations3.1.computer foundations
3.1.computer foundations
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
How to build and load linux to embedded system
How to build and load linux to embedded systemHow to build and load linux to embedded system
How to build and load linux to embedded system
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Computer Hardware
Computer HardwareComputer Hardware
Computer Hardware
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Linux io
Linux ioLinux io
Linux io
 
Boot cd
Boot cdBoot cd
Boot cd
 
Placa mãe – fabricantes
Placa mãe – fabricantesPlaca mãe – fabricantes
Placa mãe – fabricantes
 
Free bsd visually
Free bsd visuallyFree bsd visually
Free bsd visually
 
Mother board
Mother boardMother board
Mother board
 
Linux Shell Scripting Presantion
Linux Shell Scripting PresantionLinux Shell Scripting Presantion
Linux Shell Scripting Presantion
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
 
Diskmanager112
Diskmanager112Diskmanager112
Diskmanager112
 
Soft skill-( ICT)part-1
Soft skill-( ICT)part-1Soft skill-( ICT)part-1
Soft skill-( ICT)part-1
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Netup
NetupNetup
Netup
 

Similar to Open Enea Linux workshop at the Embedded Conference Scandinavia 2014

Real time systems
Real time systemsReal time systems
Real time systems
Said Benaissa
 
Partitioning_SDcard
Partitioning_SDcardPartitioning_SDcard
Partitioning_SDcard
Rashila Rr
 
TinyOS installation Guide And Manual
TinyOS installation Guide And ManualTinyOS installation Guide And Manual
TinyOS installation Guide And Manual
Ankit Singh
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
GlobalLogic Ukraine
 
Mac os x mount ntfs
Mac os x mount ntfsMac os x mount ntfs
Mac os x mount ntfs
yusuf mochammad
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
Simonas Kareiva
 
Uclinux
UclinuxUclinux
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
Acácio Oliveira
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Jian-Hong Pan
 
Operating Systems (slides)
Operating Systems (slides)Operating Systems (slides)
Operating Systems (slides)
wx672
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
sudakarman
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
Isham Rashik
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
Alessandro Selli
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by Ivan
Ivan Silva
 
Metasploitable
MetasploitableMetasploitable
Slim Server Practical
Slim Server PracticalSlim Server Practical
Slim Server Practical
Gaurav Paliwal
 
Ubuntu
UbuntuUbuntu
Linux.pdf
Linux.pdfLinux.pdf
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
Slawomir Jasek
 

Similar to Open Enea Linux workshop at the Embedded Conference Scandinavia 2014 (20)

Real time systems
Real time systemsReal time systems
Real time systems
 
Partitioning_SDcard
Partitioning_SDcardPartitioning_SDcard
Partitioning_SDcard
 
TinyOS installation Guide And Manual
TinyOS installation Guide And ManualTinyOS installation Guide And Manual
TinyOS installation Guide And Manual
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
Mac os x mount ntfs
Mac os x mount ntfsMac os x mount ntfs
Mac os x mount ntfs
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
 
Uclinux
UclinuxUclinux
Uclinux
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Operating Systems (slides)
Operating Systems (slides)Operating Systems (slides)
Operating Systems (slides)
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by Ivan
 
Metasploitable
MetasploitableMetasploitable
Metasploitable
 
Slim Server Practical
Slim Server PracticalSlim Server Practical
Slim Server Practical
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Linux.pdf
Linux.pdfLinux.pdf
Linux.pdf
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 

More from EneaSoftware

Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
EneaSoftware
 
Enea Keystone training 2014
Enea Keystone training 2014Enea Keystone training 2014
Enea Keystone training 2014
EneaSoftware
 
LTE Components Drive Multimode Mobile Broadband
LTE Components Drive Multimode Mobile BroadbandLTE Components Drive Multimode Mobile Broadband
LTE Components Drive Multimode Mobile Broadband
EneaSoftware
 
Enea Linux Base Station Platform FTF China
Enea Linux Base Station Platform FTF ChinaEnea Linux Base Station Platform FTF China
Enea Linux Base Station Platform FTF China
EneaSoftware
 
Enea Linux and LWRT FTF China 2012
Enea Linux and LWRT FTF China 2012Enea Linux and LWRT FTF China 2012
Enea Linux and LWRT FTF China 2012
EneaSoftware
 
Said about Enea's courses
Said about Enea's coursesSaid about Enea's courses
Said about Enea's courses
EneaSoftware
 

More from EneaSoftware (6)

Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
Enabling accelerated networking - seminar by Enea at the Embedded Conference ...
 
Enea Keystone training 2014
Enea Keystone training 2014Enea Keystone training 2014
Enea Keystone training 2014
 
LTE Components Drive Multimode Mobile Broadband
LTE Components Drive Multimode Mobile BroadbandLTE Components Drive Multimode Mobile Broadband
LTE Components Drive Multimode Mobile Broadband
 
Enea Linux Base Station Platform FTF China
Enea Linux Base Station Platform FTF ChinaEnea Linux Base Station Platform FTF China
Enea Linux Base Station Platform FTF China
 
Enea Linux and LWRT FTF China 2012
Enea Linux and LWRT FTF China 2012Enea Linux and LWRT FTF China 2012
Enea Linux and LWRT FTF China 2012
 
Said about Enea's courses
Said about Enea's coursesSaid about Enea's courses
Said about Enea's courses
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 

Open Enea Linux workshop at the Embedded Conference Scandinavia 2014

  • 1. Open Enea Linux BeagleBone Black Hands-on workshop
  • 2. About us...  Founded in 1968, Stockholm  World’s third largest player in real-time operating systems  Broad ecosystem of partners  ARM, Texas Instruments, Freescale,...  Broad ecosystem of customers  Ericsson, Nokia, Electrolux, ... Did you know that... Sweden’s first e-mail is sent over the internet to Enea (April 7, 1983)? What we do...  Software Products  Software services  Training Did you know that...  Linux  RTOS  Embedded Mgmt and HA  Embedded data bases Enea is the only Linux Foundation authorized training parter in Europe?
  • 3. Embedded Linux  Main factors when choosing an OS for embedded systems:  Acquisition cost  Source code availability  Linux is the most widely used OS in embedded devices  World of embedded Linux is very fragmented  Over 200 distros  Different kernel versions, packages, build systems, tools Tools Package Package Linux Kernel Package Package Package Package Package Linux Kernel Tools Package Package Package Package Package Package Package Package Linux Kernel Open Source Tools Package Manager Package Package Linux Kernel Package Package Package Package Package Package *Embedded Market Forecasters’ surveys
  • 4. What’s Open Enea Linux Yocto compatible embedded Linux distribution All prebuilt binaries available - Linux images - Toolchain/SDK Package repository infrastructure Exclusively open source tools Instructions and video tutorials Community - Interact with Eneans an other community members
  • 6. Workshop material 64b Linux Machine BeagleBone Black 4/8GB microSD card + adapter USB to TTL cable Mini USB cable Hardware Accessories USB stick
  • 7. Workshop Part 1 9:30 to 10:30  Bulk binaries to computer  Prepare SD card  Serial Connection  Boot OEL SERIAL  Configure Package Manager
  • 8. Step 1 – Bulk binaries Copy binaries locally - OEL Images - SDK/Toolchain - Enea Linux Eclipse $ cd $ mkdir OEL $ cd OEL $ cp -r -v /media/ENEAUSB/* . *You might find ENEAUSB under /media/<user>/ENEAUSB Browse directory $ ls –la drwx------ 2 user user 4096 Oct 24 16:19 boot drwx------ 2 user user 4096 Oct 24 16:20 partition1 drwx------ 2 user user 4096 Oct 24 16:20 partition2 drwx------ 2 user user 4096 Oct 30 14:12 scripts drwx------ 2 user user 4096 Oct 24 16:20 toolchain drwx------ 2 user user 4096 Oct 24 16:19 tools *You can now remove the USB stick safely
  • 9. Step 2 – Connect microSD card Connect your microSD card to your computer using an SD adapter or a memory card reader. Observe which device it registers as by checking your dmesg log: $ dmesg | tail [17622.977436] mmc0: new SDHC card at address aaaa [17622.977810] mmcblk0: mmc0:aaaa SL32G 29.7 GiB [17622.989858] mmcblk0: p1 p2 [17623.410434] EXT4-fs (mmcblk0p2): recovery complete [17623.414702] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) *Note that this MicroSD card contains 2 partitions in /dev/mmcblk0 Your SD card might have only one or no partition at all. Alternatively, you can also list your existing devices this way: $ ls /dev/mmc* $ ls /dev/sd* /dev/mmcblk0p1 /dev/mmcblk0p2 *If you are using an SD car adapter *If you are using an SD car reader (might be called something like sdf, sdb,…)
  • 10. Step 3 – Partition microSD card Unmount existing partitions (if applicable) $ sudo umount /dev/<device_name>* Begin partitioning the microSD card $ sudo fdisk /dev/<device_name> Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) *Note that you need to replace /dev/<device_name> with your actual device name
  • 11. Step 3 – Partition microSD card Partition 1 From beginning To sector 4095 Initialize a new partition table by selecting o, then verify the partition table is empty by selecting p Partition 1: Create a boot partition by selecting n for ‘new’, then p for ‘primary’, and 1 to specify the first partition. Press enter to accept the default first sector and specify 4095 for the last sector Change the partition type to FAT16 by selecting t for ‘type’ and e for ‘W95 FAT16 (LBA)’ Set the partition bootable by selecting a then 1 Partition 2: Create the data partition for the root file system by selecting n for ‘new’, then p for ‘primary’, and 2 to specify the second partition. Accept the default values for the first and last sectors by pressing enter twice Partition 2 From sectr 4095 To end *If you make a mistake, you can always initialize the partition table by selecting o, and start from scratch
  • 12. Step 3 – Partition microSD card Press p to ‘print’ the partition table. It should look similar to the one below: Disk /dev/sdb: 7948 MB, 7948206080 bytes 255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xafb3f87b Device Boot Start End Blocks Id System /dev/sdb1 * 2048 4095 1024 e W95 FAT16 (LBA) /dev/sdb2 * 4096 15523839 7759872 83 Linux Now you can commit the changes by selecting w to ‘write’ the partition table and exit fdisk Partition 1 From beginning To sector 4095 Partition 2 From sectr 4095 To end *You might get a warning after this, but do not worry.
  • 13. Step 3 – Partition microSD card Partition 1 vfat Partition 2 ext4 Check your partition names: $ ls -l /dev/<device_name>* brw-rw---- 1 root disk 179, 0 Oct 30 14:28 /dev/mmcblk0 brw-rw---- 1 root disk 179, 1 Oct 30 14:28 /dev/mmcblk0p1 brw-rw---- 1 root disk 179, 2 Oct 30 14:28 /dev/mmcblk0p2 Format partition 1 as FAT: $ sudo mkfs.vfat /dev/<partition1> … and partition 2 as ext4: $ sudo mkfs.ext4 /dev/<partition2> <device_name> <partition1> <partition2> *Remember that our device name is mmcblk0 because we are using the SD adapter
  • 14. Step 4 – Populate microSD card Partition 1 MLO, u-boot, uEnv.txt Mount both partitions: $ sudo mkdir /mnt/partition1 $ sudo mkdir /mnt/partition2 $ sudo mount -t vfat -v /dev/<partition1> /mnt/partition1 $ sudo mount -t ext4 -v /dev/<partition2> /mnt/partition2 Populate both partitions: $ cd ~/OEL/ $ sudo cp -r partition1/* /mnt/partition1/ $ cd partition2 $ sudo tar -xvjf core-image-minimal-rpm-beaglebone.tar.bz2 -C /mnt/partition2 $ sudo cp -r -v ../boot/* /mnt/partition2/boot/ $ sudo cp -r -v ../scripts/* /mnt/partition2/home/root/ Now synchronize and unmount: $ sync $ sudo umount -v /mnt/partition1 $ sudo umount -v /mnt/partition2 Partition 2 Filesystem, OEL images *Replace <partition1> and <partition2> with the devices found in the previous step *Takes a while…
  • 15. Step 5 – Serial Connection We will use minicom to talk to our BeagleBone Black. Install it first: POWER SERIAL $ sudo apt-get install minicom Now, insert the micro SD card in the BeagleBone Black board … .. and connect it to the host using a USB TTL serial cable as explained in the next slide *Minicom is a text-based serial port communications program *Alternatively you can install it via the Synaptic Package Manager 1
  • 16. Pin connection: - Pin1 (black): Ground - Pin4 (green): Receive - Pin5 (white): Transmit
  • 17. Step 5 – Serial Connection We need to find out the name of the port that minicom will listen to: POWER SERIAL $ dmesg | grep tty ... [110831.397736] usb 3-2: pl2303 converter now attached to ttyUSB0 *Note that our serial port is ttyUSB0, yours might be different Now, let’s configure minicom: $ sudo minicom -s
  • 18. Step 5 – Serial Connection Select Serial port set up and configure: - Serial Device - Bps/Par/Bits - Hardware Flow Control - Software Flow Control POWER SERIAL +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +---------------------------+ +------------------------------------------------------------+ | A - Serial Device : /dev/<serial_port> | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : No | | G - Software Flow Control : No | | | | Change which setting? | +------------------------------------------------------------+
  • 19. Step 5 – Serial Connection Save set up as default (dfl) so that you can start listening to the serial connection at a later point in time: POWER SERIAL +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +---------------------------+ Then “exit from minicom”, and start serial connection: $ sudo minicom
  • 20. Step 6 - Erase eMMC flash Pressing the USER/BOOT button when powering on will temporarily change the boot order, But for the sake of simplicity, you might want to erase the eMMC on the Black, so that it boots off automatically from the SD card Power on board by connecting the USB to miniUSB cable and see the console prompt in minicom. Get to u-boot command prompt by interrupting the initial boot process (follow verbose instructions) and erase the eMMC: ERASE U-Boot 2014.07 (Jul 18 2014 - 14:49:15) I2C: ready DRAM: 512 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: U-boot# mmc dev 1 U-boot# mmc erase 0 512 USER/BOOT BUTTON *We are using BBB revision C, we have experienced boot issues with previous revisions *Some of you might already have it deleted since we have been testing some of the boards
  • 21. Step 7 – Boot OEL Connect the board to the network and reboot: U-boot# reset OEL should boot automatically. Log in as root and do not forget to change your password: ... Starting syslogd/klogd: done Stopping Bootlog daemon: bootlogd. Starting tcf-agent: OK Open Enea Linux 2014-01-01 beaglebone /dev/ttyO0 beaglebone login: root root@beaglebone:~# passwd *Make sure you set a password, otherwise Eclipse will complain later when creating a remote ssh connection
  • 22. Step 8 – Configure Package Manager Check internet conection and make sure you have been given an ip address: # ifconfig eth0 Let’s configure the package manager. Execute script and select option 1: 20.000 packages for the beagle # chmod 700 smart_config.sh # ./smart_config.sh Open Enea Linux script: Smart package manager configurator 1) Configure Smart 3) Show Configuration 2) Reset Configuration 4) Quit Please enter your choice: 1 *You can also show or reset the configuration in case you need to do some trouble-shooting And update the package manager metadata: # smart update
  • 23. Step 9 – Customize your distro openssh It is time you start customizing your OEL distro... Search for any package you like. Let’s say you need to ssh your board: # smart search ssh You will find openssh. Go ahead and install it: # smart install openssh You can now test an ssh connection from the host: $ ssh root@<board_ip> *You might need to reboot the BeagleBone so that the ssh client starts up You done? Try and install some packages that you are familiar with... For instance, an alternative to vi editor. Can you find and install nano editor? REBOOT BUTTON
  • 24. Break 10:30 – 11:00 Join Open Enea Linux mailing list today and win a BeagleBone Black
  • 25. Workshop Part 2 11:00 to 12:00 Toolchain/SDK Eclipse SSH ping.c  Install Toolchain  Install Eclipse  Create a remote connection  Create an ADT project  Remote Debugging with ping
  • 26. Step 10 – Install Toolchain First of all, we need to install the toolchain. Type this on the host. Note that we are chosing opt/oel-beagle/ as target directory, which is relative: $ cd ~/OEL/toolchain/ $ sudo chmod 775 oel-eglibc-x86_64-core-image-minimal-cortexa8hf-vfp-neon-toolchain-2014-01-01.sh $ ./oel-eglibc-x86_64-core-image-minimal-cortexa8hf-vfp-neon-toolchain-2014-01-01.sh Enter target directory for SDK (default: /opt/oel/2014-01-01): opt/oel-beagle/ You are about to install the SDK to "/home/<user>/OEL/toolchain/opt/oel-beagle". Proceed[Y/n]?Y Extracting SDK...done Setting it up...done SDK has been successfully set up and is ready to be used. *Note that opt/oel-beagle is a relative directory, the toolchain is actually installed here: /home/<user>/OEL/toolchain/opt/oel-beagle
  • 27. Step 11 – Install Eclipse Let’s extract the Enea Linux Eclipse toolsuite: $ cd ~/OEL/tools $ tar –xvzf Enea-Linux-Eclipse_4.0.tar.gz And start it in the background: $ cd eclipse $ ./eclipse & Select your workspace folder: /home/<user>/workspace Click OK and close welcome tab /home/<user>/workspace
  • 28. Step 12 – Remote Connection Now we are going to connect Eclipse to our target. Eclipse supports several types of remote connections: in Open Enea Linux, SSH connection is used. This type of connection requires that a corresponding service (openssh) is enabled and running on the target. 1. Window → Open Perspective → Other → Remote System Explorer 2. File → New → Other → Remote System Explorer → Connection
  • 29. Step 12 – Remote Connection 4. Enter Host name (IP address of the beagle) and Connection Name (bbb) → Finish 3. Select SSH Only Enter IP address here bbb
  • 30. Step 12 – Remote Connection 5. To verify the remote connection, go to the Remote Systems window tab and expand your connection. Expand 6. It may ask for login information for the initial ssh connection. Enter user and passwd. Now your bbb Root file system should have expanded completely and you should be able to browse it.
  • 31. Step 13 – Tools Set up Set up general cross compiler preferences. Go to: Window → Preferences → Yocto Project ADT → Cross Compiler Options: - 1. Select Standalone pre-built toolchain and configure the following: - 2. Toolchain Root Location: /home/<user>/OEL/toolchain/opt/oel-beagle - 3. Sysroot Location: /home/<user>/OEL/toolchain/opt/oel-beagle/sysroots/ - 4. Target Architecture: “cortexa8hf-vfp-neon-oel-linux-gnueabi” - 5. Click OK .../opt/oel-beagle/ .../opt/oel-beagle/sysroots/
  • 32. Step 14 – Create ADT Project 1. File → New → Project: Expand C/C++ Project and select C Project 2. Expand Yocto Project ADT Autotools Project and select Hello World ANSI C Autotools Project Project name: “ping” Use default location Click Next ping /home/<user>/workspace/ping *Default location should be /home/<user>/workspace/ping
  • 33. Step 14 – Create ADT Project 3. Fill in Author → Finish 4. Open C/C++ perspective
  • 34. Step 14 – Create ADT Project $ cp ~/OEL/tools/ping.c ~/workspace/ping/src/ping.c 5. Now we need to replace the generated file with our own ping file. Type on host: 6. And double check that the file has been replaced in Eclipse: Double click ping.c ping.c
  • 35. Step 15 – Cross Compile Right click on project name (ping in our case) → Reconfigure Project Check for “Operation Successful” in Eclipse Configure Console window.
  • 36. Step 15 – Cross Compile Right click on project name (ping) → Build Project Verify logs in CDT Build Console to ensure it has built, and see resulting binaries in Project Explorer window *You can select the various Eclipse consoles by clicking the dropdown console button
  • 37. Step 16 – Remote Debugging 1. Run → Debug Configurations → Expand C/C++ Remote Application and select Ping_gdb_arm-oel-linux-gnueabi 3. Type “/home/root/ping” ping src/ping *This tells Eclipse to deploy the ping binary in the root home folder of the target 2. Select connection: bbb 4. Do not click on Debug yet… /home/root/ping
  • 38. Step 16 – Remote Debugging 5. Arguments Tab → Add 127.0.0.1 to ping to ourselves. 6. Click Debug and open debug perspective 127.0.0.1
  • 39. Step 16 – Remote Debugging 7. This should launch a debug session and break your program at the entry into the main function
  • 40. Step 16 – Remote Debugging 8. To run a simple test, set a breakpoint at line 688 (Shortcut to find line: CTRL + L) 9. Then go to Run → Resume (Shortcut for resume: F8) *Repeat this step a few times, and see that it breaks at every reply Ping.c Ping Ping *Double-click here
  • 41. More About Tools More advanced User space debugging Kernel Debugging (KDBG) - shares serial connection - needs kernel sources and vmlinux file – kernel debug image - uses SysRq magic commands to put the kernel into debugging mode - rest is normal GDB debugging - scheduling/execution control are still sensitive areas - possible to debug kernel modules - need to provide GDB with module mapping data - needs special kernel configs: CONFIG_KGDB=y CONFIG_KGDB_SERIAL_CONSOLE=y CONFIG_DEBUG_INFO=y - support for debugging shared objects - support for debugging multicore applications - attach to applications at runtime - debug large scale projects with separate build systems
  • 44. Thanks Join Open Enea Linux mailing list today and win a BeagleBone Black