SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Touch your NetBSD
EHSM 2012
Berlin, Germany
Pierre Pronchery <khorben@netbsd.org>
Saturday, December 29th
2012
Background information

Freelance IT-Security consultant
DUEKIN Consulting
pierre.pronchery@duekin.com

OSDev hobbyist
The DeforaOS Project
khorben@defora.org

NetBSD developer
khorben@netbsd.org

Based in Berlin, Germany
Agenda
I. The concept
– DeforaOS Project
– NetBSD
II.Previous steps
– Openmoko Freerunner
– AFULTab contest
III.Current status
– Demo
– Technical details
IV.The future
Concept: DeforaOS (1/3)

Open Source project since 2005

Born from my frustration with the existing stuff:

I just wanted to synchronize IRC chat logs between
my two computers!

Rinse, repeat, apply (RSS, bookmarks, playlists, SCM,
documents... possibly running programs)

Really:

Ubiquitous computing

Seamless networking

All the more relevant today...
Concept: DeforaOS (2/3)
Three parts:
1.Self-hosted capability
kernel, libc, assembler, compiler...
2.Distributed framework
RPC, interfaces, services...
3.Desktop environment
desktop, embedded devices...
Portable, also meant to run on today's systems
Not fully implemented...
Concept: DeforaOS (3/3)
• Started with the kernel back then
...but I didn't know what to do!
• So I went from top to bottom:
– UNIX utilities and libc
– Graphical interface
– And then the more innovating parts
• Therefore, the system:
– The system works on existing platforms
– Progressively implement each part as need be
– Trying to build up and connect the different parts
Concept: NetBSD
IT'S OUT
THERE!!1
(6.0.1 too btw)
(©™ Nike)
Concept: NetBSD (1/2)
Discovered it at sysadmin school:
– « Install and network three different Operating
Systems together, sharing user data and
authentication; to make it equally difficult to
everyone, one of them has to be NetBSD 2.0 »
...but I liked it, using it daily since version 3.0
Personal preference:

Clean, portable, embedded, coherent

...fun!
Concept: NetBSD (2/2)
• About these silly rumors I heard:
– You do *not* have to compile anything at all
– Portability comes from good design (not a goal)
• Some advantages for this kind of project:
– Cross-compilation is free
– Target any NetBSD architecture from Linux, Mac...
• Reference system for DeforaOS development
Concept: NetBSD on tablets

Not really new:
– Sharp Zaurus
– uep(4)
– hpctp(4)
– sstouch on
s3c2440

Existing touchscreen framework: tpcalib

There was no modern touchscreen driver
Previous steps
Step: Openmoko Freerunner (1/3)

Worked with Bearstech on hackable:1

Debian-based GNU/Linux distribution, originally
for the Openmoko Freerunner

Smartphone released in 2008

ARM-based Open Source hardware

Ported the DeforaOS desktop for
such embedded platforms

Eventually made it on HTC TouchPro and Nokia
N900 as well
Step: Openmoko Freerunner (2/3
Step: Openmoko Freerunner (3/3)
Step: AFULTab contest (1/3)

AFUL is a French FOSS user group

Launched an international contest end of 2011:

Create a 100% OSS tablet within 6 months

Guidelines for hardware:
− 10” touchscreen, 6+ hours of battery life
− Wireless support, mobile networking...

Planned to use the WeTab tablet

Prepared on a Lenovo IdeaPad S10-3t

Presented at FOSDEM 2012
Step: Back in February... (1/2)

FOSDEM 2012, BSD Devroom

First functional demonstration:

uts(4) driver committed (touchscreen)

Many shortcomings:

Required some patches

Limited screen resolution

No wireless or mobile networking

Had not received the final hardware yet
Step: Back in February... (2/2)

FOSDEM 2012, BSD Devroom (still)

It looked like this:
Step: WeTab hardware
●
Intel Atom N450-based, 1.6 GHz, 1 GB RAM
●
11.6” multi-touch screen, 1366x768
●
Wireless chipset (Atheros)
●
Huawei 3G modem built-in, with GPS support
●
Bluetooth, 2 USB ports, SD card slot
●
32 GB internal flash
●
Front camera, MP
Step: AFULTab contest (2/3)

A few months later...

Received the WeTab

Co-won the contest in May 2012!

Released extensive documentation:
http://www.duekin.com/downloads/papers/WeTab%

Became a NetBSD developer in the process,
khorben@ (breaking USB keyboard drivers since
May 2012)
Step: AFULTab contest (3/3)
And it looked like this at the time:
(Solutions Linux 2012, NetBSD booth)
Overview
Citroën GT concept car (probably under copyright)
Overview: Under the hood
Reminder:
• NetBSD's kernel and base system
• Packages from pkgsrc
• Default to the DeforaOS embedded desktop
Make it a real tablet experience:
• Finger-based interaction
• Look appealing!
Here's my approach...
Overview: Today
Overview: Boot time (1/2)
Splash screen!
Overview: Boot time (2/2)
Splash screen on genfb(4), 800x600 at 16 bpp

Particular JPEG format (not progressive)
Silent boot through boot.cfg, boot -z:
banner=Welcome to NetBSD [...]
menu=Boot normally:rndseed /var/db/entropy-file;vesa
800x600x16;splash /deforaos.jpeg;boot /netbsd.gz -z
menu=Boot normally (text mode):rndseed /var/db/entropy-
file;boot /netbsd.gz
menu=Boot single user:rndseed /var/db/entropy-file;boot
/netbsd.gz -s
menu=Disable ACPI:rndseed /var/db/entropy-file;boot /netbsd.gz
-2
menu=Drop to boot prompt:prompt
default=1
timeout=5
Overview: Instant use
Where “instant” means about 45 seconds (yay!)
GDM auto-login:

Can be configured through the graphical user
interface

Otherwise in /usr/pkg/etc/gdm/custom.conf:
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=khorben
Overview: Calibration (1/2)

Set of patches, see PR kern/45872
$ wsconsctl -f /dev/wsmouse2 -ma
type=touch-panel
calibration.minx=0
calibration.miny=0
calibration.maxx=32767
calibration.maxy=32767
calibration.samples=0,0,0,0:32767,32767,1365,76
7:72,0,3,0:0,140,0,3
repeat.buttons=none
repeat.delay.first=0
repeat.delay.decrement=0
repeat.delay.minimum=0

There is also tpctl(8) for initial calibration
Overview: Calibration (2/2)
• Specification by Microsoft as “digitizer devices”:
http://msdn.microsoft.com/en-us/library/windows/ha
• Really a USB HID device, working like a mouse
• ...or like two simultaneously (relative, absolute)
• Good to know: device mode through usbhidctl
$ usbhidctl -f /dev/uhid1 
Device_Configuration.Finger.Device_Mode=2
Overview: X11 support

xf86-input-mouse needs support for absolute
coordinates (through wscons)

Both base and pkgsrc should be patched now

Needs more work: wrong coordinates when the
screen is rotated in portrait mode...
Overview: Gtk+ settings
• ~/.Xdefaults, set DPI:
!Xft
Xft*dpi: 132
• ~/.gtkrc-2.0, some possibilities:
gtk-icon-sizes=...:panel-smaller=24,24:panel-
small=32,32:panel-large=48,48
gtk-touchscreen-mode=1
• Additional tweaking through the Gtk+ engine:
– Larger scrollbars...
• Third button emulation:
export GTK_MODULES=libgtkstylus.so
Overview: DeforaOS desktop (1/2)
●
wip/deforaos-desktop, meta-package:
– deforaos-browser deforaos-camera
– deforaos-editor deforaos-keyboard
– deforaos-locker deforaos-mixer
– deforaos-panel deforaos-pdfviewer
– deforaos-phone deforaos-player
– deforaos-surfer deforaos-todo
– libgtkstylus matchbox-wm (for now)
• For embedded devices, set in /etc/mk.conf:
PKG_DEFAULT_OPTIONS+=embedded
Overview: DeforaOS desktop (2/2)
User's ~/.Xclients file:
#!/bin/sh
export GTK_MODULES=libgtkstylus.so
desktop &
dhcpcd-gtk &
locker &
panel &
phone &
exec matchbox-window-manager -use_titlebar no 
-use_cursor no -use_desktop_mode plain
Overview: Screensaver, unlocking
Overview: powerd integration
• Panel notifications:
_message()
{
DISPLAY=:0.0 /usr/bin/su -- "khorben" 
-c "/etc/powerd/actions/message '$1' '$2'"
}
• Power management, /etc/powerd/scripts/*:
_message -E 'All hell loose, power down.'
Overview: Mobile networking
DeforaOS Phone calls pppd in pty
mode, see /etc/ppp/peers/phone:
notty
defaultroute
local
noauth
usepeerdns
Name resolution via resolvconf(8),
see the /etc/ppp/ip-up and ip-down scripts:
[ “$USEPEERDNS” -eq 1 ] && /sbin/resolvconf -a “$1” 
< /etc/ppp/resolv.conf
/sbin/resolvconf -d “$1”
Overview: Wireless networking

dhcpcd-gtk from Roy Marples

In wpa_supplicant.conf, set:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

In rc.conf, set:
dhcpcd=YES dhcpcd_flags=”-bq”
wpa_supplicant=YES wpa_supplicant_flags="-B
-iath0 -c/etc/wpa_supplicant.conf"
Overview: GPS support
• Add /dev/ttyU2 and /dev/ttyU3:
# cd /dev && ./MAKEDEV ttyU2 ttyU3
• Enable the GPS plug-in in DeforaOS Phone
• Click “Start” in the GPS preferences there
• Install and configure geography/gpsd
• Start wip/foxtrotgps:
GLib (gthread-posix.c): Unexpected error from
C library during 'pthread_mutex_unlock':
Operation not permitted. Aborting.
Abort trap (core dumped)
• More work required...
Overview: Hardware support

Fully supported:

Video camera, uvideo(4)

Some issues remaining:

Touchscreen, uts(4) (multi-touch...)

3G modem, u3g(4) (maybe not related)

Wireless support, ath(4) (likewise)

Video driver, x11/xf86-video-intel (HDMI output)

Needs more ♥

GPS, via u3g(4) and wip/foxtrotgps

Power management (suspend, permissions)
Future
<insert picture of a skate hoverboard here>
Future
(from blogdegeek.com)
Future: I can haz potentialz

NetBSD on the Nokia N900

A NetBSD-based Open Source phone?
Future: NetBSD/N900
• Kernel configuration file committed upstream
• Installer starts (sysinst)
• mount_chfs(8) for flash-based storage
• Keyboard driver ongoing (needs OMAP I2C)
• More drivers required:
– Modem, audio, sensors, camera, USB OTG...
– Flash memory optionally (Onenand)
Future: DeforaOS on Github (1/2)
Future: DeforaOS on Github (2/2)
• 41 repositories by now
• A lot is still broken after migration from CVS :(
– Daily builds
– Development mailing-list
– Meta-project tree
– Repository browsing from the website...
Future: More on DeforaOS
• Make the ubiquitous seamless networking
computing goodness happen!
• Also, switch to Gtk+ 3:
– Finger scrolling?
– (almost ready)
• Other ideas?
Future: But for now...

DeforaOS Project, http://www.defora.org/

NetBSD Project, http://www.netbsd.org/

DUEKIN Consulting at http://www.duekin.com/

Myself at http://people.defora.org/~khorben/
@khorben on Twitter

Contenu connexe

Tendances

Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
T. J. Saotome
 
Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
Sherif Mousa
 
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
Anne Nicolas
 

Tendances (20)

Linux basics 1/2
Linux basics 1/2Linux basics 1/2
Linux basics 1/2
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
 
2.Accessing the Pi
2.Accessing the Pi2.Accessing the Pi
2.Accessing the Pi
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
 
Raspberry Pi 101
Raspberry Pi 101Raspberry Pi 101
Raspberry Pi 101
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using Buildroot
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
 
Ignite ux-quickstart
Ignite ux-quickstartIgnite ux-quickstart
Ignite ux-quickstart
 
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
Distro Recipes 2013: What&rsquo;s new in gcc 4.8?
 
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
 
DTraceCloud2012
DTraceCloud2012DTraceCloud2012
DTraceCloud2012
 
Building
BuildingBuilding
Building
 

En vedette (7)

Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1
 
Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1
 
Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1
 
Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1
 
第1回タスクセラピー(jMatsuzaki)
第1回タスクセラピー(jMatsuzaki)第1回タスクセラピー(jMatsuzaki)
第1回タスクセラピー(jMatsuzaki)
 
Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1Soal uji-komp-pedagogik-paket-ia-edit1
Soal uji-komp-pedagogik-paket-ia-edit1
 
Tesisbabis d-vdanlampiran1s-d-121113005251-phpapp02
Tesisbabis d-vdanlampiran1s-d-121113005251-phpapp02Tesisbabis d-vdanlampiran1s-d-121113005251-phpapp02
Tesisbabis d-vdanlampiran1s-d-121113005251-phpapp02
 

Similaire à Touch your NetBSD

Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
Logicaltrust pl
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
Yury Chemerkin
 
How to save the environment
How to save the environmentHow to save the environment
How to save the environment
Aaron Zauner
 

Similaire à Touch your NetBSD (20)

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)
 
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
DSD-INT 2014 - Delft3D Open Source Workshop - Qinghua Ye & Adri Mourits, Delt...
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
OSMC 2021 | Icinga-Installer – the easy way to your Icinga
OSMC 2021 | Icinga-Installer – the easy way to your IcingaOSMC 2021 | Icinga-Installer – the easy way to your Icinga
OSMC 2021 | Icinga-Installer – the easy way to your Icinga
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Максим Мельников - FOSDEM 2014 overview
Максим Мельников - FOSDEM 2014 overviewМаксим Мельников - FOSDEM 2014 overview
Максим Мельников - FOSDEM 2014 overview
 
FOSDEM 2014 Overview
FOSDEM 2014 OverviewFOSDEM 2014 Overview
FOSDEM 2014 Overview
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Portable OS & Portable Application
Portable OS & Portable ApplicationPortable OS & Portable Application
Portable OS & Portable Application
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
How to save the environment
How to save the environmentHow to save the environment
How to save the environment
 

Touch your NetBSD

  • 1. Touch your NetBSD EHSM 2012 Berlin, Germany Pierre Pronchery <khorben@netbsd.org> Saturday, December 29th 2012
  • 2. Background information  Freelance IT-Security consultant DUEKIN Consulting pierre.pronchery@duekin.com  OSDev hobbyist The DeforaOS Project khorben@defora.org  NetBSD developer khorben@netbsd.org  Based in Berlin, Germany
  • 3. Agenda I. The concept – DeforaOS Project – NetBSD II.Previous steps – Openmoko Freerunner – AFULTab contest III.Current status – Demo – Technical details IV.The future
  • 4. Concept: DeforaOS (1/3)  Open Source project since 2005  Born from my frustration with the existing stuff:  I just wanted to synchronize IRC chat logs between my two computers!  Rinse, repeat, apply (RSS, bookmarks, playlists, SCM, documents... possibly running programs)  Really:  Ubiquitous computing  Seamless networking  All the more relevant today...
  • 5. Concept: DeforaOS (2/3) Three parts: 1.Self-hosted capability kernel, libc, assembler, compiler... 2.Distributed framework RPC, interfaces, services... 3.Desktop environment desktop, embedded devices... Portable, also meant to run on today's systems Not fully implemented...
  • 6. Concept: DeforaOS (3/3) • Started with the kernel back then ...but I didn't know what to do! • So I went from top to bottom: – UNIX utilities and libc – Graphical interface – And then the more innovating parts • Therefore, the system: – The system works on existing platforms – Progressively implement each part as need be – Trying to build up and connect the different parts
  • 8. Concept: NetBSD (1/2) Discovered it at sysadmin school: – « Install and network three different Operating Systems together, sharing user data and authentication; to make it equally difficult to everyone, one of them has to be NetBSD 2.0 » ...but I liked it, using it daily since version 3.0 Personal preference:  Clean, portable, embedded, coherent  ...fun!
  • 9. Concept: NetBSD (2/2) • About these silly rumors I heard: – You do *not* have to compile anything at all – Portability comes from good design (not a goal) • Some advantages for this kind of project: – Cross-compilation is free – Target any NetBSD architecture from Linux, Mac... • Reference system for DeforaOS development
  • 10. Concept: NetBSD on tablets  Not really new: – Sharp Zaurus – uep(4) – hpctp(4) – sstouch on s3c2440  Existing touchscreen framework: tpcalib  There was no modern touchscreen driver
  • 12. Step: Openmoko Freerunner (1/3)  Worked with Bearstech on hackable:1  Debian-based GNU/Linux distribution, originally for the Openmoko Freerunner  Smartphone released in 2008  ARM-based Open Source hardware  Ported the DeforaOS desktop for such embedded platforms  Eventually made it on HTC TouchPro and Nokia N900 as well
  • 15. Step: AFULTab contest (1/3)  AFUL is a French FOSS user group  Launched an international contest end of 2011:  Create a 100% OSS tablet within 6 months  Guidelines for hardware: − 10” touchscreen, 6+ hours of battery life − Wireless support, mobile networking...  Planned to use the WeTab tablet  Prepared on a Lenovo IdeaPad S10-3t  Presented at FOSDEM 2012
  • 16. Step: Back in February... (1/2)  FOSDEM 2012, BSD Devroom  First functional demonstration:  uts(4) driver committed (touchscreen)  Many shortcomings:  Required some patches  Limited screen resolution  No wireless or mobile networking  Had not received the final hardware yet
  • 17. Step: Back in February... (2/2)  FOSDEM 2012, BSD Devroom (still)  It looked like this:
  • 18. Step: WeTab hardware ● Intel Atom N450-based, 1.6 GHz, 1 GB RAM ● 11.6” multi-touch screen, 1366x768 ● Wireless chipset (Atheros) ● Huawei 3G modem built-in, with GPS support ● Bluetooth, 2 USB ports, SD card slot ● 32 GB internal flash ● Front camera, MP
  • 19. Step: AFULTab contest (2/3)  A few months later...  Received the WeTab  Co-won the contest in May 2012!  Released extensive documentation: http://www.duekin.com/downloads/papers/WeTab%  Became a NetBSD developer in the process, khorben@ (breaking USB keyboard drivers since May 2012)
  • 20. Step: AFULTab contest (3/3) And it looked like this at the time: (Solutions Linux 2012, NetBSD booth)
  • 21. Overview Citroën GT concept car (probably under copyright)
  • 22. Overview: Under the hood Reminder: • NetBSD's kernel and base system • Packages from pkgsrc • Default to the DeforaOS embedded desktop Make it a real tablet experience: • Finger-based interaction • Look appealing! Here's my approach...
  • 24. Overview: Boot time (1/2) Splash screen!
  • 25. Overview: Boot time (2/2) Splash screen on genfb(4), 800x600 at 16 bpp  Particular JPEG format (not progressive) Silent boot through boot.cfg, boot -z: banner=Welcome to NetBSD [...] menu=Boot normally:rndseed /var/db/entropy-file;vesa 800x600x16;splash /deforaos.jpeg;boot /netbsd.gz -z menu=Boot normally (text mode):rndseed /var/db/entropy- file;boot /netbsd.gz menu=Boot single user:rndseed /var/db/entropy-file;boot /netbsd.gz -s menu=Disable ACPI:rndseed /var/db/entropy-file;boot /netbsd.gz -2 menu=Drop to boot prompt:prompt default=1 timeout=5
  • 26. Overview: Instant use Where “instant” means about 45 seconds (yay!) GDM auto-login:  Can be configured through the graphical user interface  Otherwise in /usr/pkg/etc/gdm/custom.conf: [daemon] AutomaticLoginEnable=True AutomaticLogin=khorben
  • 27. Overview: Calibration (1/2)  Set of patches, see PR kern/45872 $ wsconsctl -f /dev/wsmouse2 -ma type=touch-panel calibration.minx=0 calibration.miny=0 calibration.maxx=32767 calibration.maxy=32767 calibration.samples=0,0,0,0:32767,32767,1365,76 7:72,0,3,0:0,140,0,3 repeat.buttons=none repeat.delay.first=0 repeat.delay.decrement=0 repeat.delay.minimum=0  There is also tpctl(8) for initial calibration
  • 28. Overview: Calibration (2/2) • Specification by Microsoft as “digitizer devices”: http://msdn.microsoft.com/en-us/library/windows/ha • Really a USB HID device, working like a mouse • ...or like two simultaneously (relative, absolute) • Good to know: device mode through usbhidctl $ usbhidctl -f /dev/uhid1 Device_Configuration.Finger.Device_Mode=2
  • 29. Overview: X11 support  xf86-input-mouse needs support for absolute coordinates (through wscons)  Both base and pkgsrc should be patched now  Needs more work: wrong coordinates when the screen is rotated in portrait mode...
  • 30. Overview: Gtk+ settings • ~/.Xdefaults, set DPI: !Xft Xft*dpi: 132 • ~/.gtkrc-2.0, some possibilities: gtk-icon-sizes=...:panel-smaller=24,24:panel- small=32,32:panel-large=48,48 gtk-touchscreen-mode=1 • Additional tweaking through the Gtk+ engine: – Larger scrollbars... • Third button emulation: export GTK_MODULES=libgtkstylus.so
  • 31. Overview: DeforaOS desktop (1/2) ● wip/deforaos-desktop, meta-package: – deforaos-browser deforaos-camera – deforaos-editor deforaos-keyboard – deforaos-locker deforaos-mixer – deforaos-panel deforaos-pdfviewer – deforaos-phone deforaos-player – deforaos-surfer deforaos-todo – libgtkstylus matchbox-wm (for now) • For embedded devices, set in /etc/mk.conf: PKG_DEFAULT_OPTIONS+=embedded
  • 32. Overview: DeforaOS desktop (2/2) User's ~/.Xclients file: #!/bin/sh export GTK_MODULES=libgtkstylus.so desktop & dhcpcd-gtk & locker & panel & phone & exec matchbox-window-manager -use_titlebar no -use_cursor no -use_desktop_mode plain
  • 34. Overview: powerd integration • Panel notifications: _message() { DISPLAY=:0.0 /usr/bin/su -- "khorben" -c "/etc/powerd/actions/message '$1' '$2'" } • Power management, /etc/powerd/scripts/*: _message -E 'All hell loose, power down.'
  • 35. Overview: Mobile networking DeforaOS Phone calls pppd in pty mode, see /etc/ppp/peers/phone: notty defaultroute local noauth usepeerdns Name resolution via resolvconf(8), see the /etc/ppp/ip-up and ip-down scripts: [ “$USEPEERDNS” -eq 1 ] && /sbin/resolvconf -a “$1” < /etc/ppp/resolv.conf /sbin/resolvconf -d “$1”
  • 36. Overview: Wireless networking  dhcpcd-gtk from Roy Marples  In wpa_supplicant.conf, set: ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel update_config=1  In rc.conf, set: dhcpcd=YES dhcpcd_flags=”-bq” wpa_supplicant=YES wpa_supplicant_flags="-B -iath0 -c/etc/wpa_supplicant.conf"
  • 37. Overview: GPS support • Add /dev/ttyU2 and /dev/ttyU3: # cd /dev && ./MAKEDEV ttyU2 ttyU3 • Enable the GPS plug-in in DeforaOS Phone • Click “Start” in the GPS preferences there • Install and configure geography/gpsd • Start wip/foxtrotgps: GLib (gthread-posix.c): Unexpected error from C library during 'pthread_mutex_unlock': Operation not permitted. Aborting. Abort trap (core dumped) • More work required...
  • 38. Overview: Hardware support  Fully supported:  Video camera, uvideo(4)  Some issues remaining:  Touchscreen, uts(4) (multi-touch...)  3G modem, u3g(4) (maybe not related)  Wireless support, ath(4) (likewise)  Video driver, x11/xf86-video-intel (HDMI output)  Needs more ♥  GPS, via u3g(4) and wip/foxtrotgps  Power management (suspend, permissions)
  • 39. Future <insert picture of a skate hoverboard here>
  • 41.
  • 42. Future: I can haz potentialz  NetBSD on the Nokia N900  A NetBSD-based Open Source phone?
  • 43. Future: NetBSD/N900 • Kernel configuration file committed upstream • Installer starts (sysinst) • mount_chfs(8) for flash-based storage • Keyboard driver ongoing (needs OMAP I2C) • More drivers required: – Modem, audio, sensors, camera, USB OTG... – Flash memory optionally (Onenand)
  • 44. Future: DeforaOS on Github (1/2)
  • 45. Future: DeforaOS on Github (2/2) • 41 repositories by now • A lot is still broken after migration from CVS :( – Daily builds – Development mailing-list – Meta-project tree – Repository browsing from the website...
  • 46. Future: More on DeforaOS • Make the ubiquitous seamless networking computing goodness happen! • Also, switch to Gtk+ 3: – Finger scrolling? – (almost ready) • Other ideas?
  • 47. Future: But for now...  DeforaOS Project, http://www.defora.org/  NetBSD Project, http://www.netbsd.org/  DUEKIN Consulting at http://www.duekin.com/  Myself at http://people.defora.org/~khorben/ @khorben on Twitter