• No results found

Linux Embedded devices with PicoDebian Martin Noha

N/A
N/A
Protected

Academic year: 2021

Share "Linux Embedded devices with PicoDebian Martin Noha"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Embedded systems 

Embedded systems 

Linux Embedded devices 

with PicoDebian

  Martin Noha  28.9.2006

(2)

Agenda 

Agenda 

 Why did I look in this stuff ?  What is an embedded device?   Characteristic hardware   global requirements for software   some small distributions   Pico Debian out of the box   Customizing 

(3)

Why did I look in this stuff ?

Why did I look in this stuff ?

• Security 

• costs

(4)

Why did I look in this stuff (2) ?

Why did I look in this stuff (2) ?

 DSL termination

 AP 

 basic services 

 firewalling 

 reporting 

 compliant with dummies (girl friend) 

Conclusion: I want an embedded device 

(5)

What is an embedded device?

What is an embedded device?

 no noise 

 no hard disk, no fan  ­> no moving parts

 may need keyboard and monitor

Not very powerful processor 

Limited memory (64 – 128 MB)

Compact flash instead of hard disk

Limited capability for extensions

(6)

Characteristic hardware

Characteristic hardware

 

(7)

Characteristic hardware (2)

Characteristic hardware (2)

http://www.soekris.com

(8)

Characteristic hardware (3)

Characteristic hardware (3)

http://www.lex.com.tw

Keyboard and 

Monitor connector 

Supports harddisk 

(9)

global requirements for software

global requirements for software

 ability to boot from flash 

 no write access to flash 

 read only file system 

 Capability to run within limited resources

 flexible configuration 

(10)

some small distributions

some small distributions

 

 Embedded Debian

 Monowall  

 DSL (Dammed Small Linux)

 Trinux 

 Linux Router Project

 

 

Pebble ­> pyramid Linux

 

PicoDebian

(11)

PicoDebian out of the box 

PicoDebian out of the box 

 

 thinned­down version of the Debian Sarge    hardware support depends on kernel  uses Squashfs   has two partitions (root and boot)   generates RAM disk at boot   image generation on development server  configuration in chroot env. on dev. server   Runs with 32MB CompactFlash   Consists of two parts 

(12)

PicoDebian out of the box (2) 

PicoDebian out of the box (2) 

 

Advantages 

 flexible – with all Debian packets in the background  Same administration like a standard Debian system 

Disadvantages

   Squashfs requires new image and reboot for each      config change   chroot env has problems with module installation   devices may miss in /dev  all logs are deleted at power down

(13)

PicoDebian out of the box (3)

PicoDebian out of the box (3)

 

Scripts are used for   Image generation   setting up the chroot environment   Installation process   Partitioning of flash in dev server   install boot loader (grub) in MBR   Adopt boot image to size of boot partition   adopt system specific parameter e.g. fd device,      boot parameter, mount table, root password,  etc.

(14)

PicoDebian out of the box (4)

PicoDebian out of the box (4)

 

what can go wrong – what went wrong      no monitor – no info about boot process    ­> serial connection needed   kernel not found   ­> reconfigure grub  Panic because of wrong root device   ­> reconfigure grub   network device not supported   ­> new kernel needed   no access because of missing passwords   ­> …

(15)

PicoDebian customizing   PicoDebian customizing    ­ tecnical track ­ ­ tecnical track ­

Customizing step 1 

 own kernel without modules   kernel update impacts only /boot   change of partitions – adding a seconded system   extending the scripts Mainly adding a copy function and parameter   adding a RW section in the boot partition      that is copied to the RAM disk at boot 

(16)

PicoDebian customizing (2)  PicoDebian customizing (2)   ­ tecnical track ­ ­ tecnical track ­

Customizing step 2 

 integrating unionfs    change of partitions – adding a 5 MB system  HW ­ adding an Atheros based WLAN      mini PCI­Card    adding madwifi driver to kernel – building AP   kernel must support modules again Kernel installation is more complex  E.g depmod –a does not work in chroot 

(17)

PicoDebian customizing (3)  PicoDebian customizing (3)   ­ tecnical track ­ ­ tecnical track ­

Customizing Kernel 

 download from www.kernel.org and unpack …  patch with squashfs  patch with unionfs   patch with …   configure new options  Make debian kernel package, unionfs­tools,      madwifi­modules   Install kernel, and unionfs­tools and 

(18)

PicoDebian customizing (2)  PicoDebian customizing (2)   ­ tecnical track ­ ­ tecnical track ­  selection at boot – via grub or predefined  10MB /boot Hda1 ext2 25 MB / update system  Hda2 Squashfs  50 MB / (normal) root  Hda3 Squashfs 5 MB  for union FS ext2 / /boot /etc /root /…. / /boot /etc /root /…. Normal operating  Update mode 

(19)

PicoDebian customizing (4)  PicoDebian customizing (4)   ­ tecnical track ­ ­ tecnical track ­

Update method 

 enter chroot env on dev­server   modify elements (apt­get update, upgrade …)   generate image   boot into update mode   transfer image for hda1 and hda 3 (dd via ssh)   and reboot   „copy“ main env to update env   Generate update image and transfer to hda2  

(20)

PicoDebian customizing (5)  PicoDebian customizing (5)   ­ tecnical track ­ ­ tecnical track ­

Services running  

 DSL termination    Default system applications (syslog etc)  iptables “firewall” with wondershaper   basic services ntp, dns, dhcp, ssh, snmpd    squid   some ipv6 stuff (not relevant)  Dyndns client   Hostapd and radius   bridge 

(21)

PicoDebian customizing (6)  PicoDebian customizing (6)   ­ tecnical track ­ ­ tecnical track ­

Versions 

 based on debian sarge (tried ubuntu too)  Kernel 2.6.17.11    Squashfs 3.0 (supports up to 2.6.15 officially)  snapshot of unionfs (2006/06/20)     official release supports only 2.6.15.x  Madwifi 0.91  hostapd with 801.x authentication (TLS)  Radius server

(22)

PicoDebian rescue system for  PicoDebian rescue system for  mailserver mailserver

Different use case 

 rescue system for a company mail server   boots by default into a PicoDebian installation    offers maintenance without mounted filesystem  needes one partition and 50 MB   remote hands needs to press reset only   all filemgt toos are includes in the image   kernel has to be patched with squashfs   uses same kernel as productive system  

References

Related documents

Hari ini, peranan dan fungsi Bahasa Melayu sebagai Bahasa Kebangsaan, bahasa perpaduan dan bahasa ilmu seakan-akan semakin tidak relevan, terpinggir dan gagal mendapat

Matson reminded the Committee that at its meeting in May 2008, it set up a working group consisting of Audit Committee members and Executive Committee members to develop the

Introductionto Networked Embedded Systems, Embedded Distributed Systems, Embedded Processors Overview,Operating Systems for Communication-Centric Devices, Sensor Network

The SETOFF is the official publication of the North American Railcar Operators Association (NARCOA) and is published bimonthly to pro- mote safe legal operation of railroad

The American Association of Neurological Surgeons (AANS), the American Association of Orthopaedic Surgeons (AAOS), the Congress of Neurological Surgeons (CNS), the AANS/CNS

Given the heterogeneous nature of overburden units beneath the TSF and the potential for contaminant transport along preferential groundwater flow paths that bypass interception wells

FedACH transmits the total of each batch that contains forward credit items (or total amount of forward credit items contained in a mixed batch) to ABMS for verification that funds

TABLE VI: Comparison of three measures of the solutions found by MOEA/D-TS with and without block properties (BPs) on 40-job problem. We have found that on average among 50