1-Introduction To Embedded Linux
1-Introduction To Embedded Linux
Maria Mushtaq
Maria.mushtaq@telecom-paris.fr
2022-2023
o Administrative Introduction
o References
(gcc, make…)
o Themes
o Easier to debug
o 8 GB of RAM
o Session 1
- Course Introduction
o Session 2
o Session 3
o Session 5
- TP
o Session 6
o Session 7
- Course Interruptions
- TP
Session 8
- Course Concurrence
- TP
o Final grade
• - 25% of the TP renderings on the device driver (Group Assignment)
- Only document allowed: one A4 page with what you want to write on it
- For the moment, the conditions are met to take this exam in person. Nevertheless, if the situation requires it, this exam could take
o Course taken over from last year (taught by another teacher in previous years) and reassembled
o Do not hesitate to point out any error that you find in the in the course, the texts of the practical
exercises, etc.
o Your feedback will be precious to improve this course for the next years
o Don't hesitate to ask questions during the course and the tutorials!
o Administrative Introduction
o References
o Core: from a small 8-bit microcontroller to several 64-bit multi-core/multi-threaded 64-bit processors
o Mass storage: from a few KB of ROM to several GB/TB of flash or hard disk
o Memory protection: MPU (Memory Protection Unit), MMU (Memory Management Unit)
o Securely share the resources of the execution media between the different tasks
o Processor(s): allocates processor time to the different tasks wishing to execute (with priority management,
preemption, etc.)
o Memory: distributes the memory to the tasks and ensures isolation between them (based on hardware:
o Peripherals
o Provides
o Dedicated
o Windows IoT (ex. Windows Embedded, proprietary), QNX (proprietary), iOS (proprietary), Android (open
source)...
o Real time: VxWorks (proprietary), FreeRTOS (open source), ChibiOS/RT (open source), INTEGRITY
o Home: 19%
o FreeRTOS: 18%
o Ubuntu: 14%
o The market share of Linux (all distributions combined) is therefore very important in the embedded world
o Dynamic ecosystem
o Long-term viability
o No commercial support
o Large ecosystem
o Administrative Introduction
o References
o Some licenses impose constraints on access to the source code, patents or the possibility to update the software
o Copyleft licenses
o Permissive licenses
o Used by the Linux kernel, many tools (busybox for example) and some libraries (GNU Readline!)
o Modifications made to the software must be distributed under the same terms (and therefore distribute the source code of the
modifications)
o The link with a static or dynamic library is considered a derivative work and therefore requires publication of the
o A module compiled outside of the kernel source tree can be distributed under another license (but it will not have
access to certain features of the kernel, and the kernel will be marked as tainted)
o Main additions to v2
o In case of hardware + software distribution, obligation to provide the necessary information so that the
o In case of distribution of the software, provision of a license on the patents necessary to the user to
o In case of an attack for patent infringement the attacker loses the rights granted by the license
o In case of dynamic linking, if the LGPL library is already present on the user's computer, there is no need to
o Unlike copyleft licenses, they do not require the distribution of derivative works under
o In general, in case of redistribution, they oblige simply mention the use of the
component, its license and its authors, and the absence of warranty
o Be very careful with licenses: if you have any doubt, ask a specialized lawyer
o Important point: almost all free licenses explicitly mention the absence of guarantees
o You will not be able to turn against such a software component if a bug in the latter has
o Administrative Introduction
o References
o In 1991, while studying in Helsinki (Finland), Linus Torvalds (21 years old), started to
o September 1991 : version 0.01 published on a FTP server, about 10,000 lines of code
o Thanks to the democratization of the Internet in the early 90's, Linux federates a
processors)
o Supported architectures (v5.9): DEC Alpha, ARC, ARM, ARM 64, C6x, C-SKY, Renesas H8, Qualcomm
Hexagon, Intel IA-64, Freescale 68k, Xilinx Microblaze, MIPS, Andes NDS32, Altera NiosII, OpenRISC,
HP PA-RISC, PowerPC, RISC-V, IBM System/390, SuperH, SPARC, x86, x86-64, Tensilica Xtensa
o Memory Management Unit (MMU) (see μClinux for systems without MMU, it supports
microcontrollers)
o Several MB of RAM (the minimum depends on the kernel configuration, around 4-8 MB, but then
o Patch PREEMPT_RT to make the kernel able to respect hard real-time constraints
o The Linux kernel needs a number of additional software components (it can't do much on its own)
o A bootloader
o Loading the kernel from a mass storage medium storage media (hard disk, flash memory...)
o Setting up the complementary structures in memory for the kernel startup (device tree, initial memory disk
(initrd...))
- Either a minimal system in RAM set up from an image provided to the kernel at (initrd or initramfs)
- Or a more complete file system mounted from a mass storage medium or from the network
- Note: in many systems the two methods above are used one after the other. Methods above are used
o It is this process that will be in charge of the rest of the system startup
o Most of the essential libraries and tools come from the GNU project, hence the name GNU/Linux
o A console (keyboard/screen)
o Debian
o Ubuntu
o ...
o OpenEmbedded : http://www.openembedded.org
o Buildroot : https://buildroot.org/
o Disadvantages: very long to set up, problems of dependency between tools or versions, difficult
learning curve
o Administrative Introduction
o References
46/
o Administrative Introduction
o References
n Group of 3
n Build your file system
n Take help from internet
n Discuss in your group
n Support Material:
n https://opensource.com/article/19/4/create-
filesystem-linux-partition
n Group of 3
n Build/Compile your Linux Kernel
n Take help from internet
n Discuss in your group
n Support Material:
n https://phoenixnap.com/kb/build-linux-kernel