Install and boot a Linux distribution on Armv-A Base AEM FVP Platforms

Linux distribution boot

The Armv-A Base AEM FVP platform software stack supports the installation and boot of various Linux distributions such as Debian, Ubuntu, and Fedora. The distribution is installed on a SATA disk and since the installed image is persistent it can be used for multiple boots.

Download the platform software

To obtain the required sources for the platform, follow the steps listed on the user guide page. Ensure that the platform software is downloaded before proceeding with the steps listed below. Also, note the host machine requirements listed on that page which is essential to build and execute the platform software stack.

Skip this section if the required sources have been downloaded.

Build the platform software

This section describes the procedure to build the platform firmware required to install and boot a Linux distribution on Armv-A Base AEM FVP platforms.

To build the Armv-A Base AEM FVP software stack, the command to be used is

./build-scripts/build-test-uefi.sh -p <platform name> <command>

Supported command line options are listed below

  • <platform name>

    • aemfvp-a

  • <command>

    • clean

    • build

    • package

    • all (all of the three above)

Examples of the build command are

  • Command to clean, build and package the Armv8-A Base AEM FVP software stack required for the distribution installation/boot on the platform:

    ./build-scripts/build-test-uefi.sh -p aemfvp-a all
    
  • Command to remove the generated outputs (binaries) of the software stack for the Armv8-A Base FVP platform:

    ./build-scripts/build-test-uefi.sh -p aemfvp-a clean
    
  • Command to perform an incremental build of the software components included in the software stack for the Armv8-A Base platform:

    Note: this command should be followed by the package command to complete the preparation of the fip image.

    ./build-scripts/build-test-uefi.sh -p aemfvp-a build
    
  • Command to package the previously built software stack and prepares the fip image:

    ./build-scripts/build-test-uefi.sh -p aemfvp-a package
    

Installing a Linux distribution

After the platform firmware build for the distribution install/boot is complete, a distribution can be installed into a SATA disk image. Before beginning the installation process, download the CD iso image of the required distribution version.

The distribution installation images can be downloaded from the following locations (select an image built for aarch64 architecture):

Refer to the user guide section Obtaining the Arm-A Base AEM FVP for information on downloading the Arm-A Base AEM FVP model.

The commands used to begin the distribution installation are:

  • Set MODEL path before launching the model:

    export MODEL=<absolute path to the platform FVP binary>
    
  • Launch the installation:

    ./model-scripts/aemfvp-a/distro.sh -p <platform name> -i <abs_iso_image_path> -s <disk size> -n [true|false]
    

Supported command line options are listed below

  • -p <platform name>

    • aemfvp-a

  • -i <abs_iso_image_path>

    • Absolute path to the downloaded distribution installer disk image.

  • -s <disk_size>

    • Size of the SATA disk image (in GB) to be created. 12GB and above is good enough for most use cases.

  • -n [true|false] (optional)

    • Enable or disable network controller support on the platform. If network ports have to be enabled, use ‘true’ as the option. Default value is set to ‘false’.

An example of a command to install the Fedora distribution is listed below.

./model-scripts/aemfvp-a/distro.sh -p aemfvp-a -i /absolute/path/to/Fedora-Server-dvd-aarch64-34-1.2.iso -s 16
  • This command creates a 16GB SATA disk image, boots the Armv8-A Base software stack and starts the installation of Fedora distribution.

  • From here on, follow the instructions of the chosen distribution installer. For more information about the installation procedure, refer online installation manuals of the chosen distribution.

  • After the installation is completed, the disk image with a random name “<number>.satadisk” will be created in satadisk/ folder. Use this disk image for booting the installed distribution.

Additional distribution specific instructions (if any)

  • Debian Distribution installation:

    • During installation, the installer will prompt the user with the message ‘Load CD-ROM drivers from removable media’ and display two options - Yes/No. Select the option ‘No’. This is followed by another prompt ‘Manually select a CD-ROM module and device?’ and displays two options - Yes/No. Select the option ‘Yes’. This brings up the module list required for accessing CD-ROM and lists two options - ‘none’ and ‘cdrom’. Select the option ‘none’ and enter /dev/vda. The installation media on the virtio disk will be detected and installation continues.

Booting a Linux distribution

Refer to the user guide section Obtaining the Arm-A Base AEM FVP for information on downloading the Arm-A Base AEM FVP model.

To boot the installed distribution, use the following commands:

  • Set MODEL path before launching the model:

    export MODEL=<absolute path to the platform FVP binary>
    
  • Start the distribution boot:

    ./model-scripts/aemfvp-a/distro.sh -p <platform name> -d <satadisk_path> -n [true|false]
    

Supported command line options are listed below

  • -p <platform name>

    • aemfvp-a

  • -d <satadisk_path>

    • Absolute path to the installed distribution disk image created using the instructions listed in the previous section.

  • -n [true|false] (optional)

    • Enable or disable network controller support on the platform. If network ports have to be enabled, use ‘true’ as the option. Default value is set to ‘false’.

Example commands to boot a Linux distribution are listed below.

  • Command to look for the available .satadisk image in the satadisk/ folder and boots with that image. If multiple .satadisk images are found, it will list them all but won’t boot:

    ./model-scripts/aemfvp-a/distro.sh -p aemfvp-a
    
  • Command to begin the distribution boot from the fedora.satadisk image:

    ./model-scripts/aemfvp-a/distro.sh -p aemfvp-a -d /absolute/path/to/fedora.satadisk
    

When the script is executed, four terminal instances will be launched. The usage of each terminal can be seen below,

  • Terminal-0 is the debug console for the AP (Application Processor) and contains the booting logs of Trusted firmware-A, Linux, and user-space applications.

  • Terminal-1 is the debug console for the AP (Application Processor) and contains the UEFI boot logs.

  • Terminal-2 is the debug console that displays the localhost information.

  • The fourth Terminal uses the GUI representation of the model, which contains information about the overall executed instructions of the CPUs and the status of each CPU in the clusters.

The AP will start booting Trusted Firmware-A, followed by UEFI, Linux, and then Distribution.

To run terminal-only mode on hosts without graphics/display:

env -u DISPLAY ./model-scripts/aemfvp-a/distro.sh -p <platform name> -d <satadisk_path>

This launches FVP in the background and automatically connects to the interactive application console via telnet.

To stop the model, exit telnet:

Ctrl + ]
telnet> close

Note: The boot logs can be found at <aemfvp-a_workspace>/aemfvp-a path after booting distribution. The following logs are generated in this path.

  • uart0.log: Terminal-0 debug console logs are stored in the uart0.log file. It is a symbolic link for uart0 log file with the latest timestamp.

  • uart1.log: Terminal-1 debug console logs are stored in the uart1.log file. It is a symbolic link for uart1 log file with the latest timestamp.


Copyright (c) 2021, Arm Limited. All rights reserved.