Sie sind auf Seite 1von 16

corp@sensorflock.

com
www.sensorflock.com

SensorFlock (SMC-PVT.) Limited

DaaS Embedded Linux

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page ii
DaaS-Embedded-Linux 01.03

DOCUMENT CONTROL
Author M Rizwan Azam

Author Contact rizwan.azam@sensorflock.com

Document Control Contact docqa@sensorflock.com

Document Classification Public

Document ID DaaS-Embedded-Linux 01.03

Document UID OWL987-06-27

Document Text font Arial

Creation Date 29 May 2013

DOCUMENT APPROVAL
Nature of Signoff Person Signature Date Role
QA Engr.
Authors M Rizwan Azam
CEO & CTO,
Reviewers Mr Weqaar Janjua
DaaS Architect
GM Projects
Mr Yasir Awais

DOCUMENT CHANGE RECORD


Date Version Author, Contributors Change Details

29 March 2013 V 01.01, Draft 1 First complete draft

15 April 2013 V 01.02, Draft 2 Qemu details

29 May 2013 V 01.03, Alpha1 Alpha release

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page iii
DaaS-Embedded-Linux 01.03

TABLE OF CONTENTS
DOCUMENT CONTROL ............................................................................................ II
TABLE OF CONTENTS............................................................................................ III
LIST OF FIGURES.................................................................................................... IV
1.1 Introduction .............................................................................................. 1
1.2 Advantages ............................................................................................... 1
2 BOOT SEQUENCE ......................................................................................... 2
2.1 Introduction .............................................................................................. 2
2.2 Kernel Space ............................................................................................ 2
2.3 User Space................................................................................................ 3
3 BUSYBOX VS. SYSINIT ................................................................................. 4
3.1 BusyBox .................................................................................................... 4
3.2 SysInit ....................................................................................................... 4
4 GNU TOOLS AND SUBSYSTEMS ................................................................. 5
4.1 GNU Tools................................................................................................. 5
4.1.1 Glibc ..................................................................................................... 5
4.1.2 BinUtils ................................................................................................ 5
4.1.3 Coreutils .............................................................................................. 5
4.1.4 InetUtils................................................................................................ 5
4.1.5 Bash ..................................................................................................... 5
4.2 Subsystems of Kernel.............................................................................. 5
4.3 Daas Linux OS .......................................................................................... 6
4.3.1 Opensource Components .................................................................. 6
4.4 Daas Linux Performance testing............................................................. 7
4.5 Screenshots .............................................................................................. 9
4.6 Trial and Evaluation ............................................................................... 11
4.7 References .............................................................................................. 12

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page iv
DaaS-Embedded-Linux 01.03

LIST OF FIGURES

Figure 1: Boot sequence for a Linux distro ......................................................................................... 2

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 1
DaaS-Embedded-Linux 01.03

1.1 INTRODUCTION
A Linux distribution (often called distro for short) is a member of the family of Unix-
like operating systems built on top of the Linux kernel. These operating systems
consist of the Linux kernel and, usually, a set of libraries and utilities from the GNU
Project. Before discussing the procedure of making a distro, it is compulsory to
understand the need for it.

1.2 ADVANTAGES
Some of the advantages a customized distro provides are listed below;
1. Customized program for a specific architecture, increases level of
performance.
2. Optimized for performance & high-availability
3. Removing excess modules and components will reduce the size of the
compiled kernel and helps it to boot quickly.
4. Requires extremely less Memory and CPU Power
5. We can add various features and optimize it for better performance.
6. Open System Architecture
7. Clean file system
8. Secure and Robust

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 2
DaaS-Embedded-Linux 01.03

2 BOOT SEQUENCE
2.1 INTRODUCTION
Figure 1 shows the boot sequence for a Linux distro on ARM Architecture as well as
the architecture to make a custom distro.

Figure 1: Boot sequence for a Linux distro

The Linux architecture is fundamentally divided in two major categories:


1. Kernel Space
2. User Space

2.2 KERNEL SPACE


In Kernel space, the flow of control during a boot is from CPU, to boot loader and to
kernel. Sequence can be described in steps;
1. When a system is booted, CPU and memory devices are initialized.
2. CPU picks up the data contained in 0 sector of the storage 1 (bootstrapper).
Processes performed in storage 1 are;
a. Bootstrapper initializes the hardware peripherals
b. Load header file, which contains configuration for bootstrapping
c. X-loader initializes clocks and memory
3. Processes being performed in storage 2 are;

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 3
DaaS-Embedded-Linux 01.03

a. Load u-boot Image


b. Network card initialization (optional, removed for fast boot times)
c. Load kernel into memory
4. Kernel is decompressed into the memory. Linux file system is mounted, which
contains user space libraries and applications

2.3 USER SPACE


User space is the memory area where all user mode applications work;
1. Init is the first process executed during booting, containing 6 runlevels; After
the Linux kernel has booted, the init program reads the /etc/inittab file to
determine the behaviour for each runlevel. Unless the user specifies another
value as a kernel boot parameter, the system will attempt to enter (start) the
default runlevel. The default six runlevels are described in Table 1.
Table 1 : Default Runlevels
ID Name Description
0 Halt Shuts down the system.
1 Single-user Mode Mode for administrative tasks.
Does not configure network interfaces
2 Multi-user Mode and does not export networks
services.
3 Multi-user Mode with Networking Starts the system normally.
4 Not used/User-definable For special purposes.
5 Graphical user interface login As runlevel 3 + display manager.
6 Reboot Reboots the system.

2. Init is in charge of finalizing system start-up by spawning various applications


and starting some key software components. It adapts all the orphan
processes.
3. “Getty” (get teletype) is initialized by init, it manages physical or virtual
terminals (TTYs). When it detects a connection, it prompts for a username
and runs the 'login' program to authenticate the user. It gives a console after
log in process, attached with serial port devices.
4. SSH (Secure Shell) provides secure connection.
5. Necessary Applications are initiated, that completes the booting process.

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 4
DaaS-Embedded-Linux 01.03

3 BUSYBOX VS. SYSINIT


3.1 BUSYBOX
BusyBox combines tiny versions of many common UNIX utilities into a single small
executable. This executable replaces functionality of almost 300 commands. It
provides a fairly complete environment for any small or embedded system. BusyBox
has been written with size-optimization and limited resources in mind. It is also
extremely modular so you can easily include or exclude commands (or features) at
compile time. Some features of BusyBox are;
1. Each utility can be accessed by calling the single BusyBox binary with
symbolic links bearing the original commands' names with appropriate
arguments
2. Begins by reading /etc/inittab
3. BusyBox init does not provide runlevel support
4. If application unexpectedly dies, its exit will cause a kernel panic followed by
a system reboot.

3.2 SYSINIT
DaaS Linux init subsystem is developed using System-V UNIX init ‘SysVinit’.

1. Begins by reading /etc/inittab


2. More complex format than Busybox
3. Contains 6 Runlevels explained in Table 1
4. /etc/rcS invokes the run-level subsystem and traverses through step 5 below
5. /etc/rc.d will define which services run on each runlevel.

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 5
DaaS-Embedded-Linux 01.03

4 GNU TOOLS AND SUBSYSTEMS


4.1 GNU TOOLS
SensorFlock DaaS Embedded Linux was built using the Mentor GNU Embedded
Toolchain [1]. It comprises the following GNU components:

4.1.1 Glibc

1. GNU C Library, commonly known as Glibc, is the GNU Project's


implementation of the C standard library
2. Made up of a number of libraries
3. Functions are defined in it.

4.1.2 BinUtils

Includes the utilities most often used to manipulate binary object files i.e.
1. Linker
2. Assembler
3. Archives

4.1.3 Coreutils

These are the core utilities which are expected to exist in every operating system. It
includes
1. File, shell and text manipulation utilities

4.1.4 InetUtils

Inetutils is a collection of common network programs, it includes


1. ftp client and server
2. telnet client and server
3. tftp client and server.

4.1.5 Bash

1. Bash is the default shell in Linux


2. It is a command processor, allowing the user to input commands
3. Can be used from sbin/sh or bin/bash.

4.2 SUBSYSTEMS OF KERNEL


1. HAL (Hardware Abstraction layer) – responsible for discovering,
enumerating and mediating access to most of the hardware on the host
computer.
2. Memory Management – Memory management takes care for virtual memory
of all processes and also the kernel memory.

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 6
DaaS-Embedded-Linux 01.03

3. Scheduler - Decides which process should run, when and how long it should
run.
4. File system - Used to store, retrieve and update a set of files
5. I / O Subsystem - Scheduling, buffering, caching, and error handling are
provided by the kernel's I/O subsystem
6. Networking – Routing of packets between different networks is done inside
the kernel
7. Inter-Process Communication (IPC) - Provides a method for multiple
processes to communicate with one another.

4.3 DAAS LINUX OS


Daas Linux distribution has been developed from scratch using GNU software stacks
as the base. It is not a derivation of any other Linux distribution i.e. Debian or Redhat.
Daas Linux has initially been developed and tested for ARM Cortex (V4/7)
Architectures.
Daas Linux is an ASOS (Application Specific Operating System) Stack. General
purpose Linux Distributions are generic in nature and are not tuned for any
application specific purpose i.e. running a Java Application Stack or MySQL
Database Service.
The Author of DaaS Linux comes from ASOS development background, primarily
with Redhat eCos Operating System in early year 2000 [2].

4.3.1 Opensource Components

kernel 3.2
u-boot <>
x-load <>
glibc <>
gcc <>
binutils 2.23
coreutils 8.1
inetutils 1.9.1
nettools 1.60
ncurses <>

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 7
DaaS-Embedded-Linux 01.03

lzo <>
sysvinit 2.88
bash 4.2
bison <>
openssl <>
util-linux 2.22.2
Oracle java embedded runtime 1.7.0
iperf <>
netperf <>

4.4 DAAS LINUX PERFORMANCE TESTING

No. of Parallel Throughput Connection Type CPU Utilization


Threads (Mbits/sec)
1 60 TCP * 0.8%
100 0.50 TCP * 30%

* FIN_TIMEOUT = 1 sec

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 8
DaaS-Embedded-Linux 01.03

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 9
DaaS-Embedded-Linux 01.03

4.5 SCREENSHOTS

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 10
DaaS-Embedded-Linux 01.03

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 11
DaaS-Embedded-Linux 01.03

4.6 TRIAL AND EVALUATION


Alpha version is currently available for download, full source will be made available
with beta release in August 2013. Follow these steps to boot DaaS Linux:
• QEMU image is available for download [3]
• Download and use Linaro QEMU stack [4]
• Execute qemu binary:
qemu-system-arm -M overo -m 256 -sd qemu.img -clock unix -net nic,vlan=0 -
net tap,vlan=0,ifname=tap2,script=no -vnc :1 -nographic -monitor pty -serial
stdio

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.


DaaS Embedded Linux Page 12
DaaS-Embedded-Linux 01.03

4.7 REFERENCES
[1] http://www.mentor.com/embedded-software/sourcery-tools/sourcery-
codebench/overview/
[2] http://goo.gl/DMZqs
[3] http://db.tt/0vIWI7Um
[4] https://launchpad.net/qemu-linaro/

Copyright © 2013 SensorFlock (SMC-PVT.) Limited.

Das könnte Ihnen auch gefallen