Touch your NetBSD
Pierre Pronchery
Freelance IT-Security Consultant
AFULTab contest
- AFUL is a French FOSS user group
- launched AFULTab end of last year
- international competition
- aims at creating a FOSS tablet within 6 months
- some guidelines for hardware:
- 10" screen, 6 hours battery life, wireless,
optionally 3G...
- deadline is on May 1st
My proposal
- use NetBSD as a base
- run DeforaOS for the user interface
- lightweight desktop based on the Gtk+ toolkit
- features an embedded mode (no menubar...)
- includes a telephony application (Openmoko, HTC...)
- written by myself
- prepare on a Lenovo IdeaPad S10-3t tablet
- order and submit proposal on a wetab (similar hardware)
Hardware: brief overview
- Intel Atom N450
- 12" and 10" screen (1024x600 and 1366x768)
- wireless chipset (Atheros and TBD)
- 3G support
Initial status: hardware
- no touchscreen support (wstablet GSoC?)
- wireless and 3G support with luck
- same with graphics acceleration (Intel)
- webcam should be fine with uvideo(4)
Touchscreen support: about wstablet
- was a Google SoC project
- was never merged, no follow-up
- little help in my context
Touchscreen support: writing uts(4)
- attaches to the USB HID bus
- hardware reports absolute values (4096x4096)
- written, sent and committed within three days!
- only implements single-touch support
- user-land requires more work :(
Touchscreen support: wsmouse and X
- xf86-input-mouse did not support absolute values
- support committed in xsrc
- PR submitted for modular-xorg in pkgsrc
Touchscreen support: calibration
- unlike what the manual says, calibration is supported
- found three serious bugs in the kernel calibration framework
- integer size issue (int in struct wscalib_coords, casted to long)
- suspecting integer overflows when averaging values
- divisions by zero
- currently requires a specific application for calibration
- now extending wsconsctl(8) to allow calibration from the CLI
Touchscreen support: improving calibration
- the hardware reports the range of logical values for X and Y
- X knows the actual screen resolution (or the one in use)
=> calibration can be automated; unfortunately:
- my current solution abuses sc_maxx, sc_maxy
- could we extend tpcalib_softc?
Current status: hardware (IdeaPad S10-3t)
- long list of additional hardware issues :(
- have to use the vesa X driver at the moment
- ACPI locks (using sysctl/envctl, S5 does not shutdown)
- wireless not fully supported yet apparently
- did not look much at 3G yet, seems non-trivial
- uvideo(4) should (?) but does not work
Current status: hardware (wetab)
- "delivery date unknown"
- hope I won't have to switch to NVidia Tegra :(
Current status: software
- finger-based interaction decent but not sufficient yet
- web browser, file management, single-touch, no gestures...
- some kernel issues remaining:
- visual artefacts with the vesa driver (and now on my laptop too)
- system unusable with the splash screen activated (and wrong colors)
- random crashes with PaX and mprotect enabled (PR sent)
Polishing: NetBSD
- ACPI and power management:
- wireless-toggle action (start and stop wpa_supplicant?)
- integrating lock-screen, (un)docking, mouse and screen switch...
- optimizing bootup, performance and battery life:
- /tmp in memory, mount the rest noatime,nodevmtime
- start X earlier (or get rid of it)
- no clear_tmp or virecover, fsck_flags always fix
- save and restore sound card mixer levels
- adapt the security model:
- ownership of device nodes (USB sticks...)
- user can suspend and shutdown
Polishing: NetBSD (continued)
- complete calibration and push it in wscons.conf(5)
(...or xf86-input-mouse)
- framebuffer and splash screen
- return of the progress bar? also for fsck?
- re-enable on shutdown (different picture?)
- additional security:
- PaX ASLR and mprotect on by default
- /tmp and /var mounted noexec
Polishing: DeforaOS
- complete the window manager and session management
- implement screen rotation (manual and automated)
- graphical interface for wireless (on top of wpa_supplicant?)
- (re-)implement drag & drop, copy & paste for file management
- better finger-based interaction
- improve essential applications:
- virtual keyboard, web browser, e-mail client...
Polishing: DeforaOS (continued)
- long-term goal is to achieve much more:
- secure and remote access to resources (data and applications)
- run just as well on your laptop, desktop and embedded device
- more modular and flexible global architecture (plug-ins...)
- replace the libc with a more modern API
- ultimately, derive higher-level interpreters from it
- ...and let it run on a micro-kernel :)
Questions?
Thank you for listening!