summaryrefslogtreecommitdiffstats
path: root/36c3/Replicant_sustainability/Replicant_sustainability.tex
diff options
context:
space:
mode:
Diffstat (limited to '36c3/Replicant_sustainability/Replicant_sustainability.tex')
-rw-r--r--36c3/Replicant_sustainability/Replicant_sustainability.tex638
1 files changed, 638 insertions, 0 deletions
diff --git a/36c3/Replicant_sustainability/Replicant_sustainability.tex b/36c3/Replicant_sustainability/Replicant_sustainability.tex
new file mode 100644
index 0000000..5e91831
--- /dev/null
+++ b/36c3/Replicant_sustainability/Replicant_sustainability.tex
@@ -0,0 +1,638 @@
+\documentclass{beamer}
+\usepackage[english]{babel}
+\usepackage{color}
+\usepackage{graphicx}
+\usepackage{ifthen}
+\usepackage[utf8]{inputenc}
+\usepackage{listings}
+\usepackage{xtab}
+\usepackage{pdfpages}
+
+%% Based on:
+%% https://tex.stackexchange.com/questions/136900/insert-a-full-page-image
+\newcommand{\pictureframe}[1] {
+ {
+ \begin{frame}
+ \noindent
+ \resizebox{\textwidth}{\textheight}
+ {\includegraphics{#1}}
+ \hspace*{-\textwidth}
+ \end{frame}
+ }
+}
+
+\newcommand{\qtmokopictureframe}[2] {
+ {
+ \begin{frame}
+ \noindent
+ {\includegraphics{#1}}
+ {\includegraphics{#2}}
+ \hspace*{-\textwidth}
+ \end{frame}
+ }
+}
+
+\newcommand{\shrpictureframe}[2] {
+ {
+ \begin{frame}
+ \noindent
+ {\includegraphics[scale=0.25]{#1}}
+ {\includegraphics[scale=0.25]{#2}}
+ \end{frame}
+ }
+}
+
+\usetheme{Singapore}
+
+\title{Replicant: Making a fully free distribution for smartphones and tablets substainable}
+%% subtitle: from quick and dirty hacks to substainability
+\author{Denis 'GNUtoo' Carikli}
+\date{\today}
+
+\begin{document}
+
+\maketitle
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}
+ \center{Replicant:}
+ \begin{itemize}
+ \item Fully free Android distribution approved by the FSF
+ \item But the hardware it runs on is not...
+ \item More details on hardware related freedom issues later %% TODO
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Some context}
+ \begin{itemize}
+ \item Website: replicant.us
+ \item Exists since September 2009
+ \item Currently based on LineageOS
+ \item Android versions:
+ \begin{itemize}
+ \item Replicant 6: Android 6, last security update: October 2017\cite{last-android-6-update}
+ \item Replicant 9: Android 9, work in progress\cite{porting-to-android-9}
+ \end{itemize}
+ \item Supports $\sim$ 10 devices (smartphones and tablets)
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Minimum feature set required to support a device}
+ \begin{itemize}
+ \item Display working and graphics fast enough
+ \item sound working
+ \item Be able to make calls
+ \item etc
+ \item GPS, Camera, and other non crucial hardware may not work, or work in later releases
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{frame}
+ \center{A very short introduction on hardware}
+ \begin{itemize}
+ \item System on a chip
+ \item Smartphones and the modem
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{System on a chip}
+\end{frame}
+
+\pictureframe{../../external_resources/replicant_website/images/freedom-privacy-security-issues/hardware.png}
+
+\begin{frame}
+ \center{picture of the hardware for showing what is in what chip}
+\end{frame}
+
+\begin{frame}
+ \center{Modem}
+\end{frame}
+
+\begin{frame}
+ \center{picture of the hardware + link to GSM tower}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{A short introduction to Android}
+\end{frame}
+
+\begin{frame}
+ \center{Android: Time to market driven architectures?}
+ \begin{itemize}
+ \item SOCs
+ \begin{itemize}
+ \item Write the code work as fast as possible
+ \item Support as much hardware features as possible
+ \item $\rightarrow$ Varying code quality
+ \item $\rightarrow$ Example: One driver rewritten 3 times
+ \end{itemize}
+ \item To smartphones and tablets
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Freedom and companies image}
+ \begin{itemize}
+ \item Having the source code under free software licenses, even if the code quality is bad is crucial for freedom:
+ \begin{itemize}
+ \item Hardware bringup is often made that way anyway
+ \item Things can be improved later:
+ always be cleaned up later or if the code quality is too bad, rewritten from scratch
+ \item Having the source code under a free software license is very important
+ \item Worst case: use the source code as documentation or reverse engineer it (add prints)
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Android Architecture}
+ \begin{itemize}
+ \item Examples of the worst API changes:
+ \begin{itemize}
+ \item Audio driver: Incompatible interface: Qualcomm DSP (MSM7K)
+ \item Modem driver: Out of tree driver, with changing interfaces (Samsung IPC)
+ \item Backlight driver: uses LED interfaces instead (HTC Dream)
+ \item WiFi driver: Has a highly modified Wext interface (Broadcom, TI, etc)
+ \item Display driver: Has a custom panel refresh interface (MSM7k, Optimus black)
+ \item Camera driver: uses custom ioctl to make it work
+ \item Accelerometer driver: output custom protocol + custom ioctl
+ \item Kernel core: has different power management API
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Image of the Android framework}
+\end{frame}
+
+\begin{frame}
+ \center{Android Framework}
+ \begin{itemize}
+ \item Device manufacturers can break the Linux API completely
+ \item It can take time (years) to bring in a new framework in Linux
+ \item API and ABI guarantees (modulo kernel configuration and build)
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{Replicant phase 1: Quick and dirty hacks}
+\end{frame}
+
+\begin{frame}
+ \center{Introduction}
+ \begin{itemize}
+ \item Replicant History: short version
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Before the Openmoko}
+\end{frame}
+
+\begin{frame}
+ \center{Picture of various hardware}
+\end{frame}
+
+\begin{frame}
+ \center{The Openmoko: a GNU/Linux smartphone}
+\end{frame}
+
+\begin{frame}
+ \center{Pictures of the openmoko}
+\end{frame}
+
+\begin{frame}
+ \center{Many GNU/Linux distributions were available for it}
+ \begin{itemize}
+ \item Debian
+ \item SHR
+ \item QtMoko
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Issues:}
+ \begin{itemize}
+ \item Hardware
+ \item Software
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Comparison with GNU/Linux} \\
+ \begin{itemize}
+ \item Advantages
+ \begin{itemize}
+ \item GUI and applications adapted to big fingers
+ \item $\rightarrow$ run on devices that:
+ \begin{itemize}
+ \item lack keyboard
+ \item have capacitve touchscreen and no stylus
+ \item Have very small displays with very high number of pixel
+ \end{itemize}
+ \end{itemize}
+ \item Issues
+ \begin{itemize}
+ \item GNU/Linux software architecture is light years ahread
+ \item Huge unknown code from google
+ \item Meant to run proprietary software
+ \item Not meant to empower users
+ \end{itemize}
+\end{itemize}
+\end{frame}
+
+\begin{frame}
+ \begin{itemize}
+ \item Like a proprietary OS (Microsoft Windows)
+ \item Let's replicate it and make a free software version
+ \item $\rightarrow$ Replicant
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Replicant, SHR and the HTC Dream} \\
+ \begin{itemize}
+ \item SHR: GNU/Linux on the first Android device
+ \begin{itemize}
+ \item Took more than one year of hard work
+ \item by 3 or 4 people (not full time)
+ \item Not reliable
+ \item Incomplete (audio) or missing features (rotation)
+ \end{itemize}
+ \item Replicant
+ \begin{itemize}
+ \item Took very few hours/week
+ \item 1 person (not full time)
+ \item Way more reliable
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{HTC Dream: Bad for freedom}
+ \begin{itemize}
+ \item Qualcomm MSM7k
+ \item The modem controlled:
+ \begin{itemize}
+ \item The boot, RAM and storage of the device
+ \item The audio (and most probably the microphone)
+ \end{itemize}
+ \item We leanred about it while working on Replicant.
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{Replicant phase 2: Better devices}
+\end{frame}
+
+\begin{frame}
+ \center{Newer devices}
+ \begin{itemize}
+ \item Nexus one
+ \begin{itemize}
+ \item The audio (and most probably the microphone)
+ \item Required nonfree audio firmware for having working calls
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Code substainability}
+ \begin{itemize}
+ \item Required verry little maintenance and time (quick and dirty hacks)
+ \item Porting to a new Android version:
+ \begin{itemize}
+ \item 3D acceleration:
+ \begin{itemize}
+ \item No free driver at the time
+ \item We needed to to make graphics fast without 3D acceleration
+ \item Lack of 3D acceleration gets less and less supported by Android source code over time
+ \item Example: Nexus One
+ \end{itemize}
+ \item Linux code not upstream $\rightarrow$ Total dependency on Android upstream
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Devices substainability}
+ \begin{itemize}
+ \item Removable batteries
+ \item Little RAM
+ \item Nightmare-like freedom issues
+ \begin{itemize}
+ \item $\rightarrow$ Very strong incentive to discontinue support for them
+ \item $\rightarrow$ negligeable freedom gained by installing Replicant
+ \item $\rightarrow$ Replicant was still useful as support for better devices was added later
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Better devices}
+ \begin{itemize}
+ \item More freedom
+ \item But required more work
+ \begin{itemize}
+ \item Required to continue reverse engineering the modem protocol (easy but long)
+ \item Nonfree libraries to replace varies across devices. Examples: Camera, audio, etc
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Freedom blockers}
+ \begin{itemize}
+ \item All currently supported devices have nonfree bootloaders
+ \item The nonfree bootloaders are not easy at all to replace as the code is usually signed
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{Replicant phase 3: Focus on devices with free software bootloaders}
+\end{frame}
+
+\begin{frame}
+ \center{First attempt to change focus}
+ \begin{itemize}
+ \item The GTA04 from Golden Delicious has a free software bootloader
+ \item The Optimus black (p970) from LG has a bootloader that is not signed
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{GTA04}
+ \begin{itemize}
+ \item Some limited Replicant 4.2 support (based on Android 4.2)
+ \item Got suspend issues with Replicant 6 (kernel)
+ \item Too much work
+ \item unfinished
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Optimus black (p970)}
+ \begin{itemize}
+ \item Required a lot of work by Paul Kocialkowski\cite{freeing-a-phone-from-the-ground-up}
+ \item Bootloader: The code is now upstream in u-boot
+ \item Linux: Very minimal support upstream
+ \begin{itemize}
+ \item working: microSD, USB
+ \item lacking: No display driver, sound etc
+ \end{itemize}
+ \item Also unfinished
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Optimus black}
+ \begin{itemize}
+ \item Long work to add support in upstream u-boot
+ \item Very basic upstream Linux support (lacking a display driver etc)
+ \item See Paul's blog for more details\cite{freeing-a-phone-from-the-ground-up}
+ \end{itemize}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{Replicant phase 4: Back to supported devices}
+\end{frame}
+
+\begin{frame}
+ \center{Replicant 6 status}
+ \begin{itemize}
+ \item Android 6 outdated
+ \item Samsung devices still supported
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Samsung devices that are or can be supported by Replicant}
+ \begin{itemize}
+ \item Exynos or OMAP System on a chip
+ \item The modems in it have been customized by samsung use the same vendor-specific protocol
+ \item Very large number of unit sold:
+ \begin{itemize}
+ \item 70 million units for the Galaxy SIII
+ \item Easy to find second hand
+ \end{itemize}
+ \item Isolated modem for currently supported devices
+ \item Removable battery for smartphones and somewhat removable for tablets
+ \item Nonfree bootloader
+ \item WiFi doesn't work out of the box
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Android requirements}
+ \begin{itemize}
+ \item RAM $\leftarrow$ $\rightarrow$ Display
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Supported Tablets (Replicant 6.0)}
+ \begin{itemize}
+ \item All have internal batteries (still possible to remove them)
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Images of removable batteries}
+\end{frame}
+
+\begin{frame}[plain,allowframebreaks]{title}
+\begin{xtabular}{cccccc}
+ \hline
+ Device & Unit solds & Launch date & RAM & GPU driver\\
+ \hline
+ Galaxy S II (I1300) & 40 Millions & 2011 & 1GB & Lima \\
+ \hline
+ Galaxy S III (I9300) & 70 Millions & 2012 & 1GB & Lima \\
+ \hline
+ Galaxy Note (N7000) & 10 Millions & October 2011 & 1GB & Lima \\
+ \hline
+ Galaxy Note II (N7100) & 30 Millions & October 2012 & 2GB & Lima \\
+ \hline
+ Galaxy Nexus (I9250) & ? & October 2011 & 1GB & PowerVR \\
+ \hline
+\end{xtabular}
+\end{frame}
+
+\begin{frame}
+ \center{Supported Tablets (Replicant 6.0)}
+ \begin{itemize}
+ \item All have removable batteries
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[plain,allowframebreaks]{title}
+\begin{xtabular}{cccccc}
+ \hline
+ Device & Unit solds & Launch date & RAM & GPU driver\\
+ \hline
+ Galaxy Tab 2 7.0 (P3100) & ? & ? & ? & PowerVR \\
+ \hline
+ Galaxy Tab 2 7.0 WiFi (P3110) & ? & ? & ? & PowerVR \\
+ \hline
+ Galaxy Tab 2 10.1 (P5100) & ? & ? & ? & PowerVR \\
+ \hline
+ Galaxy Tab 2 10.1 WiFi (P5110) & ? & ? & ? & PowerVR \\
+ \hline
+ Galaxy Note 8.0 (N5100) & ? & ? & ? & ? \\
+ \hline
+ Galaxy Note 8.0 Wi-Fi (N5110) & ? & ? & ? & ? \\
+ \hline
+\end{xtabular}
+\end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}
+ \center{Replicant phase 5: Making Replicant substainable: second attempt}
+\end{frame}
+
+\begin{frame}
+ \center{Making Replicant substainable}
+ \begin{itemize}
+ \item Got some funding from Handshake and NlNet
+ \item $\rightarrow$ Spend the money on making Replicant substainable
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Not out yet:}
+ \begin{itemize}
+ \item Librem5 from Puri.sm
+ \item Pine Phone from Pine64
+ \item NC-1 from Necunos
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Other devices}
+ \begin{itemize}
+ \item GTA04: Not produced anymore
+ \item Neo900: Would have needed more funding to start the production
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Let's continue supporting the devices we already support}
+ \begin{itemize}
+ \item Galaxy SIII (I9300), Galaxy Note II(N7100)
+ \begin{itemize}
+ \item Good but uncomplete upstream support $\rightarrow$ Let's finish it
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Replicant 9}
+ \begin{itemize}
+ \item Work in progress
+ \item Using a kernel closely based on upstream (0 Android patches in it so far)
+ \item Modem drivers upstreaming not started yet
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Let's keep 2D acceleration working}
+ \begin{itemize}
+ \item Let's be caucious and future proof:
+ \begin{itemize}
+ \item No free drivers for PowerVR GPUs
+ \item Free drivers might go away as hardware change
+ \item $\rightarrow$ Lima doesn't support
+ \end{itemize}
+ \item It payed off:
+ \item Good enough speed with 2D acceleration
+ \item Mali 400 $\rightarrow$ Lima is not ready yet but accept bugreports
+ \item Lima and even Panfrost don't support vulkan yet
+ \item Vulkan will be required for new devices shipping with Android 10, unless the device has a low amount of memory
+ \item $\rightarrow$ Vulkan will be more and more required
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{TODO: Not vicious circle + image}
+ %% GNU/Linux ----benefits----> Replicant
+ %% Replicant ----benefits----> GNU/Linux
+\end{frame}
+
+\begin{frame}
+ \center{Effects of using Linux upstream}
+ \begin{itemize}
+ \item Require more time
+ \item $\rightarrow$ We cannot support devices with non-replacable batteries
+ \item Uses upstream kernel
+ \item $\rightarrow$ Not tied to hardware specific vendor libraries
+ \item $\rightarrow$ We can share the work with GNU/Linux
+ \item $\rightarrow$ We will be able to more easily add support for devices running GNU/Linux
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{We also want to use GNU/Linux userspace hardware support projects}
+ \begin{itemize}
+ \item Easier to add support for GNU/Linux devices in Replicant
+ \item Or to add support for Replicant supported devices in GNU/Linux
+ \item Share the maintenance with communities more interested in freedom
+ \item GNU/Linux tools and distributions can be used for testing too
+ \item People buying GNU/Linux smartphones could also run Android if GNU/Linux is not ready yet for them
+ \item People having Replicant compatibles smartphones could also run GNU/Linux on it if it's ready for them
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Fully GNU/Linux free distributions for ARM}
+ \begin{itemize}
+ \item Guix: armv7h, arm64
+ \item Parabola: armv7h, based on Archlinux
+ \item PureOS: arm64, based on Debian
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \center{Extra readings}
+ \begin{itemize}
+ \item OpenMoko History: \url{https://www.vanille.de/blog/openmoko-10-years-after-mickeys-story/}
+ \item Paul's blog for on freeing the Optimus black\cite{freeing-a-phone-from-the-ground-up}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ Licenses:
+ \begin{itemize}
+ \item The Qtmoko and SHR pictures are From are under the GNU Free Documentation License.
+ \begin{itemize}
+ \item QtMoko pictures: \url{http://wiki.openmoko.org/wiki/QtMoko}
+ \item SHR pictures: \url{http://wiki.openmoko.org/wiki/SHR_User_Manual}
+ \end{itemize}
+ \item HTC Dream: \url{https://commons.wikimedia.org/wiki/File:HTC_Dream_opened.jpg}
+ Creative Commons Attribution 3.0 Unported
+ \item \url{https://creativecommons.org/licenses/by-sa/4.0/} for the rest.
+ \end{itemize}
+\end{frame}
+
+\begin{thebibliography}{99}
+ \bibitem{freeing-a-phone-from-the-ground-up}
+ \url{https://code.paulk.fr/article20/a-hacker-s-journey-freeing-a-phone-from-the-ground-up-first-part}
+ \url{https://code.paulk.fr/article21/a-hacker-s-journey-freeing-a-phone-from-the-ground-up-second-part}
+ \url{https://code.paulk.fr/article22/a-hacker-s-journey-freeing-a-phone-from-the-ground-up-third-part}
+ \url{https://code.paulk.fr/article23/a-hacker-s-journey-freeing-a-phone-from-the-ground-up-fourth-part}
+\bibitem{last-android-6-update}
+ \url{https://en.wikipedia.org/wiki/Android Marshmallow}
+\bibitem{porting-to-android-9}
+ \url{https://redmine.replicant.us/projects/replicant/wiki/PortingToAndroid9}
+\end{thebibliography}
+\end{document}