Rolling Your Own Building a REAL Internet Appliance

Slides:



Advertisements
Similar presentations
UNIX File Hierarchy. The UNIX/Linux File System Hierarchy CIS 191 – Lesson 3 / /bin /boot /dev /etc /home /lib /lost+found /mnt /opt /proc /root /sbin.
Advertisements

I/O & Perintah Dasar Linux Onno W. Purbo
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Linux on commodity network H/W Josh Parsons LUGOD talk August 15 th 2005.
EECS 498 Advanced Embedded Systems Lecture 3 Evaluation boards & Embedded Linux.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Linux Common Commands (I) alias - assign name to specified command.
It's a binary file kept under specific directory.
Linux Basic TA for ITIS3100: Xu Fei
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
Lesson 22 – Introduction to Linux Systems Administration.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Internet in a Box Building Distributed System Testbed in RAMP Zhangxi TanXiaofan Jiang Computer Science Department University of California, Berkeley Electrical.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Linux Commands LINUX COMMANDS.
Linux Filesystem Management
July 7-8, 2000 Kits Workshop 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS A Smart Port Card Tutorial - The Exercises John DeHart Washington University.
Booting and boot levels
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
Cheap Off-the-Shelf Tiny Linux By Dzuy Nguyen
1.GNU/Linux Operating System Architecture OS purpose Naming debate GNU project User vs. Kernel Space Monolithic vs. Microkernel debate Kernel subsystems.
1 Introduce Linux Speaker: Yi-Ji Jheng Date:
Introduction to Linux ( I ) Sidney Fong 4 th Feb 2006.
Linux 简介. Contents Unix GNU/Linux, Distributions Basic usage Applications Compiling, compilers Clustering.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Linux Startup Process Presenter: Dipu Gupta.
Linux Basics.
CSC414 “Introduction to UNIX/ Linux” Lecture 5. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Basic of UNIX For fresh members of SPARCS
Linux Commands C151 Multi-User Operating Systems.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
By, V.Gouthaman. Introduction Linux is a multitasking, multiuser operating system, which means that many people can run many different applications on.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
Implementation of Embedded OS
Linux Filesystem Hierarchy The Linux Documentation Project.
Embedded Software Design Week II Linux Intro Linux Kernel.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
Unix Tools Tawatchai Iempairote November 22, 2011.
1 Embedded Linux From Scratch... in 40 minutes! © Copyright , Free Electrons Creative Commons Attribution-ShareAlike 3.0 license
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
Using Linux Kaya Oğuz Room: 310.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
Getting Started with Linux
One-Stop Solution in Device Networking
The Linux Kernel About 6 million lines of code
Filesystem Hierarchy Operating systems I800
EECS 473 Advanced Embedded Systems
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Introduction to Unix Developed by Ken Thompson and Ritchie originally in assembly, and later in C, thus making it portable to other machines. It is an.
Basic Commands ls cp ls –l (in detail format) echo ls –a
Introduction History Why linux? Filesystem Linux desktop environments
Command Line Interface for Beginners
CSE 374 Programming Concepts & Tools
Linux Basic Commands Visit to more Learning Resources.
CS 60 Discussion Review.
EECS 473 Advanced Embedded Systems
SUSE Linux Enterprise Desktop Administration
Working with Mac OS and Linux
Computer System Laboratory
Linux Filesystem Management
Linux Commands LINUX COMMANDS.
Introduction to Linux Commands
1.3 Given a scenario, apply appropriate Microsoft command line tools
Be comfortable with Linux
Presentation transcript:

Rolling Your Own Building a REAL Internet Appliance Triangle Linux Users Group Alan Porter porter@trilug.org http://www.AlanPorter.com September 2008

Agenda TMIO, company, background (video) Stealing with pride: O'Reilly Packages, building (example) Delivering, tmioppix (demo) Startup sequence Filesystems The finished product (demo) Q/A

Company timeline Tinkering ~2000 TMIO (TN) started in 2003 Software office (NC) opened in 2004 Presented at CES (Las Vegas) in 2005 Available for sale in 2005/2006 Operations scaled back in late 2006

Video Shown at the Consumer Electronics Show (CES) in Las Vegas, January 2005

Trim a Distro - or - Roll Your Own Option 1 - trim an existing Distro small distros: DSL, Slackware, Linux From Scratch find what you DON'T need, trim (hard to know) Option 2 - roll your own start with nothing, add what you need (easier) understand the entire system more fun!

Building Embedded Linux Systems by Karim Yaghmour (O'Reilly) Need 3 things: kernel basic filesystem /etc/{passwd,group,hosts}, /etc/{ld.so.conf,modules.conf,nsswitch.conf} busybox, /etc/inittab bootloader: LILO or GRUB

busybox One executable file, many functions: 1.1 MB for all of this: [, [[, addgroup, adduser, adjtimex, arping, ash, awk, basename, bunzip2, busybox, bzcat, cal, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, cpio, crond, crontab, cut, date, dd, deallocvt, delgroup, deluser, df, dirname, dmesg, dos2unix, du, dumpkmap, echo, egrep, env, expr, false, fbset, fdisk, fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget, ftpput, getty, grep, gunzip, gzip, halt, head, hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, install, ip, ipaddr, ipcalc, iplink, iproute, iptunnel, kill, killall, klogd, last, length, less, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, ls, md5sum, mesg, mkdir, mkfifo, mkfs.minix, mknod, mkswap, more, mount, mv, nameif, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, pivot_root, poweroff, printf, ps, pwd, rdate, readlink, realpath, reboot, renice, reset, rm, rmdir, route, run-parts, rx, sed, seq, setkeycodes, sh, sha1sum, sleep, sort, strings, stty, su, swapoff, swapon, sync, syslogd, tail, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode, vi, vlock, watch, wc, which, who, whoami, xargs, yes, zcat

Early development Single Board Computer (SBC) Arcom, EMJ Embedded (WDL Systems), TME Plug CF card into PC Copy files to CF card Plug CF card into prototype board Reboot, hope it works Lather, rinse, repeat

Later development Use SSH Copy rebuilt files from PC to SBC Copy library files directly from my Debian PC! Until I could find the source for all

37 Packages BOOTING - bootsplash - etc - grub NETWORKING - dhcp - iptables - minihttpd - openssh - ppp - wget LIBRARIES - expat - gcc - glibc - libpng - ncurses - openssl - zlib BASICS - busybox - devices - kernel - modutils GRAPHICS - freeglut - freetype - libxml2 - setterm - touchscreen - unclutter - x11 - xpmroot PERIPHERALS - aumix - sbc5831 - sox - wavtools APPLICATION - java - xtext SYSTEM UTILITIES - e2fsprogs - tar - version

The "prep" script scrub - clean up build and staging areas populate - extract sources into our build area build - build sources into binaries stage - "make install" to staging area, tar up install - write image to compact flash card

The "packages" xxxx.pkg contains 5 functions: xxxx_depends - lists dependencies xxxx_populate - extracts the source from tar xxxx_build - compiles xxxx_stage - copies deliverables to a staging area and tars it up xxxx_install - runs when CF card is created (grub and version)

Example - build simple example vi packages/minihttpd/minihttpd.pkg ./prep.pl scrub populate build stage minihttpd complex example vi packages/glibc/glibc.pkg

Delivering the goods The deliverable image 256000000 bytes (CF's vary in size) created as an image, dd-ed to the CF cards part of oven boot-up is to register a serial number The tmioppix disk - DEMO

Oven Startup Sequence special graphical BIOS screen GRUB loads the kernel no initial ram disk (why?) bootsplash kernel calls init (provided by busybox) init reads inittab inittab says to load /etc/rc /etc/rc calls /etc/rc/rc.d/[0-9][0-9].*

/etc/rc.d/[00-99].* STARTUP FILE PACKAGE DOES 01.version etc boot message 02.ramdisk etc set up filesystem 03.libraries etc ldconfig 04.modules etc depmod 05.tmio_link etc link to application 06.sbc5831 sbc5831 load module 07.bbram etc set up BBRAM filesystem 11.hostname etc set hostname 12.clock etc set clock 14.aumix aumix set speaker volume 21.firewall iptables set up firewall 22.network etc start network/DHCP 31.touchscreen touchscreen start touch screen driver 32.x-windows x11 load X11 (starts oven GUI and daemons) 99.tmio_app etc deprecated: start oven GUI and daemons

Filesystems mount flash on / ram disk on /RAM ln -s /FLASH/xx /RAM/xx cp -a /FLASH/var /RAM/var mkdir /RAM/tmp mkdir /RAM/FLASH pivot_root /RAM /RAM/FLASH make /proc, /dev, /BBRAM

DEMO Oven demo

Thank you! Questions? porter@trilug.org