SlideShare a Scribd company logo
Embedded Linux/ Debian
with ARM64 Platform
Harder Better Faster Stronger
SZ LIN
szlin@debian.org
1
Date: 2016/11/17
2
SZLIN (林上智)
➔ Debian Developer
➔ Industrial Grade Linux Distribution
➔ Blog: https://szlin.me
About Me
3
Trends
That’s really what ARM has to look at when
defining a new architecture. That is the nature of
our business, we need to look a long way forward,
and plan.
Why ARMv8 instead of using ARMv7+ LPAE [11]
4
5
ARMv7 -> ARMv8 [2]
32-bit ARMv7-A
compatibility
Cryptography support
Dual Instruction set
architecture
Improved support for
virtualization
6
AArch32 (compat) Support [8]
Support ARMv7 Linux EABI for compat tasks
• Different set of system calls (unistd32.h)
• Compat user structures
• No SWP instruction, no unaligned LDM/STM
access
Supports both ARM and Thumb-2 32-bit user
tasks
Supports 32-bit ptrace
Address space limited to 4GB
Emulated vectors page
• ARM Linux EABI expects helper routines in the
vectors page accessible by user tasks
7
AArch32 (compat) Support
arch/arm64/kernel/ptrace.c
arch/arm64/include/asm/unistd32.h
arch/arm64/include/asm/unistd.h
8
ARMv8-A Designed for Efficiency [2]
Enhancement Why it Matters
64-bit architecture Efficient access to large datasets
Increased number and size of general
purpose registers
Gains in performance and code
efficiency
Double the number and size of NEON
registers
Enhanced capacity of multimedia
engine
Cryptography support Over 10x software encryption
performance New security models for
consumer and enterprise
9
ARMv8-A Family [3]
Core Instruction cycle DMIPS/MHz
Processor
Architecture
big.LITTLE role
Cortex-A32 In-order execution 2.0 ~ 2.1 32 Unknown
Cortex-A35 In-order execution 1.78 64 little
Cortex-A53
In-order execution 2.24 64
little
Cortex-A57 Out-of-order
execution
4.6 64
big
Cortex-A72 Out-of-order
execution
4.72 64
big
Cortex-A73 Out-of-order
execution
4.8 64 big
10
The ARM Registers Comparison [4]
AArch32 AArch64 Remarks
32-bit General purpose registers r0 - r14 w0 - w30
aliased to lower half of each
64-bit register in AArch64
64-bit General purpose registers - x0 - x30
Program counter r15 aka. pc PC
not directly accessible in
AArch64
Zero register -
x31 / w31 aka. xzr /
wzr
in most instructions, except
as a base register for address
generation
Stack pointer r13 SP
encoded as x31 on address
generation
Procedure call link register r14 x30
11
ARMv7
name
AArch64/ARMv8
name
Remarks
Monitor mode EL3
highest exception level,
mostly for firmware
HYP mode EL2
exception level for
hypervisors like Xen (or
parts of KVM)
SVC mode EL1
the Linux kernel is
running in this
USR mode EL0 for unprivileged userland
The ARM Execution Mode [4][8]
12
Memory Layout [15]
AARCH64
It allows up to 4 levels of translation
tables with a 4KB page size and up to
3 levels with a 64KB page size.
13
Memory Layout [9][15]
32 bit address space:
• 4GB of virtual addresses
• 1MPages
• Each entry is 4 bytes (a 32 bit physical
address)
• Page size : 4kb
14
Memory Layout [14][15]
AArch64 Linux uses either 3 levels or 4 levels of
translation tables with the 4KB page
configuration, allowing 39-bit (512GB) or 48-
bit (256TB) virtual addresses, respectively, for
both user and kernel.
64 bit address space
• 16 exabytes(1018) of virtual address space
• 4PetaPages (1015)
• Entry is 8 bytes
• Page size : 4kb/ 64kb
15
Memory Layout [14][15]
16
Memory Layout [14]
With 64KB pages, only 2 levels of translation
tables, allowing 42-bit (4TB) virtual address,
are used but the memory layout is the same.
17
The ARM64 with Linux Kernel [5]
First patch in Kernel 3.7
 Without real hardware
First ARM64 SoC supported in Kernel 3.11
 2013/6
Second ARM64 SoC supported in Kernel 3.18
 2014/12
Different assembly code/ ABI between ARM32/64
AArch64 is the name for the 64-bit ARM architecture
18
The ARM64 with Linux Kernel [5]
 Device tree
 arch/arm64/boot/dts/<vendor>/
 Compressed Kernel
 arch/arm64/boot/Image.gz
 No more “arch/arm64/mach-<soc>” [7]
 No more C files, all SoC features should be handled by drivers
 Or it can go “drivers/soc” if it cannot fit an existing drivers
 No more uImage [7]
 Incompatible with multiplatform kernels
 Switch to bootz command in bootloader
19
The ARM64 with Debian [6]
First release in Debian 8
AARCH64 Toolchain in Debian
 Package: crossbuild-essential-arm64
 aarch64-linux-gnu-gcc
Build ARM64 Debian root filesytem via debootstrap
Hands on experience
Build Debian on AARCH64
20
21
The QorIQ® LS1043A reference design board [13]
22
The QorIQ® LS1043A reference design board [13]
23
Cross Tool chain in Debian
24
Build Kernel 4.1…with Error
root@szlin:/home/szlin/work/Kernel/moxa_linux/ls1043a# make -j30
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
HOSTCC scripts/kallsyms
CC scripts/mod/empty.o
CC scripts/mod/devicetable-offsets.s
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/mod_devicetable.h:11,
from scripts/mod/devicetable-offsets.c:2:
include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory
#include gcc_header(__GNUC__)
^
25
Build Kernel 4.1 – Patch with GCC6 issue
26
Build Kernel 4.1 – LZ4 is not existed in ARM 64
LZ4 is existed in ARM Kernel 4.1
But not in ARM 64… it needs patch !
27
Build uImage – Failed in ARM64 [17]
> Bringing in uImage as a target on ARM might have
been a mistake, since
> now people want to bring in new targets for whate
ver boot format they
> happen to want. So it's a good idea to keep arm64 f
rom going down the
> same path and stick to the native, raw, formats.
mkimage -A arm64 -O linux -T kernel -C gzip -a 0x80080000 -e 0x80080000 -
n 4.1.0-ltsi-rt+ -d arch/arm64/boot/Image.gz uImage
No, there should be no uImage target on
arm64. Newer u-boots can
already boot an ARM zImage (through the
bootz command), and should be
enhanced as needed to boot a vmlinux if
needed.
However, we can still make uImage manually
28
Configure system
account
Configure pure
root filesystem
4321
Have fun with Debian
Steps to Build Your Debian ARM
Pre-download pure
root filesystem
29
Configure system
account
Configure pure
root filesystem
4321
Have fun with Debian
Steps to Build Your Debian ARM
Pre-download pure
root filesystem
30
Pre-download pure root filesystem
1. Build pure Debian root filesystem via “debootstrap” command
debootstrap --arch=arm64 --foreign --keyring /usr/share/keyrings/debian-archive-keyring.gpg --
exclude=debfoster jessie *DIRECTORY*
Note:“man debootstrap” to get further information
2. Download ARM64 “sudo” package
 https://packages.debian.org/jessie/sudo
3. Put “sudo” package into *DIRECTORY*/var/cache/apt/archives/
DEMO: https://github.com/szlin/Pure_Debian_aarch64.git
31
Configure system
account
Configure pure
root filesystem
4321
Have fun with Debian
Steps to Build Your Debian ARM
Pre-download pure
root filesystem
32
Linux Kernel
and device tree
Debian root filesystem
Tiny root filesystem
Non-volatile memory
setenv bootargs "console=ttyS0,115200
root=/dev/mmcblk0p3 rw rootdelay=5
earlycon=uart8250,0x21c0500,115200"
fatload mmc 0 0xa0000000 uImage
fatload mmc 0 0x90000000 fsl-ls1043a-rdb.dtb
bootm 0xa0000000 - 0x90000000
Set root = tiny root filesystem in first boot
up
33
Boot up the device via manual
command
34
ln -sf /dev/null /dev/tty3
ln -sf /dev/null /dev/tty4
ln -sf /dev/null /dev/tty2
Mount Debian partition and chroot to debian
35
Start to configure Debian rootfilesystem in second stage
Unnecessary files will removed afterwards
36
Configure system
account
Configure pure
root filesystem
4321
Have fun with Debian
Steps to Build Your Debian ARM
Pre-download pure
root filesystem
37
Create “sudo” account
DEMO: https://github.com/szlin/Debian_aarch64.git
38
Configure system
account
Configure pure
root filesystem
4321
Have fun with Debian
Steps to Build Your Debian ARM
Pre-download pure
root filesystem
39
Linux Kernel
and device tree
Debian root filesystem
Tiny root filesystem
Non-volatile memory
setenv bootargs "console=ttyS0,115200
root=/dev/mmcblk0p2 rw rootdelay=5
earlycon=uart8250,0x21c0500,115200"
fatload mmc 0 0xa0000000 uImage
fatload mmc 0 0x90000000 fsl-ls1043a-rdb.dtb
bootm 0xa0000000 - 0x90000000
Set root = Debian root filesystem in
bootloader
40
Login and check “sudo” mechanism
41
ARM 64 Programming
42
ARM 64 Programming [16]
What is the different between 32 and 64 bits in C
43
ARM 64 Programming [16]
Pre-defined macros relating to ARMv8 compilation
44
ARM 64 Programming [16]
Bit manipulation operations
Any issue?
45
ARM 64 Programming [16]
Bit manipulation operations
“1” has int type…
46
ARM 64 Programming [16]
Indexes
Any issue?
47
ARM 64 Programming [16]
Indexes
size_t: 64 bit
unsigned int: 32 bit
Infinite loop
48
ARM 64 Programming [16]
Pointers and ints
Is p = q?
49
ARM 64 Programming [16]
Pointers and ints
1. For ARM32
 p==q
2. For ARM64
 p!=q
50
ARM 64 Programming [16]
Structure padding
What is the size
of structure in C ?
51
ARM 64 Programming [16]
Structure padding
1. For ARM32
int a : 4
long b: 4
int c: 4
Total = 12 bytes
2. For ARM64
int a : 4
long b: 8
int c: 4
Total = 20 bytes
52
ARM 64 Programming [16]
Structure padding
1. For ARM64
int a : 4
long b: 8
int c: 4
Total = 20 bytes
For double-word aligned, it needs to introduce four
bytes of padding between the end of the first ”int” and
the ”long”
53
Thank you
54
References
1. AArch64 planning
https://www.einval.com/~steve/talks/Debconf12-aarch64
2. ARMv8-A
http://media.corporate-ir.net/media_files/IROL/19/197211/ARMv8-
A%20IR%20webcast%2024_03_2014.pdf
3. Comparison of ARMv8-A cores
https://en.wikipedia.org/wiki/Comparison_of_ARMv8-A_cores
4. Arm64
http://linux-sunxi.org/Arm64
5. ARM64 SoC checklist
http://events.linuxfoundation.org/sites/events/files/slides/clement-arm64-soc-checklist.pdf
6. ARM64Port
https://wiki.debian.org/Arm64Port
7. AArch64 kernel image decompression
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225354.html
8. Linux on AArch64 ARM 64-bit Architecture
https://events.linuxfoundation.org/images/stories/pdf/lcna_co2012_marinas.pdf
9. Migrating code from ARM to ARM64
https://www.linuxplumbersconf.org/2014/ocw/system/presentations/2343/original/08%20-
%20Migrating%20code%20from%20ARM%20to%20ARM64.pdf
55
References
10. ARM64 vs ARM32 -- What's different for Linux programmers
http://edn.com/design/systems-design/4440662/ARM64-vs-ARM32-What-s-different-
for-Linux-programmers
11. ARMv8
https://www.arm.com/files/downloads/ARMv8_white_paper_v5.pdf
12. Debian
https://www.debian.org
13. LS1043a – RDB
http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/qoriq-
arm-processors/qoriq-ls1043a-reference-design-board:LS1043A-RDB
14. Memory Layout on AArch64 Linux
https://www.kernel.org/doc/Documentation/arm64/memory.txt
15. Virtual memory
https://cseweb.ucsd.edu/classes/wi11/cse141/Slides/19_VirtualMemory.key.pdf
56
References
16. Porting to 64-bit ARM
http://malideveloper.arm.com/downloads/Porting%20to%20ARM%2064-bit.pdf
17. AArch64 kernel image decompression
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225354.html
18. arm64: enable more compressed Image formats
https://patchwork.kernel.org/patch/6810841/
19. Fix-the-compile-issue-under-gcc6
https://raw.githubusercontent.com/Freescale/meta-freescale-
3rdparty/master/recipes-kernel/linux/linux-variscite-4.1.15/Fix-the-compile-issue-
under-gcc6.patch

More Related Content

What's hot

Linux device drivers
Linux device drivers Linux device drivers
仮想マシンにおけるメモリ管理
仮想マシンにおけるメモリ管理仮想マシンにおけるメモリ管理
仮想マシンにおけるメモリ管理
Akari Asai
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
NAVER D2
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image艾鍗科技
 
Introduction to BTRFS and ZFS
Introduction to BTRFS and ZFSIntroduction to BTRFS and ZFS
Introduction to BTRFS and ZFS
Tsung-en Hsiao
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Thomas Graf
 
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
Johann Lombardi
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
Kernel TLV
 
GPU Virtualization in SUSE
GPU Virtualization in SUSEGPU Virtualization in SUSE
GPU Virtualization in SUSE
Liang Yan
 
Bootloaders
BootloadersBootloaders
Bootloaders
Anil Kumar Pugalia
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
Stephan Cadene
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
SUSE Labs Taipei
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
SeongJae Park
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
Yi-Hsiu Hsu
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
Adrian Huang
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
Brendan Gregg
 
OFI Overview 2019 Webinar
OFI Overview 2019 WebinarOFI Overview 2019 Webinar
OFI Overview 2019 Webinar
seanhefty
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
shimosawa
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
Jian-Hong Pan
 

What's hot (20)

Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
仮想マシンにおけるメモリ管理
仮想マシンにおけるメモリ管理仮想マシンにおけるメモリ管理
仮想マシンにおけるメモリ管理
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
 
Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Introduction to BTRFS and ZFS
Introduction to BTRFS and ZFSIntroduction to BTRFS and ZFS
Introduction to BTRFS and ZFS
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
 
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
Introduction to the DAOS Scale-out object store (HLRS Workshop, April 2017)
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
GPU Virtualization in SUSE
GPU Virtualization in SUSEGPU Virtualization in SUSE
GPU Virtualization in SUSE
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 
OFI Overview 2019 Webinar
OFI Overview 2019 WebinarOFI Overview 2019 Webinar
OFI Overview 2019 Webinar
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 

Similar to Embedded Linux/ Debian with ARM64 Platform

Building
BuildingBuilding
Building
Satpal Parmar
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
Rishabh5121993
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
eurobsdcon
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
Satpal Parmar
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
Toradex
 
Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015
Siji Sunny
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
Sreenatha Reddy K R
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
Morteza Nourelahi Alamdari
 
Cross-compilation native sous android
Cross-compilation native sous androidCross-compilation native sous android
Cross-compilation native sous android
Thierry Gayet
 
Moving NEON to 64 bits
Moving NEON to 64 bitsMoving NEON to 64 bits
Moving NEON to 64 bits
Chiou-Nan Chen
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded Linux
Tushar B Kute
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernel
Anne Nicolas
 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
ryancox
 
Kernel compilation
Kernel compilationKernel compilation
Kernel compilationmcganesh
 
OMAP
OMAPOMAP
OMAP
sbmguys
 
Steps to Build Kernel and Root Filesystem for OMAP5912
Steps to Build Kernel and Root Filesystem for OMAP5912Steps to Build Kernel and Root Filesystem for OMAP5912
Steps to Build Kernel and Root Filesystem for OMAP5912
sbmguys
 
A2O Core implementation on FPGA
A2O Core implementation on FPGAA2O Core implementation on FPGA
A2O Core implementation on FPGA
Ganesan Narayanasamy
 

Similar to Embedded Linux/ Debian with ARM64 Platform (20)

Building
BuildingBuilding
Building
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Rhce ppt
Rhce pptRhce ppt
Rhce ppt
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
 
Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015Debian on ARM - Gnunify2015
Debian on ARM - Gnunify2015
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 
Cross-compilation native sous android
Cross-compilation native sous androidCross-compilation native sous android
Cross-compilation native sous android
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
Moving NEON to 64 bits
Moving NEON to 64 bitsMoving NEON to 64 bits
Moving NEON to 64 bits
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded Linux
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernel
 
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
 
Kernel compilation
Kernel compilationKernel compilation
Kernel compilation
 
OMAP
OMAPOMAP
OMAP
 
Steps to Build Kernel and Root Filesystem for OMAP5912
Steps to Build Kernel and Root Filesystem for OMAP5912Steps to Build Kernel and Root Filesystem for OMAP5912
Steps to Build Kernel and Root Filesystem for OMAP5912
 
A2O Core implementation on FPGA
A2O Core implementation on FPGAA2O Core implementation on FPGA
A2O Core implementation on FPGA
 

More from SZ Lin

Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
SZ Lin
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
SZ Lin
 
Manage kernel vulnerabilities in the software development lifecycle
Manage kernel vulnerabilities in the software development lifecycleManage kernel vulnerabilities in the software development lifecycle
Manage kernel vulnerabilities in the software development lifecycle
SZ Lin
 
OpenChain 2.0 specification in a nutshell
OpenChain 2.0 specification in a nutshellOpenChain 2.0 specification in a nutshell
OpenChain 2.0 specification in a nutshell
SZ Lin
 
OpenChain - The Industry Standard for Open Source Compliance
OpenChain - The Industry Standard for Open Source ComplianceOpenChain - The Industry Standard for Open Source Compliance
OpenChain - The Industry Standard for Open Source Compliance
SZ Lin
 
Design, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux PlatformDesign, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux Platform
SZ Lin
 
[ELCE] Activities of super long term support kernel workgroup in civil infras...
[ELCE] Activities of super long term support kernel workgroup in civil infras...[ELCE] Activities of super long term support kernel workgroup in civil infras...
[ELCE] Activities of super long term support kernel workgroup in civil infras...
SZ Lin
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...
SZ Lin
 
Take a step forward from user to maintainer or developer in open source secur...
Take a step forward from user to maintainer or developer in open source secur...Take a step forward from user to maintainer or developer in open source secur...
Take a step forward from user to maintainer or developer in open source secur...
SZ Lin
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
SZ Lin
 
OpenChain spec 2.0 繁體中文
OpenChain spec 2.0 繁體中文OpenChain spec 2.0 繁體中文
OpenChain spec 2.0 繁體中文
SZ Lin
 
Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure Platform
SZ Lin
 
Long-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux DistributionLong-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux Distribution
SZ Lin
 
Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...
SZ Lin
 
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
SZ Lin
 
Cellular technology with Embedded Linux - COSCUP 2016
Cellular technology with Embedded Linux - COSCUP 2016Cellular technology with Embedded Linux - COSCUP 2016
Cellular technology with Embedded Linux - COSCUP 2016
SZ Lin
 
Learning notes on Open Source License
Learning notes on Open Source License Learning notes on Open Source License
Learning notes on Open Source License
SZ Lin
 
y2038 issue
y2038 issuey2038 issue
y2038 issue
SZ Lin
 
Debian 套件打包教學指南 - 繁體中文翻譯
Debian 套件打包教學指南 - 繁體中文翻譯Debian 套件打包教學指南 - 繁體中文翻譯
Debian 套件打包教學指南 - 繁體中文翻譯
SZ Lin
 
Fast boot
Fast bootFast boot
Fast boot
SZ Lin
 

More from SZ Lin (20)

Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
Industry Insights Common Pitfalls and Key Considerations in Using Software Bi...
 
Select, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernelsSelect, manage, and backport the long term stable kernels
Select, manage, and backport the long term stable kernels
 
Manage kernel vulnerabilities in the software development lifecycle
Manage kernel vulnerabilities in the software development lifecycleManage kernel vulnerabilities in the software development lifecycle
Manage kernel vulnerabilities in the software development lifecycle
 
OpenChain 2.0 specification in a nutshell
OpenChain 2.0 specification in a nutshellOpenChain 2.0 specification in a nutshell
OpenChain 2.0 specification in a nutshell
 
OpenChain - The Industry Standard for Open Source Compliance
OpenChain - The Industry Standard for Open Source ComplianceOpenChain - The Industry Standard for Open Source Compliance
OpenChain - The Industry Standard for Open Source Compliance
 
Design, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux PlatformDesign, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux Platform
 
[ELCE] Activities of super long term support kernel workgroup in civil infras...
[ELCE] Activities of super long term support kernel workgroup in civil infras...[ELCE] Activities of super long term support kernel workgroup in civil infras...
[ELCE] Activities of super long term support kernel workgroup in civil infras...
 
Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...Using open source software to build an industrial grade embedded linux platfo...
Using open source software to build an industrial grade embedded linux platfo...
 
Take a step forward from user to maintainer or developer in open source secur...
Take a step forward from user to maintainer or developer in open source secur...Take a step forward from user to maintainer or developer in open source secur...
Take a step forward from user to maintainer or developer in open source secur...
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
 
OpenChain spec 2.0 繁體中文
OpenChain spec 2.0 繁體中文OpenChain spec 2.0 繁體中文
OpenChain spec 2.0 繁體中文
 
Introduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure PlatformIntroduction to Civil Infrastructure Platform
Introduction to Civil Infrastructure Platform
 
Long-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux DistributionLong-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux Distribution
 
Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...Building, deploying and testing an industrial linux platform @ Open source su...
Building, deploying and testing an industrial linux platform @ Open source su...
 
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
Debian 套件打包教學指南 v0.19 - 繁體中文翻譯
 
Cellular technology with Embedded Linux - COSCUP 2016
Cellular technology with Embedded Linux - COSCUP 2016Cellular technology with Embedded Linux - COSCUP 2016
Cellular technology with Embedded Linux - COSCUP 2016
 
Learning notes on Open Source License
Learning notes on Open Source License Learning notes on Open Source License
Learning notes on Open Source License
 
y2038 issue
y2038 issuey2038 issue
y2038 issue
 
Debian 套件打包教學指南 - 繁體中文翻譯
Debian 套件打包教學指南 - 繁體中文翻譯Debian 套件打包教學指南 - 繁體中文翻譯
Debian 套件打包教學指南 - 繁體中文翻譯
 
Fast boot
Fast bootFast boot
Fast boot
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Embedded Linux/ Debian with ARM64 Platform

  • 1. Embedded Linux/ Debian with ARM64 Platform Harder Better Faster Stronger SZ LIN szlin@debian.org 1 Date: 2016/11/17
  • 2. 2 SZLIN (林上智) ➔ Debian Developer ➔ Industrial Grade Linux Distribution ➔ Blog: https://szlin.me About Me
  • 3. 3 Trends That’s really what ARM has to look at when defining a new architecture. That is the nature of our business, we need to look a long way forward, and plan. Why ARMv8 instead of using ARMv7+ LPAE [11]
  • 4. 4
  • 5. 5 ARMv7 -> ARMv8 [2] 32-bit ARMv7-A compatibility Cryptography support Dual Instruction set architecture Improved support for virtualization
  • 6. 6 AArch32 (compat) Support [8] Support ARMv7 Linux EABI for compat tasks • Different set of system calls (unistd32.h) • Compat user structures • No SWP instruction, no unaligned LDM/STM access Supports both ARM and Thumb-2 32-bit user tasks Supports 32-bit ptrace Address space limited to 4GB Emulated vectors page • ARM Linux EABI expects helper routines in the vectors page accessible by user tasks
  • 8. 8 ARMv8-A Designed for Efficiency [2] Enhancement Why it Matters 64-bit architecture Efficient access to large datasets Increased number and size of general purpose registers Gains in performance and code efficiency Double the number and size of NEON registers Enhanced capacity of multimedia engine Cryptography support Over 10x software encryption performance New security models for consumer and enterprise
  • 9. 9 ARMv8-A Family [3] Core Instruction cycle DMIPS/MHz Processor Architecture big.LITTLE role Cortex-A32 In-order execution 2.0 ~ 2.1 32 Unknown Cortex-A35 In-order execution 1.78 64 little Cortex-A53 In-order execution 2.24 64 little Cortex-A57 Out-of-order execution 4.6 64 big Cortex-A72 Out-of-order execution 4.72 64 big Cortex-A73 Out-of-order execution 4.8 64 big
  • 10. 10 The ARM Registers Comparison [4] AArch32 AArch64 Remarks 32-bit General purpose registers r0 - r14 w0 - w30 aliased to lower half of each 64-bit register in AArch64 64-bit General purpose registers - x0 - x30 Program counter r15 aka. pc PC not directly accessible in AArch64 Zero register - x31 / w31 aka. xzr / wzr in most instructions, except as a base register for address generation Stack pointer r13 SP encoded as x31 on address generation Procedure call link register r14 x30
  • 11. 11 ARMv7 name AArch64/ARMv8 name Remarks Monitor mode EL3 highest exception level, mostly for firmware HYP mode EL2 exception level for hypervisors like Xen (or parts of KVM) SVC mode EL1 the Linux kernel is running in this USR mode EL0 for unprivileged userland The ARM Execution Mode [4][8]
  • 12. 12 Memory Layout [15] AARCH64 It allows up to 4 levels of translation tables with a 4KB page size and up to 3 levels with a 64KB page size.
  • 13. 13 Memory Layout [9][15] 32 bit address space: • 4GB of virtual addresses • 1MPages • Each entry is 4 bytes (a 32 bit physical address) • Page size : 4kb
  • 14. 14 Memory Layout [14][15] AArch64 Linux uses either 3 levels or 4 levels of translation tables with the 4KB page configuration, allowing 39-bit (512GB) or 48- bit (256TB) virtual addresses, respectively, for both user and kernel. 64 bit address space • 16 exabytes(1018) of virtual address space • 4PetaPages (1015) • Entry is 8 bytes • Page size : 4kb/ 64kb
  • 16. 16 Memory Layout [14] With 64KB pages, only 2 levels of translation tables, allowing 42-bit (4TB) virtual address, are used but the memory layout is the same.
  • 17. 17 The ARM64 with Linux Kernel [5] First patch in Kernel 3.7  Without real hardware First ARM64 SoC supported in Kernel 3.11  2013/6 Second ARM64 SoC supported in Kernel 3.18  2014/12 Different assembly code/ ABI between ARM32/64 AArch64 is the name for the 64-bit ARM architecture
  • 18. 18 The ARM64 with Linux Kernel [5]  Device tree  arch/arm64/boot/dts/<vendor>/  Compressed Kernel  arch/arm64/boot/Image.gz  No more “arch/arm64/mach-<soc>” [7]  No more C files, all SoC features should be handled by drivers  Or it can go “drivers/soc” if it cannot fit an existing drivers  No more uImage [7]  Incompatible with multiplatform kernels  Switch to bootz command in bootloader
  • 19. 19 The ARM64 with Debian [6] First release in Debian 8 AARCH64 Toolchain in Debian  Package: crossbuild-essential-arm64  aarch64-linux-gnu-gcc Build ARM64 Debian root filesytem via debootstrap
  • 20. Hands on experience Build Debian on AARCH64 20
  • 21. 21 The QorIQ® LS1043A reference design board [13]
  • 22. 22 The QorIQ® LS1043A reference design board [13]
  • 23. 23 Cross Tool chain in Debian
  • 24. 24 Build Kernel 4.1…with Error root@szlin:/home/szlin/work/Kernel/moxa_linux/ls1043a# make -j30 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h HOSTCC scripts/kallsyms CC scripts/mod/empty.o CC scripts/mod/devicetable-offsets.s MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o In file included from include/linux/compiler.h:54:0, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mod_devicetable.h:11, from scripts/mod/devicetable-offsets.c:2: include/linux/compiler-gcc.h:121:30: fatal error: linux/compiler-gcc6.h: No such file or directory #include gcc_header(__GNUC__) ^
  • 25. 25 Build Kernel 4.1 – Patch with GCC6 issue
  • 26. 26 Build Kernel 4.1 – LZ4 is not existed in ARM 64 LZ4 is existed in ARM Kernel 4.1 But not in ARM 64… it needs patch !
  • 27. 27 Build uImage – Failed in ARM64 [17] > Bringing in uImage as a target on ARM might have been a mistake, since > now people want to bring in new targets for whate ver boot format they > happen to want. So it's a good idea to keep arm64 f rom going down the > same path and stick to the native, raw, formats. mkimage -A arm64 -O linux -T kernel -C gzip -a 0x80080000 -e 0x80080000 - n 4.1.0-ltsi-rt+ -d arch/arm64/boot/Image.gz uImage No, there should be no uImage target on arm64. Newer u-boots can already boot an ARM zImage (through the bootz command), and should be enhanced as needed to boot a vmlinux if needed. However, we can still make uImage manually
  • 28. 28 Configure system account Configure pure root filesystem 4321 Have fun with Debian Steps to Build Your Debian ARM Pre-download pure root filesystem
  • 29. 29 Configure system account Configure pure root filesystem 4321 Have fun with Debian Steps to Build Your Debian ARM Pre-download pure root filesystem
  • 30. 30 Pre-download pure root filesystem 1. Build pure Debian root filesystem via “debootstrap” command debootstrap --arch=arm64 --foreign --keyring /usr/share/keyrings/debian-archive-keyring.gpg -- exclude=debfoster jessie *DIRECTORY* Note:“man debootstrap” to get further information 2. Download ARM64 “sudo” package  https://packages.debian.org/jessie/sudo 3. Put “sudo” package into *DIRECTORY*/var/cache/apt/archives/ DEMO: https://github.com/szlin/Pure_Debian_aarch64.git
  • 31. 31 Configure system account Configure pure root filesystem 4321 Have fun with Debian Steps to Build Your Debian ARM Pre-download pure root filesystem
  • 32. 32 Linux Kernel and device tree Debian root filesystem Tiny root filesystem Non-volatile memory setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p3 rw rootdelay=5 earlycon=uart8250,0x21c0500,115200" fatload mmc 0 0xa0000000 uImage fatload mmc 0 0x90000000 fsl-ls1043a-rdb.dtb bootm 0xa0000000 - 0x90000000 Set root = tiny root filesystem in first boot up
  • 33. 33 Boot up the device via manual command
  • 34. 34 ln -sf /dev/null /dev/tty3 ln -sf /dev/null /dev/tty4 ln -sf /dev/null /dev/tty2 Mount Debian partition and chroot to debian
  • 35. 35 Start to configure Debian rootfilesystem in second stage Unnecessary files will removed afterwards
  • 36. 36 Configure system account Configure pure root filesystem 4321 Have fun with Debian Steps to Build Your Debian ARM Pre-download pure root filesystem
  • 37. 37 Create “sudo” account DEMO: https://github.com/szlin/Debian_aarch64.git
  • 38. 38 Configure system account Configure pure root filesystem 4321 Have fun with Debian Steps to Build Your Debian ARM Pre-download pure root filesystem
  • 39. 39 Linux Kernel and device tree Debian root filesystem Tiny root filesystem Non-volatile memory setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootdelay=5 earlycon=uart8250,0x21c0500,115200" fatload mmc 0 0xa0000000 uImage fatload mmc 0 0x90000000 fsl-ls1043a-rdb.dtb bootm 0xa0000000 - 0x90000000 Set root = Debian root filesystem in bootloader
  • 40. 40 Login and check “sudo” mechanism
  • 42. 42 ARM 64 Programming [16] What is the different between 32 and 64 bits in C
  • 43. 43 ARM 64 Programming [16] Pre-defined macros relating to ARMv8 compilation
  • 44. 44 ARM 64 Programming [16] Bit manipulation operations Any issue?
  • 45. 45 ARM 64 Programming [16] Bit manipulation operations “1” has int type…
  • 46. 46 ARM 64 Programming [16] Indexes Any issue?
  • 47. 47 ARM 64 Programming [16] Indexes size_t: 64 bit unsigned int: 32 bit Infinite loop
  • 48. 48 ARM 64 Programming [16] Pointers and ints Is p = q?
  • 49. 49 ARM 64 Programming [16] Pointers and ints 1. For ARM32  p==q 2. For ARM64  p!=q
  • 50. 50 ARM 64 Programming [16] Structure padding What is the size of structure in C ?
  • 51. 51 ARM 64 Programming [16] Structure padding 1. For ARM32 int a : 4 long b: 4 int c: 4 Total = 12 bytes 2. For ARM64 int a : 4 long b: 8 int c: 4 Total = 20 bytes
  • 52. 52 ARM 64 Programming [16] Structure padding 1. For ARM64 int a : 4 long b: 8 int c: 4 Total = 20 bytes For double-word aligned, it needs to introduce four bytes of padding between the end of the first ”int” and the ”long”
  • 54. 54 References 1. AArch64 planning https://www.einval.com/~steve/talks/Debconf12-aarch64 2. ARMv8-A http://media.corporate-ir.net/media_files/IROL/19/197211/ARMv8- A%20IR%20webcast%2024_03_2014.pdf 3. Comparison of ARMv8-A cores https://en.wikipedia.org/wiki/Comparison_of_ARMv8-A_cores 4. Arm64 http://linux-sunxi.org/Arm64 5. ARM64 SoC checklist http://events.linuxfoundation.org/sites/events/files/slides/clement-arm64-soc-checklist.pdf 6. ARM64Port https://wiki.debian.org/Arm64Port 7. AArch64 kernel image decompression http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225354.html 8. Linux on AArch64 ARM 64-bit Architecture https://events.linuxfoundation.org/images/stories/pdf/lcna_co2012_marinas.pdf 9. Migrating code from ARM to ARM64 https://www.linuxplumbersconf.org/2014/ocw/system/presentations/2343/original/08%20- %20Migrating%20code%20from%20ARM%20to%20ARM64.pdf
  • 55. 55 References 10. ARM64 vs ARM32 -- What's different for Linux programmers http://edn.com/design/systems-design/4440662/ARM64-vs-ARM32-What-s-different- for-Linux-programmers 11. ARMv8 https://www.arm.com/files/downloads/ARMv8_white_paper_v5.pdf 12. Debian https://www.debian.org 13. LS1043a – RDB http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/qoriq- arm-processors/qoriq-ls1043a-reference-design-board:LS1043A-RDB 14. Memory Layout on AArch64 Linux https://www.kernel.org/doc/Documentation/arm64/memory.txt 15. Virtual memory https://cseweb.ucsd.edu/classes/wi11/cse141/Slides/19_VirtualMemory.key.pdf
  • 56. 56 References 16. Porting to 64-bit ARM http://malideveloper.arm.com/downloads/Porting%20to%20ARM%2064-bit.pdf 17. AArch64 kernel image decompression http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225354.html 18. arm64: enable more compressed Image formats https://patchwork.kernel.org/patch/6810841/ 19. Fix-the-compile-issue-under-gcc6 https://raw.githubusercontent.com/Freescale/meta-freescale- 3rdparty/master/recipes-kernel/linux/linux-variscite-4.1.15/Fix-the-compile-issue- under-gcc6.patch