The document discusses how to add Linux support for a new board. It covers customizing hardware design from a reference design, adding board support code for the bootloader and Linux kernel, and building a custom user-space distribution. The key steps involve customizing the hardware design, porting the bootloader (AT91Bootstrap and U-Boot), adding board support to the Linux kernel, and using a build system like OpenEmbedded to create a custom user-space distribution.
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
This course gets you started with writing device drivers in Linux by providing real time hardware exposure. Equip you with real-time tools, debugging techniques and industry usage in a hands-on manner. Dedicated hardware by Emertxe's device driver learning kit. Special focus on character and USB device drivers.
LCU13: Deep Dive into ARM Trusted Firmware
Resource: LCU13
Name: Deep Dive into ARM Trusted Firmware
Date: 31-10-2013
Speaker: Dan Handley / Charles Garcia-Tobin
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
This course gets you started with writing device drivers in Linux by providing real time hardware exposure. Equip you with real-time tools, debugging techniques and industry usage in a hands-on manner. Dedicated hardware by Emertxe's device driver learning kit. Special focus on character and USB device drivers.
LCU13: Deep Dive into ARM Trusted Firmware
Resource: LCU13
Name: Deep Dive into ARM Trusted Firmware
Date: 31-10-2013
Speaker: Dan Handley / Charles Garcia-Tobin
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
Most of this session will focus on Kernel Module Programming. We will briefly talk about the interaction of different layers of operating system from userspace to kernel space. Starting from simple Hello World kernel modules, we will learn the development of more sophisticated modules related to device drivers and interrupt handlers. We will also briefly touch upon the shell scripts and how they can be used to extract system level information. Since, this will be a hands on session, attendees are expected to try the examples on their machines. Basic understanding of operating systems and C programming is expected for the tutorial.
Embitude's Linux SPI Drivers Training Slides. Contains the details of AM335X specific low level programming, SPI components such as SPI Master Driver, SPI Client Driver, Device Tree for SPI
The slides begins with introduction to the character drivers and then mentions the various APIs for registering the character driver. Dynamically creating the device file and IOCTL
Covers the basics of Direct Memory Access (DMA). Further to this, the generic Linux DMA engine is covered along with steps to initiate the DMA transfer
The conversion of the ARM Linux kernel over to the Device Tree as the mechanism to describe the hardware has been a significant change for ARM kernel developers. Nowadays, all developers porting the Linux kernel on new ARM platforms, either new SOCs or new boards, have to work with the Device Tree. Based on practical examples, this talk intends to provide a ""getting started guide"" for newcomers in the Device Tree world: what is the Device Tree? How is it written and compiled? How do the bootloader and kernel interact? How are Device Tree bindings written and documented? What are the best practices for writing Device Trees and their bindings?
Video available at https://www.youtube.com/watch?v=m_NyYEBxfn8.
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Overview of the architecture of the Linux kernel, based on "Anatomy of the Linux Kernel" by M. Tim Jones (IBM Developerworks), http://www.ibm.com/developerworks/linux/library/l-linux-kernel/
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
Most of this session will focus on Kernel Module Programming. We will briefly talk about the interaction of different layers of operating system from userspace to kernel space. Starting from simple Hello World kernel modules, we will learn the development of more sophisticated modules related to device drivers and interrupt handlers. We will also briefly touch upon the shell scripts and how they can be used to extract system level information. Since, this will be a hands on session, attendees are expected to try the examples on their machines. Basic understanding of operating systems and C programming is expected for the tutorial.
Embitude's Linux SPI Drivers Training Slides. Contains the details of AM335X specific low level programming, SPI components such as SPI Master Driver, SPI Client Driver, Device Tree for SPI
The slides begins with introduction to the character drivers and then mentions the various APIs for registering the character driver. Dynamically creating the device file and IOCTL
Covers the basics of Direct Memory Access (DMA). Further to this, the generic Linux DMA engine is covered along with steps to initiate the DMA transfer
The conversion of the ARM Linux kernel over to the Device Tree as the mechanism to describe the hardware has been a significant change for ARM kernel developers. Nowadays, all developers porting the Linux kernel on new ARM platforms, either new SOCs or new boards, have to work with the Device Tree. Based on practical examples, this talk intends to provide a ""getting started guide"" for newcomers in the Device Tree world: what is the Device Tree? How is it written and compiled? How do the bootloader and kernel interact? How are Device Tree bindings written and documented? What are the best practices for writing Device Trees and their bindings?
Video available at https://www.youtube.com/watch?v=m_NyYEBxfn8.
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Overview of the architecture of the Linux kernel, based on "Anatomy of the Linux Kernel" by M. Tim Jones (IBM Developerworks), http://www.ibm.com/developerworks/linux/library/l-linux-kernel/
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
The objective of this conference is to explain how to develop on small machines that can boot fast, fanless โฆ Itโs convenient and often more realistic than to work in virtual machines, especially when working on developping drivers.
Willy will list all the necessary items to setup an optimal environment to be as efficient as possible. Among these one: the importance of investing time to speed up the boot, etc โฆ
He will also speak a bit about crosstool-ng, used in this environement.
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...Toradex
ย
Read our blog for the latest on demystifying the development of embedded systems using Heterogeneous Multicore Processing architecture powered SoCs! This might provide you with the jump start you need for your development. https://www.toradex.com/blog/first-steps-developing-embedded-applications-using-heterogeneous-multicore-processors
FPGA introduction for absolute beginners
- What is inside FPGA (Altera example)
- What are the major differences between firmware development for MCU and FPGA
- Some very basics of Verilog HDL language (by similarities with C/C++)
- Testbench approach and Icarus simulator demonstration
- Altera Quartus IDE demonstration -- creating project, compilation, and download
- Signal-Tap internal logic analyzer demonstration
(Verilog source code examples attached inside presentation)
Topic: Low cost computing using the Raspberry PI and other single board computing platforms. Overview of the growing low cost computing environment and demo of basic configuration of the Raspberry PI and Arduino for home and business projects.
Linaro Connect 2016 (BKK16) - Introduction to LISAPatrick Bellasi
ย
This presentation introduces the tutorial on the Linux Integrated System Analysis toolkit and provides a short description of its main modules. The tutorial is available on GitHub at this URL:
https://github.com/ARM-software/lisa/blob/master/ipynb/tutorial/00_LisaInANutshell.ipynb
Exploiting Linux Control Groups for Effective Run-time Resource ManagementPatrick Bellasi
ย
Emerging multi/many-core architectures, targeting both High Performance Computing (HPC) and mobile devices,
increase the interest for self-adaptive systems, where both applications and computational resources could smoothly adapt
to the changing of the working conditions. In these scenarios, an efficient Run-Time Resource Manager (RTRM) framework
can provide a valuable support to identify the optimal trade-off between the Quality-of-Service (QoS) requirements of the
applications and the time varying resources availability.
This presentation introduces a new approach to the development of a system-wide RTRM featuring: a) a hierarchical and distributed control, b) the exploitation of design-time information, c) a rich multi-objective optimization strategy and d) a portable and modular design based on a set of tunable policies. The framework is already available as an Open Source project, targeting a NUMA architecture and a new generation multi/many-core research platform. First tests show benefits for the execution of parallel applications, the scalability of the proposed multi-objective resources partitioning strategy, and the sustainability of the overheads introduced by the framework.
Cross-Layer Frameworks for Constrained Power and Resources Management of Embe...Patrick Bellasi
ย
Power and resource management are key goals for the success of modern battery-supplied multimedia devices. This kind of devices are usually based on SoCs with a wide range of subsystems, that compete in
the usage of shared resources, and offer several power saving capabilities, but need an adequate software support to exploit such capabilities.
This presentation introduces Constrained Power Management (CPM), a cross-layer formal model and framework for power and resource management, targeted to MPSoC-based devices. CPM allows coordination and communication, among applications and device drivers, to reduce energy consumption without compromising QoS. A dynamic and multi-objective optimization strategy is supported, which has been designed to have a negligible overhead on the development process and at run-time.
The general purpose of operating systems like Linux, thanks to their predisposition to adapt easily to different application contexts, is a common choice for many new generation mobile devices. Being a key feature to improve mobility, energy efficiency has become a high priority design goal, and the implementation of the necessary mechanisms to optimize both power and performances can no longer be separated from the requirements of ease of development, portability and adaptability.
This work presents a formal model to define the problem of power vs performance control. We have proven that a distributed control is particularly suited to meet the goals of both adaptability and portability, without unduly compromising the effectiveness of control and its efficiency.
Starting from the current Linux solution we will advance the proposal for an extension that is better tailored to embedded mobile systems. The proposed solution has been implemented in a new Linux kernel framework named CPM which is competitive in adaptability and ensures better control on performances while still not affecting ease of implementation.
Unveiling the Secrets How Does Generative AI Work.pdfSam H
ย
At its core, generative artificial intelligence relies on the concept of generative models, which serve as engines that churn out entirely new data resembling their training data. It is like a sculptor who has studied so many forms found in nature and then uses this knowledge to create sculptures from his imagination that have never been seen before anywhere else. If taken to cyberspace, gans work almost the same way.
Improving profitability for small businessBen Wann
ย
In this comprehensive presentation, we will explore strategies and practical tips for enhancing profitability in small businesses. Tailored to meet the unique challenges faced by small enterprises, this session covers various aspects that directly impact the bottom line. Attendees will learn how to optimize operational efficiency, manage expenses, and increase revenue through innovative marketing and customer engagement techniques.
Implicitly or explicitly all competing businesses employ a strategy to select a mix
of marketing resources. Formulating such competitive strategies fundamentally
involves recognizing relationships between elements of the marketing mix (e.g.,
price and product quality), as well as assessing competitive and market conditions
(i.e., industry structure in the language of economics).
LA HUG - Video Testimonials with Chynna Morgan - June 2024Lital Barkan
ย
Have you ever heard that user-generated content or video testimonials can take your brand to the next level? We will explore how you can effectively use video testimonials to leverage and boost your sales, content strategy, and increase your CRM data.๐คฏ
We will dig deeper into:
1. How to capture video testimonials that convert from your audience ๐ฅ
2. How to leverage your testimonials to boost your sales ๐ฒ
3. How you can capture more CRM data to understand your audience better through video testimonials. ๐
Premium MEAN Stack Development Solutions for Modern BusinessesSynapseIndia
ย
Stay ahead of the curve with our premium MEAN Stack Development Solutions. Our expert developers utilize MongoDB, Express.js, AngularJS, and Node.js to create modern and responsive web applications. Trust us for cutting-edge solutions that drive your business growth and success.
Know more: https://www.synapseindia.com/technology/mean-stack-development-company.html
Personal Brand Statement:
As an Army veteran dedicated to lifelong learning, I bring a disciplined, strategic mindset to my pursuits. I am constantly expanding my knowledge to innovate and lead effectively. My journey is driven by a commitment to excellence, and to make a meaningful impact in the world.
What are the main advantages of using HR recruiter services.pdfHumanResourceDimensi1
ย
HR recruiter services offer top talents to companies according to their specific needs. They handle all recruitment tasks from job posting to onboarding and help companies concentrate on their business growth. With their expertise and years of experience, they streamline the hiring process and save time and resources for the company.
Business Valuation Principles for EntrepreneursBen Wann
ย
This insightful presentation is designed to equip entrepreneurs with the essential knowledge and tools needed to accurately value their businesses. Understanding business valuation is crucial for making informed decisions, whether you're seeking investment, planning to sell, or simply want to gauge your company's worth.
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...BBPMedia1
ย
Grote partijen zijn al een tijdje onderweg met retail media. Ondertussen worden in dit domein ook de kansen zichtbaar voor andere spelers in de markt. Maar met die kansen ontstaan ook vragen: Zelf retail media worden of erop adverteren? In welke fase van de funnel past het en hoe integreer je het in een mediaplan? Wat is nu precies het verschil met marketplaces en Programmatic ads? In dit half uur beslechten we de dilemma's en krijg je antwoorden op wanneer het voor jou tijd is om de volgende stap te zetten.
Kseniya Leshchenko: Shared development support service model as the way to ma...Lviv Startup Club
ย
Kseniya Leshchenko: Shared development support service model as the way to make small projects with small budgets profitable for the company (UA)
Kyiv PMDay 2024 Summer
Website โ www.pmday.org
Youtube โ https://www.youtube.com/startuplviv
FB โ https://www.facebook.com/pmdayconference
1. Linux Board Porting
how to add Linux support for a new board
Patrick Bellasi
Dipartimento di Elettronica ed Informazione
Politecnico di Milano
bellasi@elet.polimi.it
10/08/09
2. Agenda
๎ Introduction
๎ Hardware design
customizing a reference design
HW verification
๎ Board Support Package
board specific code
Boot-loader porting
booting Linux kernel
๎ User-space support
build your own distribution
๎ Build you own application
2
3. Introduction
Presentation objectives
๎ Show you how is relatively simple to develop you own
Linux board
demo-boards are suitable for fast prototyping
real-applications require ad-hoc HW
stability, both mechanical and functional
efficiency
Cost-reduction
๎ Needs
reference design
a development methodology
possibly using open-source tools
mostly basic HW design skills
3
4. Introduction
Methodology Overview
๎ Few simple steps
1) customize an HW reference design to suite your needs
2) build a cross-compilation toolchain
using tools adopted on step 5
3) setup boot code
first (and Second) Level Bootloader
4) add board support to Linux kernel
5) build your own distribution
๎ We will consider as example the porting to a new
board based on Atmel's AT91SAM9260 SoC
4
5. Agenda
๎ Introduction
๎ Hardware design
customizing a reference design
HW verification
๎ Board Support Package
board specific code
Boot-loader porting
booting Linux kernel
๎ User-space support
build your own distribution
๎ Build you own application
5
6. Hardware Design
Identify your needs
๎ Target system requirements
processing power
memories: type and amounts
devices
communication channels (USART, USB, CAN, I2C, โฆ)
digital I/O
ADC (channels, resolution, timings, โฆ)
networking (ethernet, modem, zigbee, bluetooth, โฆ)
sensors (GPS, Temp/Lux/Humidity... )
power needs and budget
application fields constraints (usability, certifications, ... )
๎ Identify a SoC that match most of these requirements
consider your skills!
a reference design is usually provide by the producer
6
7. Hardware Design
Example - AM9 Reference Platform: AT91SAM9260 by Atmel
High performances 7-layer high-speed bus matrix
8 kByte instruction cache
Advanced system controller
Low power mode support
200 MIPS ARM926EJ-Sยฎ core, camera interface, seven
USARTs, 10/100 Ethernet MAC, 12 Mbps USB device
and host controller with on-chip transceivers, external bus
interface (EBI) supporting SDRAM, Flash, NAND Flash
with built-in ECC, SD, SDIO, and Multimedia Card
interface (MMC), three synchronous serial controllers
(SSC), two master/slave Serial Peripheral Interfaces (SPI),a three-
channel 16-bit timer/counter, two-wire interface (IยฒC) and IEEEยฎ
1149.1 JTAG Boundary Scan on all digital pins.
7
8. Hardware Design
Example โ Custom boards based on same reference desing
๎ Atmel provides reference board's schematics
use to build you own board
e.g. add new external devices (GSM, Memories, etc. )
Omelix's SAM9-L9260
Daricom's C3-Ax03
8
9. Hardware Design
Design your own board
๎ Keep as much as possible from the reference design
substitute wrong components
add missing components
๎ Use an IDE to support both circuit design and
verification
opensource solutions: KiCAD, Eagle
export standard garber files
use them correctly
define pin properties
exploit circuit verification tools
๎ Carefully review power lines design
you may need an help from an electronics engineer
if possible rely on power companion IC
๎ Add test-points to help HW debugging
9
13. Hardware Design
Produce and test the board
๎ Verify the production quality
power lines voltage levels
connections among components
test circuit functionalities
you can test well behavior of SoC's external components
e.g. USART working, control GPIOs, โฆ
๎ JTAG (IEEE 1149.1) boundary-scan
device pin signals can be
observed in real-time
without interfering with the
normal device operation
used to control SoC's pins
13
15. Agenda
๎ Introduction
๎ Hardware design
customizing a reference design
HW verification
๎ Board Support Package
board specific code
Boot-loader porting
booting Linux kernel
๎ User-space support
build your own distribution
๎ Build you own application
15
16. Board Support Package
Introduction
๎ Contains everything needed to run an operating
system on a given hardware platform
Microprocessor support
Board specific resources
Bootloader
Board initialization code
Device drivers: buses and peripherals
User-space distribution
๎ Integration into OpenSource standard tools
preferred delivery method (i.e. public available)
u-boot and Linux board support, OpenEmbedded metadata
๎ SoC's producer provide BSP for reference design
we can update the BSP to include support for our own board
16
17. Booting Linux
SAM9: Boot Sequence
๎ Understand the boot procedure
several pieces of software are involved
ROM code check if a valid application is present on
supported media
FLASH, DATAFLASH, NANDFLASH, SDCARD
download a valid application into internal SRAM
run the First Level Bootloader (AT91Bootstrap)
in charge of HW configuration, download U-Boot binary from
FLASH to SDRAM, start the Second Level Bootloader
run the Second Level Bootloader (U-Boot)
in charge of download kernel binaries from FLASH, network,
USB key, etc.
start the kernel
๎ Each architecture has a specific sequence
for the first two steps only
17
18. Booting Linux
SAM9: Understanding Boot Possibilities
๎ Memory considerations ๎ Different booting
4KB of internal SRAM strategies
๎ Memory mapping
give fixed addresses
available memories
device configuration
registers
18
19. Booting Linux
SAM9: ROM Code
๎ Integrates different programs to download and/or
upload into the different memories of the product
initializes the Debug Unit serial port (DBGU) and the USB
device port
look for valid code in DataFlash CS0
sequence of eight valid ARM exception vectors
all these vectors must be B-branch or LDR load register instructions
if a valid sequence is found, code is downloaded into the
internal SRAM
remap and a jump to the first address of the SRAM
otherwise check DataFlash CS1 and NAND Flash
If no valid ARM vector sequence is found
SAM-BAยฎ Boot is then executed
waits for transactions either on the USB device, or on the DBGU
serial port
19
20. Booting Linux
SAM9: SAM-BAยฎ Boot Code
๎ Execute if a valid image to load is not found on flash
๎ Provide a simple command set
read/write internal SRAM memory
copy files to/from internal SRAM memory
jump execution to a specified address in SRAM
๎ Can be used with a graphical tool (SAM-BA GUI)
run on host, board attached via RS-232 or USB device
to upload code into SRAM and execute setup routines
initialize external memories: SDRAM, Serial DataFlash and NAND
Flash
available for Linux too
can require some porting
e.g. if you changed external memory configuration wrt reference design
C code
cross-compile using an arm-elf cross-compiler (e.g. wingcc)
20
23. Booting Linux
SAM9: AT91Bootstrap
๎ The first level boot loader
small footprint (<4KB)
stored into dataflash or nand using SAM-BA utility
๎ Needed to
initialize external memory making them usable
load โsome codeโ into external memory
jump execution to some predefined address
or reset boot sector to restore access to SAM-BA
๎ Can start either Linux or a second level bootloader
๎ May require few porting
e.g. if you changed external memory configuration wrt reference
design
C code
quite similar to SAM-BA code structure
23
25. Booting Linux
Das U-Boot โ The Universal Bootloader
๎ Is a monitor program
command line interface with basic command set
information, memory, flash memory, execution control, network,
environment variables, filesystem support, special and
miscellaneous commands
๎ It is relatively easy to port U-boot to a new board
this explains its success
many supported architectures
PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze
thousand boards supported by public source tree
๎ It is responsible of configuring main interfaces and
launching a Linux system
it is possible to directly boot Linux from AT91Bootstrap
in a production phase for instance
25
29. Booting Linux
Das U-Boot โ The Universal Bootloader
๎ Configuration depends on the combination of board
and CPU type
such information is kept in a configuration file
include/configs/<board_name>.h
look for an already supported board which is as close as
possible to yours
e.g. have a look at the at91sam9260ek.h
๎ Create support code
in board/atmel/<your_board>
have a look at similar atmel'2 boards:
at91sam9260ek.c config.mk led.c Makefile nand.c partition.c
29
30. Booting Linux
Das U-Boot โ The Universal Bootloader
๎ Adjust building scripts to add your board
MAKEALL:
LIST_at91="at91cap9adk at91rm9200dk.... <your_board>โ
Makefile:
c3ax03_config : unconfig
$(MKCONFIG) -a c3ax03 arm arm926ejs c3ax03 daricom at91sam9
include/asm-arm/mach-types.h:
#define MACH_TYPE_<YOUR_BOARD> <YOUR_MACH_TYPE>
(originating from Linux headers, should already be present)
๎ Cross-compile and load the binary image into Flash
using SAM-BA GUI Application
save at address 0x8400
defined into AT91Bootstrap code
30
31. Booting Linux
Das U-Boot โ Other Implementation Details
๎ CPU support implemented in the cpu/ directory
74xx_7xx arm920t arm946es blackfin leon2 mcf5227x mcf532x microblaze
mpc5xx mpc824x mpc85xx nios pxa sh3 arm1136 arm925t arm_intcm i386 leon3
mcf523x mcf5445x mips mpc5xxx mpc8260 mpc86xx nios2 s3c44b0 sh4
arm720t arm926ejs at32ap ixp lh7a40x mcf52x2 mcf547x_8x mpc512x
mpc8220 mpc83xx mpc8xx ppc4xx sa1100
๎ Device drivers implemented in drivers/
a lot of reuse from Linux drivers
๎ Headers implemented in include/ and in include/asm-
<arch>/
mostly Linux headers
31
33. Booting Linux
Linux Kernel โ Architecture Specific Code
๎ Processor specific code is under arch/<arch>
and include/asm-<arch>
e.g. arch/arm
๎ Machine specific code is under arch/<arch>/<subdir>
e.g. arch/arm/mach-at91
33
34. Booting Linux
Linux Kernel โ Machine Initialization
๎ On ARM done with the MACHINE_START macro
MACHINE_START(C3AX03, "Daricom C3-AX03")
/* Maintainer: Patrick Bellasi <derkling@gmail.com> */
.phys_io = AT91_BASE_SYS,
.io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
.boot_params = AT91_SDRAM_BASE + 0x100,
.map_io = c3ax03_map_io,
.init_irq = c3ax03_init_irq,
.init_machine = c3ax03_board_init,
.timer = &at91sam926x_timer,
MACHINE_END
declared in the board definition file
๎ Initialization routines
some are board specific
mostly composed of structures definitions and registration
34
35. Booting Linux
Linux Kernel โ Board Definition Code
๎ Board definitions is done on a single file
arch/arm/mach-at91/board-<your_board>.c
๎ Data structure definitions
e.g. MACB Ethernet device
static struct at91_eth_data __initdata c3ax03_macb_data = {
.phy_irq_pin = AT91_PIN_PA7,
.is_rmii = 1,
};
๎ Data structure registrations
e.g. MACB Ethernet device
at91_add_device_eth(&c3ax03_macb_data);
๎ Update configuration and compilation files
enable building of your board code
provide a default kernel configuration
e.g. arch/arm/configs/c3ax03_defconfig
35
36. Booting Linux
Linux Kernel โ Cross-compile kernel
๎ Configure using default configuration
cp arch/arm/configs/c3ax03_defconfig .config
make ARCH=arm oldconfig
๎ Customize the kernel for your needs
make ARCH=arm menuconfig
๎ Build the kernel image
make ARCH=arm CROSS_COMPILE=<path_to_arm-gcc>
๎ Build the U-Boot kernel Image
mkimage -A arm -O linux -C none -T kernel -a 20008000 -e
20008000 -n linux-2.6 -d arch/arm/boot/zImage uImage
36
38. Agenda
๎ Introduction
๎ Hardware design
customizing a reference design
HW verification
๎ Board Support Package
board specific code
Boot-loader porting
booting Linux kernel
๎ User-space support
build your own distribution
๎ Build you own application
38
39. User Space Support
Openembedded Introduction
๎ Self contained cross build system
๎ Collection of metadata (recipes) that describe how to
build a package
thousands of packages including bootloaders, libraries, and
applications
for ~60 target machines including the N770 and x86
over 40 package/machine configurations (distributions)
๎ Does not include source code
fetches source using instructions in metadata
sopport for sources on tarball, SVN, GIT, ...
๎ Output is individual packages and ๏ฌlesystem images
jffs2, ext2, etc
39
40. User Space Support
Openembedded and Bitbake
๎ OE is powered by BitBake
parses the OE metadata to build the system
parses recipes/confs
creates a database of how to fetch, configure, build, install and stage
each package
determines package dependencies and builds in correct order
uses the IPK packaging format
40
41. User Space Support
Openembedded Setup
๎ Decide on OE metadata version (snapshot or latest)
install bitbake
setup a pristine OE directory
keep changes in an overlay
specific configuration files
internal package metadata
overloads on pristine metadata for classes, bb files, configuration
download directory
41
42. User Space Support
Openembedded File Layout
๎ Six directories, three of them hold BitBake metadata
conf
holding bitbake.conf, machine and distribution configuration
bitbake.conf is read when BitBake is started
will link a local.conf, the machine and distribution configuration files
all these files will be searched in the BBPATH environment variable
classes
holding BitBake bbclass that can be inherited by receipts BitBake
packages
store the BitBake files
a directory for each task or application
directories store the real BitBake files, ending with .bb
for each application and version we have one .bb file
๎ Bitbake parses all configuration and recipes files found
in the BBPATH environment variable
metadata files end with .conf, .inc, .bb and .bbclass
42
43. User Space Support
Openembedded Main Configuration Files
๎ local.conf
highest level configuration
BBPATH variable
compilation options
images to produce
machine and distro
๎ conf/machine/<machine>.conf
system architecture
kernel and its boot parameters
๎ conf/distro/<distro>.conf
version of each software packages
43
44. User Space Support
Using Openembedded
๎ Source the configuration file init.conf
๎ Build single packages
bitbake busybox
e.g. build the kernel
bitbake linux
๎ Build meta packages
e.g. build a standalone toolchain
bitbake meta-toolchain
๎ Build a rootdisk image
e.g. build a mininal system
bitbake minimal-image
44
45. User Space Support
Openembedded Output
๎ Build output directories
cache
conf build specific configuration files
deploy image and packages
staging intermediate install for libraries and headers
work build directory
cross host tools for target
rootfs expanded root filesystem
stamps
45