1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-17 16:17:09 +00:00

Compare commits

...

49 Commits

Author SHA1 Message Date
Hugo L'Hostis 71686ac05c arm-bsp/n1sdp: remove debug and verbose kernel cmd line parameters from grub cfg
By removing the verbose and debug kernel command line parameters from the grub
menu entries we prevent the console printing unnecessary messages and slowing
down the boot process.

Issue-Id: SCM-3027
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: Ieb68c606b7ed5b20191f6989aea84963b8cda778
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-21 11:53:18 -04:00
Ross Burton e9d695f132 arm/generic-arm64: recommend kernel modules and firmware
The generic-arm64 machine is meant to be generic, so pull in all the
kernel modules and firmware we have to increase the chances of hardware
working out of the box.

Change-Id: I51f500f6a6f821fa8df5bee062a52077dcf8e564
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-16 09:12:38 -04:00
Ross Burton f86bf75a6e arm/generic-arm64: set machine features
Set a slew of generic machine features that other parts of oe-core will
respect.

Change-Id: I47ea187128c7e3a9f8b711b74467b20b9cb4fcee
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-16 09:12:38 -04:00
Ross Burton 2d7af5f9d7 arm/generic-arm64: use a custom EFI wic file
Instead of using the pre-canned Wic kickstart file, provide our own.
This lets us specify that UUIDs should be used in the fstab, meaning
that the image is agnostic to the device type.

Change-Id: If9c0083c16f8bd2ad7d573a0d356383553aa8936
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-16 09:12:38 -04:00
Ross Burton ee1b109e36 arm/generic-arm64: don't set SERIAL_CONSOLES
This machine expects something approximating SystemReady, which means
the firmware should be capable of telling the kernel where the console
is.

Remove SERIAL_CONSOLES so the kernel does what the firmware is told, and
doesn't try to use serial consoles that don't exist.

Change-Id: Ib0b008fececf4c046112bdede9d0d3ebf9dc332b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-16 09:12:38 -04:00
Ross Burton ba82ea920a arm-bsp/linux-yocto: drop upstreamed N1SDP patch
This patch was upstreamed in 5.10.54.

Change-Id: Iacf6345c4d4ffa8e512e2f812876fdd50a057f96
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-29 10:42:07 -04:00
Jon Mason e82b83c92e juno: temporarily pin 5.4 kernel version
Recent changes in the 5.4 kernel are preventing the juno patches from
applying.  Temporarily pin the kernel to the version prior to this until
the patches can be rebased.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:14:53 -04:00
Jon Mason 30077d988f CI: add ssh tests
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:14:53 -04:00
Jon Mason 85f2a93c0a CI: merge testimage into the build stage
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:14:53 -04:00
Anastasios Kavoukis e4520e2a63 CI: enable debug-tweaks IMAGE_FEATURE
This makes the images suitable for development and test,
debug-tweaks includes settings like empty root password.

All CI image builds inheriting from base.yml will
have this include this setting.

Signed-off-by: Anastasios Kavoukis <anastasios.kavoukis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:14:53 -04:00
Hugo L'Hostis 328c85778b arm-autonomy/fvp-base: Add support for runfvp for arm-autonomy-host
Expand the FVP_DATA variable used by the fvpboot.bbclass to load both Xen
and its device tree when building arm-autonomy-host image for fvp-base.

Issue-Id: SCM-2718
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: Ia6e2f6a13e84c8e762d297ac34ccbe5417a7793b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-07-27 14:23:18 -04:00
Ross Burton 4e14a1c5ee CI: set interruptible on all jobs
The previous attempt at setting interruptible didn't work as it needs to
happen on all tasks, as once a single uninterruptible job has executed
the pipeline cannot be cancelled.  Unfortunately the setup jobs were
not interruptible, so the pipeline could never be cancelled.

Change-Id: I5416bc3f9a883ace24c12607b2ebc24bc428b50b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-07-22 12:26:47 +01:00
Ross Burton 3d9cf26be1 ci/check-warnings: ignore warnings that we're using the mirror
SourceForge in particular doesn't like multiple connections from the
same IP, but when a source mirror is being populated for the first time
this will happen. Our fetch falls back to the Yocto mirror so it doesn't
cause a failure, but there is a warning logged which our CI then fails
because of.

As we don't care about these warnings, filter them out of the log before
checking if there were any errors.

Change-Id: I36c97c5d9923f1c4d14c4588f3780211cccb57b2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-07-22 12:26:00 +01:00
Sumit Garg afd9bf7ee6 arm/qemuarm64-secureboot: Enable kernel TEE drivers
Add a config fragment to enable kernel TEE drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-07-20 08:54:26 -04:00
Timothy Mertz e82d9fdd49 external-arm-sdk-toolchain: Fix parsing error with INCOMPATIBLE_LICENSE
This change fixes parsing error that occurs when INCOMPATIBLE_LICENSE =
"GPLv3" by defining EAT_BFD_LICENSE, EAT_GDB_LICENSE and EAT_RLE_LICENSE
in license.inc and requiring it in external-arm-sdk-toolchain.bb

Definitions in external-arm-toolchain-versions.inc are made redundant so
they are removed.

Signed-off-by: Timothy Mertz <timothy.mertz@garmin.com>
Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
Reviewed-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-07-02 10:54:52 -04:00
Diego Sueiro eec8640c16 arm-bsp/u-boot/fvp-base: Make usage of config fragments to set CONFIG_BOOTARGS
Since u-boot recipe supports using config fragments let's use it instead of
patching the vexpress_aemv8a_semi_defconfig file.

Issue-Id: SCM-2329
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: I7feba5d23a6eab501cade38c188cb8414d0b86bd
(cherry picked from commit 1a46824760)
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-29 13:45:40 -04:00
Jon Mason 4e3f2de11d CI: add testing and testimage
Add a testing task to the gitlab CI and run testimage in that job.
Currently, it only runs against some of the qemu based machines.
Using slirp, there is no need for a privileged container or tun/tap
devices.

Change-Id: Ia85a3d0089f7d4dc7595c3a45d328c79d8e675f1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-29 11:14:23 -04:00
Jon Mason 04d9436f9d arm/linux: temporarily use 5.10.21 kernel for qemuarm64-secureboot
Patches for ZONE_DMA continue to be added to the 5.10.x kernel, causing
the removal patch to constantly break.  While working on a better fix,
regress the kernel to 5.10.21 (last version before ZONE_DMA was added)
to keep the CI working.

Change-Id: I537dd061ae0c6d2adce6649d03bd63a3d5dfffe9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-23 09:41:11 -04:00
Ross Burton b8e69c8bb3 ci: add yocto-check-layers step
Add a job to run yocto-check-layers to validate a selection of layers
are Yocto Project Compatible.

Right now we validate:
- meta-arm
- meta-arm-bsp
- meta-arm-toolchain
- meta-gem5

meta-atp and meta-arm-autonomy are currently skipped: meta-atp fails and
meta-arm-autonomy has a larger set of dependant layers and will be added
later.

Change-Id: Ia0c8c16e4228eeb461bd213b30703e950ede656f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-23 09:41:11 -04:00
Ross Burton 1de9c1ffb8 arm-bsp/linux: guard FILESEXTRAPATHS changes in overrides
Because of how the kernel class searches for files any changes to
FILESEXTRAPATHS should be done in an override so it doesn't potentially
impact unrelated builds.

Issue spotted by running yocto-check-layer.

Change-Id: Id3b741d184a024d0cc6d2d5031e150a8f0ae4b0d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-23 09:41:11 -04:00
Ross Burton ae5fed3951 arm-bsp/tc0-artifacts-image: restrict to TC0
This recipe is for TC0, so set COMPATIBLE_MACHINE appropriately.

This is both logically correct, and fixes a Yocto Compatible test failure
where tc0-artifacts-image isn't buildable for arbitrary machines.

Change-Id: I6381fc08076d4ddea254f7efc84f90c4a7f65d26
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-23 09:41:11 -04:00
Diego Sueiro e0c855cc24 arm-autonomy/fvp-base: Make usage of wic images
In meta-arm-bsp fvp-base switched to wic images. Hence, make the appropriate
changes to also use wic images in meta-arm-autonomy.

Change-Id: I34d68fee11ea339fb52a97d7593e373aa69faa1c
Issue-Id: SCM-2329
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
(cherry picked from commit b2031ed7ca)
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-21 14:53:01 -04:00
Kamil Dziezyk 8f2dcc25f0 arm-bsp/fvp-base*: Introduce WIC support for fvp-base* machines
Add wks script that contains two partitions.
Rootfs is populated to second partition, because the first one is empty,
to keep compatibility with image_types_disk_img.bbclass
and use the same root device set in u-boot bootargs parameter.

Both wic and disk.img files are built by default.

Issue-Id: SCM-2698
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ib5b5c3a7aa6e8fe9fa90a2955ae1e461caa01356
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-21 14:53:01 -04:00
Ross Burton 646239278a arm-bsp/fvp-base: set FVP_ variables
So that a fvp-base image can be tested easily, set the relevant FVP_*
variables.

After setting IMAGE_CLASSES += "fvpboot" in local.conf, this will show
the firmware start and Linux boot:

$ MACHINE=fvp-base bitbake core-image-base
$ runfvp fvp-base --console

Change-Id: Id1bd6cea57958117103e53ab9f78a58ce92b6a2e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton 6873363ede runfvp: drop --parameter, users can use -- --parameter
Now that arbitrary parameters can be passed to the FVP binary, runfvp
doesn't need to handle --parameter itself.

Anyone using runfvp --parameter should simply use runfvp -- --parameter.

Change-Id: I8a79200fe927c253308731e7e0cb228e53cd989a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton b36052691e runfvp: pass arbitrary options after -- to the FVP binary
To allow passing arbitrary options to the FVP binary, split the passed
options on --.  Anything before the separator is handled by runfvp,
anything afterwards is passed as-is to the FVP binary.

Change-Id: I686b2fb79d217e26988753be7bd067c638d69eac
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton 8fe982f8d0 runfvp: exit with the return code of the FVP binary
Change-Id: If79e31e61110161c9a13dd512b0146d1d515d77a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton 77f4023c82 scripts: add runfvp
runfvp is a script that reads existing .fvpconf files (as written by
fvpboot.bbclass) and executes the FVP binary appropriately.

By default the behaviour is the same as running a FVP by hand, but by
passing --console the first serial port is connected to stdin/stdout.

Change-Id: Ibd26867c09e8692be4c02a7ea13571dcfe36db9b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton c5ebdb44d2 arm/fvpboot: add class to write FVP boot configuration
The fvpboot class is used to write a machine-readable file that describes
how to boot a given machine image inside a FVP, similar to how qemuboot
writes files for runqemu.

BSPs should set the FVP_* variables as appropriate in their machine
configuration, but let the user opt-in to adding fvpboot to IMAGE_CLASSES.

Change-Id: I2d1cd86ec4affc1d688a293987890d6a89124d94
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton 6c622ca3da arm/fvp-library: add recipe for the FVP Library
Add a recipe for the FVP Library:

https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms

This is free to download but is behind a login-wall, and the FVPs are
license managed.

Change-Id: Ia0e7b1bfac54e06faf9d517d5b769acf9670724a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton de18bcf3d2 arm/fvp-base-a-aem: add Architecture Envelope Model FVP for Arm v8-A
Add a recipe for the general purpose Armv-A Base RevC AEM FVP.

This FVP is behind a login-wall so the user has to download it themselves,
but the FVP is free to use.

Change-Id: I14d7b965a05ff9f405a2a12d4da2afd3dd2ecb87
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Ross Burton c9eda152b0 arm/fvp: add recipes for Ecosystem FVPs
Add recipes for the SGI-575 and N1-Edge reference designs from the
Ecosystem FVP collection:

https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps

These FVPs are free to download and use.

Change-Id: Ia645e4a7264f73ec42ee61ab2907a9bfdbe7c25d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-17 11:35:10 -04:00
Hugo L'Hostis 9851e5714a arm-autonomy/xenguest-network: add "none" network type to xenguests
This patch adds a new "none" network type that can be set for xenguests
using XENGUEST_IMAGE_NETWORK_TYPE in their configuration.

Issue-Id: SCM-2338
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: If4f6de282b0048e5c68d293a3db5b56cd5adce66
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-06-14 10:35:36 -04:00
Hugo L'Hostis 318b47ae05 arm-autonomy/n1sdp: add kernel modules to mount FAT filesystem
This patch adds kernel modules necessary for n1sdp to mount the FAT filesystem
codepage 437 and NLS ISO 8859-1.

Issue-Id: SCM-2682
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I2d4fede311544917050326564b2b0a7d0123cb21
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-14 10:35:36 -04:00
Jon Mason 4482136c29 ci: clean regularly to reduce size
The Gitlab CI executors do not clean-up after each run, which will
result in a ballooning size over time. Remove all files in the work
tree, removing the problem.  SSTATE should prevent this from causing
any performance by not having the files there.

Change-Id: I57df3cf470c519286fe194739a0a7722794f3b25
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-08 11:29:33 -04:00
Hugo L'Hostis 65d41185b0 arm-autonomy/xenguest-manager: fix xenguest initscript stop sequence
This patch fixes an issue where xenguest initscript stop sequence was not
properly identifying the running guests.

Issue-Id: SCM-2772
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I3ad88e00f48fab07f99936a10c0d1deb7459e83b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-08 10:20:29 -04:00
Hugo L'Hostis 10e5981995 arm-bsp/docs: documentation improvements for fvp-baser-aemv8r64
This patch updates the documentation for fvp-baser-aemv8r64 :

- Update link to the yocto documentation.
- Add details about what Host OS version are supported. Add Ubuntu
20.04 specific instructions.
- Warn user about disk space.

Issue-Id: SCM-2665
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Change-Id: I37e6bd3ae0a04258743a5bf1dfc80e515078d524
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-01 11:00:03 -04:00
Filipe Rinaldi 48ffd24725 arm-bsp/docs: Updated documentation fvp-baser-aemv8r64 MACHINE
This update has mainly format related changes (no functional changes) to
improve readability when reading the non-rendered version of it.
- Use underlined style for headers level 1 and 2
- Use indentation to create blocks
- Use double space at the end of each section
- Add indentation to the FVP parameters
- Add pip command to install the kas tool

Issue-Id: SCM-2665
Signed-off-by: Filipe Rinaldi <filipe.rinaldi@arm.com>
Change-Id: I9d4b4dbcef6dc13638b62563ebdf90b6b9d5b686
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-01 11:00:03 -04:00
luca fancellu a727cfe74b arm-autonomy: fix building for xen-tools >=4.15
The 0001-vif-nat-fix-hostname.patch is merged in xen-tools
4.15, so fix the layer to apply the patch only for 4.14.

Issue-Id: SCM-2608
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Change-Id: I1306955ab0b1ee435a8da42e953e142270c4b2d3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-01 11:00:03 -04:00
Ross Burton 12af38f31b ci/base: don't try to make warnings fatal
The generated local.conf has ERROR_QA=${WARN_QA} in an attempt to make
warnings fatal, but this appears to be just disabling some warnings and
error instead.

As we already have warning detection in the GitLab CI script, this is
redundant and can be removed.

Change-Id: I393874edbae148ee338a7069bbf800603c028242
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-05-25 12:12:44 +01:00
Ross Burton 7ca13b4f15 arm/linux-yocto: add missing LINUX_VERSION to qemuarm64-sbsa
As the SRCREV is pinned to a specific SHA we should also set LINUX_VERSION, as future kernel
upgrades in oe-core master will change both SRCREV and LINUX_VERSION.

Change-Id: Iafababe83ff54625112d2fae859d8a3938001cd5
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-05-11 16:01:14 +01:00
Peter Hoyes 33e88e8a3a arm-autonomy/linux-arm-autonomy: Remove Xen irq lock patch
The following patch has been backported to kernel 5.10.30:
    0001-xen-evtchn-Change-irq_info-lock-to-raw_spinlock_t.patch

Issue-Id: SCM-2307
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I9cef017b60891780176dff944e3eca5986746d8a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-04 10:54:59 -04:00
Jon Mason 301bf3b5fd arm/kernel: fix previous patch
The previous patch broke for qemuarm64-sbsa, ebcause they share the same
defconfig patch but now the upstream kernel SHAs are different.  Change
them to have the same SHAs.

Also, the previous patch lost the patch header.  So re-add that.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-02 11:13:02 -04:00
Ross Burton f3227b7a8e arm/linux: guard FILESEXTRAPATHS changes in overrides
Because of how the kernel class searches for files any changes to
FILESEXTRAPATHS should be done in an override so it doesn't potentially
impact unrelated builds.

Issue spotted by running yocto-check-layer.

Change-Id: I3e915a0cafc850d4b2594b655a849977d389465a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-02 11:12:58 -04:00
Jon Mason bd2e25959f arm: combine linux-yocto bbappend files
Combining linux-yocto bbappend into a single file.

Change-Id: Ica4fc2d0edc9939451c572e5eb65f34e4002c26f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-02 11:12:58 -04:00
Jon Mason 6c08dd6c76 arm/kernel: fix broken defconfig patch
Upstream kernel is now being patched, which prevents the patch being
fixed here from applying cleanly.  Rebase it on top of the existing one
to resolve the issue.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-01 18:39:42 -04:00
Jon Mason a637fa88f2 CI: enable non-arm64 builders
Abstract away all of the things preventing the current setup from
working on only internal, arm64 build hardware.

Change-Id: Ib8d0e8e76602d4553e044520a91349015b1aa19b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-30 13:24:48 -04:00
Jon Mason ef9b9c8e70 CI: use public KAS image
Use the KAS docker image provided by the KAs project for Gitlab CI.
This allows for the external (non-Arm Corp) users/developers to run
Gitlab CI.

Change-Id: I9fee9a0d571e3fd60862d4ccd36176f9e583fc91
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-30 13:24:48 -04:00
Jon Mason 235f2a8ca7 CI: Reorder manual tasks to be alphabetical
Change-Id: I2e5bfdf5794c99da530bc2645fb56a5444444be3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-30 13:24:48 -04:00
50 changed files with 860 additions and 451 deletions
+50 -26
View File
@@ -1,5 +1,4 @@
# Use our custom Crops-derived image
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/yocto-builder:master
image: ghcr.io/siemens/kas/kas
# First do a common bootstrap, and then build all the targets
stages:
@@ -10,27 +9,30 @@ stages:
# Common job fragment to get a worker ready
.setup:
stage: build
interruptible: true
variables:
KAS_WORK_DIR: $CI_PROJECT_DIR/work
KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos
SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
DL_DIR: $CI_BUILDS_DIR/persist/downloads
BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains
IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images
before_script:
- echo KAS_WORK_DIR = $KAS_WORK_DIR
- echo SSTATE_DIR = $SSTATE_DIR
- echo DL_DIR = $DL_DIR
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR
- rm -rf $KAS_WORK_DIR
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
# Generalised fragment to do a Kas build
.build:
extends: .setup
script:
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
#
# Prep stage, update repositories once
@@ -41,6 +43,12 @@ update-repos:
script:
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
get-binary-toolchains:
extends: .setup
stage: prep
script:
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
#
# Bootstrap stage, bootstrap and machine coverage
@@ -55,6 +63,7 @@ n1sdp/bootstrap:
# What percentage of machines in the layer do we build
machine-coverage:
stage: bootstrap
interruptible: true
script:
- ./ci/check-machine-coverage
coverage: '/Coverage: \d+/'
@@ -64,6 +73,14 @@ machine-coverage:
# Build stage, the actual build jobs
#
# Validate layers are Yocto Project Compatible
check-layers:
extends: .setup
coverage: '/Coverage: \d+/'
script:
- kas shell --update --force-checkout ci/base.yml:ci/meta-python.yml --command \
"$CI_PROJECT_DIR/ci/check-layers.py $CI_PROJECT_DIR/ci/check-layers.yml $CI_PROJECT_DIR $KAS_WORK_DIR"
corstone500:
extends: .build
@@ -79,7 +96,7 @@ fvp-base:
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gcc-arm32:
fvp-base-arm32/external-gccarm:
extends: .build
fvp-baser-aemv8r64:
@@ -121,25 +138,25 @@ n1sdp/armgcc:
qemu-cortex-a53:
extends: .build
qemuarm:
qemuarm/testimage:
extends: .build
qemuarm64-sbsa:
extends: .build
qemuarm64-secureboot:
qemuarm64-secureboot/testimage:
extends: .build
qemuarm64-secureboot/clang:
qemuarm64-secureboot/clang/testimage:
extends: .build
qemuarm64-secureboot/clang/musl:
qemuarm64-secureboot/clang/musl/testimage:
extends: .build
qemuarm64-secureboot/musl:
qemuarm64-secureboot/musl/testimage:
extends: .build
qemuarmv5:
qemuarmv5/testimage:
extends: .build
sgi575:
@@ -153,14 +170,6 @@ tc0:
# Utility tasks, not executed automatically
#
# Report on disk usage
usage:
extends: .setup
stage: prep
when: manual
script:
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR
delete-dl-dir:
extends: .setup
stage: prep
@@ -175,6 +184,21 @@ delete-repo-dir:
script:
- rm -rf $KAS_REPO_REF_DIR/*
# Delete all sstate
delete-sstate:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $SSTATE_DIR/*
delete-toolchains:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $TOOLCHAIN_DIR/*
# Wipe out old sstate
prune-sstate:
extends: .setup
@@ -183,10 +207,10 @@ prune-sstate:
script:
- find $SSTATE_DIR -type f -atime +30 -delete
# Delete all sstate
delete-sstate:
# Report on disk usage
usage:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $SSTATE_DIR/*
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
+2 -1
View File
@@ -22,6 +22,7 @@ repos:
env:
BB_LOGCONFIG: ""
TOOLCHAIN_DIR: ""
local_conf_header:
base: |
@@ -29,11 +30,11 @@ local_conf_header:
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_WHITELIST += "armcompiler"
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES_append = " debug-tweaks"
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
INHERIT += "rm_work"
PACKAGECONFIG_append_pn-perf = " coresight"
ERROR_QA = "${WARN_QA}"
noptest: |
DISTRO_FEATURES_remove = "ptest"
+43
View File
@@ -0,0 +1,43 @@
#! /usr/bin/env python3
import argparse
import pathlib
import re
import subprocess
import sys
import yaml
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("config", type=argparse.FileType())
parser.add_argument("metaarm", type=pathlib.Path, help="Path to meta-arm")
parser.add_argument("others", type=pathlib.Path, help="Path to parent of dependencies")
args = parser.parse_args()
config = yaml.safe_load(args.config)
layers = config["layers"]
dependencies = config["dependencies"]
found_layers = [p for p in args.metaarm.glob("meta-*") if p.is_dir()]
print(f"Testing {len(layers)} layers: {', '.join(layers)}.")
print(f"Found {len(found_layers)} layers in meta-arm.")
print()
cli = ["yocto-check-layer-wrapper",]
cli.extend([args.metaarm / layer for layer in layers])
cli.append("--dependency")
cli.extend([args.others / layer for layer in dependencies])
passed = 0
process = subprocess.Popen(cli, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
while True:
line = process.stdout.readline()
if process.poll() is not None:
break
print(line.strip())
if re.search(r"meta-.+ PASS", line):
passed += 1
print(f"Coverage: {int(passed / len(found_layers) * 100)}%")
sys.exit(process.returncode)
+7
View File
@@ -0,0 +1,7 @@
layers:
- meta-arm
- meta-arm-bsp
- meta-arm-toolchain
- meta-gem5
dependencies:
- meta-openembedded/meta-oe
+2 -1
View File
@@ -7,7 +7,8 @@ set -e -u
LOGFILE=$1
if test -s $LOGFILE; then
LINES=$(grep --invert-match "attempting MIRRORS if available" $LOGFILE | wc -l)
if test "$LINES" -ne 0; then
echo ==============================
echo The build had warnings/errors:
echo ==============================
@@ -5,4 +5,4 @@ local_conf_header:
cc: |
PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "/usr/local/gcc-arm-10.2-2020.11-aarch64-arm-none-linux-gnueabihf"
EXTERNAL_TOOLCHAIN = "${TOOLCHAIN_DIR}/${TARGET_ARCH}"
+52
View File
@@ -0,0 +1,52 @@
#!/bin/bash
set -u
HOST_ARCH=$(uname -m)
VER="10.2-2020.11"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
# These should be already created by .bitlab-ci.yml, but do here if run outside of that env
mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR
if [ $HOST_ARCH = "aarch64" ]; then
#AArch64 Linux hosted cross compilers
#AArch32 target with hard float (arm-none-linux-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
elif [ $HOST_ARCH = "x86_64" ]; then
#x86_64 Linux hosted cross compilers
#AArch32 target with hard float (arm-linux-none-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
#AArch64 GNU/Linux target (aarch64-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
#AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
else
echo "ERROR - Unknown build arch of $HOST_ARCH"
exit 1
fi
for i in arm aarch64 aarch64_be; do
if [ ! -f $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
continue
fi
if [ -d $TOOLCHAIN_DIR/$i ]; then
echo "$TOOLCHAIN_DIR/$i EXISTS!"
MANIFEST=$(ls $TOOLCHAIN_DIR/$i | grep txt)
if [[ $MANIFEST != $VER-$HOST_ARCH-$i-none-linux-gnu*.txt ]]; then
echo "Removing old $MANIFEST for $VER-$HOST_ARCH-$i-*.txt toolchain"
rm -rf $TOOLCHAIN_DIR/$i
fi
fi
if [ ! -d $TOOLCHAIN_DIR/$i ]; then
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
mv $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*/ $TOOLCHAIN_DIR/$i
fi
done
+5
View File
@@ -5,6 +5,11 @@ header:
machine: qemuarm64-secureboot
local_conf_header:
bugs: |
# Only ping until errors can be resolved
TEST_SUITES = "ping"
target:
- core-image-base
- perf
+5
View File
@@ -4,3 +4,8 @@ header:
- base.yml
machine: qemuarmv5
local_conf_header:
bugs: |
# Remove parselogs until errors can be resolved
TEST_SUITES_remove = "parselogs"
+17
View File
@@ -0,0 +1,17 @@
header:
version: 9
local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TESTIMAGE_AUTO = "1"
slirp: |
TEST_RUNQEMUPARAMS = "slirp"
TEST_SERVER_IP = "127.0.0.1"
QEMU_USE_SLIRP = "1"
packages: |
IMAGE_FEATURES_append = " ssh-server-dropbear"
# Multiple targets are available, put it down to just one
target:
- core-image-base
@@ -4,4 +4,36 @@
# default rootfs, so use vda3 for guest lvm
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/vda3"
# We need to extend the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH_prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-fvp-base-disk.wks.in"
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'${ARM_AUTONOMY_WKS_FILE}', d)}"
XEN_FILE ?= "xen-fvp-base"
DTB_FILE ?= "${@ get_xen_dtb_filename(d)}"
XEN_ADDR ?= "0x84000000"
DTB_ADDR ?= "0x83000000"
FVP_DATA += "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${XEN_FILE}@${XEN_ADDR} \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${DTB_FILE}@${DTB_ADDR}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
# This function uses the "KERNEL_DEVICETREE" variable and manipulates it to
# return the xen kernel device tree file name.
def get_xen_dtb_filename(d):
kernel_dtb_filename = d.getVar('KERNEL_DEVICETREE',d)
xen_dtb_filename = os.path.splitext(os.path.basename(kernel_dtb_filename))[0] + '-xen.dtb'
return xen_dtb_filename
@@ -84,3 +84,7 @@ IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
# Additionnal kernel modules are necessary for n1sdp to be able to mount FAT
# filesystems using CP437.
MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = " kernel-module-nls-cp437 kernel-module-nls-iso8859-1"
@@ -0,0 +1,17 @@
# short-description: Create a disk image
# long-description: Creates a partitioned disk image that the user
# can directly dd to boot media.
# For FVP Base first partition is empty to keep compatibility with disk.img
part --label empty --source empty --ondisk sda --size="1M" --system-id 8e --align 1024
# Second partition is rootfs normally populated as /dev/vda2
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Third partition to accomodate guests images normally populated as /dev/vda3 (used by XENGUEST_MANAGER_VOLUME_DEVICE)
part --label guests --source empty --ondisk sda --size="${GUEST_PART_SIZE}${GUEST_PART_SIZE_UNIT}" --system-id 8e --align 1024
# Fourth partition is user defined entry normally populated as /dev/vda4
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos
@@ -1,8 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-vif-nat-fix-hostname.patch \
"
PACKAGECONFIG_remove = "\
${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', \
@@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:"
SRC_URI += "file://0001-vif-nat-fix-hostname.patch \
"
@@ -17,6 +17,9 @@ case "${XENGUEST_NETWORK_TYPE:=}" in
echo "vif = ['script=vif-bridge,bridge=${BRIDGE_NAME}']" >> "${guestcfgfile:?}"
log info "Network type is bridge: ${BRIDGE_NAME}"
;;
none)
log info "Network type is none"
;;
*)
log error "XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
;;
@@ -66,7 +66,7 @@ case "$1" in
stop)
echo "Stopping xenguest"
# update guest list
guestlist=$(xenguest-manager status | grep Running | cut -d ":" -f1)
guestlist=$(xenguest-manager status | grep Running | cut -d " " -f1)
for f in ${guestlist}; do
xenguest-manager shutdown "${f}" --kill
done
@@ -1,77 +0,0 @@
From 3bc59ed7bc26c967cfe6eb9c1ef9a1ef9108e99d Mon Sep 17 00:00:00 2001
From: Luca Fancellu <luca.fancellu@arm.com>
Date: Tue, 23 Mar 2021 16:16:39 +0000
Subject: [PATCH 4/4] xen/evtchn: Change irq_info lock to raw_spinlock_t
Unmask operation must be called with interrupt disabled,
on preempt_rt spin_lock_irqsave/spin_unlock_irqrestore
don't disable/enable interrupts, so use raw_* implementation
and change lock variable in struct irq_info from spinlock_t
to raw_spinlock_t
Issue-Id: SCM-2147
Upstream-Status: Pending
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
drivers/xen/events/events_base.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 7bd03f6e0422..b91c19b90b8b 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -108,7 +108,7 @@ struct irq_info {
unsigned short eoi_cpu; /* EOI must happen on this cpu-1 */
unsigned int irq_epoch; /* If eoi_cpu valid: irq_epoch of event */
u64 eoi_time; /* Time in jiffies when to EOI. */
- spinlock_t lock;
+ raw_spinlock_t lock;
union {
unsigned short virq;
@@ -280,7 +280,7 @@ static int xen_irq_info_common_setup(struct irq_info *info,
info->evtchn = evtchn;
info->cpu = cpu;
info->mask_reason = EVT_MASK_REASON_EXPLICIT;
- spin_lock_init(&info->lock);
+ raw_spin_lock_init(&info->lock);
ret = set_evtchn_to_irq(evtchn, irq);
if (ret < 0)
@@ -432,28 +432,28 @@ static void do_mask(struct irq_info *info, u8 reason)
{
unsigned long flags;
- spin_lock_irqsave(&info->lock, flags);
+ raw_spin_lock_irqsave(&info->lock, flags);
if (!info->mask_reason)
mask_evtchn(info->evtchn);
info->mask_reason |= reason;
- spin_unlock_irqrestore(&info->lock, flags);
+ raw_spin_unlock_irqrestore(&info->lock, flags);
}
static void do_unmask(struct irq_info *info, u8 reason)
{
unsigned long flags;
- spin_lock_irqsave(&info->lock, flags);
+ raw_spin_lock_irqsave(&info->lock, flags);
info->mask_reason &= ~reason;
if (!info->mask_reason)
unmask_evtchn(info->evtchn);
- spin_unlock_irqrestore(&info->lock, flags);
+ raw_spin_unlock_irqrestore(&info->lock, flags);
}
#ifdef CONFIG_X86
--
2.17.1
@@ -44,8 +44,6 @@ python() {
and oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"):
if LooseVersion(kernelVersion) < '5.9':
d.appendVar('SRC_URI', ' file://files/0001-arm-arm64-xen-Fix-to-convert-percpu-address-to-gfn-c.patch' )
if '5.10' <= LooseVersion(kernelVersion) < '5.12':
d.appendVar('SRC_URI', ' file://files/0001-xen-evtchn-Change-irq_info-lock-to-raw_spinlock_t.patch' )
if kernelVersion and LooseVersion(kernelVersion) < '5.10':
if oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"):
+14
View File
@@ -15,3 +15,17 @@ UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
KERNEL_IMAGETYPE = "Image"
KERNEL_DEVICETREE = "arm/fvp-base-gicv3-psci-custom.dtb"
FVP_PROVIDER ?= "fvp-base-a-aem-native"
FVP_EXE ?= "FVP_Base_RevC-2xAEMvA"
FVP_CONFIG[cache_state_modelled] ?= "0"
FVP_CONFIG[bp.secureflashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-fvp.bin"
FVP_CONFIG[bp.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip-fvp.bin"
FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic"
FVP_DATA ?= "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}@0x80080000 \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-gicv3-psci-custom.dtb@0x83000000"
FVP_CONSOLE ?= "terminal_0"
FVP_TERMINALS[bp.terminal_0] ?= "Console"
FVP_TERMINALS[bp.terminal_1] ?= ""
FVP_TERMINALS[bp.terminal_2] ?= ""
FVP_TERMINALS[bp.terminal_3] ?= ""
+3 -1
View File
@@ -8,7 +8,9 @@
MACHINE_FEATURES = "optee"
IMAGE_CLASSES += "image_types_disk_img"
IMAGE_FSTYPES += "disk.img"
IMAGE_FSTYPES += "disk.img wic"
WKS_FILE ?= "fvp-base.wks"
# Disk image configuration
# We don't use the first partition
+103 -76
View File
@@ -1,6 +1,9 @@
# Armv8-R AArch64 AEM FVP Support in meta-arm-bsp
Armv8-R AArch64 AEM FVP Support in meta-arm-bsp
===============================================
Overview
--------
## Overview
Fixed Virtual Platforms (FVP) are complete simulations of an Arm system,
including processor, memory and peripherals. These are set out in a
"programmer's view", which gives you a comprehensive model on which to build
@@ -16,34 +19,75 @@ https://developer.arm.com/ip-products/processors/cortex-r/cortex-r82
Fast Models Fixed Virtual Platforms (FVP) Reference Guide:
https://developer.arm.com/docs/100966/latest
## BSP Support
BSP Support
-----------
The fvp-baser-aemv8r64 Yocto MACHINE supports the following BSP components:
- boot-wrapper-aarch64
- Kernel: linux-yocto-5.10
## Quick start: Howto Build and Run
Quick start: Howto Build and Run
--------------------------------
### Host environment setup
Install the Required Packages for the Build Host:
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#required-packages-for-the-build-host
The following instructions have been tested on hosts running Ubuntu 18.04 and
Ubuntu 20.04.
Install the required packages for the build host:
https://docs.yoctoproject.org/3.3.1/singleindex.html#required-packages-for-the-build-host
Install the kas setup tool for bitbake based projects:
https://kas.readthedocs.io/en/latest/userguide.html#dependencies-installation
pip3 install --user kas
For more details on kas, see https://kas.readthedocs.io/.
**Note:** The host machine should have at least 50 GBytes of free disk space
for the next steps to work correctly.
### Fetch sources
Fetch meta-arm repository:
```
mkdir -p ~/fvp-baser-aemv8r64-bsp
cd ~/fvp-baser-aemv8r64-bsp
git clone https://git.yoctoproject.org/git/meta-arm
```
Fetch the meta-arm repository into a build directory:
mkdir -p ~/fvp-baser-aemv8r64-build
cd ~/fvp-baser-aemv8r64-build
git clone https://git.yoctoproject.org/git/meta-arm
### Build
```
cd ~/fvp-baser-aemv8r64-bsp
kas build meta-arm/kas/fvp-baser-aemv8r64-bsp.yml
```
Building with the standard Linux kernel:
cd ~/fvp-baser-aemv8r64-build
kas build meta-arm/kas/fvp-baser-aemv8r64-bsp.yml
### Networking
To enable networking on the FVP via a host network interface, you will need to
install the following package(s):
**Ubuntu 18.04:**
sudo apt-get install libvirt-bin
**Ubuntu 20.04:**
sudo apt-get install libvirt-dev libvirt-daemon qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
Once that is installed for your OS version, setup tap0 using the following
commands:
sudo virsh net-start default
sudo ip tuntap add dev tap0 mode tap user $(whoami)
sudo ifconfig tap0 0.0.0.0 promisc up
sudo brctl addif virbr0 tap0
To clean up the tap0 interface on the host use the following commands:
sudo brctl delif virbr0 tap0
sudo ip link set virbr0 down
sudo brctl delbr virbr0
sudo virsh net-destroy default
sudo ip link delete tap0
### Run
To Run the Fixed Virtual Platform simulation tool you must download "Armv8-R
@@ -53,71 +97,54 @@ https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-pla
and install it on your host PC.
To run an image after the build is done:
```
export YOCTO_DEPLOY_IMGS_DIR="~/fvp-baser-aemv8r64-bsp/build/tmp/deploy/images/fvp-baser-aemv8r64/"
cd <path-to-AEMv8R_base_pkg>/models/Linux64_GCC-6.4/
./FVP_BaseR_AEMv8R \
-C bp.dram_metadata.init_value=0 \
-C bp.dram_metadata.is_enabled=true \
-C bp.dram_size=8 \
-C bp.exclusive_monitor.monitor_access_level=1 \
-C bp.pl011_uart0.unbuffered_output=1 \
-C bp.pl011_uart0.untimed_fifos=true \
-C bp.refcounter.non_arch_start_at_default=1 \
-C bp.smsc_91c111.enabled=0 \
-C bp.ve_sysregs.mmbSiteDefault=0 \
-C cache_state_modelled=true \
-C cluster0.gicv3.cpuintf-mmap-access-level=2 \
-C cluster0.gicv3.SRE-enable-action-on-mmap=2 \
-C cluster0.gicv3.SRE-EL2-enable-RAO=1 \
-C cluster0.gicv3.extended-interrupt-range-support=1 \
-C cluster0.has_aarch64=1 \
-C cluster0.NUM_CORES=4 \
-C cluster0.stage12_tlb_size=512 \
-C gic_distributor.GICD_CTLR-DS-1-means-secure-only=1 \
-C gic_distributor.GITS_BASER0-type=1 \
-C gic_distributor.ITS-count=1 \
-C gic_distributor.ITS-hardware-collection-count=1 \
-C gic_distributor.direct-lpi-support=1 \
-C gic_distributor.has-two-security-states=0 \
-C pctl.startup=0.0.0.* \
-C bp.virtio_net.enabled=1 \
-C cache_state_modelled=0 \
-C bp.vis.rate_limit-enable=0 \
-C bp.virtio_net.hostbridge.interfaceName=tap0 \
-a cluster0*=${YOCTO_DEPLOY_IMGS_DIR}/linux-system.axf \
-C bp.virtioblockdevice.image_path=${YOCTO_DEPLOY_IMGS_DIR}/core-image-minimal-fvp-baser-aemv8r64.wic
```
The terminal console login is `root` without password.
export YOCTO_DEPLOY_IMGS_DIR="~/fvp-baser-aemv8r64-bsp/build/tmp/deploy/images/fvp-baser-aemv8r64/"
cd <path-to-AEMv8R_base_pkg>/models/Linux64_GCC-6.4/
./FVP_BaseR_AEMv8R \
-C bp.dram_metadata.init_value=0 \
-C bp.dram_metadata.is_enabled=true \
-C bp.dram_size=8 \
-C bp.exclusive_monitor.monitor_access_level=1 \
-C bp.pl011_uart0.unbuffered_output=1 \
-C bp.pl011_uart0.untimed_fifos=true \
-C bp.refcounter.non_arch_start_at_default=1 \
-C bp.smsc_91c111.enabled=0 \
-C bp.ve_sysregs.mmbSiteDefault=0 \
-C cache_state_modelled=true \
-C cluster0.gicv3.cpuintf-mmap-access-level=2 \
-C cluster0.gicv3.SRE-enable-action-on-mmap=2 \
-C cluster0.gicv3.SRE-EL2-enable-RAO=1 \
-C cluster0.gicv3.extended-interrupt-range-support=1 \
-C cluster0.has_aarch64=1 \
-C cluster0.NUM_CORES=4 \
-C cluster0.stage12_tlb_size=512 \
-C gic_distributor.GICD_CTLR-DS-1-means-secure-only=1 \
-C gic_distributor.GITS_BASER0-type=1 \
-C gic_distributor.ITS-count=1 \
-C gic_distributor.ITS-hardware-collection-count=1 \
-C gic_distributor.has-two-security-states=0 \
-C pctl.startup=0.0.0.* \
-C bp.virtio_net.enabled=1 \
-C cache_state_modelled=0 \
-C bp.vis.rate_limit-enable=0 \
-C bp.virtio_net.hostbridge.interfaceName=tap0 \
-a cluster0*=${YOCTO_DEPLOY_IMGS_DIR}/linux-system.axf \
-C bp.virtioblockdevice.image_path=${YOCTO_DEPLOY_IMGS_DIR}/core-image-minimal-fvp-baser-aemv8r64.wic
**Note:** The terminal console login is `root` without password.
Devices supported in the kernel
-------------------------------
## Devices supported in the kernel
- serial
- virtio disk
- virtio network
- watchdog
- rtc
## Devices not supported or not functional
Devices not supported or not functional
---------------------------------------
- Only one CPU since SMP is not functional in boot-wrapper-aarch64 yet
## Networking
To enable networking on the FVP via a host network interface, set up tap0 using
the following commands (Ubuntu 18.04 Host):
```
sudo apt-get install libvirt-bin
sudo virsh net-start default
sudo ip tuntap add dev tap0 mode tap user $(whoami)
sudo ifconfig tap0 0.0.0.0 promisc up
sudo brctl addif virbr0 tap0
```
To clean up the tap0 interface on the host use the following commands:
```
sudo brctl delif virbr0 tap0
sudo ip link set virbr0 down
sudo brctl delbr virbr0
sudo virsh net-destroy default
sudo ip link delete tap0
```
@@ -6,6 +6,8 @@ SUMMARY = "Total Compute Images"
DESCRIPTION = "Build all the images required for Total Compute platform"
LICENSE = "Apache-2.0"
COMPATIBLE_MACHINE = "tc0"
inherit nopackages
# The last image to be built is trusted-firmware-a
@@ -0,0 +1 @@
CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda2 rw rootwait"
@@ -1,17 +0,0 @@
Upstream-Status: Inappropriate [OE config specific]
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index f0ac2f9da3..93fcd3026a 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -10,7 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_ANDROID_BOOT_IMAGE=y
CONFIG_BOOTDELAY=1
CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
+CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 androidboot.hardware=fvpbase root=/dev/vda2 rw rootwait loglevel=9"
# CONFIG_USE_BOOTCOMMAND is not set
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
@@ -5,7 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
#
# FVP BASE
#
SRC_URI_append_fvp-base = " file://u-boot_vexpress_fvp.patch \
SRC_URI_append_fvp-base = " file://bootargs.cfg \
file://0001-vexpress64_fvp-Set-DRAM-to-4G-to-match-with-kernel-d.patch \
"
@@ -5,7 +5,11 @@
# in this file. Update SRC_URI and do_patch for building images with custom dts
#
FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/files:"
# We can't set FILESEXTRAPATHS once because of how the kernel classes search for
# config fragments. Discussion is ongoing as to whether this is the correct
# solution, or a workaround.
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14154
ARMBSPFILESPATHS := "${THISDIR}:${THISDIR}/files:"
# Arm platforms kmeta
SRC_URI_KMETA = "file://arm-platforms-kmeta;type=kmeta;name=arm-platforms-kmeta;destsuffix=arm-platforms-kmeta"
@@ -26,6 +30,7 @@ COMPATIBLE_MACHINE_corstone500 = "corstone500"
#
COMPATIBLE_MACHINE_fvp-base = "fvp-base"
KMACHINE_fvp-base = "fvp"
FILESEXTRAPATHS_prepend_fvp-base := "${ARMBSPFILESPATHS}"
SRC_URI_append_fvp-base = " file://fvp-base-dts.patch"
#
@@ -33,6 +38,7 @@ SRC_URI_append_fvp-base = " file://fvp-base-dts.patch"
#
COMPATIBLE_MACHINE_fvp-base-arm32 = "fvp-base-arm32"
KMACHINE_fvp-base-arm32 = "fvp-arm32"
FILESEXTRAPATHS_prepend_fvp-base-arm32 := "${ARMBSPFILESPATHS}"
SRC_URI_append_fvp-base-arm32 = " file://fvp-base-arm32-dts.patch \
file://0001-ARM-vexpress-enable-GICv3.patch"
@@ -43,6 +49,11 @@ COMPATIBLE_MACHINE_juno = "juno"
KMACHINE_juno = "juno"
KBUILD_DEFCONFIG_juno = "defconfig"
KCONFIG_MODE_juno = "--alldefconfig"
#FIXME - temporarily pin kernel version to allow for juno patches to apply
KBRANCH_juno = "v5.4/standard/base"
KERNEL_VERSION_SANITY_SKIP_juno = "1"
SRCREV_machine_juno = "dd8a64a523fb714a98328441e0de72cde115a6fc"
FILESEXTRAPATHS_prepend_juno := "${ARMBSPFILESPATHS}"
SRC_URI_append_juno = " \
file://0001-mailbox-add-support-for-doorbell-signal-mode-control.patch \
file://0002-dt-bindings-mailbox-add-bindings-to-support-ARM-MHU-.patch \
@@ -68,6 +79,7 @@ KCONFIG_MODE_sgi575 = "--alldefconfig"
COMPATIBLE_MACHINE_tc0 = "tc0"
KMACHINE_tc0 = "tc0"
KCONFIG_MODE_tc0 = "--alldefconfig"
FILESEXTRAPATHS_prepend_tc0 := "${ARMBSPFILESPATHS}"
SRC_URI_append_tc0 = " \
file://defconfig \
file://0001-drm-Add-component-aware-simple-encoder.patch \
@@ -94,12 +106,12 @@ FILESEXTRAPATHS_prepend_n1sdp := "${THISDIR}/linux-yocto-5.10/n1sdp:"
COMPATIBLE_MACHINE_n1sdp = "n1sdp"
KBUILD_DEFCONFIG_n1sdp = "defconfig"
KCONFIG_MODE_n1sdp = "--alldefconfig"
FILESEXTRAPATHS_prepend_n1sdp := "${ARMBSPFILESPATHS}"
SRC_URI_append_n1sdp = " \
file://0001-pci_quirk-add-acs-override-for-PCI-devices.patch \
file://0002-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch \
file://0003-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch \
file://0004-n1sdp-pcie-add-quirk-support-enabling-remote-chip-PC.patch \
file://0005-r8169-Fix-to-avoid-duplicate-sysfs-entry-creation-er.patch \
file://0001-arm64-defconfig-drop-unused-BACKLIGHT_GENERIC-option.patch \
file://no-power-avs.patch \
file://enable-realtek-R8169.cfg \
@@ -119,4 +131,5 @@ COMPATIBLE_MACHINE_musca-s1 = "(^$)"
# FVP BaseR AEMv8r64 Machine
#
COMPATIBLE_MACHINE_fvp-baser-aemv8r64 = "fvp-baser-aemv8r64"
FILESEXTRAPATHS_prepend_fvp-baser-aemv8r64 := "${ARMBSPFILESPATHS}"
SRC_URI_append_fvp-baser-aemv8r64 = " file://fvp-baser-aemv8r64.dts;subdir=git/arch/arm64/boot/dts/arm"
@@ -1,45 +0,0 @@
From 914fe7871fc2f00ec94cd4d17722158e94fa88df Mon Sep 17 00:00:00 2001
From: Khasim Mohammed <khasim.mohammed@arm.com>
Date: Fri, 8 Jan 2021 04:21:23 +0000
Subject: [PATCH] r8169: Fix to avoid duplicate sysfs entry creation error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending [yet to submit]
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Patch taken from :
https://git.linaro.org/landing-teams/working/arm/kernel-release.git/commit/?h=n1sdp&id=84baaae9e751c058717d9702438429257f077f03
Following error observed with r8169 driver, this patch fix the issue.
[ 27.544136] r8169 0002:07:00.0: enabling device (0000 -> 0003)
[ 27.559734] sysfs: cannot create duplicate filename '/class/mdio_bus/r8169-700'
[ 27.684858] libphy: mii_bus r8169-700 failed to register
[ 27.695602] r8169: probe of 0002:07:00.0 failed with error -22
Change-Id: Id696abbabd794ecef5c551c5c45630963d9502a6
Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 85d9c3e30c69..6d6b24978fd5 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5088,7 +5088,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_IGNORE_INTERRUPT;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x", pci_dev_id(pdev));
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x", pdev->bus->domain_nr, pci_dev_id(pdev));
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;
--
2.17.1
@@ -1,4 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files/corstone700:"
FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/files:"
COMPATIBLE_MACHINE = "${MACHINE}"
+6
View File
@@ -0,0 +1,6 @@
# For fvp-base* machines we just need to populate the rootfs partition
# but to keep backwards compatibility with disk.img,
# we need to create first partition empty
part --label empty --source empty --ondisk sda --size="1M" --system-id 8e --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label root --size="2048"
+3 -3
View File
@@ -4,15 +4,15 @@ set default="0"
set timeout="5"
menuentry 'Arm reference image boot on N1SDP (ACPI)' {
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4 acpi=force verbose debug
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4 acpi=force
}
menuentry 'Arm reference image boot on Single-Chip N1SDP (Device Tree)' {
devicetree /n1sdp-single-chip.dtb
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4 verbose debug
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4
}
menuentry 'Arm reference image boot on Multi-Chip N1SDP (Device Tree)' {
devicetree /n1sdp-multi-chip.dtb
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4 verbose debug
linux /Image earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=PARTUUID=6a60524d-061d-454a-bfd1-38989910eccd rootwait rootfstype=ext4
}
@@ -139,19 +139,5 @@ python external_arm_toolchain_version_handler () {
d.setVar('EAT_VER_KERNEL', eat_get_kernel_version(ld))
d.setVar('EAT_VER_GDB', eat_get_gdb_version(ld))
d.setVar('EAT_VER_BFD', eat_get_bfd_version(ld))
lc_libc = "LGPL-2.1"
lc_gcc = "GPL-3.0"
lc_rle = "GPL-3.0-with-GCC-exception"
lc_gdb = "GPL-3.0"
lc_bfd = "GPL-3.0"
d.setVar('EAT_LIBC_LICENSE', lc_libc)
d.setVar('EAT_GCC_LICENSE', lc_gcc)
d.setVar('EAT_RLE_LICENSE', lc_rle)
d.setVar('EAT_GDB_LICENSE', lc_gdb)
d.setVar('EAT_BFD_LICENSE', lc_bfd)
d.setVar('EAT_LICENSE', "%s & %s & %s & %s & %s" % (lc_libc, lc_gcc, lc_rle, lc_gdb, lc_bfd))
}
addhandler external_arm_toolchain_version_handler
@@ -1,5 +1,7 @@
inherit cross-canadian
require license.inc
PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
BPN = "external-arm-sdk-toolchain"
PV = "${EAT_VER_MAIN}"
@@ -10,9 +12,6 @@ INHIBIT_SYSROOT_STRIP = "1"
INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_SHLIBS = "1"
EAT_LICENSE ??= ""
LICENSE = "${EAT_LICENSE}"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# Skip packaging QA checks for prebuilt binaries
@@ -1,7 +1,10 @@
LICENSE = "GPL-3.0-with-GCC-exception & GPLv3 & GPLv2 & LGPLv3 & LGPLv2.1 & LGPLv2"
EAT_BFD_LICENSE = "GPL-3.0"
EAT_GCC_LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
EAT_GDB_LICENSE = "GPL-3.0"
EAT_LIBC_LICENSE = "GPLv2 & LGPLv2.1"
EAT_RLE_LICENSE = "GPL-3.0-with-GCC-exception"
LICENSE_${PN} = "${EAT_LIBC_LICENSE}"
LICENSE_${PN}-dev = "${EAT_LIBC_LICENSE}"
+80
View File
@@ -0,0 +1,80 @@
# Image class to write .fvpconf files for use with runfvp. If this is desired
# then add fvpboot to IMAGE_CLASSES, and set the variables below in your machine
# configuration as appropriate.
# Name of recipe providing FVP executable. If unset then the executable must be installed on the host.
FVP_PROVIDER ?= ""
# Name of FVP executable to run
FVP_EXE ?= ""
# Flags for --parameter/-C
FVP_CONFIG ?= ""
# Flags for --data
FVP_DATA ?= ""
# Flags for --application
FVP_APPLICATIONS ?= ""
# Flags to name serial terminals. Flag name is the terminal id (such as
# terminal_0), value is a human-readable name. If the name is not set
# then runfvp will hide the terminal.
FVP_TERMINALS ?= ""
# What terminal should be considered the primary console
FVP_CONSOLE ?= ""
# Arbitrary extra arguments
FVP_EXTRA_ARGS ?= ""
EXTRA_IMAGEDEPENDS += "${FVP_PROVIDER}"
inherit image-artifact-names
addtask do_write_fvpboot_conf after do_rootfs before do_image
python do_write_fvpboot_conf() {
# Note that currently this JSON file is in development and the format may
# change at any point, so it should always be used with a matching runfvp.
import json, shlex
if not d.getVar("FVP_EXE"):
return
conffile = os.path.join(d.getVar("IMGDEPLOYDIR"), d.getVar("IMAGE_NAME") + ".fvpconf")
conffile_link = os.path.join(d.getVar("IMGDEPLOYDIR"), d.getVar("IMAGE_LINK_NAME") + ".fvpconf")
data = {}
provider = d.getVar("FVP_PROVIDER")
if provider:
data["provider"] = provider
data["fvp-bindir"] = os.path.join(d.getVar("COMPONENTS_DIR"),
d.getVar("BUILD_ARCH"),
provider,
"usr", "bin")
def getFlags(varname):
flags = d.getVarFlags(varname)
# For unexplained reasons, getVarFlags() returns None if there are no flags
if flags is None:
return {}
# For other reasons, you can't pass expand=True
return {key: d.expand(value) for key, value in flags.items()}
data["exe"] = d.getVar("FVP_EXE")
data["parameters"] = getFlags("FVP_CONFIG")
data["data"] = shlex.split(d.getVar("FVP_DATA") or "")
data["applications"] = getFlags("FVP_APPLICATIONS")
data["console"] = d.getVar("FVP_CONSOLE")
data["terminals"] = getFlags("FVP_TERMINALS")
data["args"] = shlex.split(d.getVar("FVP_EXTRA_ARGS") or "")
os.makedirs(os.path.dirname(conffile), exist_ok=True)
with open(conffile, "wt") as f:
json.dump(data, f)
if conffile_link != conffile:
if os.path.lexists(conffile_link):
os.remove(conffile_link)
os.symlink(os.path.basename(conffile), conffile_link)
}
def fvpboot_vars(d):
build_vars = ['DEPLOY_DIR_IMAGE', 'IMAGE_NAME', 'IMAGE_LINK_NAME',
'COMPONENTS_DIR', 'BUILD_ARCH']
return build_vars + [k for k in d.keys() if k.startswith('FVP_')]
do_write_fvpboot_conf[vardeps] += "${@' '.join(fvpboot_vars(d))}"
+8 -7
View File
@@ -1,23 +1,24 @@
#@TYPE: Machine
#@NAME: generic-arm64
#@DESCRIPTION: Generic Arm64 machine for creating rootfs that should work on all arm64 hardware
#@DESCRIPTION: Generic Arm64 machine for typical SystemReady platforms, which
#have working firmware and boot via EFI.
require conf/machine/include/arm/arch-armv8a.inc
SERIAL_CONSOLES ?= "115200;ttyAMA0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
KERNEL_IMAGETYPE = "Image"
IMAGE_BOOT_FILES = "${KERNEL_IMAGETYPE}"
IMAGE_FSTYPES ?= "wic"
WKS_FILE ?= "mkefidisk.wks"
WKS_FILE ?= "efi-disk.wks.in"
MACHINE_FEATURES += "efi"
MACHINE_FEATURES += "alsa bluetooth efi qemu-usermode rtc screen usbhost vfat wifi"
EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}"
KBUILD_DEFCONFIG = "defconfig"
KCONFIG_MODE = "--alldefconfig"
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware"
@@ -0,0 +1,26 @@
require fvp-common.inc
SUMMARY = "Arm Fixed Virtual Platform - Armv-A Base RevC Architecture Envelope Model FVP"
HOMEPAGE = "https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms/arm-ecosystem-models"
LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=1a33828e132ba71861c11688dbb0bd16 \
file://license_terms/third_party_licenses.txt;md5=b40ecbbbd3409d48263437b782df6df9"
# This FVP cannot be downloaded directly, so download the Armv-A Base RevC AEM
# FVP yourself from the homepage and set FVP_BASE_A_AEM_TARBALL_URI appropriately
# (for example, file:///home/user/FVP_Base_RevC-2xAEMvA_11.14_21.tgz).
FVP_BASE_A_AEM_TARBALL_URI ?= ""
PV = "11.14_21"
SRC_URI = "${FVP_BASE_A_AEM_TARBALL_URI};subdir=${BP}"
python() {
if not d.getVar("FVP_BASE_A_AEM_TARBALL_URI"):
raise bb.parse.SkipRecipe("FVP_BASE_A_AEM_TARBALL_URI not set")
}
do_install() {
mkdir --parents ${D}${FVPDIR} ${D}${bindir}
cp --archive --no-preserve=ownership ${S}/Base_RevC_AEMvA_pkg/* ${D}${FVPDIR}/
fvp_link_binaries
}
@@ -0,0 +1,36 @@
HOMEPAGE = "https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms"
# FVP has an End User License Agreement. Add Arm-FVP-EULA to your
# LICENSE_FLAGS_WHITELIST if you agree to these terms.
LICENSE_FLAGS = "Arm-FVP-EULA"
LICENSE = "Proprietary & Apache-2.0 & Python-2.0 & GPL-3.0-with-GCC-exception & Zlib & NCSA & LGPLv2+ & MIT & BSD-3-Clause"
COMPATIBLE_HOST = '(x86_64|i.86).*-linux'
FVP_ARCH = "Linux64_GCC-6.4"
# The directory the FVP is installed into
FVPDIR = "${libdir}/fvp/${BPN}"
# Used in do_install to create symlinks in $bindir to $FVPDIR
fvp_link_binaries() {
for FVP in ${D}${FVPDIR}/models/${FVP_ARCH}/FVP_*; do
lnr $FVP ${D}${bindir}/$(basename $FVP)
done
# But not the .so files too
rm -f ${D}${bindir}/*.so
}
FILES_${PN} = "${bindir} ${FVPDIR}"
# Prebuilt binaries are already stripped
INSANE_SKIP_${PN} += "already-stripped"
# FVP can optionally have a GUI, but we can use the host libraries in native/nativesdk
INSANE_SKIP_${PN} += "file-rdeps"
# FVP brings its own standard library so don't let it be used as a shlib provider
PRIVATE_LIBS = "libgcc_s.so.1 libstdc++.so.6"
INHIBIT_DEFAULT_DEPS = "1"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,25 @@
require fvp-common.inc
# These need to be set
MODEL ?= "unset"
MODEL_CODE ?= "unset"
PV ?= "unset"
SUMMARY = "Arm Fixed Virtual Platform - ${MODEL} Ecosystem Reference Design"
HOMEPAGE = "https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps"
SRC_URI = "https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/${MODEL}/${MODEL_CODE}_${PV}.tgz;subdir=${BP}"
LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=1a33828e132ba71861c11688dbb0bd16 \
file://license_terms/third_party_licenses.txt;md5=47473b1e04b70938cf0a7ffea8ea4cc3"
do_install() {
mkdir --parents ${D}${FVPDIR} ${D}${bindir}
${S}/${MODEL_CODE}.sh \
--i-agree-to-the-contained-eula \
--no-interactive \
--destination ${D}${FVPDIR}
fvp_link_binaries
}
@@ -0,0 +1,22 @@
require fvp-ecosystem.inc
MODEL = "Library"
MODEL_CODE = "FVP_ARM_Std_Library"
PV = "11.14_21"
HOMEPAGE = "https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms"
LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=a50d186fffa51ed55599183aad911298 \
file://license_terms/third_party_licenses.txt;md5=b40ecbbbd3409d48263437b782df6df9"
# The FVP Library tarball cannot be downloaded directly, so download the it
# yourself from from the homepage and set FVP_LIBRARY_TARBALL_URI appropriately
# (for example, "file:///home/user/FVP_ARM_Std_Library_11.14_21.tgz").
FVP_LIBRARY_TARBALL_URI ?= ""
SRC_URI = "${FVP_LIBRARY_TARBALL_URI};subdir=${BP}"
python() {
if not d.getVar("FVP_LIBRARY_TARBALL_URI"):
raise bb.parse.SkipRecipe("FVP_LIBRARY_TARBALL_URI not set")
}
@@ -0,0 +1,7 @@
require fvp-ecosystem.inc
MODEL = "Neoverse-N1"
MODEL_CODE = "FVP_RD_N1_edge"
PV = "11.12_43"
SRC_URI[sha256sum] = "e428cc44db251202bf45ae68d40832d01efbc5d0f1323f1ce46237213dd4f0fa"
@@ -0,0 +1,7 @@
require fvp-ecosystem.inc
MODEL = "SGI-575"
MODEL_CODE = "FVP_CSS_SGI-575"
PV = "11.12_59"
SRC_URI[sha256sum] = "86c7a16d83b0801278b4a3d05c8d42c4955ed22a0dbea3c583798fb971bc425c"
@@ -1,11 +1,17 @@
Change USB_CONN_GPIO to 'y' by default and regenerate the defconfig via
`make savedefconfig`.
From c72967164b63ea16c7c0276a306b66797998b62a Mon Sep 17 00:00:00 2001
From: Jon Mason <jdmason@kudzu.us>
Date: Sat, 1 May 2021 17:18:37 -0400
Subject: [PATCH] Change USB_CONN_GPIO to 'y' by default and regenerate the
defconfig via `make savedefconfig`.
Upstream-Status: Inappropriate [not needed in newer kernels]
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
arch/arm64/configs/defconfig | 65 +++++++++++++-----------------------
1 file changed, 24 insertions(+), 41 deletions(-)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 5cfe3cf6f2ac..1fed16950a7c 100644
index 6d84761d1285..8a2f7e075ba9 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -13,7 +13,6 @@ CONFIG_IKCONFIG=y
@@ -36,11 +42,11 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_ACPI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
-CONFIG_ACPI_APEI_PCIEAER=y
-CONFIG_PCIEAER=y
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
CONFIG_ACPI_APEI_EINJ=y
CONFIG_VIRTUALIZATION=y
@@ -180,12 +176,11 @@ CONFIG_QRTR_SMD=m
@@ -181,12 +177,11 @@ CONFIG_QRTR_SMD=m
CONFIG_QRTR_TUN=m
CONFIG_BPF_JIT=y
CONFIG_CAN=m
@@ -54,7 +60,15 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
# CONFIG_BT_LE is not set
CONFIG_BT_LEDS=y
# CONFIG_BT_DEBUGFS is not set
@@ -222,13 +217,13 @@ CONFIG_PCI_HOST_THUNDER_ECAM=y
@@ -206,6 +201,7 @@ CONFIG_NFC_NCI=m
CONFIG_NFC_S3FWRN5_I2C=m
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
CONFIG_PCI_IOV=y
CONFIG_PCI_PASID=y
CONFIG_HOTPLUG_PCI=y
@@ -223,13 +219,13 @@ CONFIG_PCI_HOST_THUNDER_ECAM=y
CONFIG_PCIE_ROCKCHIP_HOST=m
CONFIG_PCIE_BRCMSTB=m
CONFIG_PCI_LAYERSCAPE=y
@@ -69,7 +83,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_PCI_ENDPOINT=y
CONFIG_PCI_ENDPOINT_CONFIGFS=y
CONFIG_PCI_EPF_TEST=m
@@ -238,7 +233,6 @@ CONFIG_FW_LOADER_USER_HELPER=y
@@ -239,7 +235,6 @@ CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
CONFIG_HISILICON_LPC=y
CONFIG_SIMPLE_PM_BUS=y
@@ -77,7 +91,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_TEGRA_ACONNECT=m
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
@@ -257,7 +251,6 @@ CONFIG_MTD_NAND_MARVELL=y
@@ -258,7 +253,6 @@ CONFIG_MTD_NAND_MARVELL=y
CONFIG_MTD_NAND_FSL_IFC=y
CONFIG_MTD_NAND_QCOM=y
CONFIG_MTD_SPI_NOR=y
@@ -85,7 +99,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=m
CONFIG_VIRTIO_BLK=y
@@ -342,18 +335,18 @@ CONFIG_SNI_NETSEC=y
@@ -343,18 +337,18 @@ CONFIG_SNI_NETSEC=y
CONFIG_STMMAC_ETH=m
CONFIG_TI_K3_AM65_CPSW_NUSS=y
CONFIG_QCOM_IPA=m
@@ -107,7 +121,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_RTL8152=m
@@ -453,6 +446,7 @@ CONFIG_SPI=y
@@ -454,6 +448,7 @@ CONFIG_SPI=y
CONFIG_SPI_ARMADA_3700=y
CONFIG_SPI_BCM2835=m
CONFIG_SPI_BCM2835AUX=m
@@ -115,7 +129,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_SPI_FSL_LPSPI=y
CONFIG_SPI_FSL_QUADSPI=y
CONFIG_SPI_NXP_FLEXSPI=y
@@ -513,9 +507,6 @@ CONFIG_GPIO_PCA953X_IRQ=y
@@ -514,9 +509,6 @@ CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_BD9571MWV=m
CONFIG_GPIO_MAX77620=y
CONFIG_GPIO_SL28CPLD=m
@@ -125,7 +139,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_POWER_RESET_MSM=y
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
@@ -532,10 +523,10 @@ CONFIG_SENSORS_INA3221=m
@@ -533,10 +525,10 @@ CONFIG_SENSORS_INA3221=m
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y
CONFIG_THERMAL_EMULATION=y
@@ -138,7 +152,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_ROCKCHIP_THERMAL=m
CONFIG_RCAR_THERMAL=y
CONFIG_RCAR_GEN3_THERMAL=y
@@ -552,7 +543,6 @@ CONFIG_WATCHDOG=y
@@ -553,7 +545,6 @@ CONFIG_WATCHDOG=y
CONFIG_SL28CPLD_WATCHDOG=m
CONFIG_ARM_SP805_WATCHDOG=y
CONFIG_ARM_SBSA_WATCHDOG=y
@@ -146,7 +160,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_S3C2410_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_SUNXI_WATCHDOG=m
@@ -561,6 +551,7 @@ CONFIG_IMX_SC_WDT=m
@@ -562,6 +553,7 @@ CONFIG_IMX_SC_WDT=m
CONFIG_QCOM_WDT=m
CONFIG_MESON_GXBB_WATCHDOG=m
CONFIG_MESON_WATCHDOG=m
@@ -154,7 +168,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_RENESAS_WDT=y
CONFIG_UNIPHIER_WATCHDOG=y
CONFIG_BCM2835_WDT=y
@@ -607,13 +598,12 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
@@ -608,13 +600,12 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_SDR_SUPPORT=y
@@ -169,7 +183,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_VIDEO_RCAR_CSI2=m
CONFIG_VIDEO_RCAR_VIN=m
CONFIG_VIDEO_SUN6I_CSI=m
@@ -628,7 +618,6 @@ CONFIG_SDR_PLATFORM_DRIVERS=y
@@ -629,7 +620,6 @@ CONFIG_SDR_PLATFORM_DRIVERS=y
CONFIG_VIDEO_RCAR_DRIF=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_OV5645=m
@@ -177,7 +191,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_DRM=m
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_MALI_DISPLAY=m
@@ -660,8 +649,8 @@ CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
@@ -661,8 +651,8 @@ CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
CONFIG_DRM_PANEL_SITRONIX_ST7703=m
CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
CONFIG_DRM_DISPLAY_CONNECTOR=m
@@ -187,7 +201,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_DRM_SII902X=m
CONFIG_DRM_SIMPLE_BRIDGE=m
CONFIG_DRM_THINE_THC63LVD1024=m
@@ -682,7 +671,6 @@ CONFIG_DRM_PANFROST=m
@@ -683,7 +673,6 @@ CONFIG_DRM_PANFROST=m
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_EFI=y
@@ -195,7 +209,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_BACKLIGHT_PWM=m
CONFIG_BACKLIGHT_LP855X=m
CONFIG_LOGO=y
@@ -726,7 +714,6 @@ CONFIG_SND_SOC_WSA881X=m
@@ -727,7 +716,6 @@ CONFIG_SND_SOC_WSA881X=m
CONFIG_SND_SIMPLE_CARD=m
CONFIG_SND_AUDIO_GRAPH_CARD=m
CONFIG_I2C_HID=m
@@ -203,7 +217,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_USB_XHCI_HCD=y
@@ -859,7 +846,6 @@ CONFIG_VIRTIO_BALLOON=y
@@ -859,7 +847,6 @@ CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_MMIO=y
CONFIG_XEN_GNTDEV=y
CONFIG_XEN_GRANT_DEV_ALLOC=y
@@ -211,7 +225,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_CHROME_PLATFORMS=y
CONFIG_CROS_EC=y
CONFIG_CROS_EC_I2C=y
@@ -885,8 +871,8 @@ CONFIG_QCOM_A53PLL=y
@@ -885,8 +872,8 @@ CONFIG_QCOM_A53PLL=y
CONFIG_QCOM_CLK_APCS_MSM8916=y
CONFIG_QCOM_CLK_SMD_RPM=y
CONFIG_QCOM_CLK_RPMH=y
@@ -221,7 +235,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_MSM_GCC_8916=y
CONFIG_MSM_GCC_8994=y
CONFIG_MSM_MMCC_8996=y
@@ -894,12 +880,9 @@ CONFIG_MSM_GCC_8998=y
@@ -894,12 +881,9 @@ CONFIG_MSM_GCC_8998=y
CONFIG_QCS_GCC_404=y
CONFIG_SC_GCC_7180=y
CONFIG_SDM_CAMCC_845=m
@@ -234,7 +248,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_SM_GPUCC_8150=y
CONFIG_SM_GPUCC_8250=y
CONFIG_QCOM_HFPLL=y
@@ -930,6 +913,7 @@ CONFIG_RASPBERRYPI_POWER=y
@@ -930,6 +914,7 @@ CONFIG_RASPBERRYPI_POWER=y
CONFIG_FSL_DPAA=y
CONFIG_FSL_MC_DPIO=y
CONFIG_QCOM_AOSS_QMP=y
@@ -242,7 +256,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_QCOM_GENI_SE=y
CONFIG_QCOM_RMTFS_MEM=m
CONFIG_QCOM_RPMH=y
@@ -941,19 +925,20 @@ CONFIG_QCOM_SMP2P=y
@@ -941,19 +926,20 @@ CONFIG_QCOM_SMP2P=y
CONFIG_QCOM_SMSM=y
CONFIG_QCOM_SOCINFO=m
CONFIG_QCOM_APR=m
@@ -271,7 +285,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_ROCKCHIP_PM_DOMAINS=y
CONFIG_ARCH_TEGRA_132_SOC=y
CONFIG_ARCH_TEGRA_210_SOC=y
@@ -1017,9 +1002,9 @@ CONFIG_PHY_UNIPHIER_USB3=y
@@ -1017,9 +1003,9 @@ CONFIG_PHY_UNIPHIER_USB3=y
CONFIG_PHY_TEGRA_XUSB=y
CONFIG_ARM_SMMU_V3_PMU=m
CONFIG_FSL_IMX8_DDR_PMU=m
@@ -282,7 +296,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_IMX_OCOTP_SCU=y
CONFIG_QCOM_QFPROM=y
@@ -1035,10 +1020,9 @@ CONFIG_FPGA_REGION=m
@@ -1035,10 +1021,9 @@ CONFIG_FPGA_REGION=m
CONFIG_OF_FPGA_REGION=m
CONFIG_TEE=y
CONFIG_OPTEE=y
@@ -294,7 +308,7 @@ index 5cfe3cf6f2ac..1fed16950a7c 100644
CONFIG_INTERCONNECT=y
CONFIG_INTERCONNECT_QCOM=y
CONFIG_INTERCONNECT_QCOM_MSM8916=m
@@ -1059,7 +1043,6 @@ CONFIG_CUSE=m
@@ -1059,7 +1044,6 @@ CONFIG_CUSE=m
CONFIG_OVERLAY_FS=m
CONFIG_VFAT_FS=y
CONFIG_HUGETLBFS=y
@@ -0,0 +1,10 @@
CONFIG_HW_RANDOM_OPTEE=y
CONFIG_TEE=y
#
# TEE drivers
#
CONFIG_OPTEE=y
CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1
# end of TEE drivers
@@ -1,126 +0,0 @@
Revert ZONE_DMA patches
Upstream-Status: Inappropriate
Signed-off-by: Jon Mason <jon.mason@arm.com>
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 916e0547fdcc..7fbb9c85af8a 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -29,7 +29,6 @@
#include <linux/kexec.h>
#include <linux/crash_dump.h>
#include <linux/hugetlb.h>
-#include <linux/acpi_iort.h>
#include <asm/boot.h>
#include <asm/fixmap.h>
@@ -43,6 +42,8 @@
#include <asm/tlb.h>
#include <asm/alternative.h>
+#define ARM64_ZONE_DMA_BITS 30
+
/*
* We need to be able to catch inadvertent references to memstart_addr
* that occur (potentially in generic code) before arm64_memblock_init()
@@ -187,13 +188,9 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits)
static void __init zone_sizes_init(unsigned long min, unsigned long max)
{
unsigned long max_zone_pfns[MAX_NR_ZONES] = {0};
- unsigned int __maybe_unused acpi_zone_dma_bits;
- unsigned int __maybe_unused dt_zone_dma_bits;
#ifdef CONFIG_ZONE_DMA
- acpi_zone_dma_bits = fls64(acpi_iort_dma_get_max_cpu_address());
- dt_zone_dma_bits = fls64(of_dma_get_max_cpu_address(NULL));
- zone_dma_bits = min3(32U, dt_zone_dma_bits, acpi_zone_dma_bits);
+ zone_dma_bits = ARM64_ZONE_DMA_BITS;
arm64_dma_phys_limit = max_zone_phys(zone_dma_bits);
max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit);
#endif
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 2494138a6905..94f34109695c 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1730,58 +1730,3 @@ void __init acpi_iort_init(void)
iort_init_platform_devices();
}
-
-#ifdef CONFIG_ZONE_DMA
-/*
- * Extract the highest CPU physical address accessible to all DMA masters in
- * the system. PHYS_ADDR_MAX is returned when no constrained device is found.
- */
-phys_addr_t __init acpi_iort_dma_get_max_cpu_address(void)
-{
- phys_addr_t limit = PHYS_ADDR_MAX;
- struct acpi_iort_node *node, *end;
- struct acpi_table_iort *iort;
- acpi_status status;
- int i;
-
- if (acpi_disabled)
- return limit;
-
- status = acpi_get_table(ACPI_SIG_IORT, 0,
- (struct acpi_table_header **)&iort);
- if (ACPI_FAILURE(status))
- return limit;
-
- node = ACPI_ADD_PTR(struct acpi_iort_node, iort, iort->node_offset);
- end = ACPI_ADD_PTR(struct acpi_iort_node, iort, iort->header.length);
-
- for (i = 0; i < iort->node_count; i++) {
- if (node >= end)
- break;
-
- switch (node->type) {
- struct acpi_iort_named_component *ncomp;
- struct acpi_iort_root_complex *rc;
- phys_addr_t local_limit;
-
- case ACPI_IORT_NODE_NAMED_COMPONENT:
- ncomp = (struct acpi_iort_named_component *)node->node_data;
- local_limit = DMA_BIT_MASK(ncomp->memory_address_limit);
- limit = min_not_zero(limit, local_limit);
- break;
-
- case ACPI_IORT_NODE_PCI_ROOT_COMPLEX:
- if (node->revision < 1)
- break;
-
- rc = (struct acpi_iort_root_complex *)node->node_data;
- local_limit = DMA_BIT_MASK(rc->memory_address_limit);
- limit = min_not_zero(limit, local_limit);
- break;
- }
- node = ACPI_ADD_PTR(struct acpi_iort_node, node, node->length);
- }
- acpi_put_table(&iort->header);
- return limit;
-}
-#endif
diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h
index 1a12baa58e40..20a32120bb88 100644
--- a/include/linux/acpi_iort.h
+++ b/include/linux/acpi_iort.h
@@ -38,7 +38,6 @@ void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *size);
const struct iommu_ops *iort_iommu_configure_id(struct device *dev,
const u32 *id_in);
int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head);
-phys_addr_t acpi_iort_dma_get_max_cpu_address(void);
#else
static inline void acpi_iort_init(void) { }
static inline u32 iort_msi_map_id(struct device *dev, u32 id)
@@ -56,9 +55,6 @@ static inline const struct iommu_ops *iort_iommu_configure_id(
static inline
int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head)
{ return 0; }
-
-static inline phys_addr_t acpi_iort_dma_get_max_cpu_address(void)
-{ return PHYS_ADDR_MAX; }
#endif
#endif /* __ACPI_IORT_H__ */
@@ -1,11 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/linux-yocto:"
SRC_URI_append_qemuarm64-sbsa = " \
file://defconfig.patch \
"
COMPATIBLE_MACHINE_generic-arm64 = "generic-arm64"
SRC_URI_append_generic-arm64 = " \
file://defconfig.patch \
"
@@ -1,3 +1,21 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
ARMFILESPATHS := "${THISDIR}/${PN}:"
SRC_URI_append_qemuarm64-secureboot = " file://zone_dma_revert.patch"
COMPATIBLE_MACHINE_generic-arm64 = "generic-arm64"
FILESEXTRAPATHS_prepend_generic-arm64 = "${ARMFILESPATHS}"
SRC_URI_append_generic-arm64 = " \
file://defconfig.patch \
"
FILESEXTRAPATHS_prepend_qemuarm64-sbsa = "${ARMFILESPATHS}"
LINUX_VERSION_qemuarm64-sbsa = "5.10.30"
SRCREV_machine_qemuarm64-sbsa = "d6e20b2257ecfa6e796a45a4175863862a28fa11"
SRC_URI_append_qemuarm64-sbsa = " \
file://defconfig.patch \
"
LINUX_VERSION_qemuarm64-secureboot = "5.10.21"
SRCREV_machine_qemuarm64-secureboot = "012f78dadb7186c479343b77e97df2925caf681e"
FILESEXTRAPATHS_prepend_qemuarm64-secureboot = "${ARMFILESPATHS}"
SRC_URI_append_qemuarm64-secureboot = " \
file://tee.cfg \
"
+11
View File
@@ -0,0 +1,11 @@
# short-description: Create an EFI disk image
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media.
part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active --align 1024 --use-uuid
part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
part swap --size 44 --label swap --fstype=swap --use-uuid
bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4"
Executable
+167
View File
@@ -0,0 +1,167 @@
#! /usr/bin/env python3
import json
import os
import sys
import subprocess
import pathlib
import logging
logger = logging.getLogger("RunFVP")
# TODO: option to switch between telnet and netcat
connect_command = "telnet localhost %port"
terminal_map = {
"tmux": f"tmux new-window -n \"%title\" \"{connect_command}\"",
"xterm": f"xterm -title \"%title\" -e {connect_command}",
"none": ""
# TODO more terminals
}
def get_image_directory(machine=None):
"""
Get the DEPLOY_DIR_IMAGE for the specified machine
(or the configured machine if not set).
"""
import bb.tinfoil
if machine:
os.environ["MACHINE"] = machine
with bb.tinfoil.Tinfoil() as tinfoil:
tinfoil.prepare(config_only=True)
image_dir = tinfoil.config_data.getVar("DEPLOY_DIR_IMAGE")
logger.debug(f"Got DEPLOY_DIR_IMAGE {image_dir}")
return pathlib.Path(image_dir)
def runfvp(args):
import argparse
parser = argparse.ArgumentParser(description="Run images in a FVP")
parser.add_argument("config", nargs="?", help="Machine name or path to .fvpconf file")
group = parser.add_mutually_exclusive_group()
group.add_argument("-t", "--terminals", choices=terminal_map.keys(), default="xterm", help="Automatically start terminals")
group.add_argument("-c", "--console", action="store_true", help="Attach the first uart to stdin/stdout")
parser.add_argument("--verbose", action="store_true", help="Output verbose logging")
parser.usage = f"{parser.format_usage().strip()} -- [ arguments passed to FVP ]"
# TODO option for telnet vs netcat
try:
i = sys.argv.index("--")
arguments = sys.argv[1:i]
fvp_args = sys.argv[i+1:]
except ValueError:
arguments = sys.argv[1:]
fvp_args = []
args = parser.parse_args(args=arguments)
logging.basicConfig(level=args.verbose and logging.DEBUG or logging.WARNING)
logger.debug(f"Parsed arguments are {vars(args)}")
# If we're hooking up the console, don't start any terminals
if args.console:
args.terminals = "none"
if args.config and os.path.exists(args.config):
config_file = args.config
else:
image_dir = get_image_directory(args.config)
# All .fvpconf configuration files
configs = image_dir.glob("*.fvpconf")
# Just the files
configs = [p for p in configs if p.is_file() and not p.is_symlink()]
if not configs:
print(f"Cannot find any .fvpconf in {image_dir}")
sys.exit(1)
# Sorted by modification time
configs = sorted(configs, key=lambda p: p.stat().st_mtime)
config_file = configs[-1]
logger.debug(f"Loading {config_file}")
with open(config_file) as f:
config = json.load(f)
# Ensure that all expected keys are present
def sanitise(key, value):
if key not in config or config[key] is None:
config[key] = value
sanitise("fvp-bindir", "")
sanitise("exe", "")
sanitise("parameters", {})
sanitise("data", {})
sanitise("applications", {})
sanitise("terminals", {})
sanitise("args", [])
sanitise("console", "")
if not config["exe"]:
logger.error("Required value FVP_EXE not set in machine configuration")
sys.exit(1)
cli = []
if config["fvp-bindir"]:
cli.append(os.path.join(config["fvp-bindir"], config["exe"]))
else:
cli.append(config["exe"])
for param, value in config["parameters"].items():
cli.extend(["--parameter", f"{param}={value}"])
for value in config["data"]:
cli.extend(["--data", value])
for param, value in config["applications"].items():
cli.extend(["--application", f"{param}={value}"])
for terminal, name in config["terminals"].items():
# If terminals are enabled and this terminal has been named
if args.terminals != "none" and name:
# TODO if raw mode
# cli.extend(["--parameter", f"{terminal}.mode=raw"])
# TODO put name into terminal title
cli.extend(["--parameter", f"{terminal}.terminal_command={terminal_map[args.terminals]}"])
else:
# Disable terminal
cli.extend(["--parameter", f"{terminal}.start_telnet=0"])
cli.extend(config["args"])
# Finally add the user's extra arguments
cli.extend(fvp_args)
logger.debug(f"Constructed FVP call: {cli}")
if args.console:
expected_terminal = config["console"]
if not expected_terminal:
logger.error("--console used but FVP_CONSOLE not set in machine configuration")
sys.exit(1)
fvp_process = subprocess.Popen(cli, bufsize=1, universal_newlines=True, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
import selectors, re
selector = selectors.DefaultSelector()
selector.register(fvp_process.stdout, selectors.EVENT_READ)
output = ""
looking = True
while fvp_process.poll() is None:
# TODO some sort of timeout for 'input never appeared'
events = selector.select(timeout=10)
for key, mask in events:
line = key.fileobj.readline()
output += line
if looking:
m = re.match(fr"^{expected_terminal}: Listening.+port ([0-9]+)$", line)
if m:
port = m.group(1)
subprocess.run(["telnet", "localhost", port])
looking = False
if fvp_process.returncode:
logger.error(f"{fvp_process.args[0]} quit with code {fvp_process.returncode}:")
logger.error(output)
else:
sys.exit(subprocess.run(cli).returncode)
if __name__ == "__main__":
runfvp(sys.argv)