Arnd Bergmann, LCU14
LCU14-109: Embedded Systems:How Low Can You Go?
Small ARM Systems past and present
Sony XPeria Z2:3GB RAM, Krait
$33 Intex Cloud FX128MB RAM, Cortex-A5
WiFI SDIO card32MB RAM, ARM926
Psion Series 5,8-16MB RAM, ARM710
Linksys NSLU2,32MB RAM, XScale
Apple iPod, 32MB RAM,ARM7TDMI (no MMU)
D-Link DIR-61532 MB RAM, Feroceon
Typical embedded system• Classic use case for ARM (also MIPS, PowerPC, …)• Driving factor: cost reduction• Power consumption: 1W-10W
Typical Implementation:• ARM926EJ or Cortex-A5 CPU• Standard kernel, custom configuration• Busybox, uhttpd, dropbear• Distro: OpenEmbedded, OpenWRT, Buildroot, …• libc: uClibc, musl, dietlibc, newlib, …
Scaling down to 32MB of RAM
Large microcontroller• Upstream support for EFM32 and AT91x40• Driving factor: Power usage• Power consumption: 100mW-1W
Typical Implementation:• ARM7TDMI or Cortex-M3 CPU, no MMU!• (P)SRAM rather than DRAM• Customized user space• Execute-in-place kernel in NOR flash
Scaling down to 2MB of RAM
Single-chip microcontroller system• Experiment done by Vitaly Wool• Running on STM32F29 internal SRAM+NOR• Power consumption: < 100mW
Implementation:• Highly customized kernel• XIP kernel and R/O file system• RW data compressed to fit on flash• Very little user space
Scaling down to 256KB of RAM
Alternatives:• Open source: FreeRTOS, eCos, RTEMS, Minix3, BSD…
• Proprietary RTOS
Linux advantages:• Developer familiarity• Driver support• Network stack
Linux Disadvantages:• Code size
Why Linux
Alternatives:• With MMU: MIPS, PowerPC, OpenRISC, x86, m68k, ...• Without MMU: C6x, Blackfin, Xtensa, Microblaze, …
ARM Advantages:• Widely available from many vendors• Developer community• Linaro
ARM Disadvantages:• No MMU on low-power cores
Why ARM
ARMv4T/V5E:• ARM7TDMI almost dead• ARM9TDMI, ARM740T, ARM940T, ARM946E unused• Out-of-tree users on 2.4.xx
ARMv7-R/M:• EFM32 support recently added• ARMv7-R patches existed but were never merged• Out-of-tree users on 2.6.33
NOMMU mode for normal v5/v6/v7-A CPUs• Sometimes builds and works, largely untested
State of NOMMU-Linux on ARM
Kernel size growth on ARMvm
linux
siz
e in
kilo
byte
s
• What is the smallest ARM system that Linaro and/or the upstream kernel community should care about?
• Should we work on actively making kernels smaller?
• Should we do more testing on MMU-less systems or remove the ones we don’t use?
• Are there any Cortex-M platforms that need upstream support?
• Is anybody still using ARM7TDMI on recent kernels?
Discussion
Embedded Linux Wiki page on small systems: http://elinux.org/System_Size
Linux-2.6.33 on various Cortex-M3/M4: https://github.com/EmcraftSystems/linux-emcraft
Historic uClinux-2.4 patches for ARM7TDMI: http://www.uclinux.org/pub/uClinux/uClinux-2.4.x/
PTXDIST for linux-3.16 with EFM32/Cortex-M3: http://git-public.pengutronix.de/?p=OSELAS.BSP-EnergyMicro-Gecko.git
Resources
More about Linaro Connect: http://connect.linaro.orgMore about Linaro: http://www.linaro.org/about/
More about Linaro engineering: http://www.linaro.org/engineering/Linaro members: www.linaro.org/members