• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Embedding FreeBSD: for large and small beds
 

Embedding FreeBSD: for large and small beds

on

  • 1,708 views

Embedding FreeBSD: for large and small beds - Philip Paeps

Embedding FreeBSD: for large and small beds - Philip Paeps

Statistics

Views

Total Views
1,708
Views on SlideShare
1,708
Embed Views
0

Actions

Likes
0
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Embedding FreeBSD: for large and small beds Embedding FreeBSD: for large and small beds Presentation Transcript

    • Using FreeBSD in an Embedded Environment A Work in Progress Philip Paeps philip@FreeBSD.org The FreeBSD Project OpenFest 2011 — Sofia, Bulgaria 6 November 2011
    • Welcome to the Embedded World! Console Server: What, Why? Embedding FreeBSD Future Directions Questions/Comments1 Welcome to the Embedded World! Differences with Other Worlds Intellectual Property FreeBSD as an Embedded Platform2 Console Server: What, Why? What is a Console Server Anyway? Why Build This Yourself3 Embedding FreeBSD Development Boards Software Ecosystem Using NanoBSD Remember crunchgen?4 Future Directions Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsOutline 1 Welcome to the Embedded World! Differences with Other Worlds Intellectual Property FreeBSD as an Embedded Platform 2 Console Server: What, Why? What is a Console Server Anyway? Why Build This Yourself 3 Embedding FreeBSD Development Boards Software Ecosystem Using NanoBSD Remember crunchgen? 4 Future Directions Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsDifferences with Other Worlds Space is not free There is never any time Electricity costs money too Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsIntellectual Property Legal uncertainty is not an option Some things really should not be GNU-“free” You do not want to hack a payment terminal . . . or an ATM . . . or an X-ray detector Repeat after me: GNU is not (always) “free” Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsTraditional Embedded Systems Proprietary . . . and often expensive Tiny code-size (10s–100s of Kbytes) More or less “hard” real-time Task-switching or multithreaded Single-application optimized Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsFeatures of FreeBSD Friendly BSD-style licence Contrast with GNU licence Integrated build-system Easy to build complete systems Easy to modify to requirements Support for some popular embedded platforms x86 ARM PowerPC MIPS Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Differences with Other Worlds Embedding FreeBSD Intellectual Property Future Directions FreeBSD as an Embedded Platform Questions/CommentsProblems with FreeBSD Somewhat larger than perhaps desirable On the order of 10s–100s of Mbytes Easy to strip down up to a point Slightly trickier to strip down further Chunks of infrastructure still lacking Support for more embedded architectures NAND/NOR flash device abstraction Hard to compete with Linux Linux has a lot of mindshare Not as bad as it used to be. . . Tougher to compete purely on features Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? What is a Console Server Anyway? Embedding FreeBSD Why Build This Yourself Future Directions Questions/CommentsOutline 1 Welcome to the Embedded World! Differences with Other Worlds Intellectual Property FreeBSD as an Embedded Platform 2 Console Server: What, Why? What is a Console Server Anyway? Why Build This Yourself 3 Embedding FreeBSD Development Boards Software Ecosystem Using NanoBSD Remember crunchgen? 4 Future Directions Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? What is a Console Server Anyway? Embedding FreeBSD Why Build This Yourself Future Directions Questions/CommentsWhat is a Console Server Anyway? Central component of any hacker lab Talk to consoles without keyboards and monitors Debug kernels using DDB or even GDB from a comfy chair Similar uses in large datacentres . . . for many of the same reasons Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? What is a Console Server Anyway? Embedding FreeBSD Why Build This Yourself Future Directions Questions/CommentsWhy Build This Yourself Commercial units often very expensive Blame the datacentres! Retired ones on eBay loud, clunky and powerhungry It’s fun, of course! Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsOutline 1 Welcome to the Embedded World! Differences with Other Worlds Intellectual Property FreeBSD as an Embedded Platform 2 Console Server: What, Why? What is a Console Server Anyway? Why Build This Yourself 3 Embedding FreeBSD Development Boards Software Ecosystem Using NanoBSD Remember crunchgen? 4 Future Directions Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsSoekris Net4521 100/133 Mhz AMD ElanSC520 32 Mbyte RAM Compact flash storage 8 GPIOs 1 UART No USB on-board MiniPCI and some other stuff Max 14W power consumption Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsArtila M-501 180MHz Atmel AT91RM9200 64 Mbyte RAM 16 Mbyte on-board NOR 32 GPIOs 4 UARTs USB on-board The usual complement of busses (I2 C, I2 S, SPI, SD, . . . ) Max 2.5W power consumption Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsFeature ComparissonSoekris net4521: Artila M-501: PRO: Standard PC architecture PRO: Lots and lots of UARTs PRO: Easy to flash CF cards PRO: Tiny power requirements CON: High power requirement PRO: Cheap(ish) to manufacture CON: Few UARTs PRO: Very small hardware CON: Largish hardware CON: Higher porting effort CON: Fairly expensive CON: Less convenient development Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsGetting Software on the BoardsDevelopment phase: Production system: Netbooting with BOOTP/TFTP Soekris runs from easy CF cards Software runs from root on NFS Artila has NOR flash on board FreeBSD makes this very easy Flashing NOR is a bit tricky Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsFreeBSD as a Development Workstation Base system contains most required tools Other bits can easily be installed from ports/packages Netbooting FreeBSD is fairly trivial(ish) Once it works, it tends to keep working Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsDocumentation Interfaces are (often) extensively documented Even the kernel! Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsIntegrated Build Environment Build a cross-toolchain in one command Build the “world” in one command Yes! You can do partial builds No need to reinvent yet another wheel Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsFeatures of NanoBSD NanoBSD is a script to drive the “normal” build system Primarily optimized for producing disk images for CF Chops the FreeBSD world down to 10s of Mbyte easily That is still quite large though Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Development Boards Console Server: What, Why? Software Ecosystem Embedding FreeBSD Using NanoBSD Future Directions Remember crunchgen? Questions/CommentsRemember crunchgen? A bit like “busybox” from the Linux/GNU world . . . but not really Originally from PicoBSD Now mainly used in /rescue Can chop FreeBSD down to < 10 Mbyte Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Embedding FreeBSD Future Directions Questions/CommentsOutline 1 Welcome to the Embedded World! Differences with Other Worlds Intellectual Property FreeBSD as an Embedded Platform 2 Console Server: What, Why? What is a Console Server Anyway? Why Build This Yourself 3 Embedding FreeBSD Development Boards Software Ecosystem Using NanoBSD Remember crunchgen? 4 Future Directions Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Embedding FreeBSD Future Directions Questions/CommentsMake FreeBSD Better Bootloader improvements for development Generic flash layer in the kernel Cross-platform pkg add Better integration of crunchgen with the build Perhaps with NanoBSD Call it FemtoBSD? . . . your wishlist here . . . Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Embedding FreeBSD Future Directions Questions/CommentsPorting FreeBSD to CHERI My current “big” project 64bit-only MIPS on an FPGA Security research with University of Cambridge FreeBSD target operating system Philip Paeps Using FreeBSD in an Embedded Environment
    • Welcome to the Embedded World! Console Server: What, Why? Embedding FreeBSD Future Directions Questions/CommentsQuestions? Comments? Philip Paeps Using FreeBSD in an Embedded Environment