diff --git a/config/FVP_Base_RevC-2xAEMvA-base.yaml b/config/FVP_Base_RevC-2xAEMvA-base.yaml index 7b80fc294d4632c0ca74d04967b55a00db198dce..a8761f7bf5c394a43cfed9659e8b3e7918376e20 100644 --- a/config/FVP_Base_RevC-2xAEMvA-base.yaml +++ b/config/FVP_Base_RevC-2xAEMvA-base.yaml @@ -70,6 +70,10 @@ run: -C pci.pci_smmuv3.mmu.SMMU_S_IDR2: 0 -C pci.pci_smmuv3.mmu.SMMU_S_IDR3: 0 + # Enable virtio-rng. If Linux/DT is correctly configured, it can use this to + # speed up RNG init. + -C bp.virtio_rng.enabled: 1 + terminals: bp.terminal_0: friendly: term0 diff --git a/config/dt-base.yaml b/config/dt-base.yaml index ddf7cb43eee6462ceddfd07af8e566c8071abdb3..095930cc8026b21eeea82e21d12ecb8ddc80f18d 100644 --- a/config/dt-base.yaml +++ b/config/dt-base.yaml @@ -63,6 +63,9 @@ build: # overlay: a 64MB carve-out is reserved at the end of the first memory # bank, which is used by tfa and (if present) the rmm, timer frequency, # some extra psci properties, and cpu-map to map the cores to clusters. + # By default the virtio-rng is disabled (because it was not present in + # older builds of the rev C FVP), so enable it here, so Linux can use it + # to initialize its RNG and speed up boot. - if [ "$${DTS}" = "fvp-base-revc.dts" ]; then - >- OVERLAY="/ { @@ -95,6 +98,15 @@ build: }; }; }; + bus@8000000 { + motherboard-bus@8000000 { + iofpga-bus@300000000 { + virtio@200000 { + status = \"okay\"; + }; + }; + }; + }; };" - ( dtc -q -O dts -I dtb $${DTB_FINAL} ; echo -e "$${OVERLAY}" ) | dtc -q -O dtb -o $${DTB_FINAL} - fi diff --git a/config/linux-base.yaml b/config/linux-base.yaml index 9e152e5b7f1fcc195f31d4e2ed165924a442a87c..40358c0df5e966c196c94040ebb416ecd7c1bfb1 100644 --- a/config/linux-base.yaml +++ b/config/linux-base.yaml @@ -33,6 +33,11 @@ build: - export ARCH=arm64 - make -j${param:jobs} O=${param:builddir} defconfig + # Unconditionally add the virtio-rng driver so we can use the device on + # FVP to speed up CRNG init. + - ./scripts/config --file ${param:builddir}/.config --enable CONFIG_HW_RANDOM + - ./scripts/config --file ${param:builddir}/.config --enable CONFIG_HW_RANDOM_VIRTIO + build: # Finalize the config. - make -j${param:jobs} O=${param:builddir} olddefconfig diff --git a/docker/Dockerfile.full b/docker/Dockerfile.full index bcbfe369717ce3a46f4e5f222211064c5ca8aa0a..1a220ea815b647021122ead6e524d41ac3a92c57 100644 --- a/docker/Dockerfile.full +++ b/docker/Dockerfile.full @@ -29,3 +29,30 @@ RUN cd /tools \ && cd - ENV TCH_PATH_AARCH32="/tools/${TCH_PATH_AARCH32}" ENV PATH="${TCH_PATH_AARCH32}:${PATH}" + +# Install packages required to compile Linux kselftests. We install the target +# versions for cross-compiling, and the native versions for good measure. +RUN dpkg --add-architecture arm64 \ + && apt-get update +RUN apt-get install --assume-yes --no-install-recommends --option=debug::pkgProblemResolver=yes \ + libcap-dev \ + libcap-ng-dev \ + libelf-dev \ + libfuse-dev \ + libmnl-dev \ + libnuma-dev \ + libpopt-dev \ + libasound-dev \ + liburing-dev \ + libz-dev +RUN apt-get install --assume-yes --no-install-recommends --option=debug::pkgProblemResolver=yes \ + libcap-dev:arm64 \ + libcap-ng-dev:arm64 \ + libelf-dev:arm64 \ + libfuse-dev:arm64 \ + libmnl-dev:arm64 \ + libnuma-dev:arm64 \ + libpopt-dev:arm64 \ + libasound-dev:arm64 \ + liburing-dev:arm64 \ + libz-dev:arm64 diff --git a/docker/build.sh b/docker/build.sh index e239b1d900bfaf313c3665d2d1c4a3a1c30f7322..5148cee2658292e6d3096a355c5613609a0b0007 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -38,7 +38,7 @@ if [ "${ARCH}" == "x86_64" ]; then TCH_PKG_NAME_AARCH32=arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz TCH_PATH_AARCH32=arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin FVP_PKG_URL=https://developer.arm.com/-/media/Files/downloads/ecosystem-models - FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.18_16_Linux64.tgz + FVP_PKG_NAME=FVP_Base_RevC-2xAEMvA_11.20_15_Linux64.tgz FVP_MODEL_DIR=Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3 FVP_PLUGIN_DIR=Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3 elif [ "${ARCH}" == "aarch64" ]; then