The document provides an overview of the Linux boot process from power-on to starting the kernel. It discusses:
- What bootloaders like U-Boot and GRUB do to initialize hardware and load the kernel
- The differences between ARM and x86 boot processes
- How the kernel starts as PID 1 without a userspace environment
- What initrds are and how to explore one
- How to get more debug messages from the kernel boot process
- Tips for learning more using QEMU, GDB and systemd-bootchart
The document examines the boot process in detail from a low-level perspective using tools like GDB and binutils to disassemble binaries.
All about the Linux boot process. Presented at linux.conf.au on January 25, 2018. Video at https://archive.org/details/lca2018-Linux_the_first_second . Associated blog posting at https://opensource.com/article/18/1/analyzing-linux-boot-process
Kernel Recipes 2015: Anatomy of an atomic KMS driverAnne Nicolas
The DRM and KMS APIs have won in the Linux graphics ecosystem. Long gone are the days when KMS meant only a handful of desktop graphics drivers. As a side effect, new problems have been uncovered, and API extensions are being designed to address advanced use cases. Atomic updates is the latest significant of such extensions.
While the userspace API extension is simple, a lot of work went under the hood and the in-kernel KMS helpers went through major changes that are not trivial to implement in drivers. This talk will present KMS atomic updates and explain how to update KMS drivers to take advantage of the new API, using the Renesas rcar-du-drm driver as an example.
Laurent Pinchart, Ideas on Board
Kernel Recipes 2014 - Writing Code: Keep It Short, Stupid!Anne Nicolas
The traditional KISS principle says that you are stupid if you can’t keep it simple. However, keeping it simple is actually very, very hard. But my lasting impression after reading a lot of code (linux kernel and otherwise) over the years is that there is no excuse for not keeping your code short. And usually, keeping it short is a very good first step towards keeping it simple. This presentation will give some simple tricks and pointers to keep your code short and I will also give some guidelines how to do design and implementation from a high-level point of view. These simple rules should make it easier for you to get your code accepted in open source projects such as the linux kernel.
Hans Verkuil
Kernel Recipes 2015: Introduction to Kernel Power ManagementAnne Nicolas
In order to keep up with the complexities of SoCs, the Linux kernel has an ever-growing set of features for power management. For the uninitiated, it can be confusing how each of these features work and even more confusing how they should work together. This talk will be a high-level introduction and overview of each of the various features, as well as discuss how all they fit together and interact.
Some of the features/subsystems covered: suspend/resume, CPUidle, CPUfreq, clocks, regulators, runtime PM, generic power domains, PM QoS.
Kevin Hilman, Linaro
https://kernel-recipes.org/en/2015/introduction-to-kernel-power-management/
All about the Linux boot process. Presented at linux.conf.au on January 25, 2018. Video at https://archive.org/details/lca2018-Linux_the_first_second . Associated blog posting at https://opensource.com/article/18/1/analyzing-linux-boot-process
Kernel Recipes 2015: Anatomy of an atomic KMS driverAnne Nicolas
The DRM and KMS APIs have won in the Linux graphics ecosystem. Long gone are the days when KMS meant only a handful of desktop graphics drivers. As a side effect, new problems have been uncovered, and API extensions are being designed to address advanced use cases. Atomic updates is the latest significant of such extensions.
While the userspace API extension is simple, a lot of work went under the hood and the in-kernel KMS helpers went through major changes that are not trivial to implement in drivers. This talk will present KMS atomic updates and explain how to update KMS drivers to take advantage of the new API, using the Renesas rcar-du-drm driver as an example.
Laurent Pinchart, Ideas on Board
Kernel Recipes 2014 - Writing Code: Keep It Short, Stupid!Anne Nicolas
The traditional KISS principle says that you are stupid if you can’t keep it simple. However, keeping it simple is actually very, very hard. But my lasting impression after reading a lot of code (linux kernel and otherwise) over the years is that there is no excuse for not keeping your code short. And usually, keeping it short is a very good first step towards keeping it simple. This presentation will give some simple tricks and pointers to keep your code short and I will also give some guidelines how to do design and implementation from a high-level point of view. These simple rules should make it easier for you to get your code accepted in open source projects such as the linux kernel.
Hans Verkuil
Kernel Recipes 2015: Introduction to Kernel Power ManagementAnne Nicolas
In order to keep up with the complexities of SoCs, the Linux kernel has an ever-growing set of features for power management. For the uninitiated, it can be confusing how each of these features work and even more confusing how they should work together. This talk will be a high-level introduction and overview of each of the various features, as well as discuss how all they fit together and interact.
Some of the features/subsystems covered: suspend/resume, CPUidle, CPUfreq, clocks, regulators, runtime PM, generic power domains, PM QoS.
Kevin Hilman, Linaro
https://kernel-recipes.org/en/2015/introduction-to-kernel-power-management/
Вы узнаете о том, как при помощи syzkaller обнаружить уязвимости ядра Linux. syzkaller — инструмент для фаззинга системных вызовов Linux. Во время тестирования ядра Linux внутри компании Google фаззер нашел более 400 уязвимостей; внешними пользователями также было обнаружено множество ошибок.
Kernel Recipes 2015: Representing device-tree peripherals in ACPIAnne Nicolas
Platforms using ACPI firmware are becoming increasingly interesting to embedded developers. This presentation will demonstrate the new features in the ACPI 5.1 specification which make it possible for ACPI to transparently represent devices using existing device-tree bindings, and for Linux to use existing device drivers which should automatically work for both ACPI and device-tree.
David Woodhouse, Intel
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Nate Lawson
Analysis of virtualized rootkit detection methods. Introduces "Samsara", our framework for detecting virtualization and an implementation of data/instruction TLB sizing, HPET timer, and VT errata tests. We predict the future will be cat-and-mouse, where each side analyzes and responds to the behavior of their opponent, ad infinitum. Joint talk given with Thomas Ptacek and Peter Ferrie.
Mixing performance, configurability, density, and security at scale has, historically, been hard with PHP. Early approaches have involved CGIs, suhosin, or multiple Apache instances. Then came PHP-FPM. At Pantheon, we've taken PHP-FPM, integrated it with cgroups, namespaces, and systemd socket activation. We use it to deliver all of our goals at unheard-of densities: thousands and thousands of isolated pools per box.
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...Area41
Whether it's for malware analysis, vulnerability research or emulation, having a correct disassembly of a binary is the essential thing you need when you analyze code. Unfortunately, many people are not aware that there are a lot of opcodes that are rarely used in normal files, but valid for execution, but also several common opcodes have rarely seen behaviours, which could lead to wrong conclusions after an improper analysis.
For this research, I decided to go back to the basics and study assembly from scratch, covering all opcodes, whether they're obsolete or brand new, common or undocumented. This helped me to find bugs in all the disassemblers I tried, including the most famous ones. This presentation introduces the funniest aspects of the x86 CPUs, that I discovered in the process, including unexpected or rarely known opcodes and undocumented behavior of common opcodes.
The talk will also cover opcodes that are used in armored code (malware/commercial protectors) that are likely to break tools (disassemblers, analyzers, emulators, tracers,...), and introduce some useful tools and documents that were created in the process of the research.
Bio: Ange Albertini is a reverse-engineering and assembly language enthusiast for around 20 years, and malware analyst for 6 years. He has a technical blog, where he shares experimental sources files, and some infographics that are useful in his daily work.
Linux 4.x Tracing: Performance Analysis with bcc/BPFBrendan Gregg
Talk about bcc/eBPF for SCALE15x (2017) by Brendan Gregg. "BPF (Berkeley Packet Filter) has been enhanced in the Linux 4.x series and now powers a large collection of performance analysis and observability tools ready for you to use, included in the bcc (BPF Complier Collection) open source project. BPF nowadays can do system tracing, software defined networks, and kernel fast path: much more than just filtering packets! This talk will focus on the bcc/BPF tools for performance analysis, which make use of other built in Linux capabilities: dynamic tracing (kprobes and uprobes) and static tracing (tracepoints and USDT). There are now bcc tools for measuring latency distributions for file system I/O and run queue latency, printing details of storage device I/O and TCP retransmits, investigating blocked stack traces and memory leaks, and a whole lot more. These lead to performance wins large and small, especially when instrumenting areas that previously had zero visibility. Tracing superpowers have finally arrived, built in to Linux."
Вы узнаете о том, как при помощи syzkaller обнаружить уязвимости ядра Linux. syzkaller — инструмент для фаззинга системных вызовов Linux. Во время тестирования ядра Linux внутри компании Google фаззер нашел более 400 уязвимостей; внешними пользователями также было обнаружено множество ошибок.
Kernel Recipes 2015: Representing device-tree peripherals in ACPIAnne Nicolas
Platforms using ACPI firmware are becoming increasingly interesting to embedded developers. This presentation will demonstrate the new features in the ACPI 5.1 specification which make it possible for ACPI to transparently represent devices using existing device-tree bindings, and for Linux to use existing device drivers which should automatically work for both ACPI and device-tree.
David Woodhouse, Intel
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Nate Lawson
Analysis of virtualized rootkit detection methods. Introduces "Samsara", our framework for detecting virtualization and an implementation of data/instruction TLB sizing, HPET timer, and VT errata tests. We predict the future will be cat-and-mouse, where each side analyzes and responds to the behavior of their opponent, ad infinitum. Joint talk given with Thomas Ptacek and Peter Ferrie.
Mixing performance, configurability, density, and security at scale has, historically, been hard with PHP. Early approaches have involved CGIs, suhosin, or multiple Apache instances. Then came PHP-FPM. At Pantheon, we've taken PHP-FPM, integrated it with cgroups, namespaces, and systemd socket activation. We use it to deliver all of our goals at unheard-of densities: thousands and thousands of isolated pools per box.
hashdays 2011: Ange Albertini - Such a weird processor - messing with x86 opc...Area41
Whether it's for malware analysis, vulnerability research or emulation, having a correct disassembly of a binary is the essential thing you need when you analyze code. Unfortunately, many people are not aware that there are a lot of opcodes that are rarely used in normal files, but valid for execution, but also several common opcodes have rarely seen behaviours, which could lead to wrong conclusions after an improper analysis.
For this research, I decided to go back to the basics and study assembly from scratch, covering all opcodes, whether they're obsolete or brand new, common or undocumented. This helped me to find bugs in all the disassemblers I tried, including the most famous ones. This presentation introduces the funniest aspects of the x86 CPUs, that I discovered in the process, including unexpected or rarely known opcodes and undocumented behavior of common opcodes.
The talk will also cover opcodes that are used in armored code (malware/commercial protectors) that are likely to break tools (disassemblers, analyzers, emulators, tracers,...), and introduce some useful tools and documents that were created in the process of the research.
Bio: Ange Albertini is a reverse-engineering and assembly language enthusiast for around 20 years, and malware analyst for 6 years. He has a technical blog, where he shares experimental sources files, and some infographics that are useful in his daily work.
Linux 4.x Tracing: Performance Analysis with bcc/BPFBrendan Gregg
Talk about bcc/eBPF for SCALE15x (2017) by Brendan Gregg. "BPF (Berkeley Packet Filter) has been enhanced in the Linux 4.x series and now powers a large collection of performance analysis and observability tools ready for you to use, included in the bcc (BPF Complier Collection) open source project. BPF nowadays can do system tracing, software defined networks, and kernel fast path: much more than just filtering packets! This talk will focus on the bcc/BPF tools for performance analysis, which make use of other built in Linux capabilities: dynamic tracing (kprobes and uprobes) and static tracing (tracepoints and USDT). There are now bcc tools for measuring latency distributions for file system I/O and run queue latency, printing details of storage device I/O and TCP retransmits, investigating blocked stack traces and memory leaks, and a whole lot more. These lead to performance wins large and small, especially when instrumenting areas that previously had zero visibility. Tracing superpowers have finally arrived, built in to Linux."
Shell: A Command-Line Interpretor that connects a user to Operating System and allows to execute the commands or by creating text script.
Process: Any task that a user run in the system is called a process. A process is little more complex than just a task.
File: It resides on hard disk (hdd) and contains data owned by a user.
X-windows aka windows: A mode of Linux where screen (monitor) can be split in small “parts” called windows, that allow a user to do several things at the same time and/or switch from one task to another easily and view graphics in a nice way.
Text terminal: A monitor that has only the capability of displaying text stuff, no graphics or a very basic graphics display.
Session: Time between logging on and logging out of the system.
Talk from Embedded Linux Conference, http://elcabs2015.sched.org/event/551ba3cdefe2d37c478810ef47d4ca4c?iframe=no&w=i:0;&sidebar=yes&bg=no#.VRUCknSQQQs
IRQs: the Hard, the Soft, the Threaded and the PreemptibleAlison Chaiken
The Linux kernel supports a diverse set of interrupt handlers that partition work into immediate and deferred tasks. The talk introduces the major varieties and explains how IRQs differ in the real-time kernel.
Comparing file system performance: Red Hat Enterprise Linux 6 vs. Microsoft W...Principled Technologies
Understanding how your choice of operating system affects file system I/O performance can be extremely valuable as you plan your infrastructure. Using the IOzone Filesystem Benchmark in our tests, we found I/O performance of file systems on Red Hat Enterprise Linux 6 was better than the file systems available on Microsoft Windows Server 2012, with both out-of-the-box and optimized configurations. Using default native file systems, ext4 and NTFS, we found that Red Hat Enterprise Linux 6 outperformed Windows Server 2012 by as much as 65.2 percent out-of-the-box, and as much as 33.4 percent using optimized configurations. Using more advanced native file systems, XFS and ReFS, we found that Red Hat Enterprise Linux 6 outperformed Windows Server 2012 by as much as 31.9 percent out-of-the-box, and as much as 48.4 percent using optimized configurations.
Many applications are ultimately constrained by the I/O subsystems on which they reside, making it crucial to choose the best combination of file system and operating system to achieve peak I/O performance. As our testing demonstrates, with the file system performance that Red Hat Enterprise Linux 6 can deliver, you are less likely to see I/O bottlenecks and can potentially accelerate I/O performance in your datacenter.
There are many systems that handle heavy UDP transactions, like DNS and RADIUS servers. Nowadays 10G Ethernet NICs are so widely deployed and even 40G and 100G NICs are out there. This makes it difficult for a single server to get enough performance to consume link bandwidth with short packet transactions. Since usually Linux is by default not tuned for dedicated UDP servers, we are investigating ways to boost such UDP transaction performance.
This talk will show how we analyze the bottleneck and give tips we found to make the performance better. Also we discuss challenges to improve it even more.
This presentation was given at LinuxCon Japan 2016 by Toshiaki Makita
Administering a Hadoop cluster isn't easy. Many Hadoop clusters suffer from Linux configuration problems that can negatively impact performance. With vast and sometimes confusing config/tuning options, it can can tempting (and scary) for a cluster administrator to make changes to Hadoop when cluster performance isn't as expected. Learn how to improve Hadoop cluster performance and eliminate common problem areas, applicable across use cases, using a handful of simple Linux configuration changes.
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
https://coscup.org/2021/en/session/39M73K
https://www.youtube.com/watch?v=L_Gyvdl_d_k
Engineers have plenty of debug tools for user space programs development, code tracing, debugging and analyzing. Except “printk”, do we have any other debug tools for Linux kernel development? The “KGDB” mentioned in Linux kernel document provides another possibility.
Will share how to experiment with the KGDB in a virtual machine. And, use GDB + OpenOCD + JTAG + Raspberry Pi in the real environment as the demo in this talk.
開發 user space 軟體時,工程師們有方便的 debug 工具進行查找、分析、除錯。但在 Linux kernel 的開發,除了 printk 外,還可以有哪些工具可以使用呢?從 Linux kernel document 可以看到 KGDB 相關的資訊,提供了在 kernel 除錯時的另一個可能性。
本次將分享,從建立最簡單環境的虛擬機機開始,到實際使用 GDB + OpenOCD + JTAG + Raspberry Pi 當作展示範例。
HKG15-409: ARM Hibernation enablement on SoCs - a case studyLinaro
HKG15-409: ARM Hibernation enablement on SoCs - a case study
---------------------------------------------------
Speaker: Grygorii Strashko
Date: February 12, 2015
---------------------------------------------------
★ Session Summary ★
Hibernation on ARM devices is a long-wanted feature, with multiple ways of achieving it - in-kernel, fully userspace, or a combination. This presentation will give brief overview of these methods, and will discuss the effort required in enabling in-kernel ARM hibernation to the TI platform. We will also share the pre-requisites for enabling this on other SoCs.
--------------------------------------------------
★ Resources ★
Pathable: https://hkg15.pathable.com/meetings/250837
Video: https://www.youtube.com/watch?v=dJqCbTfKrMk
Etherpad: http://pad.linaro.org/p/hkg15-409
---------------------------------------------------
★ Event Details ★
Linaro Connect Hong Kong 2015 - #HKG15
February 9-13th, 2015
Regal Airport Hotel Hong Kong Airport
---------------------------------------------------
http://www.linaro.org
http://connect.linaro.org
This presentation is about U-Boot: the most popular open source, primary boot loader used in embedded devices, as well as it's mechanisms and features.
The respective talk was held by Sam Protsenko (Software Engineer, Consultant, GlobalLogic) at GlobalLogic Mykolaiv Embedded TechTalk #1 on May 25, 2018.
This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel into RAM. What is the importance of init RAM disk (initrd), when 1st user space application is started and who will create init process.
Not breaking userspace: the evolving Linux ABIAlison Chaiken
Don't break userspace" is famously one of the core tenets of Linux kernel development. The rule makes it possible for distros to upgrade the kernel independently of userspace applications. But what does the phrase actually mean in 2022? What portions of the kernel's interface are guaranteed stable and are safe for applications to rely on?
Kernel contributors try to make only backward-compatible changes to the procfs and sysfs filesystems. These virtual filesystems (VFS) constitute the primary applications binary interface (ABI). System calls in a C library like glibc send commands to and receive information from the kernel via the VFS. Linux userspace applications can then rely on the syscalls to interact with the OS or access the VFS directly.
Linux OS's have many artifacts besides procfs and sysfs, however. Which of them are part of the stable ABI? The kernel's documentation calls out the fact that kernel configuration parameters are not stable, but what about devicetree formats, the dmesg log, the BPF validator interface, /dev files, kernel command-line parameters, tracepoints and filesystem metadata? Changes to not explicitly stable parameters have often been the source of controversy.
The difficulty of adding features and fixing bugs without changing the stable ABI is universal in software development. Sometimes there is a stark choice between implementing an upstream fix and "breaking" the library's users. When inevitably the kernel ABI is modified for bug fixes, C-library developers try to balance support for the changes with customer stability expectations. For example, a recent fork of libpthread with an ABI break was created by the realtime Linux community in order to fix problems in time-critical systems like robotics. In 2021, the kernel added a "printk indexing" feature that will make it easier for applications to parse error messages in the dmesg log. The presentation should equip attendees to better understand the Linux ABI and feel better prepared to deal with changes to them that affect their own projects.
Supporting SW Update via u-boot and GPT/EFIAlison Chaiken
A/B partition flipping is a traditional software update method for embedded devices. The Linux kernel notifies the bootloader of an image flip via a memory message at reboot. The strategy did not work for a processor which required a power-on reset due to a PMIC bug. The solution was to extend u-boot to allow the information to be stored in a GPT partition table on the storage device.
A presentation by John Kenney of Toyota InfoTechnology Center on Apr 9 2019 to the Silicon Valley Automotive Open Source Group: https://www.meetup.com/Silicon-Valley-Automotive-Open-Source/events/259384384/
Practical Challenges to Deploying Highly Automated VehiclesAlison Chaiken
Presentation by Dr. Steven Shladover of UC Berkeley on Jan 24, 2019 as part of the Silicon Valley Automotive Open Source meetup group speak series
https://www.meetup.com/Silicon-Valley-Automotive-Open-Source/events/256100027/
Functional AI and Pervasive Networking in AutomotiveAlison Chaiken
Presented ath the Sept 25, 2017 meeting of the Silicon Valley Automotive Open sSource Group. About RTI's open-source DDS middleware and how it promotes rapid development of vehicle LANs.
A talk presented at the Automotive Grade Linux All-Members meeting on September 8, 2015. The focus on why AGL should adopt systemd, and highlights two of the more difficult integration issues that may arise while doing so. The embedded SVG image, courtesy Marko Hoyer of ADIT, is at http://she-devel.com/2015-07-23_amm_demo.svg
Trends in and features of automotive Linux, with an emphasis on Android. Presented at Google Developer Group in Mountain View, CA, USA on February 4, 2015.
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
The talk combines a design overview of systemd with some tutorial incofrmation about how to configure it. Systemd's features and pitfalls are illustrated by short demos and real-life examples. Files used in the demos are listed under "Presentations" at http://she-devel.com/
Video of the live presentation will appear here:
http://www.meetup.com/Silicon-Valley-Linux-Technology/events/208133972/
Best practices for long-term support and security of the device-treeAlison Chaiken
Considerations in design of Linux kernel device-tree source, maintenance of source repositories and helpful tools for validation, source examination and over-the-area updates, particular for vehicular and IVI applications.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
1. Linux: the first second
Alison Chaiken
alison@she-devel.com
March 3, 2017
2. https://flic.kr/p/6h96xg
How Linux starts
● What precisely does “off” mean?
● Why does my bootloader have two
binaries?
● ACPI vs DTB
● When does the kernel first spawn a
second thread?
● What is an initrd?
● How does PID 1 start?
● Out-of-bounds: systemd;
SecureBoot; fastboot
3. THE FOLLOWING CONTENT MAY BE TOO
DISTURBING FOR SOME VIEWERS
-- you will witness a kernel panic and
a boot failure;
-- a NULL pointer will be dereferenced
successfully!
10. 10
'Shim' bootloader 'Early Init'
● ARM: “SPL”, “XLoader” or “MLO” in addition to u-boot.img.
● “Software program loader” separates CPU-specific code.
● Problem: DRAM controller must be initialized.
● Solution: load into SRAM ('OCRAM' in i.MX6, 'l2ram' for TI).
– Why this works: SRAM (and pNOR) are mapped memory.
● Problem: SRAM is little! (256K on i.MX6, 2 MB on DRA7x).
● Solution: start with a tiny SPL.
13. 13
enum bootstage_id {
BOOTSTAGE_ID_START = 0,
BOOTSTAGE_ID_CHECK_MAGIC,/* Checking image magic */
BOOTSTAGE_ID_CHECK_HEADER, /* Checking image header */
BOOTSTAGE_ID_CHECK_CHECKSUM, /* Checking image checksum */
BOOTSTAGE_ID_CHECK_ARCH, /* Checking architecture */
BOOTSTAGE_ID_CHECK_IMAGETYPE = 5,/* Checking image type */
BOOTSTAGE_ID_DECOMP_IMAGE, /* Decompressing image */
BOOTSTAGE_ID_KERNEL_LOADED, /* Kernel has been loaded */
BOOTSTAGE_ID_DECOMP_UNIMPL = 7, /* Odd decompression algorithm */
BOOTSTAGE_ID_RUN_OS = 15, /* Exiting U-Boot, entering OS */
/* Boot stages related to loading a kernel from an network device */
BOOTSTAGE_ID_NET_CHECKSUM = 60,
BOOTSTAGE_ID_NET_ETH_START = 64,
BOOTSTAGE_ID_NET_ETH_INIT,
BOOTSTAGE_ID_NET_START = 80,
BOOTSTAGE_ID_NET_NETLOOP_OK,
};
Interpretation of bootstages
14. 14
Passing info from Kernel to Bootloader
● U-boot can pass info in registers or in kernel cmdline.
● Most arches pass “Reset cause” to bootloader.
● mtdoops and ramoops save backtraces in persistent stores
specified by device-tree.
16. 16
The coming revolution in non-volatile storage
Source: Micron
● 1 Gb non-volatile memory suspend even for brief
inactivity.
● POR will become a rare event.
● Profound security implications.
● Linux drivers: Matthew Wilcox, XIP DAX
AKA,
'Optane'
by Intel
Specs:
ArsTechnica
21. 21
Examining ELF binary start with GDB
(results depend on toolchain)
● Compile your C program with '-ggdb'.
● gdb <some-binary-executable>
● Type 'info files'
● Look for 'Entry point'.
● x86_64:
− Type 'b *(hex address)'
− Type 'run'
− Type 'info functions'
● ARM:
− Type 'l *(hex address)'
− Type 'l 1,80'
− Type 'info functions' or
'info sources'
23. 23
The kernel as PID 0
● Userspace processes need a stack, a heap, STD* file
descriptors and an environment to start.
● An ASM constructor “ctor” from crti.o, crtn.o and crt1.0
provided by libgcc allocates these resources.
● Source is start.S.
● Corresponding kernel resources are provided via inline
ASM.
24. 24
Examining kernel start with GDB
1 Type 'file vmlinux'. (If zImage, extract with linux/scripts/extract-vmlinux).
2 Type:
gdb vmlinux
3 Type:
info files
4 Find 'Entry point'.
5 Type:
l *(hex address)
6 Type
l 1,80
26. 26
What's in head.S?
● Type 'file vmlinux.o'
● Try 'arm-linux-gnueabihf-gdb vmlinux.o'
● Type 'info files'
● Type 'l *(0x0)' <---- actually works!
27. 27
The kernel's main() function:
highlights of start_kernel()
start_kernel() {:
−boot_cpu_init();
−page_address_init();
−setup_arch(&command_line);
−page_alloc_init();
−pr_notice("Kernel command line: );
−parse_args("Booting kernel", command_line);
−mm_init();
−sched_init();
−init_IRQ();
−init_timers(); timekeeping_init();
−rest_init();
}
“Activate the first processor.”
process the device-tree
All timestamps before
are [0.000000]
setup page tables
and start virtual memory
start
userspace
29. 29
What is an initrd anyway?
● 'init ramdisk' = filesystem that is loaded into memory by the
kernel before the rootfs mounts.
● Why?
– To provide a 'rescue shell' in case rootfs doesn't mount.
– To provide modules that don't fit in zImage.
– To provide a safe environment to run agressive tests.
– To facilitate software updates on devices with limited
storage.
30. 30
What's in an initrd and why?
● Boot into the rescue shell by providing a broken cmdline in
/boot/grub/grub.cfg
– Type 'ls'
● Or try 'lsinitramfs /boot/$(uname -r)'
● initrd is a gzipped cpio archive:
cp /boot/initrd-$(uname -r) /tmp/initrd.gz
gunzip /tmp/initrd.gz
cpio -t < /tmp/initrd
32. 32
Booting into Rescue Shell
/scripts/local-block is the function local_block() inside initramfs /scripts/local
33. 33
OMG! My life is over! (rescue shell tips)
Inhale on a 4-count, then exhale on a 10-count.
● Oh no! 'help' scrolls pages of unreadable crap!
Relax your jaw. Make circles with your neck.
● Read 'man busybox'.
● 'help | grep' works in busybox.
● Look in /bin and /sbin. There's fsck!!
● You have sed and vi (but not emacs ;-( )
● Type 'reboot -f' when you are bored.
35. 35
{Hibernate, Suspend} == Freeze
● Suspend: save state to memory.
● Hibernate: save state to disk (swap).
● Main code is in kernel/freezer.c.
● Freezing of processes preserves state, protects filesystems.
● Each core must save its state separately.
● To watch, append no_console_suspend to bootargs.
36. 36
How to suspend from CLI
no_console_suspend in bootargs gives debug
output.
38. 38
Summary
● u-boot's CONFIG_BOOTSTAGES, acpidump and
systemd-bootchart provide details about boot.
● Practicing with QEMU is entertaining and low-risk.
● Examine your kernel with GDB and binutils.
● ARM and x86 boot processes are quite distinct.
● High-speed non-volatile memory is about to have a
massive impact on Linux.
39. 39
Major References
● Embedded Linux Primer by Chris Hallinan (book)
● Booting ARM Linux by Russell King and
THE LINUX/x86 BOOT PROTOCOL (Documentation/)
● Program startup process in userspace at linux-insides blog
● Matthew Garrett's comprehensive series on UEFI
● Status of Intel Management Engine on various laptops
(Coreboot) and servers (FSF)
● All about ACPI talk by Darren Hart, ELCE 2013
● Arch Wiki on hacking ACPI tables
40. do_bootm_states = u-boot state machine
bootm.c<lib>
“Main Entry point for arm
bootm implementation”
BootROM
(internal EEPROM)
resume?
Read Reset
Controller registers
No
Yes
Jump to
stored image
bootm_start() bootm_find_os()
bootm_load_os() bootm_os_get_boot_func()
boot_selected_os
do_bootm_linux()
bootm_jump_linux()
bootm.c<common>
Das U-boot
***
41. Boot ROM
in CPU
Shim
bootloader
(Xloader,
MLO, etc.)
bootloader
(u-boot,
GRUB, etc.)
cpu_idleudev
arch/arm/kernel/smp.c
kernel/smp.c
head.S
head-common.S
“Kernel startup entry point” Decompress
the
kernel
spawn
2nd
thread
Boot
secondary
cores
start
userspace
init
smp_init()
start of zImage
secondary_start_kernel()
kernel/smpboot.c
idle_threads_init()
main.c
start_kernel()
kernel_init
do_initcalls()
42. 42
How to create your own initrd
● Unpack one that already works with gunzip and 'cpio -i'
● Copy in your binary.
● Use gen_initramfs.h from kernel source tree:
– scripts/gen_initramfs_list.sh -o <archive> <path to source>
● Run 'lsinitramfs <archive>' to check the result.
● cp <archive> /boot; edit /boot/grub/grub.cfg
CAUTION: your system boots fine, right? You're crazy to mess
with the bootloader, you moron.
● Run grub-script-check.
44. 44
Getting more detailed kernel messages at boot
● Remove 'quiet' from the kernel command line.
● How to keep 'quiet' from coming back:
– edit /etc/grub.d/10_linux and add:
export GRUB_DISABLE_SUBMENU=y
export GRUB_CMDLINE_LINUX_DEFAULT=""
CAUTION: your system boots fine, right? You're crazy to mess
with the bootloader, you moron.
● Always run 'grub-script-check /boot/grub/grub.cfg' afterwards.
45. 45
Learning more with systemd-bootchart
● Make sure kernel is compiled with CONFIG_SCHEDSTATS=y.
● 'apt-get install systemd-bootchart'
● Interrupt grub by typing 'e'
● Append 'init=/lib/systemd/systemd-bootchart' to the line that
starts with 'linux'
● After boot, open the SVG image in /run/log/ with a browser.
49. The ARM bootloader
● Read fundamental configuration from fuses, switches and
GPIOs.
● Then, for ARM:
1. Setup and initialise the RAM.
2. Initialise one serial port.
3. Detect the machine type.
4. Setup the kernel tagged list. device-tree
5. Load initramfs.
6. Call the kernel image.
Code in the SPL: board_init_f() and jump_to_image_linux()
50. 50
Where do messages originate?
[ 54.590327] Starting kernel ...
[ 54.593459]
Uncompressing Linux... done, booting the kernel.
Linux version 3.0.35-2508-g54750ff (gcc version 4.6.3 #1 SMP PREEMPT
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX 6Quad/DualLite/Solo Sabre-SD Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6Q, silicon rev 1.1
PERCPU: Embedded 7 pages/cpu @8c008000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 227328
Kernel command line: console=ttymxc1,115200 ip=dhcp rootwait root=/dev/nfs
nfsroot=172.17.0.1:/tftpboot/alison/mx6q/fsl-mx6,v3,tcp
u-boot misc.c
in
zImage
header
from kernel
proper
from CPU
from
kernel
passed from u-boot
}
51. 51
Image, zImage, uImage, vmlinux, vmlinuz?
● Image is the raw executable.
● zImage is compressed version of Image with prepended
uncompression instructions in ASM.
● uImage is a zImage with a u-boot header.
● vmlinux is ELF executable containing Image in .text section.
● vmlinuz is a stripped version of vmlinux.