Add spec for enablement on ARM platform

Story: 2010739
Task: 48551

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Ibedd7a66b01e5f13a56589a7ac1529b1b347c5eb
This commit is contained in:
Jackie Huang 2023-08-04 17:56:46 +08:00
parent 7b2f5169a7
commit f9a3335523
1 changed files with 299 additions and 0 deletions

View File

@ -0,0 +1,299 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License. http://creativecommons.org/licenses/by/3.0/legalcode
=====================================
StarlingX: Enablement On ARM Platform
=====================================
Storyboard: `#2010739`_
The objective of this spec is to port and enable StarlingX to support ARM
architecture platform.
Problem description
===================
The ARM platform have been widely used more and more, cloud providers and
independent vendors now can provide various ARM platforms, e.g., AWS, Google
and Ampere. ARM platform was widely used in edge/cloud servers, IoT and
embedded systems. For Now StarlingX only works on x86 platform, it can't
work on ARM platform without porting work. So there are requirements to port
StarlingX on ARM platform to enable it works as that of x86.
Use Cases
---------
After the enablement on ARM platform, the user will be able to install and
deploy StarlingX on validated ARM architecture servers, Telecommunication
operators have more choices in hardware servers.
Proposed change
===============
Current StarlingX only support x86 platform, so it assumes x86 is the only cpu
architecture in many places, including build system(Debian based), pre-built
packages, container images, package meta data, bootstrap scripts, etc.
The proposed change here is to extend the support to ARM, specifically ARM64
architecture. So the Debian build system can also run on native ARM64
architecture platform, and build packages and ISO image for ARM64 architecture,
then with the ISO installation, StarlingX can be deploy with all
configurations on supported ARM64 servers (Initially, Ampere Altra Processor
based server will be validated and supported).
Alternatives
------------
Cross-compile for ARM on x86 platform.
Data model impact
-----------------
None
REST API impact
---------------
None
Security impact
---------------
Secure boot support maybe different on ARM platform.
Other end user impact
---------------------
None
Performance Impact
------------------
None
Other deployer impact
---------------------
None
Developer impact
----------------
Developers need to avoid hardcoded arch names like 'x86-64' or 'amd64' in
source codes and consider if there are any different patches or behavior
for ARM architecture.
Upgrade impact
--------------
None
Implementation
==============
Assignee(s)
-----------
Primary assignee:
* Jackie Huang (jackie-huang)
Other contributors:
* Trevor Tao (trevortao)
Repos Impacted
--------------
* starlingx/ansible-playbooks
* starlingx/config
* starlingx/containers
* starlingx/fault
* starlingx/ha
* starlingx/integ
* starlingx/kernel
* starlingx/metal
* starlingx/nginx-ingress-controller-armada-app
* starlingx/stx-puppet
* starlingx/tools
* starlingx/utilities
* starlingx/virt
* starlintx/root
Work Items
----------
StarlingX Debian Build Environment: Setup on Native ARM64 Server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Arm company provides the HPE ProLiant RL300 Gen11 servers with Amper
Altra Processor.
* Extend LAT-SDK to support ARM64.
* Build LAT-SDK from wrlinux with BSP qemuarm64 on ARM64 server.
* Configure the build environment on ARM64 server.
* Rebuild all the container images on ARM64 server, for stx-lat-tool,
change the dockerfile to use the LAT-SDK built from qemuarm64.
StarlingX Debian Build System: Extend to support ARM64 architecture
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Build-tools
"""""""""""
The packages lists and image yaml files may differ for different arch, the
build-tools should support arch specific lists and files, which will be named
with suffix like _arm64, then the build-tools will check the host arch, and
the files named with arch suffix will be used instead of the non-arch-specific
files.
So the supported package lists and files will include:
* base-bullseye.lst
* base-bullseye.yaml
* base-bullseye_arm64.lst
* base-bullseye_arm64.yaml
* base-initramfs-bullseye.yaml
* base-initramfs-bullseye_arm64.yaml
* debian-image.inc
* debian-image_arm64.inc
* debian_iso_image.inc
* debian_iso_image_arm64.inc
* debian_pkg_dirs
* debian_pkg_dirs_arm64
* debian_pkg_dirs_installer
* debian_pkg_dirs_installer_arm64
* debian_pkg_dirs_rt
* debian_pkg_dirs_rt_arm64
* os-std.lst
* os-std_arm64.lst
Package meta data
"""""""""""""""""
The items in dl_path/dl_files in meta_data.yaml may have different values and
the patches in the patches or deb_patches directory may be different for arm64
arch, the extend change will allow multiple dl_path/dl_files items exist in
meta_data.yaml, and multiple series files in patches or deb_patches
directories exist, and the ones with arch suffix will be used instead of the
non-arch-specific ones.
As an example, the supported meta data will look like:
e.g. in meta_data.yaml
.. code-block:: yaml
dl_files:
pkg-file-amd64.tar.gz:
topdir: pkg-amd64
url: https://path/to/pkg-file-amd64.tar.gz
sha256sum: <sha256sum value>
dl_files_arm64:
pkg-file-arm64.tar.gz:
topdir: pkg-arm64
url: https://path/to/pkg-file-arm64.tar.gz
sha256sum: <sha256sum value>
dl_path:
name: pkg-name-amd64.tar.gz
url: https://path/to/pkg-name-amd64.tar.gz
sha256sum: <sha256sum value>
dl_path_arm64:
name: pkg-name-arm64.tar.gz
url: https://path/to/pkg-name-arm64.tar.gz
sha256sum: <sha256sum value>
e.g. for patches/deb_patches
.. code-block:: shell
deb_patches
├── 0001-deb-patch1.patch
├── 0002-deb-patch2.patch
├── 0003-arm64-deb-patch1.patch
├── series
└── series_arm64
patches
├── 0001-patch1.patch
├── 0002-patch2.patch
├── 0002-arm64-patch1.patch
├── series
└── series_arm64
Package deb files
"""""""""""""""""
* control: extend some of the packages to support ARM64 architecture.
* rules: use arch variable to replace hardcoded arch names.
Container images
^^^^^^^^^^^^^^^^
* Some container images don't have arm64 on the original registry, need to
use ones on different registry url or rebuild them for ARM64 and push to
different registry.
* In ansible playbook, a new task will be added to check the arch and reset
the images url.
Dependencies
============
* Arm company provides the HPE ProLiant RL300 Gen11 servers with Amper
Altra Processor.
* Extend LAT-SDK to support ARM64.
* Build LAT-SDK in wrlinux with BSP qemuarm64 on ARM64 server.
Testing
=======
Buid
----
* Build packages and image on x86 platform to ensure there is no impact after
the changes for ARM64.
* Build packages and image on ARM64 platform.
System configuration
--------------------
The system configurations that we are assuming for testing are:
* AIO-SX on x86-64 platform
* AIO-SX on ARM64 platform
* AIO-SX(LL) on ARM64 platform
* AIO-DX on ARM64 platforms
* AIO-DX(LL) on ARM64 platforms
* std (2+2) on ARM64 platform
* std (2+2) on ARM64 platform
* DC (AIO-DX for Central + 2 sub-cloud with AIO-SX)
* DC (AIO-DX-LL for Central + 2 sub-cloud with AIO-SX-LL)
Documentation Impact
====================
The documentation will need to be changed to add notes about ARM support,
validated ARM servers, difference between x86 and ARM platform, known
issues, limitations and etc.
References
==========
* `Starlingx-discuss ARM engagement`_
* `Starlingx-discuss CI/CD setup on Arm platform`_
History
=======
.. list-table:: Revisions
:header-rows: 1
* - Release Name
- Description
* - stx-9.0
- Introduced
.. Links
.. _#2010739: https://storyboard.openstack.org/#!/story/2010739
.. _Starlingx-discuss ARM engagement: https://lists.starlingx.io/pipermail/starlingx-discuss/2023-May/014160.html
.. _Starlingx-discuss CI/CD setup on Arm platform: https://lists.starlingx.io/pipermail/starlingx-discuss/2023-July/014354.html