• Home
Name Date Size #Lines LOC

..--

sepolicy/03-May-2024-3222

BoardConfig.mkD03-May-20241.6 KiB5225

README.mdD03-May-20243.4 KiB11793

fstab.fvpbaseD03-May-2024701 98

fstab.fvpbase.initrdD03-May-2024239 54

init.fvpbase.rcD03-May-202446 32

manifest.xmlD03-May-20243.1 KiB103102

run_modelD03-May-20241.7 KiB5030

README.md

1This document describes how to build and run an Android system image targeting
2the ARM Fixed Virtual Platform.
3
4### Building userspace
5
6```
7. build/envsetup.sh
8lunch fvp-eng # or fvp-userdebug
9m
10```
11
12Note that running ``m`` requires that the kernel is built first following
13the instructions below.
14
15### Building the kernel
16
17```
18mkdir android-kernel-mainline
19cd android-kernel-mainline
20repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline
21repo sync
22BUILD_CONFIG=common/build.config.fvp build/build.sh
23```
24
25The resulting kernel image and DTB must then be copied into the product output directory:
26
27```
28mkdir -p $ANDROID_PRODUCT_OUT/boot
29cp out/android-mainline/dist/Image out/android-mainline/dist/initramfs.img $ANDROID_PRODUCT_OUT/boot/
30cp out/android-mainline/dist/fvp-base-revc.dtb $ANDROID_PRODUCT_OUT/boot/devtree.dtb
31```
32
33### Building the firmware (ARM Trusted Firmware and U-Boot)
34
35First, install ``dtc``, the device tree compiler. On Debian, this is in the
36``device-tree-compiler`` package. Then run:
37```
38mkdir platform
39cd platform
40repo init -u https://git.linaro.org/landing-teams/working/arm/manifest.git -m pinned-uboot.xml -b 20.01
41repo sync
42
43mkdir -p tools/gcc
44cd tools/gcc
45wget https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/aarch64-linux-gnu/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu.tar.xz
46tar -xJf gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu.tar.xz
47cd ../..
48
49build-scripts/build-test-uboot.sh -p fvp all
50```
51
52These components must then be copied into the product output directory:
53
54```
55cp output/fvp/fvp-uboot/uboot/{bl1,fip}.bin $ANDROID_PRODUCT_OUT/boot/
56```
57
58### Obtaining the model
59
60The model may be obtained from [ARM's
61website](https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms)
62(under "Armv8-A Base Platform FVP").
63
64### Running the model
65
66From a lunched environment, first set the value of the ``MODEL_BIN``
67environment variable to the path to the model executable. Then run the
68following command to launch the model:
69```
70device/generic/goldfish/fvpbase/run_model
71```
72Additional model parameters may be passed by appending them to the
73``run_model`` command.
74
75To terminate the model, press ``Ctrl-] Ctrl-D`` to terminate the telnet
76connection.
77
78### MTE support
79
80**WARNING**: The kernel MTE support patches are experimental and the userspace
81interface is subject to change.
82
83To launch the model with MTE support, the following additional parameters
84must be used:
85```
86-C cluster0.has_arm_v8-5=1 \
87-C cluster0.memory_tagging_support_level=2 \
88-C bp.dram_metadata.is_enabled=1
89```
90MTE in userspace requires a patched common kernel with MTE support. To build
91the kernel, follow the kernel instructions above, but before running the
92``build.sh`` command, run:
93```
94cd common
95git fetch https://github.com/pcc/linux android-experimental-mte
96git checkout FETCH_HEAD
97cd ..
98```
99Then replace the prebuilt binutils with binutils 2.33.1:
100```
101cd binutils-2.33.1
102./configure --prefix=$PWD/inst --target=aarch64-linux-gnu
103make
104make install
105for i in $PWD/inst/bin/*; do
106  ln -sf $i /path/to/android-kernel-mainline/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/$(basename $i)
107  ln -sf $i /path/to/android-kernel-mainline/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/$(basename $i | sed -e 's/gnu/android/g')
108done
109```
110
111### Accessing the model via adb
112
113To connect to the model on the host:
114```
115adb connect localhost:5555
116```
117