2019-06-25 18:33:55 +08:00
.. _using_celadon_as_uos:
2019-09-25 06:10:15 +08:00
Using Celadon as the User OS
############################
2019-06-25 18:33:55 +08:00
`Celadon <https://01.org/projectceladon/> `_ is an open source Android* software reference stack
for Intel architecture. It builds upon a vanilla Android stack and incorporates open sourced components
that are optimized for the hardware. This tutorial describes how to run Celadon as the User OS
2019-09-25 06:10:15 +08:00
on the ACRN hypervisor. We are using the Kaby Lake-based NUC (model NUC7i7DNHE) in this tutorial.
2019-06-25 18:33:55 +08:00
Prerequisites
***** ***** ***
2019-09-25 06:10:15 +08:00
* Ubuntu 18.04 with at least 150G free disk space.
* Intel Kaby Lake NUC7ixDNHE (Reference Platforms: :ref: `ACRN supported platforms <hardware>` ).
2019-06-25 18:33:55 +08:00
* BIOS version 0059 or later firmware should be flashed on the NUC system,
2019-09-25 06:10:15 +08:00
and the `` Device Mode `` option is selected on the USB category of the Devices tab
2019-06-25 18:33:55 +08:00
in order to enable USB device function through the internal USB 3.0 port header.
2019-09-25 06:10:15 +08:00
* Two HDMI monitors.
2019-06-25 18:33:55 +08:00
* A USB dongle (e.g. `Dawson Canyon USB 3.0 female
to 10-pin header cable <https://www.gorite.com/dawson-canyon-usb-3-0-female-to-10-pin-header-cable>`_)
is optional if you plan to use the `` adb `` and `` fastboot `` tools in the Celadon User OS for debugging.
Refer to the `Technical Product Specification
<https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/nuc-kits/NUC7i5DN_TechProdSpec.pdf>`_
to identify the USB 3.0 port header on the main board.
Build Celadon from source
***** ***** ***** ***** *****
#. Follow the instructions in the `Build Celadon from source
2020-03-17 14:47:50 +08:00
<https://01.org/projectceladon/documentation/getting-started/build-source>`_ guide
2019-06-25 18:33:55 +08:00
to set up the Celadon project source code.
2019-09-25 06:10:15 +08:00
.. note :: The master branch is based on the Google Android 10 pre-Production Early Release.
Use the following command to specify a stable Celadon branch based on the Google Android 9 source code in order to apply those patches in the :ref: `ACRN patch list` ::
2019-09-18 18:50:17 +08:00
$ repo init -u https://github.com/projectceladon/manifest.git -b celadon/p/mr0/master -m stable-build/ww201925_H.xml
2019-06-25 18:33:55 +08:00
#. Select Celadon build target::
$ cd <Celadon project directory>
$ source build/envsetup.sh
$ lunch cel_apl-userdebug
.. note :: You can run `` lunch `` with no arguments to manually choose your Celadon build variants.
2019-09-25 06:10:15 +08:00
#. Download these additional patches and apply each one individually with the following command::
2019-06-25 18:33:55 +08:00
$ git apply <patch-filename>
.. table :: ACRN patch list
:widths: auto
:name: ACRN patch list
+--------------------------------------------------------------------+-------------------------------------------+
| Patch link | Description |
+====================================================================+===========================================+
| https://github.com/projectceladon/device-androidia/pull/458 | kernel config: Add the support of ACRN |
+--------------------------------------------------------------------+-------------------------------------------+
| https://github.com/projectceladon/device-androidia-mixins/pull/293 | graphic/mesa: Add the support of ACRN |
+--------------------------------------------------------------------+-------------------------------------------+
| https://github.com/projectceladon/device-androidia/pull/441 | cel_apl: use ttyS0 instead of ttyUSB0 |
+--------------------------------------------------------------------+-------------------------------------------+
| https://github.com/projectceladon/device-androidia/pull/439 | Disable trusty and pstore |
+--------------------------------------------------------------------+-------------------------------------------+
.. note :: If the `` git apply `` command shows an error, you may need to modify
the source code manually instead.
#. Build Celadon image::
$ device/intel/mixins/mixin-update
$ make SPARSE_IMG=true gptimage -j $(nproc)
.. note :: Replace the `` $(nproc) `` argument with the number of processor threads on your workstation
in order to build the source code with parallel tasks. The Celadon gptimage will be
generated to `` out/target/product/cel_apl/cel_apl_gptimage.img ``
2019-09-25 06:10:15 +08:00
Steps for Using Celadon as the User OS
***** ***** ***** ***** ***** ***** ***** ***
2019-06-25 18:33:55 +08:00
2019-10-28 14:23:23 +08:00
#. Follow :ref: `kbl-nuc-sdc` to boot the ACRN Service OS based on Clear Linux 29880.
2019-06-25 18:33:55 +08:00
#. Prepare dependencies on your NUC::
# mkdir ~/celadon && cd ~/celadon
# cp /usr/share/acrn/samples/nuc/launch_win.sh ./launch_android.sh
# sed -i "s/win10-ltsc/android/" launch_android.sh
# scp <cel_apl_gptimage.img from your host> ./android.img
# sh launch_android.sh
2019-07-11 09:34:21 +08:00
#. You will see the shell console from the terminal and the Celadon GUI on the secondary monitor
2019-09-25 06:10:15 +08:00
after the system boots. You can check the build info using the `` getprop `` command in the shell console:
2019-06-25 18:33:55 +08:00
.. code-block :: bash
console:/ $
console:/ $ getprop | grep finger
[ro.bootimage.build.fingerprint]: [cel_apl/cel_apl/cel_apl:9/PPR2.181005.003.A1/rui06241613:userdebug/test-keys]
[ro.build.fingerprint]: [cel_apl/cel_apl/cel_apl:9/PPR2.181005.003.A1/rui06241613:userdebug/test-keys]
[ro.vendor.build.fingerprint]: [cel_apl/cel_apl/cel_apl:9/PPR2.181005.003.A1/rui06241613:userdebug/test-keys]
2019-07-11 09:34:21 +08:00
.. figure :: images/Celadon_home.png
:width: 700px
:align: center
.. figure :: images/Celadon_apps.png
:width: 700px
:align: center