Guest User

Untitled

a guest
Feb 12th, 2021
51
306 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/index.rst b/index.rst
  2. index d794e3b..449810d 100644
  3. --- a/index.rst
  4. +++ b/index.rst
  5. @@ -31,6 +31,7 @@ to devices running Androidâ„¢ OS.
  6.     getting-in
  7.     flashing
  8.     manual-install
  9. +   ota-updates
  10.     modifications
  11.     subsystems
  12.     middleware
  13. diff --git a/mic.rst b/mic.rst
  14. index 0ae62f5..29e2263 100644
  15. --- a/mic.rst
  16. +++ b/mic.rst
  17. @@ -68,8 +68,8 @@ You need to choose a `Sailfish OS version`_ you want to build.
  18.     patterns to break as new HA packages get introduced etc.
  19.  
  20.     Ensure you pick the same release as your target was in    :doc:`scratchbox2`.
  21. -   E.g., if target's ``ssu lr`` versions begin with ``3.3.0.``, build Sailfish OS update
  22. -   3.3.0.16 (check for the latest, non "Early Access" `Sailfish OS version`_)
  23. +   E.g., if target's ``ssu lr`` versions begin with ``4.0.1.``, build Sailfish OS update
  24. +   4.0.1.48 (check for the latest, non "Early Access" `Sailfish OS version`_)
  25.  
  26.  Build a rootfs using RPM repositories and a kickstart file (NB: all errors are
  27.  non-critical as long as you end up with a generated .zip image):
  28. @@ -82,7 +82,7 @@ non-critical as long as you end up with a generated .zip image):
  29.  
  30.    # Set the version of your choosing, latest is strongly preferred
  31.    # (check with "Sailfish OS version" link above)
  32. -  export RELEASE=3.3.0.16
  33. +  export RELEASE=4.0.1.48
  34.    # EXTRA_NAME adds your custom tag. It doesn't support '.' dots in it!
  35.    export EXTRA_NAME=-my1
  36.    rpm/dhd/helpers/build_packages.sh --mic
  37. diff --git a/naming.rst b/naming.rst
  38. index 88ad384..0b13867 100644
  39. --- a/naming.rst
  40. +++ b/naming.rst
  41. @@ -11,7 +11,7 @@ with the device codename (e.g. ``mako`` for Nexus 4), and the asterisk
  42.  List of naming rules
  43.  --------------------
  44.  
  45. -Packages that are arch-specific (e.g. ``armv7hl``), device-specific and
  46. +Packages that are arch-specific (e.g. ``aarch64``), device-specific and
  47.  contain ``$DEVICE`` in their name:
  48.  
  49.  * The arch-specific HAL RPMs (built from ``droid-hal-device``) should be named
  50. @@ -38,7 +38,7 @@ Package that are arch-independent (``noarch``), device-specific and contain
  51.  * The SensorFW libhybris plugin configuration should be named
  52.    **hybris-libsensorfw-qt5-configs** (``hybris-libsensorfw-qt5-configs``)
  53.  
  54. -Packages that are arch-specific (e.g. ``armv7hl``), device-specific,
  55. +Packages that are arch-specific (e.g. ``aarch64``), device-specific,
  56.  but do not contain ``$DEVICE``:
  57.  
  58.  * RPMs built from libhybris should be named
  59. diff --git a/ota-updates.rst b/ota-updates.rst
  60. new file mode 100644
  61. index 0000000..422e4c8
  62. --- /dev/null
  63. +++ b/ota-updates.rst
  64. @@ -0,0 +1,180 @@
  65. +OTA (Over-the-Air) Updates
  66. +==========================
  67. +
  68. +You can setup to upgrade a Sailfish OS device over the air, a.k.a. OTA update.
  69. +
  70. +Prepare the infrastructure
  71. +--------------------------
  72. +
  73. +* Ensure your Sailfish OS version is at least 3.2.1 (3.4.0 for ``aarch64``)
  74. +* Create file ``20-mydomain.ini`` (rename "mydomain" as you see fit) under
  75. +  ``$ANDROID_ROOT/hybris/droid-configs/sparse/usr/share/ssu/repos.d/`` with the
  76. +  following content:
  77. +
  78. +.. code-block:: ini
  79. +
  80. +  [release]
  81. +  adaptation=https://mydomain.net/%(release)/%(vendor)-%(adaptation)/%(arch)/
  82. +
  83. +* Substitute ``https://mydomain.net/`` with your Web server address (including
  84. +  subpath if exists)
  85. +* The ``%(release)/%(vendor)-%(adaptation)/%(arch)/`` format is advised, because
  86. +  it's the most future-proof. E.g. for the Nexus 5 this string would resolve to
  87. +  ``4.0.1.48/lge-hammerhead/aarch64/``
  88. +* Commit the above change to droid-configs (including updating the submodule,
  89. +  which introduces timestamped versioning, so updates get picked up)
  90. +* Make new image and ensure devices are flashed which will be receiving future
  91. +  updates
  92. +* Make some changes to your adaptation (e.g. fix some HW issue) and rebuild the
  93. +  affected part via ``build_packages.sh``, so that version numbers increase
  94. +
  95. +.. _test_repo:
  96. +
  97. +Test for any breakages
  98. +----------------------
  99. +
  100. +Before deploying any updates to production, they must be tested first.
  101. +
  102. +Prerequisites:
  103. +
  104. +* Web server (e.g. Apache) running on HOST and accessible within network
  105. +* Directory listing doesn't need to be enabled
  106. +* Assuming Web server's rootdir is ``/srv/http``
  107. +
  108. +Perform the following:
  109. +
  110. +.. code-block:: bash
  111. +
  112. +  HOST $
  113. +
  114. +  . ~/.hadk.env
  115. +  rm -rf /srv/http/sailfish-tmp-test-repo
  116. +  cp -ar $ANDROID_ROOT/droid-local-repo/$DEVICE /srv/http/sailfish-tmp-test-repo
  117. +
  118. +SSH into your device and execute (substituting ``https://mydomain.net`` with
  119. +the address to your Web server):
  120. +
  121. +.. code-block:: bash
  122. +
  123. +  DEVICE $
  124. +
  125. +  ssu ar sfos-test https://mydomain.net/sailfish-tmp-test-repo
  126. +  devel-su -p pkcon install zypper
  127. +  devel-su zypper refresh sfos-test
  128. +  devel-su zypper dup --from sfos-test
  129. +
  130. +Check that all the packages you touched are to be updated or removed as
  131. +expected. Afterwards you can press "Yes" to execute the update and check if
  132. +the device functions as desired, also after reboot.
  133. +
  134. +Once happy, clean up the testing environment:
  135. +
  136. +.. code-block:: bash
  137. +
  138. +  DEVICE $
  139. +
  140. +  ssu rr sfos-test
  141. +
  142. +
  143. +  HOST $
  144. +
  145. +  rm -rf /srv/http/sailfish-tmp-test-repo
  146. +
  147. +.. _deploy_repo:
  148. +
  149. +Release into production for all users
  150. +-------------------------------------
  151. +
  152. +Once successfully tested, deploy the stable packages to the release repo:
  153. +
  154. +.. code-block:: bash
  155. +
  156. +  HOST $
  157. +
  158. +  . ~/.hadk.env
  159. +  rm -rf /srv/http/$RELEASE/$VENDOR-$DEVICE/$PORT_ARCH
  160. +  mkdir -p /srv/http/$RELEASE/$VENDOR-$DEVICE
  161. +  cp -ar $ANDROID_ROOT/droid-local-repo/$DEVICE \
  162. +         /srv/http/$RELEASE/$VENDOR-$DEVICE/$PORT_ARCH
  163. +
  164. +To receive the update, each device will have to execute ``devel-su -p
  165. +version --dup``, and reboot when instructed.
  166. +
  167. +Adding custom RPM packages
  168. +--------------------------
  169. +
  170. +You can add any other RPM binary packages to the local build repository (i.e.
  171. +packages that were not created by running ``build_packages.sh``). For example:
  172. +
  173. +.. code-block:: bash
  174. +
  175. +  PLATFORM_SDK $
  176. +
  177. +  cd $ANDROID_ROOT
  178. +  mkdir -p droid-local-repo/$DEVICE/extras
  179. +  cp -a path/to/custom-built.rpm droid-local-repo/$DEVICE/extras
  180. +  createrepo_c droid-local-repo/$DEVICE
  181. +
  182. +The ``createrepo_c`` step is essential, so it rescans and regenerates the
  183. +metadata under ``droid-local-repo/$DEVICE/repodata/``.
  184. +
  185. +To make the devices of your users pull this RPM package in, ensure some other
  186. +package or pattern requires it, then :ref:`test<test_repo>` and
  187. +:ref:`deploy<deploy_repo>` your repo as per instructions above.
  188. +
  189. +Updating to the next Sailfish OS release
  190. +----------------------------------------
  191. +
  192. +If another official Sailfish OS update has been released since you last
  193. +published your HW adaptation update, perform the following:
  194. +
  195. +Update your SDK Target (see how in the last paragraph of :ref:`enter-sfos-sdk`).
  196. +
  197. +Alternatively, you can remove it and create a new one as per :doc:`scratchbox2`.
  198. +
  199. +Remove or backup your local build repository:
  200. +
  201. +.. code-block:: bash
  202. +
  203. +  PLATFORM_SDK $
  204. +
  205. +  cd $ANDROID_ROOT
  206. +
  207. +  PREV_RELEASE=3.4.0.24    # adjust to the previous release version you were on
  208. +
  209. +  mv droid-local-repo/$DEVICE droid-local-repo/$DEVICE-$PREV_RELEASE
  210. +  mkdir droid-local-repo/$DEVICE
  211. +
  212. +Then rebuild all packages and a new image by executing ``build_packages.sh``.
  213. +
  214. +Afterwards :ref:`test<test_repo>` the rebuilt repo. The actual testing sequence
  215. +on the device will be different:
  216. +
  217. +.. code-block:: bash
  218. +
  219. +  DEVICE $
  220. +
  221. +  ssu ar sfos-test https://mydomain.net/sailfish-tmp-test-repo
  222. +  ssu dr adaptation0
  223. +  ssu re 4.0.1.48    # adjust to the actual version
  224. +  devel-su -p version --dup
  225. +  ssu rr sfos-test
  226. +  ssu er adaptation0
  227. +
  228. +Then reboot as and test device functionality.
  229. +
  230. +Once satisfactory, :ref:`publish<deploy_repo>` your repo for all users.
  231. +
  232. +Finally, to receive the update, each device will have to execute:
  233. +
  234. +.. code-block:: bash
  235. +
  236. +  DEVICE $
  237. +
  238. +  ssu re 4.0.1.48    # adjust to the actual version
  239. +  devel-su -p version --dup
  240. +
  241. +NOTE: The %(release) in your self-hosted repo (visible via ``ssu lr``) will get
  242. +updated automatically after ``ssu re``.
  243. +
  244. +After ``devel-su -p version --dup`` has finished, reboot as instructed.
  245. diff --git a/prerequisites.rst b/prerequisites.rst
  246. index 0c9398a..e4247c3 100644
  247. --- a/prerequisites.rst
  248. +++ b/prerequisites.rst
  249. @@ -5,14 +5,15 @@ Prerequisites
  250.  .. _Xperia X (Sony AOSP 6): https://sailfishos.org/wiki/Sailfish_X_Build_and_Flash
  251.  .. _Xperia XA2 (Sony AOSP 8): https://sailfishos.org/wiki/DRAFT-Sailfish_X_Xperia_XA2_Build_and_Flash
  252.  .. _Xperia 10 (Sony AOSP 9): https://sailfishos.org/wiki/Sailfish_X_Xperia_Android_9_Build_and_Flash
  253. +.. _Xperia 10 II (Sony AOSP 10): https://sailfishos.org/wiki/Sailfish_X_Xperia_Android_10_Build_and_Flash
  254.  
  255.  Mobile Device
  256.  -------------
  257.  
  258. -* An Android device officially supported by LineageOS 15.1 (Android 8) and 16.0
  259. -  (Android 9) at the time of writing 2019-09-30. CyanogenMod versions (that are Sailfish
  260. -  OS-compatible) 10.1.x, 11.0, 12.1, 13.0, 14.1 will require additional
  261. -  effort because CM has become obsolete.
  262. +* An Android device officially supported by LineageOS 15.1 (Android 8), 16.0
  263. +  (Android 9) and 17.1 (Android 10) at the time of writing 2021-02-12.
  264. +  CyanogenMod versions (that are Sailfish OS-compatible) 10.1.x, 11.0, 12.1,
  265. +  13.0, 14.1 will require additional effort because CM has become obsolete.
  266.    For more supported Android versions also check `this link`_
  267.  
  268.   - Throughout this guide we shall use the term **Android base**, which will
  269. @@ -27,9 +28,14 @@ Mobile Device
  270.  
  271.    * `Xperia 10 (Sony AOSP 9)`_
  272.  
  273. - * Starting with CM 13.0 (Android 6), support for 64bit ARM has being added
  274. -   to Sailfish OS: achieved by running a mix of 64bit Linux Kernel and Android
  275. -   HAL, whilst Sailfish OS userspace is being run in the 32bit mode
  276. +  * `Xperia 10 II (Sony AOSP 10)`_
  277. +
  278. + * Starting with Sailfish OS 3.4.0, support for 64bit ARM SFOS userspace has been added
  279. +
  280. + * Sailfish OS adaptations starting with CM 13.0 (Android 6) were constructed
  281. +   by running a mix of 64bit Linux Kernel and Android HAL, whilst Sailfish OS userspace
  282. +   was being run in the 32bit mode. Such mixed mode is still supported, but we
  283. +   encourage porters to switch to full 64bit ports (using Xperia 10 II as reference)
  284.  
  285.   * See https://wiki.lineageos.org/devices for a list of compatible devices
  286.  
  287. @@ -57,9 +63,9 @@ Build Machine
  288.  * Sailfish OS Platform SDK Target (explained later)
  289.  
  290.  * At least 30 GiB of free disk space (20 GiB source download + more for
  291. -  building) for a complete Android build; a minimal download and HADK build
  292. +  building) for a complete Android 6 build; a minimal download and HADK build
  293.    (only hardware adaptation-related components) requires slightly less space.
  294. -  The newer the Android base version, the bigger the size requirements.
  295. +  Newer Android base versions yield increasingly bigger size requirements.
  296.  
  297.  * At least 4 GiB of RAM (the more the better)
  298.  
  299. diff --git a/rpm/sailfish-hadk-doc.spec b/rpm/sailfish-hadk-doc.spec
  300. index e6940ba..7ab22e6 100644
  301. --- a/rpm/sailfish-hadk-doc.spec
  302. +++ b/rpm/sailfish-hadk-doc.spec
  303. @@ -10,7 +10,7 @@ BuildArch: noarch
  304.  URL: http://sailfishos.org/
  305.  License: TBD
  306.  Group: Documentation
  307. -BuildRequires: python-sphinx
  308. +BuildRequires: python3-sphinx
  309.  
  310.  %description
  311.  Documentation for building and porting Sailfish OS to new devices.
  312. diff --git a/scratchbox2.rst b/scratchbox2.rst
  313. index 773e8b9..c3db603 100644
  314. --- a/scratchbox2.rst
  315. +++ b/scratchbox2.rst
  316. @@ -6,15 +6,19 @@ hardware adaptation packages in the next section. Download and create your
  317.  Scratchbox2 target following this wiki:
  318.  
  319.  .. important::
  320. -    Please use the 3.0.0 target or newer (same requirement as for the Platform SDK Chroot earlier)
  321. +    Please use the 4.0.1 target or newer (same requirement as for the
  322. +    Platform SDK Chroot earlier)
  323.  
  324.  .. warning::
  325.      To ensure consistency with HADK build scripts, name your tooling
  326. -    ``SailfishOS-3.0.0`` (or whichever release you are building for) instead of
  327. +    ``SailfishOS-4.0.1`` (or whichever release you are building for) instead of
  328.      wiki's suggested ``SailfishOS-latest``, and your target as
  329. -    ``$VENDOR-$DEVICE-$PORT_ARCH`` (instead of ``SailfishOS-latest-armv7hl``).
  330. +    ``$VENDOR-$DEVICE-$PORT_ARCH`` (instead of ``SailfishOS-latest-aarch64``).
  331.      Ignore the i486 target.
  332.  
  333. +Choose ``aarch64`` target, unless you are building for the ``armv7hl``
  334. +Sailfish OS userspace.
  335. +
  336.  https://sailfishos.org/wiki/Platform_SDK_Target_Installation
  337.  
  338.  To verify the correct installation of the Scratchbox2 target, cross-compile
  339. diff --git a/setupsdk.rst b/setupsdk.rst
  340. index 472ef08..e1d00c9 100644
  341. --- a/setupsdk.rst
  342. +++ b/setupsdk.rst
  343. @@ -24,8 +24,8 @@ device and setup:
  344.    export ANDROID_ROOT="$HOME/hadk"
  345.    export VENDOR="lge"
  346.    export DEVICE="hammerhead"
  347. -  # Set arch to armv7hl even if you are porting a 64bit device
  348. -  export PORT_ARCH="armv7hl"
  349. +  # "armv7hl" is still supported, but we encourage to have full 64bit ports
  350. +  export PORT_ARCH="aarch64"
  351.    EOF
  352.  
  353.    cat <<'EOF' >> $HOME/.mersdkubu.profile
  354. @@ -76,7 +76,7 @@ You'll need some tools which are not installed into the Platform SDK by default:
  355.    PLATFORM_SDK $
  356.  
  357.    sudo zypper ref
  358. -  sudo zypper in android-tools-hadk tar
  359. +  sudo zypper in android-tools-hadk tar kmod
  360.  
  361.  We strongly encourage all porters to use at least 3.0.0.8 Platform SDK. Use
  362.  ``sdk-manage`` command to upgrade your toolings and targets, or create from new
  363. diff --git a/subsystems.rst b/subsystems.rst
  364. index a93e542..bcfac29 100644
  365. --- a/subsystems.rst
  366. +++ b/subsystems.rst
  367. @@ -113,7 +113,7 @@ Camera
  368.  ******
  369.  
  370.  Launch the Camera app. If if shows black screen and becomes non-responsive,
  371. -enable the `audiosystem-passthrough-dummy-af` package in the patterns and
  372. +enable the ``audiosystem-passthrough-dummy-af`` package in the patterns and
  373.  rebuild droid-configs.
  374.  
  375.  When the app is working, it will initially be at its default (low) resolution
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

Ă—