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

Compare commits

...

629 Commits

Author SHA1 Message Date
Ross Burton 81ed80b573 CI: pin to kas 3.2 as 3.2.1 fails
For some reason the kas 3.2.1 container fails:

No such file or directory: '/builds/engineering/yocto/meta-arm/ci/ci/base.yml'

Note the repeated /ci/, which is wrong.

Pin the kas container to 3.2 for now until this is resolved.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2023-02-19 11:46:23 -05:00
Jon Mason d7bd5a0518 arm-bsp/juno: move to compressed initramfs image
Change u-boot and machine config to default to booting a compressed
initramfs.  This allows for easier testing.  A compressed image is
needed as the image is too big for the storage, and the error notifying
of such is vague.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-18 12:43:20 -05:00
Ross Burton 8961c3e10a arm-toolchain/layer.conf: remove BB_DANGLINGAPPENDS_WARNONLY
This appears to be historical from when the toolchain was in meta-linaro.

It isn't needed anymore, there's one bbappend in meta-arm-toolchain for
grub which is part of oe-core, so will never be dangling.

This variable has a global effect, so leaving it in here has a negative
impact on users.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-04 14:08:22 -04:00
Jon Mason 1f815d6e9a arm/trusted-firmware-a: Fix v2.4 recipe
The previous patch didn't have the necessary space when doing an
append.  Luckily, the include file append before this one had an extra
space.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-11 11:15:11 -04:00
Jon Mason b1e01a2ced arm/trusted-firmware-a: Fix v1.5 recipe
0003-xlat-tables-v2-remove-tautological-assert.patch does not apply on
the TF-A v1.5 sources.  Move that file append to the v2.4 recipe so that
it will not attempt to apply for v1.5.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-02 15:17:07 -04:00
Jon Mason 878fabbfc7 ci: make get-binary-toolchain run per build
In a distributed, non-homogeneous CI setup, the binary-toolchain setup
script might not run on the machine that needs the toolchains.  Make
this per-build and it will always be there, at the expense of running on
builds that might not need it (though it still should be fast).

Also, there is an issue with the directory where the binary toolchain is
located being global, and racing against other systems using, setting up,
and tearing down.  Link this to a local directory to avoid any races.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-11 13:24:24 -05:00
Jon Mason d2d7bfa38f arm-bsp: fix yylloc kernel build error
Backport patch from upstream to address the following error:
scripts/dtc/dtc-parser.tab.o:(.bss+0x20): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-11 11:52:53 -05:00
Ross Burton fe35ff5ba8 CI: use the latest release of the Kas container
If we don't specify a tag name GitLab uses the 'latest' tag, which for
Kas is moved whenever an image build is made.

Instead explicitly use the latest-release tag, which is only updated
when a release is made.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-28 15:00:08 -05:00
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
Adrian Herrera cec4d317e9 CI: add kas file and job for gem5-atp-arm64
Change-Id: Iee0d27c15fe00a4363ed832c06cb502c54299cd5
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-22 12:33:06 -04:00
Adrian Herrera bcbd365cfe atp: initial layer
meta-atp layer provides support for building AMBA Adaptive Traffic
Profiles (ATP) Engine. It provides the following recipes:

- ATP Engine native standalone build.
- ATP Engine with gem5 as host platform.
- ATP Linux kernel modules.
- ATP Linux user API.
- ATP Linux tests.

The layer provides a "gem5-atp-arm64" machine with ATP device and
adapter support.

Change-Id: Ib86c7502d62d5707d0d4bbdd7d179f231cf96f57
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-22 09:48:22 -04:00
Ross Burton f723b6b593 layer.conf: don't claim compatibility with Gatesgarth
We don't test this, and don't expect it to work, so don't claim it does.

Change-Id: I045930e690edba5a5b0b8cb810130c8c6733623f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-21 22:23:55 -04:00
Peter Hoyes 696773771f arm-autonomy/docs: Change quickstart instructions to hardknott
Issue-Id: SCM-2307
Change-Id: Ieb7a6d3280a7eba573a57b4e52e275adb0a208df
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-21 22:23:55 -04:00
Jon Mason 5c5cd66675 CI: Add repo dir to disk usage and ability to purge everything
Add the newly added repo dir to the disk usage calculation and add the
ability to remove each of the persistent directories.

Change-Id: Ib922ad42c62efdeccf01851ac751742ed67748ae
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 13:57:39 -04:00
Diego Sueiro 65382e51b7 arm-bsp/docs: Updated documentation fvp-baser-aemv8r64 MACHINE
Added quickstart instructions on how to build a BSP evaluation image using kas.
Updated FVP naming convention as well as information about where to download
and how to run the FVP.

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ia6056194ed23d6e38769a3e300eadf77fc41beb2
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 13:57:39 -04:00
Diego Sueiro b43c30089c kas: Add fvp-baser-aemv8r64 BSP evaluation build
The kas/fvp-baser-aemv8r64-bsp.yml is intended to be used as an evaluation
build for the BSP components.

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Idce501224f4c8fbd6c53dc318db73dcd3100b57b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 13:57:39 -04:00
Diego Sueiro 8baef3984a arm-autonomy/arm-autonomy-host: Set Xen to 4.14+stable version
Since meta-virtualization master branch bumped to 4.15+stable we need to force
the 4.14+stable until we validate the new version.

Issue-Id: SSCM-2307
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Id204314af9c87615d88dfc60702867380225b491
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 13:57:39 -04:00
Jon Mason 70e9b1ffde arm: workaround qemuarm64-secureboot ZONE_DMA issues
Upstream stable patches for ZONE_DMA size and dma-ranges are causing:

Segmentation fault
[    3.156012] Internal error: synchronous external abort: 96000050 [#15] PREEMPT SMP
[    3.156172] Modules linked in:
[    3.156247] CPU: 0 PID: 139 Comm: rc Tainted: G      D           5.10.21-yocto-standard #1
[    3.156391] Hardware name: linux,dummy-virt (DT)
[    3.156490] pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--)
[    3.156619] pc : copy_page+0x40/0xc0
[    3.156691] lr : copy_highpage+0x58/0xe0
[    3.156786] sp : ffffffc01192bc10
[    3.156855] x29: ffffffc01192bc10 x28: ffffff804036a880
[    3.156958] x27: 0000000000000000 x26: ffffff80432e56f0
[    3.157063] x25: ffffff8043955c38 x24: 000000557a600000
[    3.157167] x23: ffffff80432e5680 x22: ffffffff00e4e940
[    3.157268] x21: ffffffff00180600 x20: ffffff800e018000
[    3.157378] x19: ffffff80413a5000 x18: 0000000000000000
[    3.157495] x17: 0000000000000000 x16: 000000557a5ffc48
[    3.157611] x15: 0000000000000001 x14: 0000000000000000
[    3.157715] x13: 000000557a60ae08 x12: 0000000000000000
[    3.157832] x11: 0000000000000000 x10: 0000000000000000
[    3.157920] x9 : 000000557a5fd010 x8 : 000000000557a600
[    3.158033] x7 : 0000000000000161 x6 : 0000000000000000
[    3.158140] x5 : 0000000000000000 x4 : 00005b0000000002
[    3.158238] x3 : 000000557a5fa550 x2 : 0000000000000000
[    3.158348] x1 : ffffff80413a5080 x0 : ffffff800e018100
[    3.158451] Call trace:
[    3.158501]  copy_page+0x40/0xc0
[    3.158572]  copy_user_highpage+0x24/0x40
[    3.158654]  wp_page_copy+0x90/0x790
[    3.158723]  do_wp_page+0xa4/0x490
[    3.158786]  handle_mm_fault+0x7b8/0xc30
[    3.158867]  do_page_fault+0x15c/0x400
[    3.158937]  do_mem_abort+0x4c/0xac
[    3.159004]  el0_da+0x3c/0x50
[    3.159070]  el0_sync_handler+0x168/0x1b0
[    3.159153]  el0_sync+0x174/0x180
[    3.159224] Code: 91040000 91020021 f2402c1f d503201f (a8300c02)
[    3.159343] ---[ end trace 06748391c33610de ]---

Temporarily revert these patches to allow for qemuarm64-secureboot to
continue working while the root cause is being investigated.  The
patches in question are:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35ec3d09ff6a49ee90e1bfd09166596f017eb5bb
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8eaef922e9381af7b923c4e3c57a632a87101acb

Change-Id: I3cdea9469d940f6458d0ef65460f945c55eef3e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 11:32:28 -04:00
Yann Dirson 2354c9e06e arm/optee-os: deploy tee.elf for u-boot
Integration of OP-TEE in the u-boot image is done with `TEE=tee.elf`,
so this build artifact must be exported.

U-boot integration can now be done in a BSP layer with something like
this in `u-boot_%.bbappend`:

 # OP-TEE, dependent on "optee" DISTRO_FEATURES

 OPTEE_OEMAKE ?= " TEE=${DEPLOY_DIR_IMAGE}/optee/tee.elf"

 EXTRA_OEMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
 PACKAGECONFIG[optee] = "${OPTEE_OEMAKE},,optee-os"
 PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'optee', d)}"

Signed-off-by: Yann Dirson <yann@blade-group.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-20 08:07:15 -04:00
Jon Mason 587b8ab87d Revert "arm/optee-os: deploy tee.elf for u-boot"
This reverts commit 4b3343b4a9.
2021-04-19 22:26:23 -04:00
Ross Burton 850c324189 CI: track hardknott branch, not master
Hardknott has released and upstream oe-core master has diverged. We will
also be releasing shortly so track hardknott not master for the CI.

Change-Id: I68f8b1c4cc5ac0686c3db9259b44d16f367d82d6
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-04-19 13:17:30 +01:00
Ross Burton e3bfb5d746 Rename top-level kas/ to ci/
The files in kas/ are not generic Kas files, but instead designed
specifically and solely around the CI system.

Change-Id: I30082392ad2231a4c1c41e54a292595adf81715b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-19 08:12:27 -04:00
Ross Burton f88a69768a CI: don't disable uninative
We previously disabled uninative[1] because it broke builds in the
Docker containers. This has now been fixed in oe-core with uninative 3.0
so this workaround can be removed.

[1] e5523d626f

Change-Id: I40975eb46737e66dab9f9b8cc63a9283d79918fb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-19 08:12:27 -04:00
Ross Burton 1c151dba07 CI: make update-repos a bit more verbose
Change-Id: Ibb7b652b13b6d036c36fce076e7c1807f2ff37d7
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-19 08:12:27 -04:00
Ross Burton 0519634f2d kas/base.yml: rename ptest fragment to noptest
Change-Id: Ib670ba8715ff128345e631652d4cae8d76ba0812
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-19 08:12:27 -04:00
Yann Dirson 31e1428ea5 optee-os: don't override upstream TA_LOG_LEVEL setting
Aside from diverging from upstream, appending such a change it at the end of
oe_runmake makes it hard to override it in a bbappend.

This value does not seem to be inherited in TA builds, and
eg. optee-examples do use the the values set in their individual
Makefiles.  Setting this to 0 however seems to cause the TA traces not
to be relayed to the console, so the examples end up less
self-illustrative than they should.

This patch restores the upstream choice, while allowing downstream layers to
choose to set it to zero if they wish to do so.

Signed-off-by: Yann Dirson <yann@blade-group.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Yann Dirson 0f29c11d2a optee-client: use /var/lib/tee instead of /data/tee for persistent storage
This is more FHS-conformant, and allows tee-supplicant to work on a
readonly rootfs setup (although then it uses volatile storage by
default, and it is still a matter of distro policy how to arrange for
that storage to be persistent in a readonly setup).

Signed-off-by: Yann Dirson <yann@blade-group.com>
Suggested-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Yann Dirson 4b3343b4a9 arm/optee-os: deploy tee.elf for u-boot
Integration of OP-TEE in the u-boot image is done with `TEE=tee.elf`,
so this build artifact must be exported.

U-boot integration can now be done in a BSP layer with something like
this in `u-boot_%.bbappend`:

 # OP-TEE, dependent on "optee" DISTRO_FEATURES

 OPTEE_OEMAKE ?= " TEE=${DEPLOY_DIR_IMAGE}/optee/tee.elf"

 EXTRA_OEMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
 PACKAGECONFIG[optee] = "${OPTEE_OEMAKE},,optee-os"
 PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'optee', d)}"

Signed-off-by: Yann Dirson <yann@blade-group.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Yann Dirson 976cebdf6e arm/optee-os: mark LDFLAGS patch as submitted
Signed-off-by: Yann Dirson <yann@blade-group.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Yann Dirson d45c837137 arm/optee: use pycryptodome rather pycryptodomex
Recent versions of OP-TEE perfectly build with pycryptodome, no need for
the pycryptodomex transition package any more.

Signed-off-by: Yann Dirson <yann@blade-group.com>
Reviewed-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Ross Burton cbf547e222 arm/sbsa-acs: update patch status
Change-Id: I75d7c6c098edaa30b009c9586ed7ce23994b0f2a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-16 10:28:39 -04:00
Richard Neill c1123c3d63 arm-autonomy/linux-arm-autonomy: Do not apply xen IRQ patch for 5.12+ kernels
As the xen event channel kernel patch is mainlined in 5.12, this patch ensures
it is only applied to the applicable versions earlier than 5.12.

Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I03a3dc51281fdc94cd7e9a9da2540b34668a6ad1
2021-04-16 10:34:51 +01:00
Khem Raj 738c20d752 sbsa-acs: Always use BFD linker
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-07 08:59:48 -04:00
Khem Raj 43203a464d sbsa-acs: Fix build with clang 12
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-07 08:59:48 -04:00
Khasim Syed Mohammed 219fd34b76 arm-bsp/edk2-firmware: remove references to 201911 tag
edk2-firmware for n1sdp is ported and upgraded to 202102 version and since
no other platform is using 201911 version of edk2 firmware. This patch removes
the corresponding bb files.

Change-Id: I91b0e98a3df499fa86c5ea836c96de193f18990e
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
2021-04-06 10:23:06 -04:00
Khasim Syed Mohammed 2f2258d1d2 arm-bsp/edk2-firmware: upgrade n1sdp to 202102
edk2-firmware for n1sdp is ported and upgraded to 202102 version.

Change-Id: I08dcc7d1442ec9a9121ce648e68872d63169346a
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
2021-04-06 10:14:28 -04:00
Ross Burton a7f4f7d2bd CI: build sbsa-acs in the qemuarm64-sbsa job
Change-Id: I10dcd2b6332db281f969981a44edc22d0750a79b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-06 10:12:43 -04:00
Ross Burton 2261d39412 arm/sbsa-acs: add COMPATIBLE_HOST
This recipe is only valid on aarch64 targets, so set COMPATIBLE_HOST.

Change-Id: I15595d307d1dab18b315b397a0751eaf4e109e68
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-06 10:12:34 -04:00
Ross Burton 77ac287518 arm/sbsa-acs: add SBSA Architecture Compliance Suite
Add a recipe for SBSA Architecture Compliance Suite, a test suite for
SBSA.

As this is implemented as a module for the EDK2 Shell application, this
can include the edk2-firmware recipe to do the heavy lifting.

Change-Id: I890ea41d7d1068d74a541c06411aad894728f44d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-04-01 15:52:34 -04:00
Diego Sueiro 8b123ffe85 kas: Add fvp-baser-aemv8r64 build
Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I983b0a433be9087663006cce366631815759febe
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Diego Sueiro 885415312b arm-bsp/machine: Introduce fvp-baser-aemv8r64 machine and its BSP
This patch adds the fvp-baser-aemv8r64.conf machine definition for the
FVP BaseR AEMv8r64 Platform alongside the following BSP components:

* boot-wrapper-aarch64
* Kernel: linux-yocto-5.10
* Devicetree for bootstrapping
* wic image

Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ia9e400db8c78e5e57a6fa2241b81fdd42a00dd53
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Diego Sueiro 16b93fa033 arm-bsp/linux: Introduce FVP common config fragment
Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ic829801d2d32d6702f49adcd79f0f24a4595bbe1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Diego Sueiro 3032b80ed3 arm-bsp/linux: Introduce arm64 generic config fragment
Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I6bead3d86747874af5db3a4d6ae57b74abf4f796
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Diego Sueiro d1cb358f52 arm-bsp/arch: Introduce support for armv8r64 arch
We are temporarily using armv8-4a until GCC 11 is released and supported by
oe-core.

Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I7e41105a1e99f5a71ea927d1b84c9a9fa9762aaf
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Diego Sueiro 7b0e704dfd arm-bsp/arch: Introduce support for armv8-4a arch
Issue-Id: SCM-2121
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ieaf6b41fddb819e32a40c641ab3f6231fb1de9e6
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Nathan Dunne f65c5c4217 autonomy/docs: Documentation updates and fixes
Issue-Id: SCM-2038
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ida94958b63c78097be6402be019d65a80260f297
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-31 08:53:44 -04:00
Ross Burton a52d805faf CI: move utility tasks to prep so they don't cause a fetch
Re-order the tasks so that the utility tasks don't cause update-repos to
run.

Change-Id: I86a528c98fe32e20428f9efbd5fb82c374aefc8a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 15:45:38 -04:00
Ross Burton d2f8a13d3c CI: maintain centralised repositories to speed fetching
Kas supports 'reference repositories' which are used as a local source
of git objects to speed up fetches.  At the beginning of the CI run we
can update these repositories once to speed up later fetches.

Change-Id: I138051fd3cf9b5675e0fa5007cd8088abd17db4e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 15:45:38 -04:00
Ross Burton e5ed951abe arm/edk2-firmware: upgrade to 202102
The edk2 SRCREV is the tag, has edk2-platforms doesn't tag releases the
SRCREV is approximately the same date.

Also remove the PREFERRED_VERSION from SGI575 so it doesn't need to be
updated in the future.

Change-Id: I5ac544e70b404081bf0638a54514a412d87fb3d3
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 15:45:38 -04:00
Ross Burton 95087cf374 arm-bsp/scp-firmware: correct PV
These are git snapshots after 2.7.0, not 2.7.

Change-Id: I6371dd12f5d17f432839b3673331b3153c1c4b6a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 15:45:38 -04:00
Jack Davison e45cfb9e8f arm: Enable ptest for optee xtest
Provides a run-ptest script for running xtest under ptest-runner. This
script parses the output of xtest and converts it to Automake's test
format.

Change-Id: I7c981422034b39701ddd74e176f2f5134ae607e6
Signed-off-by: Jack Davison <jack.davison@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 09:08:38 -04:00
Peter Hoyes de5dc9be14 arm-autonomy/linux: Remove patches for booting Dom0 with preempt_rt
With the linux-yocto version update to 5.10.25, the following
backport patches are being removed:
0001-xen-events-reset-affinity-of-2-level-event-when-tear.patch
0002-xen-events-don-t-unmask-an-event-channel-when-an-eoi.patch
0003-xen-events-avoid-handling-the-same-event-on-two-cpus.patch

Issue-Id: SCM-2064
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iaf313440f85ab18211cc1a786d84c1f83950699f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 09:08:31 -04:00
Jon Mason 682c330600 CI: fix order
Machine order should be alphabetical

Change-Id: I83b1f1802d4db62cda7e49a591c7f26c4d22dd9a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-30 00:02:05 -04:00
Jon Mason d6e18c885d arm/machine: add zephyr machine confs for a53
Zephyr supports QEMU based machine for Cortex a53.  Add machine confs
for this.  This enables us to verify a53 tunings.

Change-Id: I398bc5b3e8bd77b7269bba056a0f75229f04c7a7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:15:53 -04:00
Ross Burton 8855e397bc arm/trusted-firmware-a: remove unused trusted-firmware-a 2.3
Change-Id: Ifb0bed130a6db8146f37a866385727805e00cd43
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Ross Burton 452bc97276 arm/trusted-firmware-a: remove unused trusted-firmware-a 2.2
Change-Id: If2c92878e63614cfc91cf500a11fe39e5a82fe46
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Ross Burton 465471fbb9 arm/scp-firmware: remove unused 2.6 version
Change-Id: I3662f139ede7b60d8f0b929cbc40fbdb67be0d72
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Ross Burton e37127939b arm-bsp/trusted-firmware-a: upgrade SGI575 to trusted-firmware-a 2.4
Change-Id: I7a3e50a0f5558a135b318d70d6d75eefc570ea2f
Tested-by: Thomas Abraham <thomas.abraham@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Damodar Santhapuri 205e4bb760 arm-bsp/juno: move scp-firmware version from 2.6 to 2.7
Move scp-firmware version to 2.7 for juno platform

Change-Id: I7ff1132c1e6a6fee047a268da2d991f81074e672
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Damodar Santhapuri e6770c2160 arm-bsp/juno: move tf-a version from 2.3 to 2.4
Move trusted-firmware-a version to 2.4 for juno

Change-Id: Ib6e6e5537a7ecb2246d3f96b4beb8893cea605dc
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:16 -04:00
Luca Fancellu 92da257b83 arm-autonomy/linux-arm-autonomy: Fix Dom0 boot issue with preempt_rt kernel
To fix Dom0 with PREEMPT_RT kernels older than 5.10.24, backport the
following patches:
    0001-xen-events-reset-affinity-of-2-level-event-when-tear.patch
    0002-xen-events-don-t-unmask-an-event-channel-when-an-eoi.patch
    0003-xen-events-avoid-handling-the-same-event-on-two-cpus.patch

Also, add the following fix (waiting to be merged upstream):
    0004-xen-evtchn-Change-irq_info-lock-to-raw_spinlock_t.patch

Issue-Id: SCM-2147
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Change-Id: I0b3a93139b0229ceb6001d87b545704b9bfc581e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 11:10:01 -04:00
Peter Hoyes 66939c8f35 arm-autonomy/n1sdp: Remove support for linux-linaro-arm_5.4
* Remove linux-linaro-arm and associated patches
 * Use linux-yocto for N1SDP

Issue-Id: SCM-1506
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I6e0ebf7de42af98e7427132590fe813c1703d1c6
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-26 09:27:25 -04:00
Nathan Dunne 943dd5943a arm-autonomy/images: Introduced xenguest-extern-guests recipe
Seperated guest inclusion for image into seperate recipe, allowing
a do_install task to be used rather than directly copying from the
local path.

This allows all bitbake fetcher types to be used rather than only
local files. Alternate fetchers are enabled through parsing
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS with set_src_uri_from_var.bbclass

Issue-Id: SCM-2225
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iff5483926a5cde8ce7519da60f1b9119946a7f4e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-25 09:33:22 -04:00
Nathan Dunne 8195b2c953 arm-autonomy/docker: Updated fetcher to use set_src_uri_from_var.bbclass
Use new class to parser CONTAINER_IMAGE_FILES variable and add entries to
the SRC_URI, as well as to generate the manifest.

Issue-Id: SCM-2225
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Idd34f564844c725f1b38a20e1e33d9aba6195e43
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-25 09:33:22 -04:00
Nathan Dunne 5e3d09e234 arm-autonomy/classes: Introduced set_src_uri_from_var.bbclass
Introduced set_src_uri_from_var.bbclass to add entries to the
SRC_URI based on a named variable, and generate a manifest
file alongside fetched items containing a number of parameters
for each entry.

Parameters can have an optional default value, or cause an error
if omitted.

Issue-Id: SCM-2225
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ia85b3f4bc3fa666fa7e7aec2d670979ac9348f52
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-25 09:33:22 -04:00
Nathan Dunne 1a77ae9d5f arm-autonomy/u-boot: Modified kernel_addr for fvp-base with xen
Modified the default booti command for fvp-base with xen to boot
into xen at 0x84000000, rather than requiring the user to break
into the u-boot prompt.

Issue-Id: SCM-2195
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I91f324ce77716474596a78f97e74f432969d9803
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-25 09:33:08 -04:00
Ross Burton e74b3c2f24 arm-bsp/corstone500: use trusted-firmware-a 2.4
Change-Id: Ie3014bdb07dc4f9e6ba28750fda7b5408fb7508a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-24 08:58:44 -04:00
Ross Burton 7fd85df7d7 arm-bsp/corstone700: use trusted-firmware-a 2.4
Move to the release of 2.4 instead of a snapshot between 2.3 and 2.4

Change-Id: Ie7bd5a8de310186de14bee9e8f10c1aaae6194e6
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-24 08:58:44 -04:00
Ross Burton e875122778 arm/edk2-firmware: support extra arguments passed to build
Add EDK2_EXTRA_BUILD which is passed to build, so that recipes can add
more arguments to e.g. enable modules.

Change-Id: I10d0fcb92e823be79ccb8c2bd47e40694c1bfbd9
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-24 08:58:44 -04:00
Ross Burton 79d60476bb arm/edk2-firmware: clean up build invocation
Add some comments to make it clear what variables are being passed as
what arguments to build.

The build tool is on PATH, so there's no need to use an absolute path.

Change-Id: If9229d4927205e1b9a9a0bf7f7526e33006a03fd
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-24 08:58:44 -04:00
Ross Burton 01a13b11ad arm/hafnium: refuse to build on non-x86-64 hosts
For reasons, hafnium doesn't use host binaries for stuff like GN, Ninja,
Clang, GCC, or Qemu. Instead it ships binaries that it uses during the
build, but these binaries are only available for x86-64.

Attempts to use external tools (so the recipe can just DEPENDS as usual)
were not successful (clang being the problem) so just forcible stop the
recipe building on anything but x86-64 for now.

Change-Id: I144309d15fa1265b2b105981cd2bfcd376aab7ad
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-23 09:47:18 -04:00
Jon Mason ac1dc0b894 arm: remove python3-intelhex
python3-intelhex is now upstream.  Remove this and use that one.
musca already has a dependency on meta-python.  So no need for new deps
to use the existing one.

Change-Id: I7a586db3a3a3b653656366c34c990d52c0fd4f7c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-22 09:08:59 -04:00
Khasim Mohammed 950c68dbab arm-bsp/n1sdp/trusted-firmware-a: bump to latest master branch
The current version is 2.4, there are quite a few new features added to the master
branch of the repository and these are required for N1SDP.

Change-Id: If45402b567b786b072583c13ee9fe95bb52d27bd
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-18 09:00:34 -04:00
Khasim Mohammed 61291f6d80 arm-bsp/n1sdp/scp-firmware: bump to latest master branch
SCP firmware recipes are updated to build latest SCP firmware,
the previous release version is 2.7.0.

New features required for N1SDP are integrated in SCP firmware repository, this mandates
us to migrate to latest master.

Change-Id: I1fb44ed790ca17f713333a0e371dce10c9399424
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-18 09:00:34 -04:00
Ross Burton 4f1f77d660 layers: add hardknott to compatible release branches
Upstream oe-core is preparing to be the Hardknott release, so add
hardknott to our compatible release list.

Once hardknott is public we should remove gatesgarth.

Change-Id: Ia5c59e703910db96a3967a1ecad074ac80d03ee9
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-16 19:00:10 -04:00
Jon Mason 403de1121e arm/machine: create generic-arm64 machine
Create a generic Arm64 system for creating a SystemReady file system.
Due to it being as generic as possible, the image created
by this should run on any hardware that already has the requisite
firmware present.

Change-Id: Ie0d71f91145311e90d228bc403e653a7ef059838
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-16 08:22:58 -04:00
Jon Mason d4f7fd1788 arm/machine: Create QEMU SBSA machine
Add a QEMU machine for Server Base System Architecture (SBSA)
development.

Change-Id: Ic4e286a6583b38aee2a78ab4b53669048136f1a1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-16 08:22:58 -04:00
Jon Mason f8d65dddc8 arm: tf-a and edk2 cleanups
Do some preparatory moving of code for add QEMU SBSA machine support.
Pulling out the qemuarm64 specific enablement from the universal inc
file into a bbappend.

Change-Id: I445132337f7851d666214f87e3250b2f0db84406
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-16 08:21:35 -04:00
Richard Neill debff92415 arm-autonomy/linux-arm-autonomy: Drop mainlined kernel patch for xenbus probe
The xenbus_probe patch to fix xen initialisation was mainlined in yocto-linux
v5.10.17. As oe-core has upgraded past this version, the patch can now be
dropped.

Issue-Id: SCM-2263
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I40e154cdc4dbabfa531a6886d724ecd400657dd9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-15 22:59:26 -04:00
Ross Burton 67faf6c7dc CI: add qemuarm and qemuarmv5
Change-Id: Ie5e1fdf0870ed578faaf6ca2d6c6e73bad340f1e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-12 11:37:47 -05:00
Peter Hoyes 4f8766b081 arm-bsp/linux: Add support for linux-yocto-rt for N1SDP
* Enable linux-arm-platforms.inc for N1SDP
 * Create n1sdp-preempt-rt.scc config
 * Disable KVM as incompatible with preempt-rt
 * Disable kconf audit warnings as preempt-rt.scc clashes with
   defconfig

Issue-Id: SCM-1506
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I4f9c61c7fe2400858578576aad7c5d1c958e9a2e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-12 09:14:12 -05:00
Nathan Dunne a949ebfd06 kas: Added yaml to test xen support in meta-gem5
Created yaml file "gem5-arm64-xen.yml" to build the target xen-image-minimal
for gem5, with required DISTRO_FEATURES 'xen' and 'virtualization'.

Issue-Id: SCM-2091
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: If21d446ca36ba01657d6b48e4b3370e9d905fd1b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Nathan Dunne a82ed3cfc9 arm-autonomy: Moved dynamic-layers/meta-gem5 to meta-gem5
Gem5 xen support in meta-arm-autonomy moved to meta-gem5 under
dynamic-layers/meta-virtualization. Any dependencies on 'arm-autonomy-host'
or 'arm-autonomy-guest' in DISTRO_FEATURES replaced with 'xen'.

Issue-Id: SCM-2091
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ia2db68e2cd88c4277e8edc213aebb88d90c0cd23
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Nathan Dunne 255ca59858 arm-autonomy: replace xen distro feature dependencies with arm-autonomy-host
Features in meta-arm-autonomy should depend on the 'arm-autonomy-host'
DISTRO_FEATURES entry rather than 'xen'

Issue-Id: SCM-2040
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ib39b761827dbeaf80635c748e6fc3a6d6109a1a1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Nathan Dunne 2bc44548b9 arm-autonomy/host-image-minimal: use XENGUEST_MANAGER_GUEST_DIR in image recipe
Created conf/xenguest.conf which defines XENGUEST_MANAGER_GUEST_DIR for both
arm-autonomy-host-image-minimal and xenguest-manager to ensure the value is
aligned.

Issue-Id: SCM-2168
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I9cd5a351b5910bb122b275f47d542798b2df7b1f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Nathan Dunne 1682eb1f44 arm-autonomy/containers: Allow multiple docker images to be included
Added docker_extern_containers bbclass that installs external docker images
that have been exported. The import-docker-image recipe has been renamed to
import-docker-containers and updated to install a new init script that imports
all of the docker containers when the image boots. The new init script now
attempts to start the docker daemon if it is not already running.

Issue-Id: SCM-1811
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Icd8222775ca9f640856a4ad4b51b18de17e5680d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Nathan Dunne 7c1cb547b9 arm-autonomy/xenguest: Generate xenguest.env containing variable values
Added task "do_deploy_xenguestenv" to xenguest_image.bbclass which creates
intermediary files for each recipe that inherits xenguest_image. These files
are merged into the main xenguest.env file in DEPLOY_DIR_IMAGE by the task
"do_merge_xenguestenv" in image_types_xenguest.bbclass, which has a dependency
on all do_deploy_xenguestenv in recipes it depends on.

Variables to write to the file are listed in XENGUEST_IMAGE_VARS, and any
extra variables in child recipes should be added to XENGUEST_IMAGE_VARS_EXTRA

xenguest-image had to be renamed xenguest_image to use EXPORT, since dash is
illegal in bash function names.

Issue-Id: SCM-2035
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I6fe45b8a5db6eb7a757c6150515da0b4de8a7205
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-11 09:26:19 -05:00
Jon Mason 4865c69658 arm/qemuarm64-secureboot: removed unused -dev kernel
The change of the qemuarm64-secureboot kernel to the generic one didn't
remove the no longer necessary kernel.

Change-Id: Id6d49084e2bee0956b986958a5d990f9ec41ea5a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-09 14:51:08 -05:00
Peter Hoyes 676caf30d0 arm-autonomy/linux: Move linaro recipes to arm-autonomy layer
The n1sdp has been upgraded to the linux-yocto 5.10 kernel in
meta-arm-bsp, but Xen + PREEMPT_RT is currently broken in 5.10, so
autonomy builds cannot upgrade.

Therefore, move the linux-linaro-arm configuration and recipes to
meta-arm-autonomy as they are now only required for autonomy
builds.

Issue-Id: SCM-2185
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ibe918bc39ffef0d9c92c19ed0a0815c83e48a2be
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-09 14:44:17 -05:00
Peter Hoyes 5d401b9a77 arm-autonomy/n1sdp: Use anonymous function to set kernel provider
Only set PREFERRED_PROVIDER_virtual/kernel in arm-autonomy to
linux-linaro-arm if it is set to linux-yocto. Allows it to be
modifed from local.conf, e.g. for RT builds.

Issue-Id: SCM-2185
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ied871389ccaa017437babb4f0cb48d23862eb7bd
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-09 14:44:17 -05:00
Peter Hoyes 214e3eb43a arm-bsp/linux: Include standard.scc for n1sdp builds
Follow same pattern as juno and fvp-base, by including
arm-platforms-kmeta and creating a scc file for n1sdp-standard.
Without this, warnings are being generated when including scc
fragments from other layers.

Issue-Id: SCM-2130
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ibf7827c86bc59c728773720e510b44d02b837c1b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-09 14:44:17 -05:00
Khem Raj aaaf3fac58 optee: Check for meta-clang for TOOLCHAIN variable
This covers the case when meta-clang is not in layers but TOOLCHAIN
variable is defined ( via config metadata e.g. local.conf ), the value
for TOOLCHAIN should be discarded in this case.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jon Mason <jon.mason@arm.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-08 09:11:52 -05:00
Richard Neill e06ae8431c arm-autonomy/xen: remove patches that have been mainlined in xen 4.14.1
Remove the 4 patches from recipes-extended/xen/xen_4.14.bbappend that
have been integrated in xen 4.14.1

Issue-Id: SCM-2133
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: If38262d17699794eb600b11e131c168ed4de4391
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-08 09:11:52 -05:00
Richard Neill d0de844df6 arm-autonomy: Add meta-networking dependency to autonomy layer config
meta-arm-autonomy requires the bridge-utils package, which is provided by the
meta-openembedded/meta-networking layer. This patch adds the explicit
dependency.

Issue-Id: SCM-2166
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I3a43eb78fe1f40a9a2fb5116b5dbaf3ebfc9af7d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:16:45 -05:00
Anders Dellien af36a66128 arm-bsp/fvp-base*: Fix the MPIDR values in the device tree
The MPIDR values are incorrect, which means that only two CPUs start.
With this patch, all 8 CPUs start.

Change-Id: I4baa8738948ec756d6902bc75d0a56edf15e23f8
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:16:30 -05:00
Richard Neill 9b830fbd97 arm-autonomy/linux-arm-autonomy: Add Xen per-cpu address translation patch
Adds a kernel patch to avoid Xen guest initialisation failure when converting a
virtual address to a frame number when the initial address space has a
non-contiguous physical layout.

The patch is mainlined for kernel versions >= 5.9, so we only apply it for
earlier versions.

Issue-Id: SCM-1910
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I3fd2aef88f57c928400389b6c4bb0b5eb5666e48
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-03 15:09:44 -05:00
Richard Neill 856291f071 arm-autonomy/linux-arm-autonomy: Drop XenStore initialisation patch
With the linux-yocto version upgrade, the xenstore initialisation patch is no
longer necessary.

Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I38d81172d5da97a87d41a76f26fe81d5c3b3f83e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-02 09:13:58 -05:00
Peter Hoyes a915ff3931 arm-autonomy/xenguest: Fix issues raised by shellcheck
Ignore issues in xenguest-manager and xenguest-mkimage as these
will soon be rewritten.

Issue-Id: SCM-1526
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I733b4bfaaa5002f7a64c577e16548af62c425ebf
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-01 19:26:51 -05:00
Diego Sueiro b4659361b3 arm-bsp/fvp-base/u-boot: Set DRAM to 4G to match with kernel devicetree
Add 0001-vexpress64_fvp-Set-DRAM-to-4G-to-match-with-kernel-d.patch backport
patch for u-boot 2021.01.

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I0c3d48fcf43ff3eab9b5a547d8d792572908e978
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-27 11:02:19 -05:00
Anders Dellien 50850e8eca arm-bsp: fvp-base-arm32: Correct load address for device tree
This commit ensures that we are using the device tree from the
Yocto build and not the one bundled within the FIP image.

Change-Id: I9592550f24867b04381e4eb962e3d942286bf480
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-27 11:02:19 -05:00
Anders Dellien 9eeeda7169 arm-bsp/fvp-base*: move to u-boot 2021.01
Move both FVP platforms to u-boot 2021.01

Change-Id: I764ff964025bb1a0266f4c91469372ed5ffffde2
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-27 11:02:19 -05:00
Diego Sueiro d38e10e58b arm-autonomy: Fix xenbus probe for guest kernels < 5.10.17
The arm64-autonomy-guest kernel from commit 3499ba8198ca ("xen: Fix event
channel callback via INTX/GSI") are hanging at `xen🎈 Initialising
balloon driver`.

The arm-autonomy-guest kernels older than 5.10.17 need to backport the
0001-arm-xen-Don-t-probe-xenbus-as-part-of-an-early-initc.patch in order
to be able to boot.

Issue-Id: SCM-2151
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I74f58366f42733be4f67ab3841584efa1636abbb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:49:51 -05:00
Diego Sueiro 0d50124e51 arm-autonomy: Fix XenStore initialisation for host kernels < 5.10.13
The arm-autonomy-host kernels older than 5.10.13 need to backport the
0001-xen-Fix-XenStore-initialisation-for-XS_LOCAL.patch in order to be able to
use the `xl block-attach` and fix this issue:
```
xl block-attach 0 "phy:/dev/vg-xen-vda3/base" xvda w
libxl: error: libxl_xshelp.c:201:libxl__xs_read_mandatory: xenstore read failed: `/libxl/0/type': No such file or directory
libxl: warning: libxl_dom.c:52:libxl__domain_type: unable to get domain type for domid=0, assuming HVM
libxl: error: libxl_disk.c:314:device_disk_add: device already exists in xenstore
libxl: error: libxl_device.c:1407:device_addrm_aocomplete: unable to add device
```

This issue is not present in linux-linaro-arm[-rt] 5.4.0 used by N1SDP, hence
we do not apply this patch for it.

Issue-Id: SCM-2151
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I1a38e22084161fb4b6028ef12443707cc566d56e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:49:51 -05:00
Ross Burton 78c8bfdd34 arm-bsp/musca*: update TFM_PLATFORM
trusted-firmware-m 1.2.0 uses different naming for the platforms, so
update the BSPs as appropriate.

Change-Id: I3b67b629d821a6b65f39bc89db768e791f173d93
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:36:27 -05:00
Ross Burton 977c7e6613 arm/trusted-firmware-m: upgrade to 1.2.0
Upgrade trusted-firmware-m to 1.2.0.  This has been tested by executing
the integrated regression tests inside qemu for the MPS2-AN521 platform.

How the build is configured has changed:
- The build type uses the standard CMAKE_BUILD_TYPE variable
- The compiler selection is done using PACKAGECONFIG to neaten the
  argument and dependency handling.

Add PACKAGECONFIGs to enable the regression tests which can be executed
inside a qemu for quick validation.

The configure stage will fetch external dependencies by default, so tell
it where we have placed the dependencies. TF-M also requires a patched
mbedcrypto (some patches are integrated into 2.25, but not all) so apply
the patches in a do_patch[postfunc].

No longer deploy files into a redundant directory.

The QA test whitelist for text relocations appears to have been fixed
upstream, so remove.

Change-Id: I11994fd0379da0e1f115ff5af0885926d2b3a055
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:36:27 -05:00
Ross Burton a8cb17f982 arm/python3-intelhex: add recipe for new trusted-firmware-m
Until this is integrated into meta-python (patches sent), hold a copy of
python3-intelhex in meta-arm for trusted-firmware-m 1.2.

Change-Id: I3e7b765cf44b3d6db7fe066bc24415190a33c97c
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:36:27 -05:00
Ross Burton 46bb624631 arm-bsp/musca-b1: disable qemu RNG
By default runqemu adds a virtio RNG, but the Musca platform doesn't
support this.

Change-Id: I61e486f02e106a2d3bb4a7ec9ff3dd0b06c9c369
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:36:27 -05:00
Nathan Dunne fc0bed464e arm-autonomy/documentation: Update multiconfig docs with mc name requirements
Update documentation to mention that hyphens are illegal in multiconfig
conf file names

Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I0c0c16063cc66f1d0d66b5458ee0eea5da4d2ee4
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:35:28 -05:00
Sumit Garg 2c44ddd93a arm-toolchain: Drop support for GCC 9.2 toolchain
As OE core has moved to GCC 10.2 toolchain, so remove support for
legacy Arm 9.2 toolchain.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 09:35:28 -05:00
Jon Mason 957fefc816 arm-toolchain: Update Denys' email address
Signed-off-by: Jon Mason <jon.mason@arm.com>
Acked-by: Denys Dmytriyenko <denis@denix.org>
2021-02-18 09:35:28 -05:00
Jon Mason 2720a1b32b arm-toolchain: Fix potential runtime crash
GCCv9 tree vectorization code is faulty and can cause random crashes at
runtime (when using -O3).  Add the backported patch to address this
issue.

Change-Id: If7bb0ba0720bab42e7d34f3679d988934f657392
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-12 10:07:38 -05:00
Diego Sueiro 808115fe13 arm/boot-wrapper-aarch64: Bump to the latest SHA
Issue-Id: SCM-2080
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I823114be82efd02ff7b14fda304668e29facd092
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-12 10:07:38 -05:00
Diego Sueiro 0cec3e584d arm/gem5/boot-wrapper-aarch64: Move main recipe to meta-arm
Move boot-wrapper-aarch64 recipe from meta-gem5 to meta-arm and merge the
contents of the .bb and .inc into a single recipe file.

Also, create a boot-wrapper-aarch64_%.bbappend for the gem5-arm64 machine.

Updated documentation for gem5-arm64 where meta-arm-toolchain and meta-arm
layers need to be included in the bblayers.conf.

Change-Id: Ia8193f4f0bf98069edcbf1661cb3e9b2105d12a3
Issue-Id: SCM-2080
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-12 10:07:38 -05:00
Jon Mason aa63e31b6e kas: microbit-v1 testing
Change-Id: I8043c7be32a1e4029e73c3c9f603ae77c78ddf3c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-10 21:58:30 -05:00
Jon Mason fdcf7b7b3b arm/microbit-v1: Fix build break
KAS is seeing build breaks on microbit-v1.  This can be fixed by either
setting the distro to zephyr or using newlib.  Opting for the latter to
match musca machines.

Change-Id: I25f1cca3f7054f6c44974877350f8612643d55e6
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-10 21:58:30 -05:00
Jon Mason d3c35b4a0e arm-bsp: create u-boot 2020.10 to resolve warning
Poky, etc master branches updated the u-boot recipes to use 2021.1,
causing bbappends for 2020.07 to no longer function.  Create a temporary
recipe for 2020.10 until all the BSPs can update to support the latest
version.

Change-Id: I6046b420a8d0b3cc2125004444683ecd51f3499b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-10 21:58:30 -05:00
Ross Burton e5523d626f kas: disable uninative to work around uninative-2.33 failures
For some mysterious reason the kernel build fails on Ubuntu hosts with the
latest uninative release. Until this is resolved we can just disable
uninative.

Change-Id: I3b2583106844d43e0ef14cdeda24ef8d5d1ae117
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-10 17:07:11 +00:00
Arunachalam Ganapathy a9644d39c5 arm-bsp/tc0: add Theodul DSU support
- Adds patches required to support Theodul DSU in optee-os, hafnium
- Updates SHA of TF-A, SCP with revision that has Theodul DSU support

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I62f0990b7de919839be9ab0e3234914624c8afde
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-09 11:12:06 -05:00
Arunachalam Ganapathy 1f872c3c83 arm-bsp/linux: add asymmetric AArch32 EL0 support for TC0
This adds patches for asymmetric AArch32 EL0 configuration support for
android11-5.4-lts kernel. And enables CONFIG_ASYMMETRIC_AARCH32 and
disables CONFIG_KVM in TC0 defconfig.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Iab94b5c48b60aca4a71267ba1be1cb1836002d10
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-09 11:12:06 -05:00
Ross Burton 3be0996065 CI: delete-sstate needs to delete contents
Change-Id: I278d470540e20db8d789a1428e927356e3a5d8b1
2021-02-08 20:16:16 +00:00
Ross Burton 101abf89c6 CI: add task to delete all sstate
Change-Id: If89c6c27cafe6ae7e93b5db5d37b9e8ecdaee131
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-08 18:55:21 +00:00
Adrian Herrera 549f362d2f gem5/gem5-aarch64-native: use oe-run-native
Persist gem5 binary in native sysroot. This allows executing the binary
with the standard oe-run-native script. We can also remove the wrapper
creation and the ".real" versioning, since paths are setup by oe-run-native.

Change-Id: I9fd46725c78e1a09a7142a9d343b140bb5a77088
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Adrian Herrera cb4c230b56 gem5/gem5-m5ops: initial recipe
m5ops provide pseudo-instructions to trigger gem5 functionality.
m5 utility provides a CLI for m5ops.
libm5.a provides a C library for m5ops.

Change-Id: Ib06dcb539648407522e31aeb1ed392fb5232675e
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Adrian Herrera 460210f4a8 gem5/gem5-m5term-native: initial recipe
m5term enables users to connect to the simulated console. Useful in
development environments.

Change-Id: I6096be9fbf44da280272656f3e15d1ba19593e50
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Ross Burton 568d4d7f9c gem5/gem5-aarch64-native: backport a patch to reduce warnings
With Python 3.9 the build produces a huge number of warnings, resulting in a
do_compile log that is 17M long.

Backport a patch from pybind11 upstream to silence this warning.

Change-Id: Ie4c71f8e5dd6c07c8be0a563778029a9859e1726
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Jon Mason 1350f983ae gem5/gem5-aarch64-native: update to v20.1.0.3
Update to the latest tagged version of gem5. Previously included
patches are now part of that release.
Upstream patch backported to enable boot with SMMUv3 model.

Change-Id: I7d7ad6f9681eb1f06743d214abbe901e9f8aa74e
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Ross Burton 15512adf39 gem5/gem5-aarch64-native: don't build gem5 three times
The recipe currently builds gem5 binaries in optimised, fast, and
debug mode.  There is no need to build three at once (and triples the
build time), so simply build the optimised variant by default (as recommended
by upstream) whilst letting the variant be altered by setting
GEM5_BUILD_VARIANT.

Change-Id: I23baeee438d1ff08d1e2a54282141b55500f2ac1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-04 14:16:47 -05:00
Anders Dellien 63c9974493 arm-bsp/fvp-base*: move to linux yocto kernel 5.10
Move both FVP platforms to linux yocto kernel 5.10

Change-Id: Idc0b35d201a188d69c2e475f2f864f5bb0f06341
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 15:58:22 -05:00
Peter Hoyes a6de147dc0 arm-autonomy: Use busybox instead of GNU tar
Switch out the tar used by xenguest-manager and xenguest-mkimage.
xenguest-mkimage requires the --exclude flag so enable the Busybox
CONFIG_FEATURE_TAR_LONG_OPTIONS option.

Issue-Id: SCM-2034
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iceed017ef8ebd058e6c06156989aaa2a4bff9103
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Peter Hoyes ea931f83e3 arm-autonomy: Use correct PACKAGE_ARCH in recipes-extended
xen-devicetree should be $MACHINE_ARCH.
xenguest-* should be allarch

Issue-Id: SCM-2039
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id5666e1dc02a174e74bb8e843cb588287717d136
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne d692df24cd arm-autonomy/xen-devictree: Update dom0_mem default inline with best practices
Updated default value for XEN_DEVICETREE_DOM0_MEM from "1024M" to
"1024M,max:1024" to match best practice for dom0_mem command line
argument. Documentation also updated to refer to new default value

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ifa7e78bf22b024cb7fe4b782f628860ff44860ad
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne e0c74f3b3b arm-autonomy/xen-devicetree: Check for empty/invalid variable values
Added check to xen-devicetree to validate values of required variables:
XEN_DEVICETREE_DOM0_ADDR
XEN_DEVICETREE_DOM0_SIZE
XEN_DEVICETREE_DOM0_MEM

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I31bfcdb9d064f6e91beb1500d0a18f2a30a42028
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne 82b31654b0 arm-autonomy/xen-devicetree: Allow hex or decimal Dom0 Size
Check whether XEN_DEVICETREE_DOM0_SIZE begins '0x' and cast from hex
or decimal accordingly, rather than assuming hex.

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I3a1c7c7ae6711b3d645cdb66bcd9c2c27196b054
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Nathan Dunne 57192fd8a5 arm-autonomy/xen-devicetree: Lower log level for incorrect kernel size
Reduced the level at which messages relating to overriding the user provided
value for XEN_DEVICETREE_DOM0_SIZE when it is too small are logged at from
'warn' to 'note'

Issue-Id: SCM-2037
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I1436dac2c347d40c897291220fe30a95a57f2fa1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-02 07:36:33 -05:00
Diego Sueiro 67f57f35da gem5/gem5-native: Fix INSANE_SKIP mechanism for native-last QA check
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: Ic1c92e145694abd30fdd99fd073eeacce917c55e
2021-02-01 16:48:44 +00:00
Nathan Dunne 0978f5a74c arm-autonomy/xenguest-manager: Make stop by default a blocking action
Added -w parameter to xl shutdown to force it not to return until
the action is completed, and modified logging to reflect this

Stop operation can be configured to return immediately using
--nowait parameter, or to force destroy the guest if the graceful
shutdown fails using --kill. Both are now documented in usage().

Issue-Id: SCM-1861
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I664acc8a6a1eb17619fa2fd9b372ea661e537923
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 11:06:29 -05:00
Peter Hoyes 232b411b47 arm-autonomy: Use 5.10 kernel for autonomy-guest
Issue-Id: SCM-2054
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I8bcb464f0fd960cd01cce328c51be538cc705e84
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 09:26:11 -05:00
Peter Hoyes 98f3779210 arm-autonomy/n1sdp: Use 5.4 kernel for autonomy n1sdp builds
meta-arm-bsp has been updated to use 5.10 kernel but further validation
required before upgrading the autonomy n1sdp kernel.

Issue-Id: SCM-2053
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3848a03d7d01dc3a1c27530ec395e1db083a9e35
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-25 09:26:11 -05:00
Peter Hoyes 7ae8a30b6b arm-autonomy/linux-arm-autonomy: Add explicit dependency on bridge.cfg
xenguest-network depends on CONFIG_BRIDGE_NETFILTER, but the default
value changed to 'n' in Linux 5.6
(http://git.yoctoproject.org/cgit.cgi/linux-yocto/commit/?id=98bda63e20daab95bdc084ce00459a4f622a0505).
Include bridge.cfg to define CONFIG_BRIDGE_NETFILTER manually for Xen
host builds.

Issue-Id: SCM-2057
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id920d14f87a95214ee722007de923fd27b61afb3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne 933df12da8 arm-autonomy/arm-autonomy-host-image-minimal: Use REQUIRED_DISTRO_FEATURES
Make use of REQUIRED_DISTRO_FEATURES rather than anonymous python for
determining that both arm-autonomy-host and xen are present in
DISTRO_FEATURES

Issue-Id: SCM-1862
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Id21086ac4f4c45a89fa8fa8a2da28f04919f6b26
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne bc4cd77370 arm-autonomy/documentation: Remove references to meta-kernel
Since meta-arm-bsp doesn't depend on meta-kernel anymore
it has been removed from the appropriate documentation.

Issue-Id: SCM-2005
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: If3548b84c4cffc5cc105a1fc07a656dc814699f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Nathan Dunne 5b823a1eb4 arm-autonomy/xenguest: Add guestcount support
Add guestcount parameter to ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS,
to create multiple guests with the same config. Symlinks are created
in the host rootfs pointing to the original xenguest file

Parameters for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS are now
retrieved using python regex rather than split, so that they can
appear in any order

Issue-Id: SCM-1863
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ifa5f5ab3b284815427c94979b3f1a5eed592ec3c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-21 09:27:37 -05:00
Adrian Herrera a8f32f990a gem5: centralise v20 sources
Both simulator and bootloader now fetch from a single include file
defining the sources. This is in preparation for m5term recipe.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Change-Id: Ia4f6b6d99401ddb0c726d913ceff4ced90f41f6b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Adrian Herrera 51e014fd47 gem5: use GEM5_RUN_PROFILE in DTB generation
Allows to generate DTBs from profiles other than baremetal.py, which is
the default established by the layer.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Change-Id: Ic990bd6751e473756d0739f421dce4b8f98248d7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy f8e79562f9 arm-bsp/tc0: Enable spmd and SEL2 SPMC with optee as SEL1 SP
- Set SPD to spmd with SEL2 SPMC. Set optee as SP
- Assign SP layout and spmc manifest file that corresponds to optee
- Move TF-A version from 2.3 to 2.4

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I3da3bf7f95ba42716b731f92e2cdfb928b1ab77f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 980f559e87 arm-bsp/linux: add ffa transport in optee driver for TC0
This patch adds FF-A transport driver for optee driver. This is based
on prototype version released by Arm and its port for android11-5.4-lts
kernel.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I991895881c069767854ae8a0722cdc282b221dd9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 44a3c5cf80 arm-bsp/linux: enable ffa driver for TC0
Enables ffa driver. Sets CONFIG_ARM_FFA_TRANSPORT=y

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I71ffeb6b3bc5b28c34bfab09cdcc66227203c74c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 603a7657e2 arm-bsp/linux: add ffa driver to TC0
This patch contains initial version of ffa driver adopted for
android11-5.4-lts kernel.

This is based on prototype ffa driver released by Arm.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Idb198cc77368a95257f1b5bff37b17bd13144109
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 7453f06afc arm-bsp/tc0: Enable optee core with SPMC at SEL2
Sets config flag CFG_CORE_SEL2_SPMC. Copies optee manifest file and
sp_layout files to deploy directory.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: If2104e2d588cbc9fbd9db3d8c4ba9fb74732901b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy b595d1ea47 arm-bsp/tc0: Add tc0 platform support patches for optee
These patches in optee-os adds support for
      - tc0 platform
      - SEL2 SPMC support in optee core
      - support for tc0 SEL2 SPMC config

The patch in optee-client adds support for
    - allocating page aligned shmem buffers

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I1cfe134bdcedc45adf446f46af0d2881815b98f6
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy a3481e5016 arm-bsp/tc0: Add support for optee
This patch adds optee-os, optee-client, optee-test support in tc0 bsp.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I65f795b7ec2b4def4778b286b2f744b06b177157
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 9fdf9297ac arm-bsp/tc0: Add hafnium support
Enables hafnium support for tc0.
Adds pending patches for SEL1 SP support.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: If5c12b7e7b7a301ae9a48a88223be3e51f38d3aa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy 9e00b6b884 arm/trusted-firmware-a: Add support for spmd build option
This patch adds generic dispatcher 'spmd' option for SPD along with
SPMD_SPM_AT_SEL2 build option.

 Config: SPD=spmd and SPMD_SPM_AT_SEL2=1. Indicates the SPMC component
 runs at the S-EL2
   - Add hafnium dependency
   - Set CTX_INCLUDE_EL2_REGS=1 and ARM_ARCH_MINOR=4
   - Set BL32 to hafnium image
   - Set SP_LAYOUT_FILE and ARM_SPMC_MANIFEST build parameters

 Config: SPD=spmd and SPMD_SPM_AT_SEL2=0. Indicates the SPMC component
 runs at the S-EL1 execution state.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Icd3970e5132e75de67ef7f41dbfc8f9e1cdde7f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Arunachalam Ganapathy ee8a242e7a arm: Add hafnium support
Initial recipe for hafnium[1]. This enables build for reference Secure
Partition Manager (SPM) for systems that implement the Armv8.4-A
Secure-EL2 extension.

Link: [1] https://www.trustedfirmware.org/projects/hafnium/

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ib256d8ca03c94131e308d962d786d5d6a656c256
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-14 09:37:35 -05:00
Ross Burton 43a25b2e96 arm/opencsd: upgrade to 1.0.0
Change-Id: I7c88e60bbeb6d9149d6d6178067bcd149405c111
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:30:40 -05:00
Khasim Mohammed e25c325197 arm-bsp/n1sdp: port and migrate to linux yocto kernel 5.10
This commit includes :
    - rebased and fixed kernel 5.4 PCIe quirk patches to apply on 5.10
    - pci probe in n1sdp driver is modified to use 5.10 structure
    - USB_CON_GPIO config is added to remove build time warning
    - Updated n1sdp conf to use 5.10 yocto kernel
    - Fix defconfig to not use obsolete symbols (RB)

Change-Id: I9e3d3945057ac09768a4a4e4d7a3033138925955
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:53 -05:00
Jon Mason 761bcbb365 arm/machine: add zephyr machine conf for microbit
Zephyr supports QEMU based machine for Cortex M0 (qemu-cortex-m0).  This
is actually using the BBC Microbit v1 machine in QEMU.  Use this more
accurate name for the machine conf.  This enables us to verify m0
tunings.

NOTE: qemu-cortex-m0's zephyr config has SRAM too small to run
zephyr-kernel-test-all, but can run zephyr-philosophers and
zephyr-kernel-test-sleep (and possibly others).

Change-Id: Ia997a162c10cf1a6b8fea244cb1960f4d4c66adc
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Anders Dellien d9fe9a3eac arm-bsp/fvp-base*: move to u-boot 2020.10
Move both FVP platforms to u-boot 2020.10

Change-Id: If94bb5a343e2709574f84283f39d8d227b32d84d
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton e627b698e7 kas: add a test for the external toolchain support
meta-arm-toolchain supports using an external binary arm
toolchain[1] instead of the gcc-cross built by oe-core.

Add a test case to exercise this build in the CI.  Currently this
is only for the Aarch32 target as our CI runs on aarch64 and there
is no binary or aarch64 target on aarch64 host.

This depends on the image used by the CI having the relevant
compilers installed into /usr/local.

[1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a

Change-Id: I9f7ea66786e98a40cbd490386497e2d3aaa47e80
Signed-off-by: Ross Burton <ross.burton@arm.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton 84683227ed kas: rename armgcc fragment to avoid conflicting with musl
The armgcc fragment was labelled 'libc', which means it would be
impossible to armgcc+musl.

Change-Id: I96f1d6e1a77bcd05fe373315f575c57c36417852
Signed-off-by: Ross Burton <ross.burton@arm.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Usama Arif 312a25202b arm-bsp/images: artifacts image for tc0
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building tc0-artifacts-image
which depends on trusted-firmware-a will build all the required binaries.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I57760a339da1601bd66e3dd752a7b2814e84bbb8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Diego Sueiro 1f548fce10 arm-autonomy/linux-arm-autonomy: apply runstate fix to kernels older than 5.10
The patch introduced in 82ffc86 is a backport from the 5.10 version. Hence,
just apply it for kernels older than 5.10.

Change-Id: I6f442f540913b5e24bea533a436b4a3104d098e9
Issue-Id: SCM-2033
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-13 17:29:30 -05:00
Ross Burton 75c9cc3bf8 CI: don't retry jobs
We can't retry jobs blindly because if a build fails with warnings we want
to fail the job.  With retries enabled the job fails, but is immediately
retried and builds quickly from sstate without any warnings.

Thus, all and any warnings are hidden.

Disabling retries. We may get occasional failures from Docker, we'll have
to see how bad they are.

Change-Id: Ib726f14a264c029fdf372fc1b8a02aca52bf5e4c
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-01-12 18:05:41 +00:00
Ross Burton 9e2ff72858 arm-toolchain/external-arm-toolchains: add upstream checking information
Change-Id: I08168f5369eafb590d7cdbc972320c852d4252b3
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Ross Burton 68a113c0a0 kas: add testing of gcc-arm
Add a build to verify that setting GCCVERSION to arm-10.2 works.

Change-Id: I086fa786b11560a8e94ee646859c59288bacba5d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Nathan Dunne f14be5995f arm-autonomy/xenguest-manager: Document VOLATILE_LOG_DIR in recipe
Added a comment to the xenguest-manager recipe to inform the user that
the default state is a volatile log dir, and how to persist logs across
reboots.

Issue-Id: SCM-1860
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ie0c92b05d11543a1524cbb7a53cd845bc63ecd3d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg eb3a6b74b7 external-arm-toolchain: Misc. fixup for GCC 10.2 support
Arm GCC 10.2 prebuilt toolchain comes with ldd and tzselect scripts
which uses "/usr/bin/bash", so replace this with "/bin/sh" as the
default shell.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg a56011bf30 arm-toolchain: Drop support for GCC 8.x toolchain
As OE core has moved to GCC 10.2 toolchain, so remove support for
legacy Arm 8.x toolchain.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Sumit Garg 0a1d96948f arm-toolchain: Add support for GCC 10.2-2020.11
Add support for GNU-A toolchain version: 10.2-2020.11.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-01-07 10:55:12 -05:00
Ross Burton 6dbf49d633 arm/trusted-firmware-a: remove git-specific recipe
This recipe isn't used by any machines and isn't tested, so remove it.

Machines that use a git snapshot should extend the closest versioned recipe
instead.

Change-Id: Ia0970f2d0491204c23d171c065e85c9f65f9472f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Ross Burton e454387d9f arm/trusted-firmware-a: remove unused 2.1 recipe
No machines in meta-arm are using this old release.

Change-Id: I8b56b1cc3eb603ee423acc52950d1e7661502d0e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Ross Burton b566fbce82 arm/edk2-firmware: remove unused 202008 version
Now that SGI575 has upgraded, this can be removed.

Change-Id: Ib8bdd9430b66a4b83524b21ad2a300a048c218eb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-22 09:53:33 -05:00
Jon Mason 756e695b48 arm-bsp/linux: remove unused kmeta variables
gem5 is no longer in meta-arm-bsp, and kmeta entry should be removed.

sgi575 has no usage of the meta-arm-bsp kmeta and would be better suited
to use the generic one.

corstone700 is defining kmeta, but that variable is only used in the
generic kmeta src_uri, and not the meta-arm-bsp that it is using.

Change-Id: I01e80c433a9a02bad1f6337b0df27cbf6a96231f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-21 09:55:52 -05:00
Jon Mason 1f6d3f6ef2 arm-bsp: fix sgi575 kernel compile warning
SGI575 throws a config warning when compiling the 5.7 kernel.

WARNING: linux-yocto-5.7.19+gitAUTOINC+b9e6fd082d_6b9830fecd-r0 do_kernel_configcheck: [kernel config]: specified values did not make it into the kernel's final configuration:

    [NOTE]: 'CONFIG_USB_CONN_GPIO' last val (m) and .config val (y) do not match
    [INFO]: CONFIG_USB_CONN_GPIO : y ## .config: 5334 :configs///defconfig (m)
    [INFO]: raw config text:

        config USB_CONN_GPIO
        	tristate "USB GPIO Based Connection Detection Driver"
        	select USB_ROLE_SWITCH
        	depends on GPIOLIB && USB_SUPPORT
        	help
        	  The driver supports USB role switch between host and device via GPIO
        	  based USB cable detection, used typically if an input GPIO is used
        	  to detect USB ID pin, and another input GPIO may be also used to detect
        	  Vbus pin at the same time, it also can be used to enable/disable
        	  device if an input GPIO is only used to detect Vbus pin.

        	  To compile the driver as a module, choose M here: the module will
        	  be called usb-conn-gpio.ko

        Config 'USB_CONN_GPIO' has the following Direct dependencies (USB_CONN_GPIO=y):
                GPIOLIB(=y) && USB_SUPPORT(=y)
        Parent dependencies are:
             USB_SUPPORT [y] GPIOLIB [y]

    [INFO]: selection details for 'CONFIG_USB_CONN_GPIO':
        Symbols currently y-selecting this symbol:
          - PHY_TEGRA_XUSB

It is using the defconfig from upstream Linux.  So, change that
defconfig to correct the warning by changing USB_CONN_GPIO from 'm' to
'y'.

Change-Id: Ia5080f7f22d0f1aef065b58d8c3b0222625c8f58
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 16:03:19 -05:00
Ross Burton 9ed331bbd7 arm-bsp/edk2-firmware: upgrade SGI575 to 202011
Change-Id: Id002f1f460d9a0d66c913d3f3c7bb460ae7d5904
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton a780470d96 arm/edk2-firmware: upgrade platforms to fix VariablePolicyLib errors
Upgrade to a newer edk2-platforms revision to incorporate the fixes
for the VariablePolicyLib changes in edk2 itself.

Change-Id: I928a59baee9cea4958963ac86f0093521036740b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 800249ac61 arm/edk2-firmware: no need to depend on the C library
Firmware is baremetal so doesn't need the C library to build.

Change-Id: Ie376783cb45fb6d455bc5d9c687e77703ff2cd72
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 5a44edaa0e arm/trusted-firmware-m: upgrade to 1.1
Change-Id: Id0c37b291b32072ebe61abcd908ed9a2ebf79365
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton cff5aafc67 arm/trusted-firmware-m: set PACKAGE_ARCH
As this is machine-specific, set PACKAGE_ARCH to MACHINE.

Change-Id: I4569bce706de8dea4ba98770960c0d40348a3fa2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 60ef8543f4 arm/trusted-firmware-m: improve CMake calls
Use cmake more idiomatically, and enable verbose builds.

Change-Id: I908af71f4662fab1dde9de86fc7a56ca3701e0c5
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 235b7539d8 arm/trusted-firmware-m: remove more unneeded build dependencies
TF-M uses the binary Arm toolchains currently, so we can inhibit
all of the default dependencies.

Change-Id: I38a7bda9570d9d63d3d81f0886c437f29929a0f5
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton d9a0f4fe59 arm-bsp/trusted-firmware-m: move TFM_PLATFORM to machine configuration
Now this can be easily set in the machine, do so.

Change-Id: I964c78c8e1e8f845cc2c95193c4a795e12089d1a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 6a85fdbd77 arm/trusted-firmware-m: don't use COMPATIBLE_MACHINE directly
COMPATIBLE_MACHINE is a wrapper around raising SkipRecipe, and as this
recipe basically just needs TFM_PLATFORM set we can raise that if the
variable is not set.  This allows BSPs to set TFM_PLATFORM in their
machine configuration instead of needing to bbappend.

Change-Id: I8544ff14ac4689bfbea1f0ac68364b673abde6f1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Ross Burton 7fdd34516c arm-bsp/musca: remove trusted-firmware-m statements
Musca doesn't build 'images' in the traditional sense yet, just
trusted-firmware-m or Zephyr, so remove EXTRA_IMAGEDEPENDS.

Remove the preferred version for TF-M as we only ship one currently.

Change-Id: I2fbd1230f6ba7a49aa093ca90fc38e676ba14633
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Nathan Dunne 9b7905b994 arm-autonomy/xenguest-manager: Clean up code duplication
Reduced duplicated code in xenguest-manager to functions for better
maintainability. Also reduced instances of calling self with a different
argument, which is better for performance and log readability.

Issue-Id: SCM-1635
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ic37b6b0a8a5f38145a298cc6aab908e3e58ae313
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-18 14:17:56 -05:00
Usama Arif caaa21d84f arm-bsp/documentation: Update the command for building all components
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building trusted-firmware-a will
build all the required binaries.

Change-Id: Ia8675b048db4a127d32394f536632ce88fe20826
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Usama Arif 65618b753f arm-bsp/tc0: Enable verified u-boot
This involes creating the fitImage which contains
both the kernel and ramdisk. The fitImage is also
signed.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I2fc50740aac3e347be02438cf54ef5741183a670
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Usama Arif 511c1ca429 arm-bsp: update tc0 platform with latest u-boot
Use 2020.10 u-boot as it has tc0 platform merged in upstream.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: Ia7da8b96a4509cee25b096f6637c036fef910b48
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Diego Sueiro 16d10f9c58 arm-autonomy/wic: Revert Introduce empty plugin to create unformatted empty partitions
This reverts commit bc07e6c62a.

Wic empty plugin upstreamed to oe-core as: 77d174fc80663403ef76c5b808aafc1117d3545c.

Change-Id: I94e6fb8583cf6e26cf141087fe5adb187ea85ef1
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Nathan Dunne 7a3e9d5087 arm-autonomy/xenguest-manager: improved logging
Introduced logging functions to unite logging to the console and to
the logfile with different filterable log levels. Also introduced
logrotate to ensure the size of the log does not become excessive.

The Log levels introduced are:
ERROR INFO VERBOSE

By default, both the terminal and the logfile will receive ERROR logs.
More verbose logs can be written to the logfile in two ways:
- passing the parameter "-v" or "-vv" to write info and verbose respectively
- modifying the value of "XENGUEST_MANAGER_LOG_LEVEL" in the host conf file,
  or updating the entry it creates in the config file
  /etc/xenguest/xenguest-manager.conf

The order of precedence is as listed above

Issue-Id: SCM-1516
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I47f74802ed31a5bff12305eab707e009af7e5398
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-16 14:38:31 -05:00
Ross Burton 35adaace0e ci: fail any build that emits warnings
Using a custom logging.yml we can instruct BitBake's logger to write all
warnings and errors into a separate log file.

Then after the build has finished we can see if the log file is empty and if
not show it and abort the build.

Change-Id: Ida835b5c822941fb513dfb1758b4ec195e0050fc
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 15:35:25 +00:00
Ross Burton e40b99e131 ci: make bootstrap just another kas overlay
Simplify the gitlab-ci by having the bootstrap build as just another Kas
overlay file, so there's no duplication of build script.

Change-Id: I7341750d2ae7f3c146bfe323f61fa98c0f3121c0
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 15:35:25 +00:00
Ross Burton fecf206b7d arm-bsp/linux: explicitly refuse to build for Musca
The Musca boards can't run Linux, so explictly refuse to build a kernel
on those platforms.

Change-Id: Ic38e9fb5a7af5b27b83a74615ece5d49c60d927b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:50:35 +00:00
Ross Burton 9b5f0a0cc4 arm/trusted-firmware-a: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: Ie53e82fffe5392d8e6f8d530d9f4ed732f03b50f
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton 88a5524a61 arm/trusted-firmware-m: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: I8e028b9457719a462f2028daca028714b80fad63
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton eea9ce959a arm/edk2-firmware: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: I1226290c223d18b776efffeccd48d291755d01a1
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton 98014d1c1c arm/optee-test: add comment
Upstream has potentially fixed the musl issues, so leave a comment to remind
whoever does the upgrade.

Change-Id: I24d9b23e492b29b6690c0843c3f2c950791f93e5
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Ross Burton a230baa675 arm/optee: add upstream tag regex
So that the automatic latest upstream release detection works correctly,
specify what release tags look like.

Change-Id: Ibc43aecd3cb4def85e2f1549d16f5bcb27cfb703
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-15 14:49:08 +00:00
Brett Warren da32f5c1c8 arm/trusted-firmware-a: -Wtautological triggers removed
When compiling under clang, certain lines triggered
-Wtautological errors. Cosmetic modifications were made
via patches to mitigate this.

Change-Id: I3d17dd5102267e03a8b7d157e66e0788b542bdd8
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:51 -05:00
Brett Warren 293d1e0e8d arm-bsp/trusted-firmware-a: enable explicit linking to runtime builtin
When compiling under clang for aarch32, linking fails because
the compiler-rt builtins aren't implicitly linked. Recipes and
patches have been modified and added to explicitly pass the runtime
builtin when linking files.

Change-Id: I4299b7d078d77c1fdd5576ceec1491f91e73c35d
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:51 -05:00
Ross Burton e59fc3233b arm-bsp/u-boot: update FVP patch metadata
Change-Id: If8edc606afa57e33ddd05ae16d6bf53b798257bc
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton c90cf8ce5a arm-bsp/scp-firmware: update a patch that is now upstream
Change-Id: Ibfa8f7d3c0f38fcde514170211264ec02efff953
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton 5b98ef9d65 arm/op-tee: remove old 3.8.0
Change-Id: I8da09673c02f3a046e4291f7eb01cdb66117450f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Ross Burton 35c0bcceea arm-bsp/musca: don't include qemu.inc
The oe-core qemu.inc is common configuration for the qemu machines
inside oe-core.  Including this to get qemuboot working has some
unintended consequences, such as a kernel being selected and
MACHINE_FEATURES being altered.

Change this to inherit qemuboot and set the correct filesystem type
directly.

Change-Id: Id17e2cc67f029653517ba802c7f8f5503eea3c31
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:04:25 -05:00
Henry Wang fabf4a3c0f arm-autonomy/container: Add a recipe to include container image
This commit implements a generic recipe to pack and import
container image to the xenguest image.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
Issue-Id: SCM-1738
Change-Id: I239b360f9a7dd1cdc050d46a40e210406ca21aae
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason b578b45092 arm-bsp: update SCP for TC0
Update TC0 SCP from using a local version (non-standard) to use the
generic 2.7 recipe.

Change-Id: I68aca8fe7f1f7a574a2324dff348f80cd4989581
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason e05be1a396 arm-bsp: update SCP for SGI575
Update SGI575 SCP from using a non-standard, post 2.6 release version of
SCP to using the generic v2.7 recipe.

Change-Id: I31945afbb16ce65b4f87130c6b85f12c89b8713c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason be19ce6b94 arm-bsp: have sgi575 use EDK2 sources
Move sgi575 off its own unique version of EDK2 and onto using the
version used in the EDK2 recipe.

NOTE: SGI575 not compiling cleanly with EDK2 202011

Change-Id: I7ab9a6673cc91758121b618e6691c25ae67e9a21
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Jon Mason 7cd87c3ee3 arm: new recipes for EDK2
Rework the EDK2 recipes to allow for multiple versions, and create a
recipe for the latest version.  This will allow for BSPs using the older
version to continue to function while waiting to be upgraded.  Also,
rework the n1sdp recipe to use the 201911 recipe, but overwrite
everything with its unique git trees.

Change-Id: I96869191bcf896ea17304d2ccf93da58605c72a1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-15 09:02:59 -05:00
Kamil Dziezyk a49c59daf6 arm-autonomy/xenguest-manager: remove double arguments checking
This patch brings following changes to xenguest_volume_init() function:
 (*) removes doubled arguments validation,
 (*) adds missing check_private() call,
 (*) inherits diskdevice and volumename values,
     as first and second function arguments.

Issue-Id: SCM-1520
Change-Id: Id01a326c2db5db1fcaae9237f887e97ea208d6ff
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-11 10:13:17 -05:00
Ross Burton 7577cecab6 layers: consolidate layer priority to match oe-core
Without exceptional justification there is no good reason for layers to
have a priority other than 5, to match oe-core.  If a layer has a
priority higher than oe-core's then recipes in that layer take immediate
preference over those in oe-core and there's no simple way to resolve
this as that is exactly what is meant to happen.

As a concrete example, meta-arm-bsp contains older releases of U-Boot
for platforms that have not yet moved to the latest release in oe-core.
As the priority of meta-arm-bsp is higher, simply adding this layer to a
qemuarm build will immediately downgrade u-boot.

As there is no exceptional justification for the differing priorities,
unify on 5.

Change-Id: I1975753b4a9799cc00310a7c8a6a11c2aef41f65
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-11 10:13:17 -05:00
Ross Burton 3c9486fb31 arm/qemuarm64-secureboot: don't use -dev kernel
According to the comment linux-yocto-dev was being used to get a 5.5
kernel as 5.4 was panicking on boot.  Now linux-yocto defaults to 5.8
so just use the standard kernel instead.

Change-Id: Id382c69f16f2ff4b2cbc63be94a645e56616549d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 2a530c3419 kas: remove redundant env settings
These are left over from an experiment and are no longer needed.

Change-Id: I27677b58e4c196371a394f47b185f71917848528
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 0d83df0bd2 gitlab-ci: force git updates
Explicitly force kas to update in case the repositories are reused.

Change-Id: Ieedf518c7586bb1a4eff274dc1a33b52a3c49d9f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Diego Sueiro 966e15826a arm-autonomy/init: Revert Change execution order between modutils.sh and checkroot.sh
This reverts commit a996166e85.

The fix was merged in oe-core as: 39f16d7dc42dcfe4a3fcceb8e476ac3c1e0ba3a2

Change-Id: Iab8f7d7b49fe62f04a5c77c1b48ec7c4fcf5c617
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Diego Sueiro 719a003508 arm-autonomy/modutils-initscripts: Revert fix modules.dep update
This reverts commit 9872afc6c7.

The fix was merged in oe-core as: 572f3045faa0a937947fbd56bcfef7bad55e9da6

Change-Id: Ib9531c1d18ac743c063afe66de18015472cdbb3d
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-09 10:14:29 -05:00
Ross Burton 79360345fb arm-bsp/trusted-firmware-a: move N1SDP to TF-A 2.4
Change-Id: I85a7b9421a6d5267c778c164b8f0e0bdd24b8407
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Khasim Syed Mohammed d683a5bc92 arm-bsp/scp-firmware: Update N1SDP SCP firmware to 2.7.0
SCP firmware recipes are updated to build SCP firmware version 2.7.0 for N1SDP

Change-Id: Ic42fac178cf4ac9e87127e9b6258c9bd15101906
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Kamil Dziezyk 780fba3481 arm-autonomy/xen-tools: update vif hostname fix patch status
Fix for hostname setting in vif-nat script was merged in xen upstream repo,
(sha: 5499e0fc8082024bf7e2d0facd5c976e82105070),
hence correct patch status for 4.14 is 'Backport'.

Issue-Id: SCM-1523
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: I35f04bfa0f0fff81a1ef20d500b9323e5f13b9ed
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-08 08:33:25 -05:00
Ross Burton afa281b7a9 arm/opencsd: upgrade to 1.14.4
Notable changes include resolving a build race.

Clean up the recipe so that arguments are not passed twice in do_compile(),
and always pass the install path arguments to clean up the tasks.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Change-Id: I7e32a40092403fd0c0c53d157ae4581f7903356c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton f54bb78861 arm/scp-firmware: inhibit default DEPENDS
This is baremetal firmware so doesn't use the C runtime library and uses
the binary compiler for 32-bit Arm instead of the standard one, so
inhibit the default dependencies entirely.

Change-Id: Idd52bb09fea49640f1fc38e1c5a47ca8eecca107
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton de5d5e611a arm/trusted-firmware-a: no need to DEPENDS on a C runtime
This recipe is for baremetal firmware, so remove libc from DEPENDS.

Change-Id: I89d0dde3f48599b9221cb1e153344dbc05e8cebe
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton 2ab2f5e179 arm/trusted-firmware-m: no need to DEPENDS on a C runtime
This recipe is for baremetal firmware, so remove libc from DEPENDS.

Change-Id: Id37f82a4dad6207237117b65d242617467b83ed2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Ross Burton 9d8bb0bea2 arm/trusted-firmware-m: clean up DEPENDS
TFM_DEPENDS isn't used anywhere so remove it.

Change-Id: I7707ada458a001a081aac1f417dc78d6ca37a307
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk 4b1d39b87d arm-autonomy/juno-firmware: add compressed kernel support
This patch adds support for lzma compressed kernel,
by setting KERNEL_ALT_IMAGETYPE to 'Image.lzma' and
adding additional decompression step during u-boot boot stage.

U-boot automatic Image decompression cannot be used here,
because if xen binary is the target of 'booti' command,
Image is not being decompressed neither by u-boot nor by xen.

Lzma compression is supported in u-boot with 'lzmadec' command,
and does not require setting additional dependencies inside kernel recipe.

Change-Id: I51b9aea962f8905f88b60ac28e71017c7d500189
Issue-Id: SCM-1769
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk 4ba96e72fd arm-autonomy/autonomy-host: add user defined partition to wic image
With this patch user can define additional partition entry,
via AUTONOMY_HOST_EXTRA_PARTITION variable.

Issue-Id: SCM-1514
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ic103a40de44ea6cd88caa60f06033a9c678b265f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk cd9cdaad2a arm-autonomy/juno-image-customization: add host wks file
This patch also appends 'wic wic.gz wic.bmap' images,
to IMAGE_FSTYPES.

WKS file contains two partition entries:
 * first is rootfs partition
 * second is empty partition (4 GiB by default)

Issue-Id: SCM-1520
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Ic0c79ee5eb4b08ad8f9c133b267feda1c85519a3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:24 -05:00
Kamil Dziezyk e3b06f63b1 arm-autonomy/xenguest-tools: add multiple disk devices support
With this patch user can set DISK_DEVICE for guest image.
If guest disk configuration contains DISK_DEVICE setting,
xenguest-manager uses that disk for this guest, insted of default one,
that is set with XENGUEST_VOLUME_DEVICE in xenguest-manager.conf file.
DISK_DEVICE is not set by deafult.

Change-Id: If400850f60097d38339e76a3d18fc0e2b927f3a0
Issue-Id: SCM-1513
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-07 08:45:23 -05:00
Jon Mason 03f2d78e45 arm: update Android common kernel
Update ACK to ASB-2020-07-05_5.4-stable and remove the 4.19 recipe

Change-Id: Iecc56effff11ecd9619553381815445b64aa645e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-12-02 13:39:34 -05:00
Ross Burton e64c553fa0 Add experimental CI using Kas+GitLab
Add kas scripts that generic to test builds, and a GitLab CI runner.

Change-Id: I9026fd1af4155288c4adb523d00b1562ea8515e9
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-30 15:44:59 +00:00
Jon Mason 7f5a3b06ee arm/scp-firmware: Add SCP v2.7.0
Add the latest version of SCP.  Not adding an inc file between them,
since the older one should be removed ASAP.

Change-Id: I0a1e58ffdb6d0d405b199e498587fe410076fc08
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton a8a44f6916 arm/scp-firmware: remove redundant python3native inherit
Change-Id: I9df71eb6bb99bb4af48b77f50a1056027c8227a4
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton fda2117467 arm-bsp/scp-firmware: explicitly select scp-firmware 2.6
Explicitly select scp-firmware 2.6 in all the machines that use it.

Change-Id: I83d3214fff05e7cbbf182f1215e67da42ceb68f1
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton 095d9e314d arm-bsp/scp-firmware: add version to wildcard bbappend
To prepare for a new version of scp-firmware, add a version to this
bbappend.

Change-Id: Ib6d79f2992783f2d582ca5804bc081912f9bb674
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Satish Kumar 148103bf84 arm-bsp/boot-firmware: update boot-firmware recipe to latest hash
The recipe now points to the folowing commit.
commit hash : af7eeb1bb8c5a85a5e5a76d48acc6fe864d715a9

Change-Id: I73313597ddee117d92351d6daa1f7bae0b5edb82
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Ross Burton f8fc3b463d arm-bsp/boot-firmware: add firmware recipe for corstone700
Previously corstone700 used the scp-firmware recipe to build
boot-firmware, which is based on scp-firmware but doesn't share the
build system.

As the differences are not insignificant, extract a dedicated
boot-firmware recipe.  Also set PV appropriately as boot-firmware now
has dated tags.

Change-Id: I3b60172e145be571aa465afb81473b9d79e9e425
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-26 14:06:06 +00:00
Nathan Dunne e18ee052f7 arm-autonomy/xenguest-manager: Fixed subshell false positive
Removed private check from check_size and is_integer to prevent
false positive error on execution in a subshell

Issue-Id: SCM-1623
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I57564bf610e21244c963a77c0669da5d4526eeff
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Khasim Mohammed 22948879f8 arm-bsp/n1sdp-board-firmware: include RAM firmware for secondary device
While testing multi-chip mode it was observed that n1sdp running
as secondary device needs scp and mcp RAM firmware as well.

This issue wasn't captured earlier as QSPI flash had RAM firmware installed
and it doesn't get erased automatically therefore the device was able to
load it on every reboot.

Change-Id: Ied9d24429c7025206e35f50c8e5b6f090a590015
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Khasim Syed Mohammed 99da50c473 arm-bsp/n1sdp: add overview section to n1sdp documentation
Update the n1sdp documentation in meta-arm-bsp to include overview section
and link to Arm community portal for further details on hardware platform.

Change-Id: Ic7c212db18a8c1f24255615061eee862af3aafd1
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton b0188cd0cc arm-bsp/fvp-base*: move to trusted-firmware-a 2.4
Move both FVP platforms to TF-A 2.4.

Change-Id: I2bf668c798983847197bfef80ef14ab3c87ecad5
Tested-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton fb045c9019 arm-bsp: remove foundation-armv8 machine
The Foundation FVP machine is no longer relevant now that meta-arm has
Base FVP machines and the Base FVPs are freely available.

Change-Id: Ia7043d98e2bcd8433c8c3d2661cd28484f691276
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:29 +00:00
Ross Burton df93a23ad4 arm-bsp/external-system: remove coreutils-native DEPENDS
This recipe doesn't appear to actually need coreutils-native at all, and
using it exposes a bug in pseudo where cp crashes.

Change-Id: I2fbf9ee75165194866e4a14758ed06148340dc2b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:16 +00:00
Ross Burton 87d12f6fa4 arm-bsp/trusted-firmware-a: adapt for patched recipe
The base trusted-firmware-a recipe is now patched, but these BSPs
chose to use an intermediate SHA instead of the release.  This SHA
already contains the patch, so we need to remove it from SRC_URI.

Change-Id: I69fab93cefd2e8b38474e308c6f2910454ba3a81
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 18:20:16 +00:00
Abdellatif El Khlifi 42b114e5e0 arm-bsp/trusted-firmware-a: fix the Corstone-500 system timer issue
This commit applies the TF-A fix allowing to use the right FPGA system
timer clock frequency for Corstone-500.

Change-Id: Iaa09d33eb76d9b2b74cb3400897c8cc0e3c694db
Signed-off-by: lakshmi Kailasanathan <lakshmi.Kailasanathan@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 39ae13d44e arm-bsp/u-boot: enabling the generic timer for Corstone-500
This commit updates the ARMv7 generic timer driver by configuring
and enabling the timer.

Change-Id: I1fc1df83f40e28869d8dd41ff7b202f6fa177a1f
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 390aa6e354 arm-bsp: use forcevariable override to set Corstone-500 kernel
Corstone-500 is built against poky-tiny distro.
poky-tiny sets PREFERRED_PROVIDER_virtual/kernel to linux-yocto-tiny.
Since distro config is evaluated after the machine config, we need to
use the strongest override possible (forcevariable) so the
PREFERRED_PROVIDER_virtual/kernel specified in the machine config will
apply.

Change-Id: Iafa9209bf39cf63e83faa6eefa2a442513992290
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Abdellatif El Khlifi 8e2fa5edc8 arm-bsp: branding CA5DS to Corstone-500
This commit changes the name of CA5DS platform to Corstone-500

Change-Id: I7fc687aea8ce6bba6d7021963ad4cb38f30858d5
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-25 12:01:45 +00:00
Kamil Dziezyk 342d2ec158 arm-autonomy/firmware-image-juno: update offset addresses for NOR flash images
This patch brings following improvements:
 * Remove images-r[012].txt and uEnv.txt source files
   and move all customization to add-xen-support.patch.
 * Move juno*-xen.dtb and xen binaries under dedicated
   'XEN' directory to be compatible with 8.3 format.
 * Increase XEN_DEVICETREE_DOM0_SIZE to 36 MiB.

Change-Id: I3d3ff963f97c738dcf2d90ba825729232d63ad06
Issue-Id: SCM-1567
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-23 16:11:22 +00:00
Nathan Dunne ce8369461e arm-autonomy/xenguest-manager: Private xenguest-manager functions
Ensure that init scripts sourced on guest start cannot execute functions
from the parent script. This is done using a check for the BASH_SUBSHELL
variable to see the depth of execution.

An error will be thrown if any init script attempts to execute a
function from xenguest-manager

Issue-Id: SCM-1623
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I87fee51d03a64d99728a7eca1ca789ec7293096b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-23 09:25:31 -05:00
Nathan Dunne 3bbddbe213 arm-autonomy/n1sdp-image-customization: boot partition size variables
Added variables BOOT_PART_SIZE and BOOT_PART_SIZE_UNIT to allow the
boot partition to be configured in conf files.

Issue-Id: SCM-1686
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iaa76d4abdcccc693b3c38708ca452295ff8ee66e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-23 09:06:03 -05:00
Kamil Dziezyk 02994f94df arm-autonomy/xenguest-mkimage: improve xenguest image checks
This patch brings following improvements:
 * Adding the same partition content e.g rootfs.tar.gz,
   for multiple partitions is now not possible.
 * Guest partition can contain only supported values of:
   - format types: vfat|ext2|ext3|ext4|swap|(empty)
   - image types: *.img.gz|*.img.bz2|*.img
                  *.tar.gz|*.tar.bz2|*.tar.xz|*.tar

Change-Id: I0201e7ef51830ac43fc59656fc496fcc1d13b8d4
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk aa35796c80 arm-autonomy/xenguest-manager: keep user defined partition order
If xenguest image does not define some partitions,
e.g second partition definition is skipped but 1st and 3rd are present,
xenguest-manager will create second partition(with small 2MB size),
to keep user defined partition order.

Change-Id: I8ff19fd9f25eb47ac37f80bec849387f6802aba3
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 5331993f8c arm-autonomy/xenguest-mkimage: check if partition fits disk size
Check if partition defined with '--disk-add-part=*' will fit
in disk size defined with '--disk-size=*'.

Change-Id: Ide87fe541d050497b4f2e5b5b47c1bcac8f5d37a
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 9b075d12de arm-autonomy/xenguest-tools: set guest disk and partition sizes in MB or GB
This patch brings following improvements:
 * Allow user to set guest disk and partition sizes in MB or GB.
 * Documentation update about this improvement.

Change-Id: I0a1a2945022efcd9d32bb39404b4a85721e28e19
Issue-Id: SCM-1515
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 91225be953 arm-autonomy/xenguest-mkimage: fix DISK_DEVICE setting
Previously '--disk-device' was set according to DISK_SIZE value,
set with '--disk-size' option, which was not quite accurate,
because disk device is more likely to be '/dev/sda2' rather than '1'.
This patch also fixes typo in help message.

Change-Id: I19aa72f3adb32cd786bb570023b6b40cfc5633bf
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Kamil Dziezyk 7c34d0affc arm-autonomy/xen-devicetree: check if kernel Image size is correct
This patch brings following improvements:
 * Adds a check for kernel size defined by XEN_DEVICETREE_DOM0_SIZE variable,
   whether it is greater or equal to actual kernel size.
   If not, bitbake warns user and adjusts value of XEN_DEVICETREE_DOM0_SIZE.
 * Adds 'virtual/kernel:do_deploy' as a mandatory xen-devicetree dependency via
   XEN_DEVICETREE_DEPEND variable.

Issue-Id: SCM-1567
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: I4f250172f1fa599b7a3673ba0887cd49372b7556
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 11:40:03 -05:00
Ross Burton d8dbaa20b2 arm/trusted-firmare-a: add version 2.4
Change-Id: Ia31b459a497bb5029d18a202b8add5edc7fd6872
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton e52410e281 arm/trusted-firmware-a: consolidate SRC_URI and S
All the recipes use the same value for SRC_URI and S, so consolidate them
into the include file.

Change-Id: Ieda6b0104e163ce46190e9fc5756a264f7198f25
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 60f5176196 arm-bsp/fvp-common: explicitly select trusted-firmware-a 2.3
These BSPs don't select a version of trusted-firmware-a, for clarity and
allow smooth upgrades explictly select 2.3.

Change-Id: Ieea7d075d709e2006ebf217d802f3eeecfb9a281
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 136207e7c1 arm-bsp/fvp-base-arm32: explicitly select trusted-firmware-a 2.2
Previously TF-A 2.3 failed to build for fvp-base-arm32, so explicitly select 2.2 for now.

Change-Id: I21f74861c5d5955ed7890d4e6fafc72dd85fe27f
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-11-20 08:57:23 -05:00
Ross Burton 56180fce2b arm-bsp/a5ds: explicitly select trusted-firmware-a 2.3
This BSP doesn't select a version of trusted-firmware-a, for clarity and
allow smooth upgrades explictly select 2.3.

Change-Id: I4e7ca6ff8322e22406040ba2f220d36e1bde4cae
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Ross Burton 067a259cbd arm/trusted-firmware-a: add CVE_PRODUCT
trusted-firmware-a has gone by many names in the CVE database, so add
them all.

Change-Id: I51f64211d10245ffcae010e3a723657ff4114b9c
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Ross Burton 197b0732e3 arm/optee-os: add CVE_PRODUCT tag
There are known CVEs for optee-os, so set the CVE_PRODUCT to ensure that
they are found.

Change-Id: Ibe88c2193a8e33f603386beedc76fe60eac1b3ea
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-19 10:00:51 -05:00
Nathan Dunne 214ec04498 arm-autonomy/arm-autonomy-host-image-minimal: Added multiconfig support
Added new documentation file arm-autonomy-multiconfig.md which explains
how to set up a multiconfig build, where both the host and guest are
built simultaneously in the same build dir.

To enable this feature the dependency between host and guest is set in
the image recipe, using the variables described in the documentation.

Issue-Id: SCM-638
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Iae315c128dc6d2b39281312bc1a2ab9b88f6241e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Nathan Dunne 42c4ba9c96 arm-autonomy/documentation: Updated for gatesgarth branch
Updated arm-autonomy-quickstart.md to suggest a user checkout the
latest gatesgarth branch instead of zeus.

Issue-Id: SCM-1521
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Idbd54efbe4bdbc31588f726b41b082de89812d60
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 9872afc6c7 arm-autonomy/modutils-initscripts: Fix modules.dep update
When building an image with USE_DEPMOD="0" we expect that on the first boot the
modutils.sh initscript will create the modules.dep file if it is empty or not
present.

Change-Id: I0048dc47f807587e723c068b0a4ba24718d66f49
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro a996166e85 arm-autonomy/init: Change execution order between modutils.sh and checkroot.sh
When '/' is first mounted as read-only, we want to have the checkroot.sh
initscript (which then remounts '/' as rw if allowed) running before the
modutils.sh.
This is because modutils.sh initscript might need to run depmod depending on
the status of the modules.dep file to update it and the '/' needs to be
writable.

Change-Id: Idac9aa19fba6b6bf46532097a667ce0518af515c
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro e9e01e9be7 arm-autonomy/n1sdp: Add GRUB config when including alternate kernel
For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present
we set, as GRUB config, the arm-autonomy-n1sdp-rt-grub.cfg which includes
additional entries for booting with the PREEMPT_RT kernel.

Change-Id: If40aee159ae5ba0efd3d9a5a16ee1c1167fb0504
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro ce9650ec84 arm-autonomy/n1sdp: Add support for building/installing alternate kernel
For N1SDP as arm-autonomy-host, when alternate-kernel DISTRO_FEATURE is present
we build the linux-linaro-arm-rt (with PREEMPT_RT support) by setting it as the
PREFERRED_PROVIDER_alternate/kernel. As required, we set the
KERNEL_PACKAGE_NAME_pn-linux-linaro-arm-rt to kernel-rt.

Also, include the alternate kernel binary as Image-preempt-rt in the boot
partition of the generated wic image by setting the IMAGE_EFI_BOOT_FILES
variable.

Change-Id: I205caf5ef8b8d6b8a37ec3f4d0981fe8736cae63
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro a9cd4fc12f arm-autonomy/arm-autonomy-host-image-minimal: Build/Install alternate kernel
This patch introduces the usage of the alternate-kernel DISTRO_FEATURE, and
when it is present we will build and install the alternate kernel set via
PREFERRED_PROVIDER_alternate/kernel.

Change-Id: I1fe7447a5f903d7ff5584813bfb38fca8979e755
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 171616a183 arm-autonomy/classes: Introduce alternate-kernel.bbclass
The alternate-kernel.bbclass is to be inherited by image recipes that want to
build and install an alternate kernel (set via
PREFERRED_PROVIDER_alternate/kernel).

It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
its value needs to be different from "kernel" since this is the default set
for PREFERRED_PROVIDER_virtual/kernel.

When building and installing an alternate kernel, the kernel-modules packages
for both virtual/kernel and alternate/kernel will be installed.

Change-Id: I1cd0c425c39206fe449fb5f8761ed6de95cfb442
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 3c738c4f69 arm-autonomy/linux-linaro-arm-rt: Add preempt-rt-extras.scc KERNEL_FEATURE
For now, when building the linux-linaro-arm-rt recipe we want these extra
settings:
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_HZ_1000=y

Change-Id: I23573a2b5be512b7a84c71bc50a1a63b2d95dffb
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Diego Sueiro 222fcf4281 arm-autonomy/linux-linaro-arm-rt: add linux-RT patch for xen dynamic events
This patch contain following fix:
 * xen: use handle_fasteoi_irq to handle xen dynamic events

Change-Id: I0b1734247b151d65ca510a074a5de56e8f8f0ada
Issue-Id: SCM-1654
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-18 11:02:40 -05:00
Ross Burton aee22517e4 gem5/gem5-aarch64-native: bump to 20.0.0.3
Minor point release, that successfully compiles with GCC 9.3.

Change-Id: I22bec41f92ea4ae6e9fb7b6e6706338c0134bf99
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 11:55:37 -05:00
Ross Burton 167c854412 gem5/gem5-aarch64-native: don't specify -j twice
There's no need to pass -j here as the scons clas does this already.

Also, BB_NUMBER_THREADS is the number of BitBake threads, not the number
of parallel make jobs.

Change-Id: Ib6179bf05c5ec57b7cbe9c045f7bea86518d35af
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 11:55:37 -05:00
Kamil Dziezyk 9a2847c0d6 arm-autonomy/xenguest-init: fix guest shutdown issues after host reboot
This patch contain following changes:
 * xenguest-init stop action uses now blocking call,
   and additional 'xl destroy guest' call if normal shutdown has failed.
 * xenguest-init stop action stops only running guest.
 * xenguest-init script is now caled before xen-tools scripts
   on host shutdown or reboot.
 * xenguest-network-bridge script is now called before ifupdown script
   on host shutdown or reboot.

Change-Id: I46e307fd0ad36b2e35559b4e8a071be9bbc50e34
Issue-Id: SCM-1632
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 10:38:44 -05:00
Khasim Mohammed 55daf196a6 arm-bsp/n1sdp: remove swap parition entry from wic image
The swap partition on n1sdp seem to create an issue when shutdown or reboot is run
from the shell prompt, the console stops at "Deactivating swap ...". Hence
removing the swap partition entry from wic image.

Change-Id: I22cf971fdde7e3b8b386c74003983fab3d309cc5
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 10:38:44 -05:00
Jon Mason 5fa6bc3a9c arm-bsp: fix missing stable kernels
Corstone, a5ds, and sgi575 were using the meta-kernel, but recent
updates removed support for their non-LTS kernel.  Change to using the
respective kernels present in linux-yocto until it can be upgraded to
the latest version.

Change-Id: I63f2e511fe69051c06e6559950b798c1371cc8e9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-13 09:23:50 -05:00
Jon Mason 0f0a971458 arm-bsp: Fix u-boot 2020.07 recipe
The u-boot 2020.07 temporary recipe is a copy of 2020.04, and brought
with it a limitation in the recipe to only be used on certain hardware.
Remove this limitation so that it can be used where needed.

Change-Id: I5b99e92f3f440812ebc1fc550e6b860e6530e9b7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-12 14:04:24 -05:00
Jon Mason 658faaff76 arm-bsp: create u-boot 2020.07 to resolve warning
Poky, etc master branches updated the u-boot recipes to use 2020.10,
causing bbappends for 2020.07 to no longer function.  Create a temporary
recipe for 2020.07 until all the BSPs can update to support the latest
version.

Change-Id: Ib5fc9b8a2ff2ccf01be3640a34429d2c1e57b627
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:04:20 -05:00
Diego Sueiro db1d714029 arm-bsp/n1sdp: Add wic.gz and wic.bmap to IMAGE_FSTYPES
Speed up wic image flashing by including wic.gz and wic.bmap to IMAGE_FSTYPES.

Change-Id: I503b6ede5aaf188aabd2a925c2c42e5872d7713a
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:04:20 -05:00
Ross Burton a47060c989 arm-bsp/linux-stable-5.7: backport a patch to fix CoreSight builds
Backport a patch from master to fix builds of perf with CoreSight
enabled.

Change-Id: Iaf4f8c4a188c898bde9dc2a45df8609c6c825eea
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Ross Burton 94c7031e4e arm-bsp/linux-stable-5.6: fix build of perf
Backport a number of patches from master to fix the build of perf.

Change-Id: I0063b242116a15ba727ad6cf4c9b3abed61600ff
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Ross Burton 2d1e4b2af1 arm-bsp/linux-stable-5.3: fix build of perf
Backport a number of patches from master to fix the build of perf.

Change-Id: I4a0d38e62ba30c1622176bc8875e849a56f8aecb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Ross Burton 1df9bebacf arm-bsp/linux-stable: move corstone700 tweaks to versioned bbappend
The corstone700-specific tweaks should be applied to just the 5.6
version of the linux-stable recipe, not all of them.  By appending all
of the versions they *all* become 5.6.14, which makes it impossible to
know what recipe is actually being used.

Change-Id: I77ccc1f16003fea7b6356732587c6947b20a2f4c
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Ross Burton c333787f64 arm/linux-arm64-ack: fix build of perf
Backport a number of patches from master to fix the build of perf.
These are incorporated into newer ACK 5.4.x releases but we're too close
to release of to bump the kernel version.

Change-Id: I60f599d9ffd9be170eb024622399d8df3e9a1fa1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Ross Burton dbe4f2c92d arm-bsp/documentation: fix MACHINE reference
The MACHINE is foundation-armv8, not foundation-v8.

Change-Id: I557eb9c32914b2ccf938a76a6efb260483e83d22
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Nathan Dunne 628b8bc19a arm-autonomy/arm-autonomy-host-image-minimal: Resolve guest path if symlink
In ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS, remove fatal error if guest path
is a symlink, and instead resolve using os.path.realpath.

Issue-Id: SCM-638
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: Ic4fdd7ae03ed6bb6caa55e722b89114080c90f4c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-10 11:03:37 -05:00
Diego Sueiro 9dd5fcd6ce arm-autonomy/linux-arm-autonomy: Introduce xen-common.scc KERNEL_FEATURES
Add xen-common.scc KERNEL_FEATURES to group common kernel configs and patches
for both Xen Host and Guest.

Change-Id: I3a14386e387b9778c962dd9fdbe9a60ce2e97e77
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:44:10 -05:00
Ross Burton 598e1cc32c arm-bsp/n1sdp-board-firmware: rewrite recipe
Any recipe that needs to use RM_WORK_EXCLUDE is either being very clever
or is breaking expectations.  This recipe is doing several things in
non-idiomatic ways that breaks other tools, for example the source
doesn't exist in do_unpack.

Rename from board-firmware-n1sdp to n1sdp-board-firmware to match the
repository name.

As this recipe simply ships some precompiled binary, set
INHIBIT_DEFAULT_DEPS to avoid depending on the toolchain to reduce how
often it needs to be rebuilt.

Unpack normally and promptly delete the large SOFTWARE/ directory that
we don't care about, instead of unpacking in do_install.

Ensure deploy is scheduled appropriately.

Remove LICENSE_FLAGS, this is for licenses which need to be opted-in.
Setting LICENSE_FLAGS and then enabling it by default makes no sense.

Change-Id: I1fe906634977d323086de6f6c67a9c45aeb7585e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:44:10 -05:00
Ross Burton fc36f9d163 arm/trusted-firmware-a: fix 2.4 build with OpenSSL
2.4 has added support for a global OPENSSL_DIR make option, instead of
hard-coded /usr into the individual Makefiles.

The TC0 build is now using a snapshot of TF-A after that change landed,
so pass OPENSSL_DIR via EXTRA_OEMAKE to fix the build.

Change-Id: I9e06991d15bb67f983a203ec3a1b1754cc6e2d7e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:12:18 -05:00
Kamil Dziezyk 9fa07405df arm-autonomy/xenguest-network: fix for unbound variable in network-bridge.sh
Undefined 'XENGUEST_NETWORK_TYPE' caused an error during guest start.

Change-Id: I5b0adea523f884cd4b649e3b85ae7e8860eb019a
Issue-Id: SCM-1633
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:12:18 -05:00
Damodar Santhapuri 2c84a019c2 arm-bsp/firmware-image-juno: update offest addresses for NOR flash images
After migrating kernel vesion to >= 5.4, Image size has been increased
to >35MB . It causes the NOR flash memory corruption.This issue got
fixed by updating NOR flash offeset of effected images .

Change-Id: Ia635fd9d91724d8255866b9f19f1ec2d42a62d2e
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:12:18 -05:00
Damodar Santhapuri 3dab98935e arm-bsp/u-boot: fix autoboot issue on juno platform
this commit fixes memory corruption of uEnv.txt's DRAM memory at
${loadaddr} , by giving enough memory to kernel Image.

Change-Id: I0243b121f1e56b06b8d2f2a21420c594598fad31
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-09 11:12:18 -05:00
Ross Burton 91d5c596a6 arm/trusted-firmware-a: ensure LICENSE is correct
TF-A itself is BSD 3-clause licensed, so use that instead of the
generic BSD license.

The end result is only also Apache-2.0 licensed if mbed TLS is used,
so add this only if mbed TLS is enabled.

Change-Id: I243e664dcfc590d8b2dbe7b795bc414a973b379b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-04 08:46:09 -05:00
Ross Burton d57027cc02 arm/trusted-firmware-a: clean up license assignments
trusted-firmware-a.inc can set LIC_FILES_CHKSUM so do += in the .bb files.

trusted-firmware-a.inc expects recipes to set LIC_FILES_CHKSUM_MBEDTLS,
so just use = in the .bb files.

Change-Id: I673aec6f2ae59c58cd11517e1f2aecc538427796
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-04 08:46:09 -05:00
Khem Raj 0de8e065f4 optee-client: Disable Werror with clang
Main flags are using gcc specific warning options e.g.
-Wunsafe-loop-optimizations which are unkown to clang so it reports then
under -Wunknown-warning-option as an error when -Werror is on

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-04 08:46:09 -05:00
Jon Mason 5b35ed7d4d arm-bsp: convert general u-boot bbappend to version specific
The generic u-boot bbappend is causing issues upstream when trying to
use new or older versions of u-boot, by trying to apply patches from
folders that do not exist.

Change-Id: I399e3234fba852382fc73ab68f14a7e826bb5a42
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Jon Mason 9a7ab6a47e arm-bsp: Fix cortexm tunes
Fix the cortex-m tunes to actually function properly.  Tested with
meta-zephyr on musca-b1.

Change-Id: Ib797cafc4f82f6a525cf6b9c0ce4a302a9ef65c2
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Ross Burton c0f9746d58 arm/python3-cbor: point the LIC_FILES_CHKSUM at the source tree
Upstream doesn't actually distribute the LICENSE file in the PyPi tarball,
so use a fragment of setup.py to checksum the license until they do.

Change-Id: I903fc82a18c6555ade9f249f31d00e4233e1c974
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Diego Sueiro 496763e0cc arm-autonomy/linux-arm-autonomy: Add CONFIG_OVERLAY_FS=y to docker-minimal.cfg
To reduce storage usage when pulling docker images we need to use the overlay2
storage driver. To achieve this we have to enable CONFIG_OVERLAY_FS in the
kernel.

Change-Id: I08e88bae41e353fc78c00e0d267a6009fbad1ca5
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Diego Sueiro 9425dbafc0 arm-bsp/n1sdp: Add support for Kernel PREEMPT_RT with linux-linaro-arm-rt
Add N1SDP settings and configurations for the kernel with PREEMPT_RT support
using the linux-linaro-arm-rt recipe.

Also, change linux-linaro-arm-n1sdp.inc to enable sharing commom patches for
N1SDP when building linux-linaro-arm or linux-linaro-arm-rt.

Change-Id: I101b2e6ffefa4f908389110048778aaf5226d5d0
Issue-Id: SCM-1653
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Diego Sueiro f24f7fde73 arm-bsp/kernel: Introduce linux-linaro-arm-rt recipe
The linux-linaro-arm-rt recipe provides the kernel with PREEMPT_RT patches and
is based on linux-linaro-arm_5.4.bb. Set PREFERRED_PROVIDER_virtual/kernel to
linux-linaro-arm-rt to enable it as the default kernel.

Change-Id: I8c3e59c476ff3f8e434841f8f0aa11eaa6c799bd
Issue-Id: SCM-1653
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Diego Sueiro 93ceeb7349 arm-bsp/linux-linaro-arm: require linux-yocto.inc
By requiring linux-yocto.inc we can have separate build dirs when building
LINUX_KERNEL_TYPE as 'standard' and 'preempt-rt', for example.

Change-Id: I6288d210f942d1bacd510397ef3d1f2858951e68
Issue-Id: SCM-1653
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Diego Sueiro 1091c186c5 arm-bsp/linux-linaro-arm: Move N1SDP specifics from .bbapend to .inc
Make usage of .inc for N1SDP to concentrate its specifics.

Change-Id: I190eca0e9db0e9ec614588ff33190dba6ee75897
Issue-Id: SCM-1653
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-03 12:31:26 -05:00
Ross Burton 45d7cf50a4 arm-bsp/documentation: add corstone700 documentation
Add brief documentation for the corstone700 BSPs.

Change-Id: I774e06aecca05ac13eaf2916623c6ec097c1c047
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Khasim Mohammed cd39898f06 arm-bsp/linux-linaro-arm-5.4: fixup perf to build with gcc 10
Many errors were observed while trying to build perf with gcc 10.
There were few patches which were merged on 5.4 stable which were missing in
our kernel repository, backporting the same here.

Change-Id: I4c4104fd3c99a60706662cc05b18f3ee94c7afa2
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 6c88dba4a4 arm/optee-test: don't attempt to build with musl
optee-test doesn't build on musl (or bionic) because libstdc++.a under musl
depends on libc providing the pthread functions, but TAs are built without
a libc.

Until this is fixed upstream (see https://github.com/OP-TEE/optee_test/issues/458)
simply refuse to build optee-test with musl.

Change-Id: If73fd43683e19e2943bf54f4027806786fb1dc7d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 8dddb06aa2 arm/opencsd: build on 32-bit Arm/x86
OpenCSD supports 32-bit Arm and x86 too, so extend COMPATIBLE_HOST.

Change-Id: Icf64b4645c4062e3b660b2bd2f3404bfe6c061b7
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton c760240dd2 arm/optee: consolidate common variables
Move a number of shared varibles into optee.inc so that they don't have
to be duplicated repeatedly.

Change-Id: Ie2565dfa66cbd61aad199224a4cdc7b2e1af0c5d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton e03b824d78 arm/optee-os: cleanup recipe
Clarify license and clean up oe_runmake calls.

Change-Id: I5952cd1b8014fa686ce4039fe8abca803fb4306a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 46b3f67814 arm/optee-examples: cleanup recipe
Clarify the license and clean up oe_runmake calls.

Change-Id: I6d0eb9aee895e3ed9de73ea14f11084c214ca5af
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 90cf59de1a arm/optee-client: rewrite recipe
The license is 2-clause BSD, so specify that precisely.

No need to inherit python3native as it is not used.

Instead of using the bare Makefile build, use CMake.

Change-Id: I324f633428f10fdaabaa57b2f2561c2fdc847919
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 2b91b8383b arm/optee-os: fix the optee-test build with GCC 10
GCC 10 calls __getauxval in some situations so backport some patches
from upstream to fix the linking with this symbol.

Change-Id: I68af7ff9d058b9f602f54350a35908d178a8e688
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton accb5d3bb4 arm/optee-test: add bug links
These issues now have upstream bugs.

Change-Id: I9eacedbbf6e7874f6d1843b08fd9a8c04d030855
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Ross Burton 15e525c0e5 arm/optee-os: improve sysroot lookup
optee-test uses the same functionality to find libstdc++ and libgcc_eh,
so ensure that these libraries are found with the right sysroot too.

Change-Id: Ice0506a42655223045bcabec790eae3a3dbcf245
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Nathan Dunne acac8ed6ce arm-autonomy/xenguest-manager: Allow guests with substring names
Created new function for determining guest running state such that
two guests with names such as "myguest" and "myguest2" report
correctly, by searching for exact guestname instead of contains.

Also modified the status command to use the same function to avoid
duplication, and added a new nested function for testing status for
a particular guest, instead of recursively calling the whole bash
script.

Using the nested function speeds up "xenguest-manager status" from
~7.5s to ~1.5s my machine.

Change-Id: Ie6fc08cacc55f623c44b08478f76031510a59126
Issue-Id: SCM-1517
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-11-02 21:09:53 -05:00
Kamil Dziezyk 5f8eabe68f arm-autonomy/xenguest-network: add kea dhcp4 configuration
Since dhcp-server was removed from oe-core layer,
we decided to add kea dhcp support in meta-arm-autonomy.

This patch introduce following changes:
  (*) replaces all configuration and customization valid for dhcpd,
      with kea complatible one.
  (*) replaces dhcp-server rdependency with kea for xenguest-network recipe
  (*) replaces default kea dhcp4 server configuration with a minimal one.

Change-Id: I4202b5b8f3be6801cbb4f9068061eccfdadee5f0
Issue-Id: SCM-1522
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-28 10:25:48 -04:00
Kamil Dziezyk eb332aec8c arm-autonomy/recipes-connectivity: Revert "revert dhcp removal and bind update"
This reverts commit 67b359d532.

In oe-core master branch the dhcp recipe was removed and bind version was
bumped.

For now, arm-autonomy-host-image-minimal installs the dhcp-server package
which is generated by dhcp_4.4.2.bb recipe that depends on bind_9.11.22.bb
recipe.

In the near future arm-autonomy will be updated to use kea dhcp server
which is now used in oe-core.

Change-Id: I8d3e8a069d007b82f45814145e2e7ce209a49052
Issue-Id: SCM-1522
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-28 10:25:35 -04:00
Ross Burton 8bb333df5e arm/opencsd: upgrade to 1.43.3
Change-Id: I7487c116be0f267dfb53f45ff0a5974c8467dbb6
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-28 09:01:16 -04:00
Kamil Dziezyk 2d3ded053a arm-bsp/n1sdp: add board firmware recipe and documentation
board-firmware:
 * updates scp binaries
 * Custom license - STM-SLA0044-Rev5 - added in layer.conf,
   whitelisted in n1sdp.conf.

firmware-image:
 * Combines uefi, tf-a and scp binaries into a tarball.
 * There are 2 flavours available:
   - n1sdp-board-firmware_primary.tar.gz
   - n1sdp-board-firmware_secondary.tar.gz

Change-Id: I82d0c995956310a569b27431f98f7c21accf8330
Issue-Id: SCM-1508
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 16:21:30 -04:00
Nathan Dunne ceb5902e56 arm-autonomy/xenguest-manager: Allow guests named 'guest'
Prevented name collision on file guest.cfg when the name of the
guest is exactly 'guest'. Config is now piped into a tmp file
which can safely be deleted at the end of the start operation.

Change-Id: Id08ac08e52e9e64c508c841b257ecb28ed9d44ae
Issue-Id: SCM-1518
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Nathan Dunne 128af6b2d0 arm-autonomy/xenguest-manager: source init scripts
source init scripts in xenguest manager instead of executing
directly, so they can immediately access functions and
variables from the parent script.

Also added a check that init scripts are executable, and will
skip if not.

Change-Id: Ie6bbb1b480a7bfe5af095addcf1aefd122b57c50
Issue-Id: SCM-1587
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton cdfe259d13 arm-bsp/edk2-firmware: add platform for fvp-base.
Change-Id: I2b908006a0dca93241b6cdfdcc10dad31c723d14
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton 7221a0c0fe arm/edk2-firmware: build for qemuarm64 by default
edk2 has a qemu/aarch64 platform, so build this in the base recipe so
the recipe can always be tested with the latest release.

Change-Id: I22988cd3fab9a4a37e0014a0d70beac81301f21b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton d931feb6b3 arm/edk2-firmware: don't assume that platforms are in edk2-platforms
Some platforms are inside edk2 itself, so don't assume that the platform
path is relative to edk2-platforms.

Remove the edk2-platforms path prefix from the tasks, and move the
prefix to EDK2_PLATFORM_DSC.

Change-Id: I53e3dcd499f4d9f1d72c4d68ac82faed4fec70f2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton 1a97691749 arm/edk2-firmware: upgrade to latest release
Bump the default SRCREVs to the latest release (for edk2) and a
corresponding working commit (edk2-platforms).  Typically platforms will
pin to known good releases but at least the defaults can be up to date.

Change-Id: I58b436416e3f2e30501126a39f1f0621b3fb9602
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton e2a09790bb arm-bsp/edk2-firmware: fix N1SDP build with clang
Clang finds more bad code paths than GCC, and edk2 uses -Werror.

Pending status because the upstreamed support appears to have been
entirely rewritten.

Change-Id: I43d4e7f28f0a6acc4ecdd1514402c1b831871b5b
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton a878c3371c arm/edk2-firmware: set GCC_VER appropriately with meta-clang
Also as this isn't actually GCC-specific, rename the variable to
EDK_COMPILER.

Change-Id: I617f5da642c10decd83124e160b06579c46405ba
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton 1a8c987158 arm-bsp/edk2-firmware: use new variables for SRC_URI
In the N1SDP port simply set the new variables instead of overriding
SRC_URI entirely.

Change-Id: I3d970f679e60acded2275aa252a4011fe1280063
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Ross Burton f35c7f282d arm/edk2-firmware: add variables to ease SRC_URI changes
Some platforms may want to switch the edk2 or edk2-platform SRC_URI to
for example the landing-teams staging repository.  Add variables for the
base URLs so this can be done surgically.

Change-Id: I32612d164f77f9e63e8498c129b512c353b04eaa
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-26 11:04:56 -04:00
Abdellatif El Khlifi 92c0971055 arm-bsp/corstone700-test-app: adding test recipe for systems comms
This commit provides a recipe that generates a Linux userspace
application used for testing the communication between Corstone700 cores.

Change-Id: I7c00653b0fcd6d9074510bbb70a838762aed0150
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-25 09:48:47 -04:00
Anders Dellien 785f8bf4c1 arm-bsp/tc0: Add kernel patches
Add patches for SCMI, MHUv2 and DRM. Also update the kernel config
to enable boot to Android home screen instead of just console.

Change-Id: Ic2af15441667b967ef360d8410de94e83eb73de4
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-25 09:48:47 -04:00
Diego Sueiro 82ffc86baf arm-autonomy/linux-arm-autonomy: Fix runstate info page if kpti is enabled
This patch surpress Dom0/DomU kernel messages like these:
(XEN) p2m.c:1888: d0v1: Failed to walk page-table va 0xffff00005ddb6238
(XEN) p2m.c:1888: d0v1: Failed to walk page-table va 0xffff00005ddb6247

Change-Id: I10364516a9992da4a7b52a2cb02baa5c12ff8585
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-25 09:48:47 -04:00
Diego Sueiro 6c740e5cf0 arm-autonomy/xen: Backport improvements to xen 4.14
These patches improve the overall stability of Xen.

Change-Id: I40c93f1c28fe9bd9548883c1cc0c38e1be7f56c3
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-25 09:48:47 -04:00
Ross Burton a6d345f978 arm-bsp: fix typo in musca-b1 documentation
Change-Id: I7e39c39f14a9ccf32ccfbc732f57c0df79034885
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:47 -04:00
Ross Burton 67108e430e arm-bsp/layer.conf: add meta-python for musca
Change-Id: I46568f3144519bc25a65bce3d29d0ae659335f55
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:47 -04:00
Ross Burton 5659d038e3 arm/edk2-firmware: set do_configure[cleandirs] to ensure B is empty
Change-Id: I0df26d6f39613ee65cce5a297dbcd17f299ac0be
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Ross Burton ed66883f14 arm/edk2-firmware: rationalise $S
Currently edk2-firmware sets S to WORKDIR/git/ and unpacks edk2 into
WORKDIR/git/edk2. This isn't idiomatic and breaks tooling such as devtool
which expects a git fetcher to unpack a git repository to $S.

Move the edk2 unpack to $S directly, and update the recipe where required.

Change-Id: Ib9571032c14a01864860e2eb5a04ed73dd382710
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Ross Burton df856a631b arm-bsp/edk2-firmware: remove redundant SRC_URI
Now that the base recipe uses gitsm: the SRC_URI can be removed from here.

Change-Id: Ic070a8a84c49a9c731690ad660501fb61b092750
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Ross Burton 2f592aa7ea arm/edk2-firmare: use gitsm fetcher
The EDK2 repository contains a number of submodules and some builds need
them, so use the gitsm fetcher to ensure they're always fetched.

Change-Id: I63cf20900b3fa636f409926222c715b7f6a7bb89
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Ross Burton 37c9eea1cd arm/edk2-firware: don't handle obsolete GCC releases
There's no point in handling GCC cross compilers that are before version 5, as
GCC 5 came out in 2017 and is obsolete now.

Change-Id: I650ee44c433f70004d20c0219310ddbd4028addb
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Ross Burton 8492512109 arm/edk2-firmware: no need to inherit python3native
There are no python3-foo-native dependencies, so just set PYTHON to the host
python3 (which is in HOSTTOOLS) and remove the python3native inherit.

Change-Id: I1234d04df380a71a1e881328157e1d154f3cb49c
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 12:32:01 -04:00
Jon Mason 4f264deaa4 arm-bsp: remove dunfell u-boot support
u-boot version 2020.01 is not needed with dunfell not supported.  Remove
files and adjust the necessary.  Also, move tc0 support to match the
other BSPs

Change-Id: Ibc0f93a9eb0ca600a84b1399d77b35e6ae08753b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 11:58:27 -04:00
Jon Mason 406e905d5e arm-bsp: remove cortex-a tune files
Cortex-a tune files have been accepted into openembedded-core.  So,
those should be used in place of these.  Removing these to prevent any
issues.

Change-Id: Ifca1557a88e50ce6947524222ba7f852fd9a282c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 11:58:27 -04:00
Jon Mason e4d4b90ce2 Drop dunfell support
Drop dunfell support from the master branch in anticipation of the
gatestgarth release.  All dunfell users should reference the dunfell
branch.

Change-Id: I9c5806f698cca42773aaea1fb49e0dfff437eaf4
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-20 11:58:27 -04:00
Khasim Mohammed b0752bbc78 arm-bsp/linux-linaro-arm-5.4: remove linux kernel dtb and use one from TFA
DTB is generated from TFA therefore remove using the one from linux kernel.

Change-Id: I4647482b41b76db803fdd6a417580d99d2e79215
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 15:59:12 -04:00
Khasim Mohammed e4e060a063 arm-bsp/n1sdp: add support for startup.nsh file
UEFI EDK2 on N1SDP is unable to detect FS2 during boot resulting
in launching of EDK2 shell instead of launching grub.
The startup.nsh will force launching of grub.

Change-Id: I90426f2883251b7cc5fd4aa453ccfd606640d3bd
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 15:59:12 -04:00
Brett Warren 7611e8cf4a optee: upgrade to 3.11
optee 3.10 recipes have been upgraded to 3.11 to keep up with
the latest version.

Change-Id: fef3af6d7d04d2903d310cf99d17566b67e2f811
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren b419151acd optee: refactor into .inc files
To reduce code duplication, .inc files are used to hold common parts
of recipes, allowing .bb files to only specify things specific to that
recipe version.

Changed-Id: 740e6c9d36a957e2988f3599dd830c745f240beb
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren 5719261b4d wic/qemuarm64: enabled kernel arguments with u-boot
Kernel commandline arguments passed via runqemu don't
configure the kernel when booting with u-boot, as it finds
configuration in extlinux/extlinux.conf instead, which is
generated by wic.

A custom extlinux.conf file is now passed to wic with the
intended arguments, so that the kernel now configures
as directed.

Change-Id: Icbbcab47fe5cf70e4d8d39c7145371f1d6cd8db7
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren 5013182dda trusted-firmware-a: enable clang support
The CC and LD parameters are used to point make to the currently
used compiler and linkers.

This change enables TFA to be compiled successfully when
TOOLCHAIN=clang.

Change-Id: Ice465318b8c9b2b69c08fe4f48f6d36c610978f0
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren effcd18f5a optee: enable clang support
Patch 0002 and 0003 in optee-test remove -W options from make
to enable successful compilation with clang.

Patch 0007 modifies the libgcc$(sm) variable in optee so that it can
find the compiler-rt dependencies. Compiler-rt is also added as a
dependency to the optee recipe.

The compiler in use is passed to make via TOOLCHAIN. If TOOLCHAIN
doesn't exist (it is declared by meta-clang, and so doesn't exist
by default), 'gcc' is passed as a default.

These modifications allow optee to be successfully compiled
when TOOLCHAIN=clang

Change-Id: If565969e169078fabd5e3cf5716ca317cc49a126
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren 715c9f8f98 optee: upgraded recipes to 3.10
The optee recipes were upgraded due to issues booting with 3.8
on qemuarm64-secureboot, which were resolved by the upgrade.
The 3.8 recipes are retained for backwards compatibility.

optee-test and optee-examples were modified to pass a sysroot
to the LIBGCC_LOCATE_CFLAGS parameter, to ensure proper location
of the libgcc library.

Recipes have been renamed to reflect their current version.
As this makes the PV variables redundent, these have been removed.

Patch 0006 has been refreshed to work with 3.10 without fuzzing.
The original copy has been retained for the 3.8 recipes to use.

Change-Id: Iacaba02d64570a790d5cc20eca8be58246e39019
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Brett Warren a636818415 qemuarm64-secureboot: changed format of memory to MB
When running runqemu the memory argument in the kernel
commandline arguments expects megabytes, so with the previous
format "-m 1GM" ended up being passed.

Change-Id: I5d3bc9d5ce93fa3da5885c99feb99ce80367c993
Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-19 09:50:13 -04:00
Ross Burton a7dc167104 gem5: use pre-generated keys instead of haveged in gem5 machine
As the gem5 image won't be used in production there is no need to
generate unique SSH keys on the first boot, which takes a long time in
gem5.

Instead of recommending haveged (from meta-oe) we can simply install
pre-generated SSH keys. These keys are static so should not be used in
production!

Change-Id: I134a421d66eb2b55cf0e4f44781021ac2c96106d
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-16 22:40:24 -04:00
Ross Burton 8d4a60880f arm-bsp: use pre-generated keys instead of haveged in FVP machines
As the FVP images won't be used in production there is no need to
generate unique SSH keys on the first boot, which takes a long time in a
FVP.

Instead of recommending haveged (from meta-oe) we can simply install
pre-generated SSH keys. These keys are static so should not be used in
production!

Change-Id: I6a538de6bee892a77816c1d938dd2b55c94257f4
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-16 22:40:24 -04:00
Jon Mason ad8ded94b9 arm-bsp: sgi575: update tune location
cortex-a75 location was upstreamed to a different location that
specified in this file.  Modify it so that the references the correct
location.

Change-Id: Ia2082e8368444b2355e6be6635f299a6383a7284
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-15 11:48:16 -04:00
Usama Arif c398ea17f5 arm-bsp/docmumentation: Add information about tc0
This includes an overview as well as build and run instructions
for the tc0 software stack.

Change-Id: I9abfc7d6dffc68da2a2cd4ceda82bec6bc5fcb10
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-15 11:48:16 -04:00
Ross Burton f77b8b1de4 arm-bsp/musca-*: use newlib for libc
Whilst glibc is definitely not an option for Cortex-M cores, newlib is
a viable libc implementation that is useful to default too.

Change-Id: I1f3a53e43945f486aa2e7bce019f105c55df5e87
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-15 11:48:16 -04:00
Kamil Dziezyk bab28a95cd arm-autonomy/xenguest-mkimage: add extra ramdisk support
Some guest images requires a ramdisk, that is built with a custom recipe.
This patch adds an option '--xen-ramdisk',
for xenguest-mkimage script to cover that.
Extra ramdisk support is also added to xenguest-image-extra bbclass,
via 'XENGUEST_EXTRA_RAMDISK' variable.

Issue-Id: SCM-1276
Change-Id: I8ec74a37c0c96ca83a3489911186f3b3262f80fd
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-15 11:48:16 -04:00
Usama Arif 553654ece7 arm-bsp/scp-firmware: Update SHA for tc0
This SHA includes the architecture changes introduced as
including switching Cortex M7 to M3 as well as memory and
interrupt map changes. The SRC_URI is also overwritten as
the patch
0001-tools-gen_module_code-atomically-rewrite-the-generat.patch
has already been merged applied in the base recipe has
already been merge in this SHA.

Change-Id: I85dc6b65390249673415789ec110aae74ba3b5af
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-13 09:35:14 -04:00
Usama Arif 3d32e6cb98 arm-bsp/trusted-firmware-a: Update SHA for tc0
This SHA of trusted-firmware-a includes support for
additional features for tc0 including TZC and cpuidle.

Change-Id: I004f9614b2bada9b88d2fce90f0f10064d8437e4
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-13 09:35:14 -04:00
Nathan Dunne 6a92503d9b arm-autonomy: Move machine override soft assignments to inc files
Moved assignments of the form:
     MYVAR_$MACHINE ?= "val"
to a machine specific .inc file, as the above will still set the
value when the base variable has been set in local.conf, e.g:
     MYVAR = "local_val"
despite the weak assignment.

Change-Id: I3ba77453be785ec92ab45255cbd34d7d77bbcf37
Issue-Id: SCM-1524
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-13 09:35:05 -04:00
Nathan Dunne c9ee368bee arm-autonomy: Drop foundation-armv8 support
Remove foundation-armv8 overrides from arm-autonomy recipes.

Change-Id: I7913ccdb3383bdf40b608fc852428716e1538318
Issue-Id: SCM-1525
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-13 09:34:22 -04:00
Jon Mason 90243d0713 arm-bsp: fix cortexa32 tune
Cortex-A32 is 32bit only, but the recent changes had it working as
64bit (causing build breaks).  This reverts that change in this file.

Change-Id: I58115096477424127baf99712b96131d2a0b0497
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-12 13:50:23 -04:00
Diego Sueiro 24f859cff2 arm-autonomy: Add minimal docker runtime in xenguest images
This patch introduces the 'docker' DISTRO_FEATURE do control whether or not to
have a minimal docker runtime installed in xenguest images.

A new packagegroup and kernel feature were introduced to ensure the minimal
kernel config is applied as well as the packages to be installed in the image.

Change-Id: Id973ca2421c43d5b0978c6f7311e1d0b4db5edca
Issue-Id: SCM-1533
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-12 13:50:23 -04:00
Diego Sueiro 37cfed754a arm-autonomy: Update Maintainers list
Change-Id: If01fcd1aaf971d0e58894661df7fe9f6ab7e5f4a
Issue-Id: SCM-1520
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-12 13:50:23 -04:00
lakshmi Kailasanathan f2abff9da8 arm-bsp/corstone700-mps3: Enabling NXP ISP1763 USB host controller in linux
This commit adds  usb host in the v5.6 kernel as a machine feature
to support the USB host controller and mass storage for MPS3 board.
The kernel binary size increase with this hence wks file updated.
The node for USB controller is added to device tree in the TF-A and
updated the sha to reflect it.

Change-Id: Iad3348f8dc599d5642ddfa0c5199485eeaca0991
Signed-off-by: lakshmi Kailasanathan <lakshmi.Kailasanathan@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-07 11:22:38 -04:00
Jon Mason 4cde2c189e arm-bsp: musca-b1: Add Zephyr support
Zephyr supports Musca B1, and QEMU has an emulated Musca B1 board.  Add
the relevant parts to get this compiling with meta-zephyr and (in
theory) run QEMU.

Change-Id: I9af4aea03e31e96f8eee17f44913e747b1241891
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:33:44 -04:00
Jon Mason 3b924302d6 arm-bsp: remove armv8m
Musca B1 and S1 should be using the external tune files.  Remove armv8,
as it is not correct anyway, and use the Cortex-M33 tune.

Note:  This change will prevent glibc from compiling (and possibly
others).  This isn't relevant for a Cortex-M, as it should be
running an RTOS not Linux.

Change-Id: Id88d2af41217e8b5bad01e98b337cf0523acf6e1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:31:25 -04:00
Jon Mason a896f597c2 arm-bsp: rename musca_b1 and musca_s1
Rename musca_b1 and musca_s1 machines to have the standard hyphen
instead of underscore.

Change-Id: Ifd43d4f68cd964f5acd546a8380f165cc53588ab
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:54 -04:00
Jon Mason 7e67045530 arm-bsp: Add cortexm tunes
Until accepted into oe-core, add the cortex-m tunes here so that they
can be used in meta-arm-bsp.

Change-Id: Iaa74937da61cd8d35c27beae7e09351e996a262e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:54 -04:00
Jon Mason a7db701d9b arm-bsp: Add cortexa tunes
Until accepted into oe-core, add the cortex-a tunes here so that they
can be used in meta-arm-bsp.  Also, this allows for them to be used for
dunfell support.

Change-Id: I9e0affef8d9d94f27cd68d5032b82276f51f7c1e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:54 -04:00
Jon Mason 41832a15a6 gem5: remove reference to meta-arm-platforms
Change-Id: Ib279545916b7da00b3d74b58464fd35f511bdc11
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:54 -04:00
Jon Mason 6fd568a02f arm-bsp: Remove references to meta-arm-platforms
meta-arm-platforms does not exist.  Change to meta-arm-bsp.

Change-Id: Iacf74f2ec2d5cd2ddaa3a952e9190e71822bd9f5
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:54 -04:00
Diego Sueiro 1b2500bfb0 arm-autonomy/wic: Deploy Xen related artefacts in the wic boot partition
This patch brings the following changes:
* Documentation about how to customize the wic image for N1SDP
* Introduce a custom wks and grub.cfg file for N1SP when building with
  `DISTRO_FEATURES += "arm-autonomy-host"` to include Xen artefacts and boot
  option.
* Introduce a mechanism to include extra global settings for machines defined
  in meta-arm-bsp when building with `DISTRO_FEATURES += "arm-autonomy-host"`.

Change-Id: Ic9f36bae3bf04df1ee6a6c543e812f27c5c537a0
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:01 -04:00
Diego Sueiro fa846e808c arm-autonomy/grub-efi: Add xen_boot support when 'xen' is in DISTRO_FEATURES
Change-Id: Icb9d909beae96e3915f36093c1c16859181d0238
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-10-02 10:28:01 -04:00
Usama Arif c74446e6bc arm-bsp/linux-arm64-ack: remove bbappend for version 4.19
This version is not used by any arm bsps' anymore.

Change-Id: I14b78e78ce05a50b7cd3428993de280b9394ad48
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-30 18:11:46 -04:00
Ross Burton 6f85236d16 arm-bsp/documentation: add BSP documentation template
Add a template for future BSP documentation.

Change-Id: I614d43f477f1a5dfb898b808d4c5b78a5bb163b8
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-30 18:11:46 -04:00
Rui Miguel Silva f5cfc2f2df arm-bsp/u-boot: fix patches for a5ds
Some of the patches for u-boot do not apply without
fuzz in 2020.07, rebase them so we do not have the
ugly warnings during do_patch

Change-Id: I0c89b18ed66adad66c7cf41373ca7cdd3fdea3da
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-30 18:11:46 -04:00
Anders Dellien cebd9c5289 arm-bsp/recipes-kernel: Update fvp-base-arm32 BSP definition
Update to use the yocto-kernel-cache 'standard' configuration
and edit 'fvp-features.cfg' to remove duplicate configs.

Change-Id: I49617bdac554571aa1242080797cb60327e527da
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-28 21:42:38 -04:00
Diego Sueiro bc07e6c62a arm-autonomy/wic: Introduce empty plugin to create unformatted empty partitions
The empty wic plugin is used to create unformatted empty partitions for wic
images.

To use it you must pass "empty" as argument for the "--source" parameter in the
wks file. For example:
part foo --source empty --ondisk sda --size="1024" --align 1024

Change-Id: I0155561e9cc2ac11159e181eec9e4d9ae11555c3
Issue-Id: SCM-889
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-25 09:33:04 -04:00
Usama Arif d62dff99d3 arm-bsp/tc0: update kernel from 4.19 to 5.4
As the ack-4.19 patches are no longer used, they can
be removed.
The extra defconfig options have been removed as well
according for 5.4 kernel.

Change-Id: Iecbfe86107b7b142f17af6bdfbee086b9590fc1a
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-24 14:36:04 -04:00
Nathan Dunne f28d16dd5d arm-bsp/n1sdp: Use IMAGE_EFI_BOOT_FILES instead of IMAGE_BOOT_FILES
Replaced IMAGE_BOOT_FILES variable with IMAGE_EFI_BOOT_FILES
in the machine config file for N1SDP, in line with commit
85574ce0cf84eaf828334dd2fafadc18909e73b5 from oe-core.

Change-Id: Ib7b76c01870dc10f49be4bb9c0b7623bd2819d46
Issue-Id: SCM-1300
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-24 11:21:04 -04:00
Khasim Mohammed cd7b55ed68 arm-bsp/n1sdp: update TFA SRC_REV to include remote chip pcie support
This patch updates the SRC REV for TFA to latest version, this includes
patch required to add support for remote chip pcie.

Change-Id: Ifeba55ca14a3437e343c4bed72ca5bb2bbda7d2f
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-24 11:20:59 -04:00
Khasim Mohammed fc38cccad1 arm-bsp/linux-linaro-arm-5.4: fix N1SDP kernel configuration warnings
Update the cfg file to fix build time kernel configuration warnings
as shown below:

{{ [NOTE]: 'CONFIG_REALTEK_PHY' last val (m) and .config val do not match
[INFO]: CONFIG_REALTEK_PHY : y ## .config: 2358 :configs///defconfig (m)
[INFO]: raw config text:

Change-Id: Icdd0ed0ecdde887e4dcb5874cc59ce407c8d92db
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-24 11:20:59 -04:00
Usama Arif f54431b950 arm/linux-arm64-ack: update branch to 5.4 version
android-5.4-stable branch has been deprecated.
Update to new branch.

Change-Id: I6912005380e89cf62baf0f49404367a1492a45e3
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-24 08:56:20 -04:00
Anders Dellien 5db22bcc8d arm-bsp/u-boot: Rebase FVP patches on u-boot 2020.07
This removes fuzz warnings when applying the patches.

Also change 'earlyprintk' parameter to 'earlycon' as
the former isn't support for AArch64.

Change-Id: I7d9ee3e3ab47877e1d85862dbc835e0d5dac0ecc
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
2020-09-23 16:16:38 -04:00
Nathan Dunne c7a1a5f9fd arm-autonomy/documentation: Update arm-autonomy-quickstart.md with dependencies
Added dependencies on meta-kernel and meta-arm/meta-arm-toolchain layers
to quick start guide instructions.

Change-Id: I7d5a3c631ccdcc7a39b8003a958d5f68ecb606c7
Issue-Id: SCM-1298
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-22 21:39:06 -04:00
Nathan Dunne e4e1a7211a arm-bsp/u-boot: fix THISDIR name collision in u-boot_%.bbappend
Renamed ${THISDIR} user defined variable to ${THIS_DIR}, to prevent
it from breaking ${THISDIR} macro in subsequent u-boot .bbappend files

Change-Id: I4473ee5c3ac5c0aea9310557294cc9757579bdf1
Issue-Id: SCM-1302
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-21 12:40:00 -04:00
Denys Dmytriyenko 804d3a5b68 external-arm-sdk-toolchain: add recipe to package gcc/gdb/binutils cross binaries
Allows re-use of prebuilt ARM toolchain binaries for SDK generation.

This code is upstreamed from meta-arago layer.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
[Sumit: package headers corresponding to EAT_TARGET_SYS and add PV]
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-18 09:39:46 -04:00
Diego Sueiro 6cf9117016 arm-autonomy/xenguest-network: Add kernel-module-xt-masquerade to RDEPENDS
Newer versions of iptables requires the xt-MASQUARADE.ko.

Change-Id: I243365b8e1819407ddadc6f021704b867ab6dcf5
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-18 09:39:46 -04:00
Diego Sueiro 67b359d532 arm-autonomy/recipes-connectivity: revert dhcp removal and bind update
In oe-core master branch the dhcp recipe was removed and bind version was
bumped.

For now, arm-autonomy-host-image-minimal installs the dhcp-server package
which is generated by dhcp_4.4.2.bb recipe that depends on bind_9.11.22.bb
recipe.

In the near future arm-autonomy will be updated to use kea dhcp server
which is now used in oe-core.

Change-Id: I5f11b5ae8642d6afd90a52b905041dbcec2d0024
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-18 09:39:46 -04:00
Ross Burton ba05f5e7b9 arm/scp-firmware: fix build race
Backport a patch to fix a race in parallel builds.

Change-Id: I4b33b819f2da302369ca77429f25d5c15672c5f3
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-18 09:39:46 -04:00
Khasim Mohammed 1f3cf5812c arm-bsp/scp-firmware: set CCIX speed to GEN3 to work with interposer C2C setup
Set CCIX speed to GEN3 to work with interposer C2C setup.
In this usecase set downstream/upstream port transmitter preset value to 4.

Change-Id: I9795a46d9a349dc2813a4ed92944a481c0a2498e
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-08 10:25:52 -04:00
Khasim Mohammed 87e8e14b9a arm-bsp/linux-linaro-arm-5.4: n1sdp: pcie: add quirk support to enable remote chip PCIe
Base address mapping for remote chip Root PCIe ECAM space.

Remote Chip PCIe topology is enumerated in Firmware and current
change takes reference of enumerated PCIe hierarchy of Remote chip into the
kernel and include in complete PCIe topology for kernel framework.

Change-Id: I2bbceb5c89cc8fb4609e646652917cd97d638a27
Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-08 10:25:52 -04:00
Khasim Mohammed 2eeea26a51 arm-bsp/n1sdp: update SRC_REV to latest validated version
This patch updates the SRC REV for SCP, TFA and edk2-platforms to point to
latest versions.

Change-Id: Ib6825d51fac89a9514b936ce927e7f5f3e508e26
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-08 10:25:52 -04:00
Jon Mason 8ddfd20f79 arm-bsp: use neoverse-n1 for N1SDP
Per https://community.arm.com/developer/tools-software/oss-platforms/w/docs/458/neoverse-n1-sdp
The N1SDP is a Neoverse N1.  Use that tuning to get better optimization
for the platform.

Change-Id: I435931abd2537a17a08eae06395137ce185a49dc
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-04 05:00:48 -04:00
Jon Mason 91d5cf02b9 arm-bsp: SGI575 should use A75 tuning
Per https://community.arm.com/developer/tools-software/oss-platforms/w/docs/489/system-guidance-for-infrastructure-sgi
The SGI575 is a Cortex-A75.  Use that tuning to get better optimization
for the platform.

Change-Id: I6172820684f2c32eb57be1e86f2ac632fcb7cecd
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-04 05:00:48 -04:00
Jon Mason b2b0a833d2 arm-bsp: ARMv8-2a: Add tuning files
Add all the available ARMv8.2 tunings from GCC.  This belongs in
OE-Core, but adding here so that it can be used while trying to upstream
there.

Change-Id: I5025eef6d18545478116b5079daf9c4d12e93dca
Signed-off-by: Jon Mason <jon.mason@arm.com>
Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2020-09-04 05:00:27 -04:00
Jon Mason 43a5b21016 arm-bsp: add cortexa73-cortexa35 tune
Add ARMv8-A big.LITTLE tuning for cortexa73-cortexa35.  It is supported
in GCC, and is the only one missing from OE-Core.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
2020-09-04 05:00:14 -04:00
Diego Sueiro 00e56a20e7 arm-autonomy/xen/gem5: Update EARLY_PRINTK support
From Xen 4.14 version, the CONFIG_EARLY_PRINTK setting was moved from the
make define setting in xen/arch/arm/Rules.mk to the Kconfig infrastructure.
Hence, we need to make usage of config fragments to add this option to the
supported machines.

Change-Id: I64a7dfbe05c803e59f3296d7d0799126b2eb7d1f
Issue-Id: SCM-1197
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 75e7288e61 gem5: Backport pointer authentication fixes
Change-Id: I5152895f992e9bc85b24a9190e4affb3c74e44cd
Issue-ID: SCM-899
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 173dca73b9 arm-autonomy/gem5-aarch64-native: Set CPU and disable pointer authentication
When booting gem5-arm64 with Xen and Linux we need to set the cpu as Cortex A53
and remove support for pointer authentification.

Change-Id: Ib8ea61784f668bf88c1492e5e56737a0aa40d762
Issue-Id: SCM-899
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 616bb5cf41 arm-autonomy: Introduce arm-autonomy-host DISTRO_FEATURES_NATIVE
Some native recipes might want to apply specific settings when the
arm-autonomy-host or xen DISTRO_FEATURES is enable for the target build.
In this case the arm-autonomy-host needs to be also added to
DISTRO_FEATURES_NATIVE.

Change-Id: I11a8c4bbb99333d62520afc2c12a183cf08d6e1a
Issue-Id: SCM-899
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro a41e7a4893 arm-autonomy/xen,xen-tools: Remove sdl from PACKAGECONFIG for arm-autonomy-host
For arm-autonomy-host DISTRO_FEATURES we don't need xen and xen-tools
configured with sdl support.

Change-Id: Id7391b722ab37b8970aa4b72d4d34221fb566618
Issue-Id: SCM-889
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 6c7cc4288d arm-autonomy/xen-devicetree: Update XEN_DEVICETREE_DOM0_BOOTARGS for N1SDP
For N1SDP the wic image partition layout have the /dev/sda1 as the boot
partition and /dev/sda2 as the rootfs partition.

To reflect this, we need to update the XEN_DEVICETREE_DOM0_BOOTARGS to
set the "root=" command line parameter to /dev/sda2.

Change-Id: Iee52176ab4ac1232a3d726e955835261b0a5ae00
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 5a893d9a02 arm-autonomy/xen-devicetree: Fixes and updates for N1SDP
The N1SDP machine now uses the dtb generated by the tf-a recipe and for
now we are only interested in the single-chip mode.

The xen-n1sdp.dtsi needs to be updated by adding the extra
'soc' root path to have the dtc being enable to process the
nodes customizations.

Change-Id: I46eaec23d25f6c4a4b6ed86661d451ace590706d
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 7aac78e433 arm-autonomy/xen-devicetree: Use a different sed delimiter character
In the do_deploy task, replace the current sed delimiter (',') with '?'
since there are use cases where the bootargs variables have the ','
character in it which makes the sed command to fail.

Change-Id: If9b8221404ec63568768bf0f303be7759ba5f64d
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Diego Sueiro 2fa92f8e5f arm-autonomy/xen: Update EARLY_PRINTK support and remove custom defconfigs
From Xen 4.14 version, the CONFIG_EARLY_PRINTK setting was moved from the
make define setting in xen/arch/arm/Rules.mk to the Kconfig infrastructure.
Hence, we need to make usage of config fragments to add this option to the
supported machines.

Also, remove the custom machines defconfigs and rely on the Xen in tree
defconfig.

Change-Id: Ibd6058c4808eeea6ad1260ba558468a64877b231
Issue-Id: SCM-1197
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-03 21:51:18 -04:00
Khem Raj fff1d902a1 optee-examples: Respect LDFLAGS passed via environment
This ensures right linking flags e.g. gnu_hash settings

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-09-02 14:22:15 -04:00
Usama Arif 237c94f5ef arm/kernel: Introduce 5.4 Android Common Kernel
This recipe targets machines based on arm64. The patch
also adds an .inc file to for common code between different
ACK recipes.

The base commit is based on tag refs/tags/ASB-2020-06-05_5.4-stable

Change-Id: I5b5f1eeb8336910355fc9880670c729453a8096a
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Usama Arif 15b94c1f3f arm-bsp/machine: Fix ACK version for tc0 to 4.19
Change-Id: Ieca56d40c26367c158b9394d546323be4c1f81ce
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Ross Burton a6d45ae857 arm-bsp/trusted-firmware-a: remove redundant MBEDTLS_DIR assignment
The base recipe already does this, so there's no need to do it again.

Change-Id: I04f679ab267db3bcdbb812dce6be2efc8a25b633
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Ross Burton 6324b10be4 arm/trusted-firmware-a: don't build all targets in parallel
There are build races in the Makefiles when you build all targets at
once (missing dependencies):

| tools/fiptool/fiptool create [...]
| ERROR: fopen WORKDIR/build/juno/debug/fdts/juno_fw_config.dtb: No such file or directory

These are non-trivial to fix so whilst upstream works on this we can
just build each target serially.

Change-Id: Iba0d0ae7de6faf199efea073135fd3b7232b81a1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Ross Burton 2ac291eea3 arm-bsp/trusted-firmware-a: remove duplicated Mbed TLS tarball
Now that trusted-firmware-a is actually adding the Mbed TLS tarball, the
machine-specific includes can stop doing it themselves.

Change-Id: I45754b8a4eba99c8fbf7c99e61d01f2a27da1b4a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Ross Burton 24379d7e7f arm/trusted-firmware-a: actually add mbedtls to SRC_URI
trusted-firmware-a.inc was conditionally adding the Mbed TLS tarball to
SRC_URI, but all of the versioned recipes subsequently assigned over the
top of it so the Mbed TLS tarball was never actually in SRC_URI.  This
resulted in machine overrides needing to add the tarball themselves.

Solve by using _append so that the SRC_URI is actually changed.

Change-Id: I05cf1dec2c6422a40a42c615fb2b9b6e8d6f1cb0
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Ross Burton ad09efd4f0 arm-bsp/trusted-firmware-a: reorder the build targets
Build the DTBs before the FIP, as the latter depends on the former to exist.

Change-Id: I6059805458b12cb87c2af77eb924778844dc88ec
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-28 11:39:43 -04:00
Usama Arif f7ec7a1278 arm/scp-firmware: Fix build location
The build location is dependent on whether
debug or release version of scp is being built.

Change-Id: I22e0777c316ea59a49a6f178d620a59d24372e00
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-28 12:03:32 +01:00
Jon Mason 46941a67b7 arm-bsp: redundant entry in FVP TF-A
bl1 is specified twice in the FVP Arm32 include file, which seems
erroneous.

Change-Id: Ib2fc91b547151acfc28f57679e99f649bd0f49ab
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-25 11:13:28 -04:00
Jon Mason fc0ce7964e arm: trusted-firmware-a variable name misuse
"processes" should be "processed" in trusted-firmware-a.inc, as it
signifies if the relevant part has been installed/processed.

Change-Id: I2d1ffbb0c6d14d280b6f9c9cc45c04c7c32409a7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-25 11:13:28 -04:00
Khasim Mohammed 2f3898a46e arm-bsp/trusted-firmware-a: Install dtbs from the generic TFA recipe
Configure TFA_INSTALL_TARGET to multi-chip and single-chip dtbs,
avoid installing dtbs in platform specific recipe instead use the generic
step.

Change-Id: I79835f2c4f4d0bde938e43d6cf59f73392520935
Issue-Id: PLATFORMS-3971
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-21 14:09:08 -04:00
Khasim Mohammed 3fc917ac8f arm/trusted-firmware-a: add support to install dtb built as part of TFA
Device tree blobs (DTBs) generated as part of TFA were installed separately
in the platform specific TFA recipes, its redundant as each platform was
executing similar installation steps.

The patch avoids skipping dtb installation and adds support to check for
DTB entries in TFA_INSTALL_TARGET and install the same to respective deploy folder.

Change-Id: I0f8f5c39dc4b4931d202696990fa915ea7ed60eb
Issue-Id: PLATFORMS-3971
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-21 14:09:08 -04:00
Khasim Mohammed 016f81a284 arm/trusted-firmware-a: fix variable name typo
Variable name "processes" is wrongly mentioned as "processed", this patch
fixes the same.

Change-Id: Id9362f514861c75f8f6a727582e11b0e65736349
Issue-Id: PLATFORMS-3971
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-21 14:09:08 -04:00
Khasim Mohammed 75b337d909 arm-bsp/linux-linaro-arm: Fix multiple definition of `yylloc'
Patch https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/scripts/dtc/dtc-lexer.l?h=v5.4.56&id=35b34d264cb347909ec89d9fa895900035d5438c
is applied to fix kernel build failure due to multiple definition of 'yyloc'.

Refer to the bug report https://bugzilla.yoctoproject.org/show_bug.cgi?id=14014 for more details.

Change-Id: I801c6c40dc67ceea74993ccf26b077ba66ae58d8
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-19 11:47:44 -04:00
Jon Mason c6cee30268 arm-bsp: Correct documentation errors
Documentation for FVP and Foundation is incorrect in names and missing a
field.

Change-Id: I58de54e9d0883671166102e657f53cfad14a2cba
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-19 11:47:19 -04:00
Jon Mason 07699dadbc arm-bsp: Remove unused kernel recipe
Change-Id: I4203a6d4536702a701055b511fc2b9a27868082f
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-19 11:47:19 -04:00
Damodar Santhapuri 7bf455636a arm-bsp/juno: Move to linux-yocto 5.4
This commit includes
1. Move from linux-linaro-arm 4.9 to linux-yocto 5.4
2. MHU patches for SCMI
3. add patch to remove stale configs in v5.4

Observed the below error in kernel boot

[    7.177114] arm-scmi firmware:scmi: mbox timed out in resp(caller: scmi_power_state_set+0x78/0xc0)
[    7.197984] arm-scmi firmware:scmi: mbox timed out in resp(caller: scmi_power_state_set+0x78/0xc0)
[    7.201125] smsc911x 18000000.ethernet eth1: SMSC911x/921x identified at 0xffff800012a70000, IRQ: 8
[    7.206968] arm-scmi firmware:scmi: mbox timed out in resp(caller: scmi_power_state_set+0x78/0xc0)
[    7.206978] arm-scmi firmware:scmi: mbox timed out in resp(caller: scmi_power_state_set+0x78/0xc0)
[    7.216073] arm-scmi firmware:scmi: message for 5 is not expected!

Change-Id: I4651a142bcee06ba95faa315e3caaf871f406b5a
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-18 08:51:17 -04:00
Denys Dmytriyenko 38de27d05f external-arm-toolchain: check for TCLIBC being glibc
The old TARGET_OS check doesn't work, as it only checks for uclibc and musl at
the end, while TARGET_OS is usually "linux-musleabi", uclibc has been deprecated
and new options like "newlib" and "baremetal" were added. Plus it only works for
the target, but not SDK. Switch to simply checking for TCLIBC = glibc.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-14 15:55:31 +01:00
Denys Dmytriyenko ad86780072 external-arm-toolchain-versions: set per-component toolchain licenses
This code is upstreamed from meta-arago layer.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-14 15:55:31 +01:00
Denys Dmytriyenko 513afd26f8 external-arm-toolchain-versions: also collect binutils/bfd version
To be used by SDK packaging for binutils cross.

This code is upstreamed from meta-arago layer.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-14 15:55:31 +01:00
Anders Dellien ea506b8908 arm-bsp/recipes-kernel: Remove kernel config warnings for fvp-base machines
For fvp-base, enable CONFIG_COMPILE_TEST to remove warning regarding
CONFIG_ARM_TIMER_SP804

For fvp-base-arm32, enable CONFIG_MODULES to remove warning regarding
CONFIG_SCSI_DEBUG

Change-Id: I02457ae2d50e03367d1ec3aeb3a0f1571c0f2b05
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:19:47 -04:00
Abdellatif El Khlifi 64131db424 arm-bsp/linux: Enabling lan9115 Ethernet for corstone700-mps3
This commit enables lan9115 Ethernet in the v5.6 kernel
as a machine feature.

Change-Id: Ib8e724a64b24db3048a2b12973824bba9f3eecc4
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:13:40 -04:00
Abdellatif El Khlifi d789b0373a arm-bsp/machine: adding corstone700-mps3 machine
This machine provides corstone700 platform on the MPS3 FPGA board.

For more information about the platform, please check:
https://community.arm.com/developer/tools-software/oss-platforms/w/docs/444/corstone-700

Change-Id: I7b654fcb8dc5c6efa261a1413389271df87534cb
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:13:33 -04:00
Abdellatif El Khlifi 88cf980c5d arm-bsp/scp-firmware: adding scp support for corstone700 platform
Extend the scp recipe to support corstone700 plaform.

The scp runs on the boot processor (Secure Enclave).

Change-Id: I24289533a72367ebd2d2150c5230d9f435b4212f
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:13:16 -04:00
Abdellatif El Khlifi e9b47532e5 arm-bsp/u-boot: adding corstone700 platform to u-boot
Adding support for the new Arm corstone700 platform family.

The current supported corstone700 machine is corstone700-fvp.

The changes are as follows:

  - Making some adjustments to the mmio timer and to the cortex-a5
    designstart platform to share as much as possible between this
    platforms.

  - Disabling the use of the mmio_timer driver and enabling the
    arch_timer driver.
    The mmio_timer tries a direct access to the Armv8-A CNTFRQ generic timer
    frequency register through memory mapping. This can not be done because
    this register is only accessible through memory mapping under a secure
    mode only. u-boot runs in non secure Hypervisor mode. To read the counter
    frequency u-boot should use the mrc instruction to read the CNTFRQ system
    register. The arch_timer driver reads the CNTFRQ register using the mrc
    instruction.

  - adding bootx command to start XiP images

Change-Id: I40f5e91cfb8865e2904b0f5ac9920df75705b593
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:13:08 -04:00
Abdellatif El Khlifi 3225c78118 arm-bsp/external-system: enabling corstone700 platform support
This commit allows the external-system firmware to be used on the
corstone700 platform.

Change-Id: I746a970dcdceee60d91152e4315afa072ca843d3
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:13:02 -04:00
Abdellatif El Khlifi 30aa72f516 arm-bsp/trusted-firmware-a: adding support for corstone700 platform
This commit adds support for trusted-firmware-a to the corstone700
platform.

The trusted-firmware-a runs on the host processor.

Change-Id: I70ae2715e640bf50c756229a734dcb663c2d8e4d
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:12:53 -04:00
Abdellatif El Khlifi 98aa643ff1 arm-bsp/linux: configuring v5.6 kernel for corstone700 platforms
This commit enables kernel v5.6 for corstone700 and configures the kernel
using configuration fragments. The current available machine is
corstone700-fvp.

Change-Id: I43371f9ef0277e9bd82bc73c7911df5a99e5f59d
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:12:46 -04:00
Abdellatif El Khlifi 6c44a63bc8 arm-bsp/machine: adding corstone700-fvp machine
This machine provides corstone700 platform on FVP.

For more information about the platform, please check:
https://community.arm.com/developer/tools-software/oss-platforms/w/docs/444/corstone-700

Change-Id: I1197d3216f37ab8d2c792da82c4f5e7e17d5a09c
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:12:38 -04:00
Rui Miguel Silva 2996183867 arm-bsp/external-system: add external system recipe
Add recipe that allows building the external system firmware.

The external system is a Cortex-M3 platform provided by the partners
and intended to implement the sensor/realtime part of the IoT system.

Change-Id: I271eafcc90e44efb8090f8b2cc1c8acfd15eb929
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-14 09:12:12 -04:00
Ross Burton 74ef241a4b arm/layer.conf: unify on a layer priority of 5
This layer may want to ship older versions of software than oe-core for
some BSPs (such as u-boot), but we don't want to force those downgrades
on everyone else.  Unfortunately because the meta-arm layers have
priority 6, any recipe in this layer wins over newer versions in oe-core:
for example with an older release of u-boot in meta-arm, simply adding
meta-arm to BBLAYERS will result in qemux86 downgrading u-boot.

Solve this by lowering meta-arm's priority to match oe-core, so that
recipes are treated equally and the usual version ordering applies.

Change-Id: I6de7a6b493e71b8b88862018b9fa35608342c1b2
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:55:03 +01:00
Ross Burton 484847b1a1 arm/trusted-firmware-m: use hashes not tag names
Using tag names in SRCREV means a network operation every build, and
loss of reproducible builds if the tag moves.

Change-Id: I583e723925314a4a36a9ac1b6c932dbcf99e7da4
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:35 +01:00
Ross Burton eb0f1db950 arm/trusted-firmware-m: don't fetch mbedtls
The trusted-firmware-m build doesn't use mbedtls (just mbed-crypto), so
don't fetch it.

Change-Id: Idc7fe211a8a667262a59d1e8106e486fb96498bd
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:35 +01:00
Ross Burton 1a2c728f63 arm/trusted-firmware-m: no need to run parse_manifest_list
This is part of the test instrumentation that we don't currently build.
A future recipe or patch can enable this properly and ensure it is
tested.

Change-Id: I02584920b00085dfe4efbff166684c5717f6cdf5
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:35 +01:00
Ross Burton cd6f152aa2 arm/trusted-firmware-m: clean up configure/compile
Move B up a level so the build tree is entirely separate from the source
tree.

Use [cleandirs] to ensure that B is present and empty when rebuilding,
and remove now redundant code.

Finally add some comments to explain why trying to use cmake.bbclass is
pointless.

Change-Id: Ic8ddc08c46b9e945023e0b0a6e4ca1a6294b726b
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:35 +01:00
Prabin CA 2f275411d2 arm-bsp/wic: Introduce WIC support for sgi575
- Add custom wks script for SGI575.
            - Add grub.cfg for SGI575

Change-Id: I9d371426a1bd75b49f6fbc89e2f2c255d4b8c0ac
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Prabin CA f3f3333901 arm-bsp/sgi575: Add RAM filesystem support
Add cpio.gz to IMAGE_FSTYPES for compressed RAM filesystem support

Change-Id: Ia81563976069666f762492e56b1a706a4ee0c173
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Prabin CA b0c7888fe0 arm-bsp/grub: Add grub-efi support for SGI575
grub-mkimage is used make a bootable image of GRUB,
grub-efi dependency in added to conf file.

Change-Id: I3afde13902cf396c47fd3ddea01d09cafd2a996d
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Prabin CA ee55fe42f1 arm-bsp/linux: Build Linux stable 5.7 for sgi575
- Update linux-arm inc for including sgi575
        - Add machine conf to add image dependency
          for Linux components

Change-Id: I26c539793b73a3f4a31e40daa4272904a1751b3e
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Prabin CA f36c3d79d6 arm-bsp/fip-image: Build TFA/UEFI for sgi575
- Add bbappend recipe to build ARM-TF and UEFI firmware
          for SGI575.
        - Add machine conf to add image dependency
          for ARM-TF components.

Change-Id: I1f9dcc8877aa929c50bffd0b437e8f51527f3d45
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Prabin CA c9295e1030 arm-bsp/scp-firmware: Build SCP/MCP for sgi575
- Add bbappend recipe to build SCP and MCP firmware
      for SGI575.
    - Add machine conf to add image dependency
      for SCP-firmware components

Change-Id: Ic888ee11178979e5ec068f85a5e0d7f2cabb7f5e
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 19:54:08 +01:00
Ross Burton 0d47e826a2 gem5/linux: remove redundant CONFIG_DRM_ARM
This config option was made redundant in 5.1, so remove it.

https://github.com/torvalds/linux/commit/37fc9bb022c654e261c5a7d2ce600c6ce26c022d

Change-Id: I01aabec52ae71fc5cabe8a1589766b6b4c79b677
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-12 10:38:21 +01:00
Ross Burton 2d2544d827 arm/trusted-firmware-a: add branch name for mbedtls
The mbedtls repository has had some branch/tag pruning so the tags we
were using are no longer on 'master'.  Set the right branch name so the
fetch is successful.

Change-Id: I07dc7045cd7784b7e93e14c3a24721a22b79da8a
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-11 14:47:46 +01:00
Prabin CA 4037691088 arm/trusted-firmware-a: add branch name for mbedtls
It appears that the mbedtls team have moved the SHA which
meta-arm was using from master branch. It is still present
in mbedtls-2.16 branch so this is now used.

Change-Id: If24915b1a1dc889d55b359863943439c76f6ca85
Signed-off-by: Prabin CA <prabin.ca@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-11 14:42:23 +01:00
Damodar Santhapuri 5ac42f2e5a arm-bsp/trusted-firmware-a: Add v2.3 support for juno platform
Update machine/juno.conf to support tf-a v2.3

Change-Id: Ieced15e83818687c879d927bce2c4604a72b9b1e
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-11 11:52:37 +01:00
Damodar Santhapuri 02739e6914 arm-bsp/scp-firmware: build SCP firmware for juno
- Remove scp-firmware-juno_19.06.bb
- Enable v2.6 support for juno
- Add juno machine specific to scp-firmware
- Use romfw_bypass as scp_bl1.bin

Change-Id: Ib3f92e170a4e5701f6c6d18695541eae763de464
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-11 11:52:37 +01:00
Damodar Santhapuri dac985058b arm-bsp/scp-firmware: Introduce FW_INSTALL variable
Use the FW_INSTALL variable to select which firmware
binaries should be installed in the target.

Change-Id: I6bffa3db9adc27a5ee43b316a12a758c48acb43f
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-11 11:52:36 +01:00
Jon Mason fa5624af38 arm-bsp: Fix missing virtual/kernel warnings for musca
When building musca s1 and b1, the many warnings are seen.  As an
example:
NOTE: Multiple providers are available for virtual/kernel (linux-dummy, linux-linaro-arm, linux-mainline, linux-stable)
Consider defining a PREFERRED_PROVIDER entry to match virtual/kernel
NOTE: Multiple providers are available for runtime kernel-base (linux-linaro-arm, linux-mainline, linux-stable)
Consider defining a PREFERRED_RPROVIDER entry to match kernel-base
NOTE: Multiple providers are available for runtime kernel-image (linux-linaro-arm, linux-mainline, linux-stable)
Consider defining a PREFERRED_RPROVIDER entry to match kernel-image
NOTE: Multiple providers are available for runtime kernel-image-zimage (linux-linaro-arm, linux-mainline, linux-stable)
Consider defining a PREFERRED_RPROVIDER entry to match kernel-image-zimage
...

Add linux-dummy as the PREFERRED_PROVIDER to the musca inc file to
silence these.

Change-Id: I80eee816b51aa028f9f2ceb03ac137f9c5f8b461
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-08-10 17:00:17 -04:00
Ross Burton 1c125f216b arm/scp-firmware: don't set DEBUG_PREFIX_MAP
The current arm-none-eabi-gcc supports all the flags that oe-core uses,
so we can remove this.

Noticed because due to the override it wasn't actually being used.

Change-Id: I09aa8c5d427fa3877f9947a0508c36a4f060ae68
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 17:43:08 +01:00
Ross Burton 6b68a434a5 arm/scp-firmware: mark as machine-specific
Firmware is machine-specific, so set PACKAGE_ARCH.

Change-Id: Ib3247d04eaacd2b4240a1e11353f06ebd381a4c6
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 17:43:07 +01:00
Usama Arif d651ccd61c arm-bsp/recipes-kernel: Enable FRAMEBUFFER_CONSOLE for tc0
This enables extra ttys that are required by sysvinit 2.96 used
in dunfell.

Change-Id: I4ee0d1a3ec98665fd19cb8022b66c53c3d559499
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 17:42:20 +01:00
Khasim Syed Mohammed d080cb27c6 arm-bsp/wic: Introduce custom wks and grub.cfg for N1SDP
The standard canned WKS files like mkefidisk.wks doesn't allow
us to set custom grub.cfg hence a new wks file is created on the
lines of mkefidisk.wks to accept custom grub.cfg as config parameter
to bootloader command.

The custom grub.cfg allows user to select from different boot options
(acpi, devicetree for single and multi chip).

IMAGE_BOOT_FILES is updated to package n1sdp dtbs for single and multi chip
as part of the final image.

Change-Id: I29a64d0bd50d72d912cdcd99dbc593388be786bb
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 17:01:54 +01:00
Khasim Syed Mohammed 1ced26dcdf arm-bsp/trusted-firmware-a: generate single-chip and multi-chip dtbs for N1SDP
N1SDP supports both single-chip and multi-chip environment.
 - Updated SHA to latest TFA patchset to add support for both DTS files
 - generate dtbs for both single and multi-chip environment
 - Migrate N1SDP to use trusted-firmware-a version 2.3 as base line

Change-Id: I4b92e1680750041421fb9fbc9cef448250581f94
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 17:01:49 +01:00
Usama Arif 3ac76657bd arm-bsp/trusted-firmware: tc0: remove SHA for mbedtls
Use the default one from trusted-firmware-a_2.3

Change-Id: I496db01818b172b109e8dab04e39a66bafd35a2d
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 11:34:04 +01:00
Usama Arif 01d9c1ff3c arm/trusted-firmware-a: add branch name for mbedtls
It appears that the mbedtls team have moved the SHA which
meta-arm was using from master branch. It is still present
in mbedtls-2.18 branch so this is now used.

Change-Id: Ie932f446067767e85a25583b1bdc02b4739e323f
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Prabin CA <prabin.ca@rm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-08-05 11:33:39 +01:00
Anders Dellien 191f62e246 arm-bsp: Introduce 32-bit FVP-BASE platform and BSP
Also refactor fvp-common.inc to contain definitions shared
between fvp-base, fvp-base-arm32 and foundation-armv8

Change-Id: I3634c3fefa8d793d0bcf5fcfd7458e6dbd2a6622
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
2020-08-03 10:33:53 -04:00
Anders Dellien 98e3b9f6b1 arm-bsp/trusted-firmware-a: Add support for 32-bit FVP_BASE machine
Change-Id: Ia2b51de62564ed3f1489d749c0e7d78459fda993
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
2020-08-03 10:33:53 -04:00
Anders Dellien f42fc54033 arm-bsp/u-boot: Add support for 32-bit FVP BASE machine
Change-Id: I48ec5607c216b1c15d2fedc1375f3f0a914c9937
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
2020-08-03 10:33:53 -04:00
Jon Mason 921207e89d arm: add TF-A v1.5 recipes
Add trusted-firmware-a recipes for v1.5.  While old, there are platforms
that are still using this older version.

Change-Id: Id40414ad58fd274af86203bb2c8d449e18a10c7a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-31 15:25:39 -04:00
Jon Mason f14b1b325b arm-bsp: remove redundant entry
Change-Id: I096c238ceec9244a130c1c5d7e30fc0dbc98997d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-31 15:25:39 -04:00
Ross Burton 2c5bdd0f73 optee-os: fix build race
There's a rare build race where mk/conf.mk.tmp is written to before mk/
exists.  Add an explicit mkdir so that this directory is sure to exist.

Change-Id: I4e907f395679da9354d386301e7bf5da46afdbaf
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-31 08:10:37 -04:00
Diego Sueiro c4cf4382cd arm-autonomy: Move gem5-arm64 to dynamic-layers/meta-gem5
Since gem5-arm64 machine implementation was moved from meta-arm-bsp to
meta-gem5, we need to move the specific machine settings to
meta-arm-autonomy/dynamic-layers/meta-gem5.

Change-Id: I773189e7e1ee2ca77e569dcec2d92ecfb93d3719
Issue-Id: SCM-1133
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-31 08:10:37 -04:00
Khasim Mohammed a411cec3e0 arm-bsp/wic: fix WKS dependencies for N1SDP components
Add build-time dependencies to ensure the required components
(TFA, SCP, UEFI EDK2) are built and available before
the task to create wic image gets initiated.

Change-Id: I3789c8d1a44984a26d31ddd8ddd5d16f4d58c7d3
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-31 08:10:37 -04:00
Diego Sueiro 0ad8a1495c arm-autonomy/xenguest-network: Add NAT port forward support
When XENGUEST_IMAGE_NETWORK_TYPE="nat", add the option to set NAT port
forward to have access to the guest from the external network.

The port forward is applied per guest by the 00-xenguest-nat-port-forward.hook
script which is called by /etc/xen/scripts/vif-post.d/00-vif-xenguest.hook.
The ports can be customised by the XENGUEST_IMAGE_HOST_PORT and
XENGUEST_IMAGE_GUEST_PORT variables.

Change-Id: I49492f5ac881fd3cc38838ce24d1d4160a4e65df
Issue-Id: SCM-1019
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 16:15:02 -04:00
Diego Sueiro 7318d9ac3c arm-autonomy/xenguest-network: Add private network support for xenguest
Introduce the private/internal network support for xenguest by using NAT
and applying the proper iptables rules to allow the guest to have access
to the external network.

The XENGUEST_NETWORK_TYPE variable was introduced to allow the user to
setup the xenguest network type between "bridge" (default), "nat" and
"none".

Change-Id: I919e5b0fd0809093698b9dec3a9503b598b54828
Issue-Id: SCM-1019
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 16:14:58 -04:00
Diego Sueiro b37fd5b7a5 arm-autonomy/linux-arm-autonomy: Extend netfilter config for host
To properly set the iptables rules to be applied when configuring the
network between the host and guest we need to have the netfilter.scc
kernel feature and following kernel extra kernel configs:
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m

Change-Id: I6f3ff9e8db5d359efba5fb3ead04703f4f2ec88b
Issue-Id: SCM-1019
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 16:14:52 -04:00
Diego Sueiro e972ddb64b arm-autonomy/xen-tools: vif-nat script fixes
This patch introduces two fixes for the vif-nat script:
1- Setting the hostname is failing because the "$XENBUS_PATH/domain"
   doesn't exist anymore. To fix this we set it to dom$domid.
2- Copy temp files used to add/remove dhcpd configurations to avoid
   replacing potential symlinks.

Change-Id: I5f2ed917c15bbe1c6ff9ec3cc9ad2fc4e1c0fb60
Issue-Id: SCM-1019
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 16:14:44 -04:00
Khasim Mohammed 7841c775b9 arm-bsp/linux-linaro-arm: enable Realtek R8169 eth adapter driver for N1SDP
By default kernel defconfig is not enabled to support Realtek adapter driver
required to get ethernet working on N1SDP. This patch enables the CONFIG_R8169
to add the support.

Issue-Id: PLATFORMS-3134
Change-Id: I218ca8e0011db7f02329e103c1dea1350ccc3c28
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:58:10 -04:00
Khasim Mohammed d5f4b4680b arm-bsp/linux-linaro-arm: remove disable of CONFIG_EXTRA_FIRMWARE for N1SDP
The kernel defconfig has removed enabling of CONFIG_EXTRA_FIRMWARE,
disabling the CONFIG_EXTRA_FIRMWARE isn't required.

Change-Id: I032b1aa7dd84c63f6aece5f24dbab43d14da278c
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:58:10 -04:00
Ross Burton af341b0e2c arm-bsp/scp-firmware: bump TC0 SRCREV and fix PV
This is 2.6.0, not 2.6.

Also bump the SRCREV to match N1 SDP so that the core code is the same,
that BSP uses a newer commit.

Change-Id: I83168aa5973d83e4d93869019d91c05daf1e71e9
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:23:05 -04:00
Ross Burton 0803574292 arm-bsp/scp-firmware: use full version number 2.6.0, not 2.6
Change-Id: I34928c09d89eb836cfef80d824b3c5a060af7491
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:23:05 -04:00
Ross Burton 282cbd7029 arm/scp-firmware: move to 2.6.0 release tag
Instead of an arbitrary commit, set the base recipe to build the 2.6.0
release.

Change-Id: Iec78c6ed903edfd020cca1222770d8ec018ae78a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:22:48 -04:00
Ross Burton c8c1f9e7a0 arm-bsp/scp-firmware: use wildcard bbappend
This doesn't care what specific version is being appended, so use a
wildcard.

Change-Id: I5e3a46c42616f8dfa62a20549c03b60e24fe8b20
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:11:12 -04:00
Ross Burton 3140f49fa9 arm-bsp/scp-firmware: remove cmsis SRCREV
This repository is no longer fetched explicitly by bitbake so remove the SRCREVs.

Change-Id: I2de11d354f1f708de941485d5cc4463d53e6018e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:11:12 -04:00
Ross Burton c44a476a8a arm/scp-firmware: use gitsm fetcher
The standard git fetcher ignores submodules but as scp-firmware uses
submodules it should use the gitsm: fetcher to automatically fetch cmsis
instead of doing it manually.

Change-Id: I2f83100fa53070b6560be6fb7322383345224bb1
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:10:50 -04:00
Ross Burton 7bc168740b arm/scp-firmware: always compile verbosely
The only downside of verbose builds is that the compile logs are larger,
but non-verbose logs are useless for debugging mysterious build failures.

Remove the option and always do a verbose build.

Change-Id: Ibfd0414f0f6d0d69e20ec1fadcae8e86b516d3fc
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:09:24 -04:00
Ross Burton b3e425f594 arm/scp-firmware: oe_runmake already passes EXTRA_OEMAKE
oe_runmake adds EXTRA_OEMAKE to the arguments, so there's no need to do
it again.

Change-Id: Id8f078faecba72156a4626c960fc7113a70c8eba
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:09:24 -04:00
Ross Burton 2b3c39bb5a arm/scp-firmware: merge bb/inc
There's no other recipe that uses scp-firmware.inc, so merge it into the
recipe for clarity.

Change-Id: Ife1874b54c8b2be2704e1d0f5a7013ff89b8ca6e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-30 15:09:24 -04:00
Ross Burton 5ceb140f37 gem5: recommend haveged, don't depend
Instead of explicitly adding haveged to IMAGE_INSTALL, add it to
MACHINE_EXTRA_RECOMMENDS.

This means people without haveged don't have failing builds, and tiny
images which don't need haveged are not forced to contain it.

Change-Id: I190cdd26dde38fc9039ca1017da3cd2d9ac78721
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-27 13:38:54 +01:00
Ross Burton d17850230d arm-bsp: recommend haveged, don't depend
Instead of explicitly adding haveged to IMAGE_INSTALL, add it to
MACHINE_EXTRA_RECOMMENDS.

This means people without haveged don't have failing builds, and tiny
images which don't need haveged are not forced to contain it.

Change-Id: Id30139f5b96fb0041eba8612776aaac07c7a3704
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-27 13:38:54 +01:00
Ross Burton 713a697e3d arm-bsp/linux: simplify fvp-base DTS additions
Recent changes to meta-kernel meant that we cannot be sure that do_patch
is shell or Python, so doing do_patch_append() is unwise.

Frustratingly we can't just use subdir= in the SRC_URI to drop the files
into the right place as the kernel build is unexpectedly complex.

Instead, just add the files in a patch.  In the future these will be
provided by TF-A so mark as Inappropriate and Sign-off by the developer
who added them initially.

Change-Id: I5bc3483d92c8d3abe3e7fbdde26579b602124d39
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-27 13:35:48 +01:00
Ross Burton d5e8453cb9 arm/trusted-firmware-a: fix TC0 build when host doesn't have openssl-dev
The TC0 bbappend needs the cert_create tool to be built, which hard-codes the
fact that openssl is installed in /usr.

Change-Id: I8a7ed54fe7d75697509f7873e7d73b3bf1b2b903
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-24 17:59:33 +01:00
Ross Burton 86be37565a arm/trusted-firmware-a: do verbose builds
Verbose builds are useful when looking for compile problems, and as the logs
go directly to files we can simply turn them on by default.

Change-Id: I91c6314e331a5024543138ea77a111b1d59cf371
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-23 14:39:56 +01:00
Jon Mason 4812a66527 arm-bsp: Fix a5ds dunfell support
Commit 65d336c807 updated the u-boot patches to work with newer
u-boots, but broke dunfell support by them not cleanly applying on
u-boot 2020.01.  To address this, take the original version of the
patches and put them in a location that will uniquely apply to the
dunfell version of u-boot.  Also, move the newer version of the
patches to a place that will only apply for it.

Fixes: 65d336c807 ("arm-bsp: u-boot: rebase a5ds patches")
Change-Id: I993ee097de709aa51ff28a6b00b7b4330bebd1ff
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-23 09:17:10 -04:00
Diego Sueiro e632cfd89f arm-autonomy: Extend compatibility to gatesgarth
Change-Id: I38c688f0b50bdfc8abc2119821977755dde33cad
Issue-Id: SCM-1065
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-21 09:13:37 -04:00
Jon Mason 815bd4a67a arm-bsp: u-boot error fixing and file clean-up
This commit fixes the errors while rebasing u-boot src to v2020.07.
Additional work necessary to preserve dunfell functionality.
Consolidate all of the files into a single inc file and single bbappend
file.

Change-Id: I442c843b1fafeb41ea283d2f11393522a48fc9d2
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-21 09:13:37 -04:00
Jon Mason 77de189634 arm-bsp: FVP include cleanup
No real benefit to having the FVP inc file in a layer above the conf
files.  Move the file down one level and rename to make it more
consistent with the layout.

Change-Id: If32c0462352fbe2f3496957b1b2a169cfd7e7f66
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-20 08:58:58 -04:00
Ross Burton 76b639666e arm-toolchain/gcc-arm-none-eabi: support aarch64 hosts
This binary toolchain is also available for aarch64, so support fetching
that too.

Change-Id: I6206d8a9b4221d8461070d0cb7fff40c712c3df0
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:03:04 -04:00
Ross Burton 984e0ff52e arm-toolchain/gcc-aarch64-none-elf: support aarch64 hosts
This binary toolchain is also available for aarch64, so support fetching
that too.

Change-Id: I788fcd95c30b97f095593059e85de9a99710be05
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:59 -04:00
Ross Burton 35458c9665 arm-toolchain/arm-binary-toolchain: more QA skipping
When building nativesdk or target forms of these recipes more QA tests
are executed, which produce more warnings. As these recipes are quite
special, skip more tests:

- arch, as we ship ilp32 binaries in aarch64 packages
- dev-so, as the entire toolchain is put into a single package

Change-Id: Ib72b224749642c912278f0d5601fe04b30afc25f
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:54 -04:00
Ross Burton f78868e169 arm-toolchain/recipes-devtools: move compatible host assignments
Some of the toolchains are available in more than just x86-64, so move
the COMPATIBLE_HOST assignment out of the include and into the recipes.

Change-Id: I10977593935bc7dc50196132d43541aed585cc18
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:50 -04:00
Ross Burton b241f7b069 arm-toolchain/gcc-aarch-none-elf: don't use GFLD as license checksum
The GFDL license statement isn't a good choice for the GCC license
checksum, instead use Copying.html from the documentation.

Change-Id: I265bb0add795f3de40f49f8c31127ac9215d2566
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:44 -04:00
Ross Burton b09c368798 arm-toolchain/external-arm-toolchain: rename common include
These recipes all used a common include
external-arm-toolchain-x86host.inc, but that name isn't very meaningful:
the recipes are for x86-64, there typically are more than x86-64
binaries available, and it's not for an external toolchain but
integrating a binary toolchain.

Rename the include to arm-binary-toolchain.inc, as they're all the Arm
binary toolchain.

Change-Id: I59f5faa7373686958e226db0aa68e7880d36400e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:23 -04:00
Diego Sueiro c9b6941f3d arm-autonomy/qemu: Install qemu-system-i386 instead of qemu-xen
This patch cleans the qemu_%.bbappend and uses the already provided
qemu-system-i386 package from meta-virtualization to include only the
/usr/bin/qemu-system-i386 binary.

Change-Id: I6f1fc4db458d0b09c54013c1512398521cb349e2
Issue-Id: SCM-889
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:02:03 -04:00
Kamil Dziezyk c1be31f8c5 arm-bsp/image_types_disk_img: do not force 'ext4' FS by default
In some cases user doesn't want to create any file system on a specific partition.

Change-Id: I4596d97b95034952436cfd0a267a3f6ae4c0401d
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:01:35 -04:00
Khasim Mohammed 21c9ca3d7a arm-bsp/wic : add wic image support for N1SDP
- Update IMAGE_FSTYPES to generate a wic image
- Update MACHINE_FEATURES to include efi as supported feature on N1SDP

Change-Id: I8c75171270e3b643794af74b734825e1739999e5
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:01:18 -04:00
Jon Mason b0d3129ac1 arm-bsp: rename linux-yocto_5.4.bbappend for versatility
There is nothing unique about the 5.4 version of linux-yocto.  Rename
the file to allow for this to be applied against any version of
linux-yocto.

Change-Id: I15e0c4509b237d29969105ac5942dd8079eaeee9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:01:15 -04:00
Jon Mason 2c8517e0c0 Limit legacy compatibility to dunfell
Layers are only being tested against dunfell and gatesgarth.  Limit the
layer compatibility to only those versions.

Change-Id: Ib4df617d8991b1c9096b8feaad9228174319bf11
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-17 09:00:44 -04:00
Ross Burton 8bd0cb6bab opencsd: upgrade to 0.14.2
Change-Id: Ic66533674e10b7c8cb71f9f49d907af1aac47e44
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 12:30:14 -04:00
Ross Burton c2916a4688 opencsd: put version into PV instead of SHA
Change-Id: I3615737fe64b26249a0405dc20843735913b3078
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 12:30:14 -04:00
Jon Mason b91737ec76 arm-bsp: Prepare to migrate linaro kernels to meta-kernel
Reorganize and clean-up the Linaro kernel recipes for migration to
meta-kernel.

Change-Id: I4291ae01b5679ee2c110b1deb38c963bde254177
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 12:28:44 -04:00
Jon Mason d43563f603 arm-bsp: Fix tc0 compile
TC0 does not compile on the latest master branch.  Clean-up the recipe
and get it compiling again.

Change-Id: I9eda0db826727ca33cac5a1f0be68024a8827900
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 12:27:16 -04:00
Jon Mason 5990cd6259 arm-bsp: Migrate a5ds to meta-kernel for stable kernels
a5ds is having issues building its stable kernel on master.  Migrate to
meta-kernel to fix the build break.  This has the benefit of meta-arm
not having a unique stable kernel recipe to maintain and support.

Also, change the name of linux-yocto-arm-platforms to be more
generic, as it doesn't accurately reflect where it is currently being
used and can be used by different kernels going forward.

Change-Id: I4e76c7f1ee4b84641279a389820940fac7130df1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 12:25:49 -04:00
Ross Burton 20da562210 arm-bsp/trusted-firmware-a: move machine customisations to the versioned appends
By having MACHINE_TFA_REQUIRE set and required in both the wildcard
bbappend and the versioned append, the same file can get included twice
which results in a warning from bitbake:

WARNING: trusted-firmware-a_2.3.bb: Duplicate inclusion for
trusted-firmware-a-juno.inc in trusted-firmware-a_2.3.bbappend

Move the customisations from the wildcard bbappend to the specific
version of trusted-firmware-a that is used for that platform to be clear
about what platforms are supported and remove this warning.

Change-Id: Ib220aedbf94fa11d21ddc6c5f9ac2c5de5c66b7a
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 09:06:40 -04:00
Anders Dellien babe4b577d arm-bsp: Move to newer kernel for fvp-base and foundation-armv8
Change fvp-base and foundation-armv8 kernel from linux-linaro-arm-4.19
to linux-yocto_5.4.
Also add the necessary DTS files.

Change-Id: I6aa2e7706a2f20904d2f7a2bbfb928f0e53eb1eb
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 09:06:40 -04:00
Ross Burton 9c35bf8cb1 arm/edk2-firmware: mark as machine-specific
As this recipe needs per-machine configuration to be set, mark the
package archicture as the machine architecture to ensure that multiple
BSPs don't conflict in the package feed.

Change-Id: I3db0be2621987290a0c9e7b689554cd5f51cb61e
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 09:06:40 -04:00
Ross Burton 46d6da1519 arm/edk2-firmware: merge the .bb/.inc files
There is no reason to split this recipe between two files, so merge them.

Change-Id: I130cfb0ef78baa3117d5683d4732bc9b86798869
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-14 09:06:40 -04:00
Ross Burton 940605ac1c arm-bsp/trusted-firmware-a: consolidate FILESEXTRAPATHS
There's no need to set FILESEXTRAPATHS to "${THISDIR}/files/n1sdp:" when
n1sdp is the name of the current MACHINE as bitbake will search for
override-named directories automatically.

Instead just add ${THISDIR}/files and let bitbake do it's thing.

Change-Id: I0f58933ff9e56ee41a8fdd55f467d263c4e1b1e7
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-08 23:05:11 -04:00
Ross Burton 4ed1f47078 arm-bsp/trusted-firmware-a: move A5 DesignStart to 2.3
0001-plat-arm-a5ds-move-dtb-to-a-new-address.patch was never applied,
and has been merged upstream so drop it.

The recipe was using the _git.bb recipe and setting the SRCREV to a
commit 300+ commits past 2.2 but not quite 2.3.  Instead, just use 2.3.

Change-Id: I76aee592e7ce3ec23268872d7f202efa945e5e59
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-08 23:05:11 -04:00
Usama Arif 02813ba953 arm-bsp/u-boot: Updated platform port for TC0
This makes the platform port independent of vexpress board
so it applies cleanly on both u-boot 2019.07 (zeus) and
2020.01 (dunfell). The SRCREV that existed in u-boot-tc0.inc
for v2020.07-rc3 has been removed and the default SRCREV is
now used.

Change-Id: Ieb65cb666a1812eeeb2e3e306aec06b5e538cf06
Signed-off-by: Usama Arif <usama.arif@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-07-08 15:24:15 +01:00
Jon Mason 55242ed6c6 arm-bsp: yocto-check-layer fixes
Changes necessary to get yocto-check-layer to pass

Change-Id: Ie9ea5047ab1344d14a585552277fdbd6b2bc48ab
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-07 09:09:26 -04:00
Khasim Mohammed 5892e1b8f0 arm-bsp/grub: Add grub-efi support for N1SDP
grub-mkimage is used make a bootable image of GRUB,
grub-efi dependency in added to conf file.

Change-Id: Iaf08ed8b5e221003f10fceef9edffbe22b752534
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-07 09:09:26 -04:00
Khasim Mohammed 5d5672ee9a arm-bsp/wic: add default wks file to create EFI disk image
Creates a partitioned EFI disk image that the user
can directly dd to boot media. The selected bootloader is grub-efi.

Change-Id: I1a5e8bc953274cdcc1840b27351d8e6444b2c5ab
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-07 09:09:26 -04:00
Gabor Abonyi c168b6731f arm-bsp: musca_s1: Add machine
Add Musca S1 machine. Also add it to the supported targets
for Trusted Firmware M.

Change-Id: I58cee5f71d695e364b324b7c92db920b4b1a3b69
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 15:41:05 -04:00
Gabor Abonyi 29bae2a017 arm-bsp: musca_b1: Add machine
Add Musca B1 machine. Also add it to the supported targets
for Trusted Firmware M.

Change-Id: I66dcc87df9a8dcb258de701ffbdcde264b0886c5
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 15:41:05 -04:00
Gabor Abonyi 6f613362f3 arm: trusted-firmware-m: Add recipe
Adds a recipe to pull down the trusted-firmware-m repository and the
ones it depends on. The recipe can either use gcc-arm-none-eabi-native
or armcompiler-native Clang toolchain to compile the firmware.

Change-Id: I37a4ba38982b5b1d387eccbb26bb5c79bddab0f7
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 15:41:05 -04:00
Gabor Abonyi b5998ff3d0 arm: python3-cbor: Add recipe
Adds a recipe to pull cbor pypi package for python3.
This package is required to compile Trusted Firmware M.

Change-Id: I86ef64a573e3daafb1b798800c4a0c05b292078f
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 15:41:05 -04:00
Gabor Abonyi 4f1ef2b3db arm-toolchain: armcompiler: Add Arm Clang recipe
Adds Arm Clang recipe to pull down the prebuilt Armcompiler for
compiling for Cortex-A, Cortex-R, and Cortex-M processors from ARM.
This toolchain is required to build Arm trusted-firmware-m with
different optimisations than GCC can provide for M-class processors.

This recipe is based on the gcc-arm-none-eabi-native toolchain.

Change-Id: I0110f899ec6e5b355c5b7661db1f4aa0e254e7e2
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 15:40:52 -04:00
Gabor Abonyi 91025496f7 arm-toolchain: external-arm-toolchain: Rename
Rename common external-arm-toolchain file, so it can be used by non-gcc
external toolchains too.

Change-Id: I48345dc53bc3d20f33b44fc0224b511f30107036
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-02 11:15:48 -04:00
Ross Burton 0eb184e504 linux-linaro-arm_5.4: fix build of Perf with new BFD
Change-Id: Ice129ecddc17c3c24e177cf4f2d3445daeb6b455
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-01 10:39:20 -04:00
Jon Mason e654f319d7 gem5: Add README
README.md is needed or yocto-check-layer throws an error.  Add a simple
one which references the one present in the root directory.

Change-Id: I1e0bb52ff3679347ec72d2f6178e7807398d583a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-01 10:39:20 -04:00
Jon Mason 72759e13dd gem5: add dunfell support
Add dunfell support to meta-gem5.  This allows for the master to work
with stable dunfell branches.

Change-Id: Ie43bd7ca0a145fd30d92d0c241431dfc0a307dd5
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-07-01 10:39:20 -04:00
Teo Couprie Diaz 435aea46a7 arm-bsp : Introduce TC0 platform and BSP
This patch introduces the Total Compute platform.
It adds support for the TC0 platform to the Android Common Kernel and
allows building all binaries needed to run Android on TC0.
It adds patches specific to TC0 for TF-A, SCP and U-Boot.

Change-Id: Ia83b79571c7381967c7449db031e3177b1990546
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz@arm.com>
Signed-off-by: Usama Arif <usama.arif@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-30 11:23:03 -04:00
Teo Couprie Diaz 4991e2054d arm: Introduce 4.19 Android Common Kernel
This recipe targets machines based on arm64.
Change-Id: I9f9556c3ce3636a31fb3a6faf38494335be6b997
Signed-off-by: Teo Couprie Diaz <teo.coupriediaz@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-30 11:22:28 -04:00
Ross Burton 6147e82375 meta-gem5: extract the gem5 recipe and machine into a dedicate meta-gem5 layer
meta-arm-bsp no longer has to depend on meta-oe, and in the future
meta-gem5 could be moved out of meta-arm.

Change-Id: I49fa8f793b60af8c0cdb7e04b27fb53fc094cdad
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-29 08:46:17 -04:00
Khasim Mohammed 34224c961d arm-bsp/scp-firmware: Build SCP MCP firmware for N1SDP
- Add bbappend recipe to build SCP and MCP firmware
  for N1SDP.
- Use fiptool to package the binary images
- Update machine conf to add image dependency
  for SCP-firmware components

Issue-Id: PLATFORMS-3134

Change-Id: I24bb427179f2fdee0a8351257c9088d8024ca6b8
Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-24 13:44:23 -04:00
Khasim Mohammed 37a5fb3f58 arm/scp-firmware : allow setting scp log level to INFO or WARN
SCP code has been updated with new logging framework. The patch
is to allow setting of log level parameter to INFO or WARN.

Change-Id: I20ec19a9aa1bdb7f59c067d2344c299c057a088b
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-24 13:44:01 -04:00
Khasim Mohammed 2c08e207b6 arm/fiptool : provides fiptool for packaging
Firmware Image Package (FIP), is a packaging format used
by TF-A to package the firmware images in a single binary,
this tool is used to package the binaries in FIP format.

Change-Id: Ie4108915c5d63be340d6f53148a6dff03d6d48e7
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-24 13:43:08 -04:00
Jon Mason 831e317e8a arm-toolchain: Add Denys as co-maintainer
Per mailing list discussion, Denys is co-maintainer of the
meta-arm-toolchain layer.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-18 18:24:03 -04:00
Sumit Garg 3237858efa external-arm-toolchain: Add package specific licenses
Add license.inc file to state license of various packages provided by
pre-built Arm tool-set.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 15:00:14 -04:00
Sumit Garg 4ccff1d27a meta-arm-toolchain: Add README
Document usage details for GNU Arm toolchains which could either be built
from source or pre-built.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 15:00:14 -04:00
Sumit Garg 6eca170875 external-arm-toolchain: Align glibc packaging to OE TARGET_SYS
OE native and cross compilers (in case of SDK) uses OE TARGET_SYS to
create standard paths to search for libraries and headers during
compilation.

Currently external-arm-toolchain recipe temporarily override TARGET_SYS
with EAT_TARGET_SYS and packages libraries and headers corresponding to
EAT_TARGET_SYS which leads to failures during native and cross compilation
(in case of SDK) such as:

$ $CXX -o hello++ hello.cpp
In file included from hello.cpp:1:
/tmp/armsdk/sysroots/armv7at2hf-neon-oe-linux-gnueabi/usr/include/c++/9.2.1/iostream:38:10: fatal error: bits/c++config.h: No such file or directory
   38 | #include <bits/c++config.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

$ $CC hello.c
real-ld: cannot find crtbeginS.o: No such file or directory

So remove temp override of TARGET_SYS and rather package libraries and
headers corresponding to OE TARGET_SYS.

This fixes changes added in commit:
https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce

Also, update location for unwind.h gcc-arm-common.inc accordingly.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 15:00:14 -04:00
Sumit Garg ceff030d5c external-arm-toolchain: Refine dev libraries/headers packaging
OE core by default package all libraies/headers installed as
"${libdir}/lib*.so", "${libdir}/*.la" and {includedir} as part of
FILES_${PN}-dev" but in case of external Arm toolchain recipe, multiple
packages are provided which needs to include specific libraries and
headers. And "${PN}-dev" is only meant to pick up remaining dev libraries
and headers that aren't picked up by other packages.

So in order to achieve above objective, re-order PACKAGES list to shift
${PN}-dev towards the end. And since some static libraries needs to be
packaged in ${PN}-dev, so we need to keep ${PN}-staticdev later in order.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 15:00:14 -04:00
Sumit Garg 0f352925ed external-arm-toolchain: Remove glibc locale dependency
Currently external Arm toolchain recipe doesn't provide packages
corresponding to OE glibc locale recipe. So explicitly remove corresponding
libc dependencies until we sort out glibc locale packaging rather than
blocking OE SDK generation which is still useful without glibc locale
packaging.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 15:00:14 -04:00
Diego Sueiro c4eb8e8958 arm-autonomy, xenguest-manager: Guest creation failure cleanup
When the guest creation process fails, we need to perform a proper
cleanup on the system, like removing configuration files and detaching
the disk previously attached to Xen.

This patch also adds an extra failure condition when the partition
assigned to guests is already formatted with a filesystem and it is not
a lvm partition.

Change-Id: I36087bf95fb8ff093160a6df406920fa5f293e09
Issue-Id: SCM-996
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 14:41:42 -04:00
Diego Sueiro f7635b43a0 arm-autonomy, xenguest: Fail if Dom0 is not properly initialized
During the xenguest initialization and when invoking the
xenguest-manager tool, abort the execution if Dom0 was not properly
initialized on top of Xen and with the proper kernel configurations.

Change-Id: I307c03e58a266a943968df1bc5ba39951912d2cb
Issue-Id: SCM-996
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 14:41:09 -04:00
Khasim Mohammed 150fdcc862 arm-bsp/edk2-firmware: fix destsuffix and PV for recursion error
Use relative paths in destsuffix as the paths are relative
to ${WORKDIR} and turn the existing PV ?= into PV =

Change-Id: Ib9367a15dde611e5b74c11eeff330d0b5a3de75d
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 14:40:30 -04:00
Khasim Mohammed 47b276bc3d arm/edk2-firmware: fix passing of linker flags
The build initially worked because host machine had
util-linux-dev installed, the build failed otherwise.
This patch will fix the passing of linker flags.

Change-Id: If2f31e8e31109b9c8fd62b32d2f80902a1dd3cfd
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 14:40:30 -04:00
Ross Burton 938b47f666 README: add git-config example for git-send-email
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 08:08:05 -04:00
Ross Burton 2e8653b6f0 README: add section on expected commit message style
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 08:08:05 -04:00
Ross Burton e510436c48 README: add Ross Burton as co-maintainer
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 08:08:05 -04:00
luca fancellu 92e8855124 arm-bsp: Move to linux-linaro-arm for fvp-base and foundation-armv8
Change fvp-base and foundation-armv8 kernel from linux-yocto_5.4
to linux-linaro-arm_4.19 because some drivers are not available.
Furthermore, for fvp-base the linaro kernel comes with the dts
file removing the needs to support it on our side.

Change-Id: I844d92f173406542c2bad8d89793513f8bc28fd1
Signed-off-by: luca fancellu <luca.fancellu@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-17 08:07:05 -04:00
Diego Sueiro ec8faf6b71 trusted-firmware-a: fiptool build using BUILD_CFLAGS and BUILD_LDFLAGS
Since the TF-A fiptool is native tool we should be using the
BUILD_CFLAGS and BUILD_LDFLAGS flags to proper build and execute it.

Change-Id: I9634604dbc42ba7da85d9b9449f1ed94ecb38df2
Issue-Id: SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-12 08:43:36 -04:00
Diego Sueiro d4dbb2ccb0 arm-bsp, gem5-arm64: Update to v20 version
This patch updates gem5-aarch64-bootloader and gem5-aarch64-native to
the release tag v20.0.0.1.

Also apply populate the right compiler and linker flags to get
gem5-aarch64-native properly building

Change-Id: Icc2203163105373cf030975c1b12f1d4f2fcb03c
Issue-Id: SCM-1014
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-11 09:04:25 -04:00
Diego Sueiro 2fafa9ab6c arm-autonomy, xenguest-network-bridge: Set bridge members per machine
By default, XENGUEST_NETWORK_BRIDGE_MEMBERS should be empty and only be
set per machine.

Change-Id: I67c56847eb785279c28757a6052f092c838babe0
Issue-Id: SCM-995
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-11 09:03:55 -04:00
Khasim Mohammed 24cbd0e702 arm-bsp: Build UEFI EDK2 firmware for N1SDP
- Add bbappend recipe to configure N1SDP specifics
- Enable UEFI EDK2 firmware build for N1SDP.
- Update machine conf to add dependency
  for EDK2 firmware components

Change-Id: I89d41c176f31bce6f1df7f3b3a7cd624b46c05e1
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-11 09:02:54 -04:00
Khasim Mohammed 4f8f8eae7f meta-arm: Add UEFI EDK2 support for Arm platforms
EDK2 Project is a modern, feature-rich, cross-platform
firmware development environment for the UEFI specifications
from www.uefi.org.

This patch adds a new recipe to fetch, configure and build
UEFI EDK2 firmware for Arm platforms.

Change-Id: Icfb157e5b68d87accfd4290f522fc529fe4e849e
Issue-Id: PLATFORMS-3134
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-11 09:02:21 -04:00
Rui Miguel Silva 65d336c807 arm-bsp: u-boot: rebase a5ds patches
Rebase a5ds u-boot patches so, they apply clean in top of
latest u-boot.

Change-Id: I12e596ef8460429b540777e2a8646ed64f81fbac
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-09 15:41:27 -04:00
Denys Dmytriyenko 22be9b620c gcc-x86host.inc: properly link triplet-prefixed binaries
Use the correct path for the binaries in ${datadir}, otherwise it results in a
single incorrect symlink like gcc-arm-none-eabi-*

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-08 09:08:06 -04:00
Denys Dmytriyenko b796672277 gcc-aarch64-none-elf: properly set ${S} that is different from default
Also use ${BINNAME} and ${PV} variables for automatic substitution.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-08 09:08:06 -04:00
Denys Dmytriyenko 7765d89009 external-arm-toolchain: un-break target compilation
Compiling on the target using runtime libs from external-arm-toolchain
requires libgcc.a, as libgcc_s.so explains:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library.  */
GROUP ( libgcc_s.so.1 -lgcc )

Otherwise it results in errors like:
| /usr/lib/gcc/arm-linux-gnueabi/9.2.1/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgcc
| /usr/lib/gcc/arm-linux-gnueabi/9.2.1/../../../../arm-linux-gnueabi/bin/ld: cannot find -lgcc
| collect2: error: ld returned 1 exit status

This already has been fixed before in this commit:
https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=91ea4d017bf0598e49944e76c889e66d58c066ce

But then it got broken/undone here w/o due review:
https://git.linaro.org/openembedded/meta-linaro.git/commit/?id=b43d5f0ce431ba1e242504641266a63293ded5db

Even though it's a static library, we want it to be in libgcc-dev as it's
not optional, but rather required for development.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-08 09:08:06 -04:00
Denys Dmytriyenko f2069723f2 layer.conf: remove dependency on meta-python
Corresponding Python modules pycryptodome(x) and pyelftools, needed by optee,
were moved from meta-python to oe-core.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-07 09:51:19 -04:00
Khasim Mohammed f36666eb63 meta-arm: Add SCP MCP build support
SCP-firmware provides a software reference implementation for
the System Control Processor (SCP) and Manageability Control
Processor (MCP) components found in several Arm Compute
Sub-Systems.

This patch set adds support to fetch and build SCP and MCP
firmware binaries

Issue-Id: PLATFORMS-3134

Change-Id: Ic7259bb430c9e7e9711c9c8bc3283aafaacdf707
Signed-off-by: Patrik Berglund <patrik.berglund@arm.com>
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-07 09:50:19 -04:00
Khasim Mohammed b89693b16f arm-bsp: Add trusted firmware support for N1SDP
- Add new bbappend to fetch tfa ver 2.2 required for N1SDP
- Apply additional patch required for N1SDP
- Update machine conf to add image dependency for
  trusted firmware component

Issue-Id: PLATFORMS-3134
Change-Id: Ibf593c1818c9ea08acf71c6b5b80abc4aca79723
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-07 09:50:19 -04:00
Diego Sueiro ad8fdc96c0 arm-bsp, linux-linaro-arm: Don't perform SHA verification
Since the Linaro kernel-release repo doesn't have a master branch and
the branches are force pushed, we need to have the nobranch=1 setting
in the SRC_URI and have the SRCREV pointing to TAG commit SHA the will
not get modified.

Change-Id: Id1ad6b57a6f11ec4dadd3647043e6f2f48f498d4
Issue-ID: SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-05 10:54:09 -04:00
Jon Mason 04eb583c4b arm-toolchain: merge binary toolchain recipes
Merge the majority of the binary toolchain recipes for building on an
x86 host into a common include file.

Also, found and fixed an error with both install commands where the name
was double nested on the copy.  For example,
/usr/share/arm-none-eabi/arm-none-eabi/ due to the way it was being
copied.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
2020-06-02 11:37:40 -04:00
Jon Mason a1918abd8d arm-bsp: a5ds: change SRC_URI to git
When building for a5ds dunfell, I am seeing the following error:
fatal: unable to access 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux/': server certificate verification failed. CAfile: none CRLfile: none

I do not see this error when using git instead of https to access the
tree.  So, change to that access method (and it should be faster too).

Change-Id: I8e793ece68edaaa918ed3c3a0e9b4e195775828f
Signed-off-by: Jon Mason <jon.mason@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
2020-06-02 08:43:12 -04:00
Joshua Watt 422001af4d optee-os: Refresh GCC 10 patches
The original fix for compiling with GCC 10 had to be reverted because it
failed on older versions. Upstream resolved this and re-instituted the
fix, so backport that patch series

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-01 17:37:06 -04:00
Khem Raj 8c9670108d optee-test: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-01 17:37:06 -04:00
Ralph Siemsen fdc51fe01a arm-toolchain: set CVE_VERSION to fix cve-check warnings
Yocto cve-check currently produces numerous warnings like:
    WARNING: gcc-cross-arm-arm-8.3-r2019.03 do_cve_check: gcc:
    Failed to compare arm-8.3 < 10.0 for CVE-2019-15847
In turn this means that some potential CVEs are not reported.

This occurs because PV has been prefixed with "arm-", to allow for
multiple gcc implementations.

Fix this by setting CVE_VERSION to the non-prefixed version.

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-29 10:27:14 -04:00
Denys Dmytriyenko b2f900e054 arm-toolchain: gcc-aarch64-none-elf: Add recipe
Adds a recipe to pull down the prebuilt GCC for compiling bare-metal targets
for Aarch64 processors from ARM.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-28 19:14:42 -04:00
Joshua Watt d341b6693f Add support for booting qemu with TFA and optee
Adds support for booting AArch64 Qemu machines using TF-A + optee +
u-boot. Most of the changes are applicable to any AArch64 qemu target,
and a reference machine called qemuarm64-secureboot has been added that
show how to enable support for it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-28 10:08:47 -04:00
Joshua Watt d1255ee8fe optee-client: Add sysVinit service
Adds a sysVinit service to start tee-supplicant so that the optee-client
package can be used on distros where systemd is not used. Also does some
cleanup of the recipe including:
 1) Using @path@ tokens for replacemane in the .service file instead of
    paths
 2) Replacing tokens in the .service file after it is installed instead
    of editing the source file in ${WORKDIR}

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-28 10:08:22 -04:00
Joshua Watt 12604dc9d3 optee-{os,examples,client,test}: Build out of tree
Modifies the optee recipes to all build out of tree. This is cleaner and
helps prevent build error from stale builds when dependencies change.
Also allows the elimination of the OPTEEOUTPUTMACHINE variable in
optee-os.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-28 10:07:56 -04:00
Denys Dmytriyenko 0418996eba trusted-firmware-a: re-enable generation of packages
There is no need to inherit nopackages. Even when the output binaries are being
consumed from deploy or sysroot, and the main binary package is not meant to be
installed in the rootfs, package generation is still useful for SDK use cases
and as a way to distribute sources (e.g. src.rpm/SRPM) in Distros.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-19 11:16:44 -04:00
Joshua Watt f4206ef4d4 optee-os: Fix compile with GCC 10
Adds a patch to fix compiles with GCC 10 due to the way that libgcc
detects LSE support using __getauxval().

V2: Incorporate patch changes suggested by upstream

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-19 11:14:01 -04:00
Denys Dmytriyenko c8dbf892cc trusted-firmware-a: remove stale checksums, not used for git fetches
All SRC_URIs for trusted-firmware-a now use git and checksums are not needed.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-19 11:14:01 -04:00
Jon Mason f9ece576ad arm-toolchain: gcc-arm-none-eabi-native: Add recipe
Adds a recipe to pull down the prebuilt GCC for compiling on Cortex-R
and Cortex-M processors from ARM. This toolchain is required to build
Arm Trusted Firmware for the Rockchip rk3399 SoC, since it must compile
some firmware for the M0 coprocessor.

This was originally taken from meta-rockchip, but has been modified from
mailing list feedback.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-15 09:58:19 -04:00
Denys Dmytriyenko 06b648821a optee-os: replace old pycrypto with pycryptodome - a drop-in replacement
While pycryptodome is a drop-in replacement for the old pycrypto module,
pycryptodomex uses a separate namespace to not confict with pycrypto.
Unfortunately, optee-os uses both namespaces, hence both variants of
pycryptodome and pycryptodomex are needed.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-05-15 09:11:43 -04:00
723 changed files with 43259 additions and 10769 deletions
+212
View File
@@ -0,0 +1,212 @@
image: ghcr.io/siemens/kas/kas:3.2
# First do a common bootstrap, and then build all the targets
stages:
- prep
- bootstrap
- build
# 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
TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains
before_script:
- echo KAS_WORK_DIR = $KAS_WORK_DIR
- echo SSTATE_DIR = $SSTATE_DIR
- echo DL_DIR = $DL_DIR
- rm -rf $KAS_WORK_DIR
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
# Must do this here, as it's the only way to make sure the toolchain is installed on the same builder
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_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
#
# Prep stage, update repositories once
#
update-repos:
extends: .setup
stage: prep
script:
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
#
# Bootstrap stage, bootstrap and machine coverage
#
# Build a number of native tools first to ensure the other builders don't race
# over them
n1sdp/bootstrap:
extends: .build
stage: 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+/'
#
# 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
corstone700-fvp:
extends: .build
corstone700-mps3:
extends: .build
fvp-base:
extends: .build
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gccarm:
extends: .build
fvp-baser-aemv8r64:
extends: .build
gem5-arm64:
extends: .build
gem5-arm64-xen:
extends: .build
gem5-atp-arm64:
extends: .build
generic-arm64:
extends: .build
juno:
extends: .build
juno/clang:
extends: .build
microbit-v1:
extends: .build
musca-b1:
extends: .build
musca-s1:
extends: .build
n1sdp:
extends: .build
n1sdp/armgcc:
extends: .build
qemu-cortex-a53:
extends: .build
qemuarm/testimage:
extends: .build
qemuarm64-sbsa:
extends: .build
qemuarm64-secureboot/testimage:
extends: .build
qemuarm64-secureboot/clang/testimage:
extends: .build
qemuarm64-secureboot/clang/musl/testimage:
extends: .build
qemuarm64-secureboot/musl/testimage:
extends: .build
qemuarmv5/testimage:
extends: .build
sgi575:
extends: .build
tc0:
extends: .build
#
# Utility tasks, not executed automatically
#
delete-dl-dir:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $DL_DIR/*
delete-repo-dir:
extends: .setup
stage: prep
when: manual
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
stage: prep
when: manual
script:
- find $SSTATE_DIR -type f -atime +30 -delete
# Report on disk usage
usage:
extends: .setup
stage: prep
when: manual
script:
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
+15 -3
View File
@@ -25,14 +25,26 @@ Currently, we only accept patches from the meta-arm mailing list. For general
information on how to submit a patch, please read
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
E-mail meta-arm@lists.yoctoproject.org with patches created using this process
E-mail meta-arm@lists.yoctoproject.org with patches created using this process. You can configure git-send-email to automatically use this address for the meta-arm repository with the following git command:
$ git config --local --add sendemail.to meta-arm@lists.yoctoproject.org
Commits and patches added should follow the OpenEmbedded patch guidelines:
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
The component being changed in the shortlog should be prefixed with the layer name (without the meta- prefix), for example:
arm-bsp/trusted-firmware-a: decrease frobbing level
arm-toolchain/gcc: enable foobar v2
Reporting bugs
--------------
E-mail meta-arm@lists.yoctoproject.org with the error encountered and the steps
to reproduce the issue
to reproduce the issue.
Maintainer(s)
-------------
* Jon Mason <jon.mason@arm.com>
* Ross Burton <ross.burton@arm.com>
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
local_conf_header:
cc: |
GCCVERSION = "arm-10.2"
+45
View File
@@ -0,0 +1,45 @@
header:
version: 9
distro: poky
defaults:
repos:
refspec: hardknott
repos:
meta-arm:
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
layers:
meta:
meta-poky:
env:
BB_LOGCONFIG: ""
TOOLCHAIN_DIR: ""
local_conf_header:
base: |
CONF_VERSION = "1"
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"
noptest: |
DISTRO_FEATURES_remove = "ptest"
machine: unset
target:
- core-image-base
- perf
+9
View File
@@ -0,0 +1,9 @@
header:
version: 9
target:
- binutils-cross-aarch64
- gcc-cross-aarch64
- python3-native
- opkg-native
- rpm-native
+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
+26
View File
@@ -0,0 +1,26 @@
#! /usr/bin/env python3
from pathlib import Path
import sys
metaarm = Path.cwd()
if metaarm.name != "meta-arm":
print("Not running inside meta-arm")
sys.exit(1)
# All machine configurations
machines = metaarm.glob("meta-*/conf/machine/*.conf")
machines = set(p.stem for p in machines)
# All kas files
kas = metaarm.glob("ci/*.yml")
kas = set(p.stem for p in kas)
missing = machines - kas
print(f"The following machines are missing: {', '.join(sorted(missing))}.")
covered = len(machines) - len(missing)
total = len(machines)
percent = int(covered / total * 100)
print(f"Coverage: {percent}%")
+19
View File
@@ -0,0 +1,19 @@
#! /bin/bash
# Expects the path to a log file as $1, and if this file has any content
# then display the contents and exit with an error code.
set -e -u
LOGFILE=$1
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 ==============================
cat $LOGFILE
exit 1
fi
exit 0
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
local_conf_header:
clang: |
TOOLCHAIN = "clang"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: corstone500
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
machine: corstone700-fvp
local_conf_header:
image: |
CORE_IMAGE_EXTRA_INSTALL = "corstone700-test-app"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- corstone700-fvp.yml
machine: corstone700-mps3
+8
View File
@@ -0,0 +1,8 @@
header:
version: 9
local_conf_header:
cc: |
PNBLACKLIST[gcc-cross-arm] = "Using external toolchain"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "${TOPDIR}/toolchains/${TARGET_ARCH}"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: fvp-base-arm32
+7
View File
@@ -0,0 +1,7 @@
header:
version: 9
includes:
- base.yml
machine: fvp-base
+7
View File
@@ -0,0 +1,7 @@
header:
version: 9
includes:
- base.yml
machine: fvp-baser-aemv8r64
+28
View File
@@ -0,0 +1,28 @@
header:
version: 9
includes:
- base.yml
- meta-python.yml
repos:
meta-arm:
layers:
meta-gem5:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
meta-filesystems:
meta-networking:
meta-virtualization:
url: git://git.yoctoproject.org/meta-virtualization
machine: gem5-arm64
local_conf_header:
meta-virt:
DISTRO_FEATURES_append = " virtualization xen"
target:
- xen-image-minimal
+21
View File
@@ -0,0 +1,21 @@
header:
version: 9
includes:
- base.yml
repos:
meta-arm:
layers:
meta-gem5:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
machine: gem5-arm64
target:
- core-image-minimal
- perf
- gem5-aarch64-native
+15
View File
@@ -0,0 +1,15 @@
header:
version: 9
includes:
- gem5-arm64.yml
repos:
meta-arm:
layers:
meta-atp:
machine: gem5-atp-arm64
target:
- atp-native
- core-image-minimal
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: generic-arm64
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
set -u
HOST_ARCH=$(uname -m)
VER="10.2-2020.11"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
TOOLCHAIN_LINK_DIR=$3
# These should be already created by .gitlab-ci.yml, but do here if run outside of that env
mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_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 [ ! -d $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then
if [ ! -f $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
continue
fi
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
fi
# Setup a link for the toolchain to use local to the building machine (e.g., not in a shared location)
ln -s $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i
done
Executable
+19
View File
@@ -0,0 +1,19 @@
#! /bin/bash
# Read a GitLab CI job name on $1 and transform it to a
# list of Kas yaml files
set -e -u
# Read Job namne from $1 and split on /
IFS=/ read -r -a PARTS<<<$1
# Prefix each part with ci/
PARTS=("${PARTS[@]/#/ci/}")
# Suffix each part with .yml
PARTS=("${PARTS[@]/%/.yml}")
# Print colon-separated
IFS=":"
echo "${PARTS[*]}"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: juno
+13
View File
@@ -0,0 +1,13 @@
# Python logging configuration to write all warnings to a separate file
version: 1
handlers:
warnings:
class: logging.FileHandler
level: WARNING
filename: warnings.log
formatter: BitBake.logfileFormatter
loggers:
BitBake:
handlers: [warnings]
+9
View File
@@ -0,0 +1,9 @@
header:
version: 9
repos:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
meta-python:
+8
View File
@@ -0,0 +1,8 @@
header:
version: 9
includes:
- meta-python.yml
repos:
meta-zephyr:
url: https://git.yoctoproject.org/git/meta-zephyr
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: microbit-v1
target:
- zephyr-philosophers
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: musca-b1
target:
- trusted-firmware-m
- zephyr-philosophers
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
- meta-python.yml
machine: musca-s1
target:
- trusted-firmware-m
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
local_conf_header:
libc: |
TCLIBC = "musl"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: n1sdp
+10
View File
@@ -0,0 +1,10 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: qemu-cortex-a53
target:
- zephyr-philosophers
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm64-sbsa
target:
- core-image-base
- perf
- sbsa-acs
+16
View File
@@ -0,0 +1,16 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm64-secureboot
local_conf_header:
bugs: |
# Only ping until errors can be resolved
TEST_SUITES = "ping"
target:
- core-image-base
- perf
- optee-examples
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
includes:
- base.yml
machine: qemuarmv5
local_conf_header:
bugs: |
# Remove parselogs until errors can be resolved
TEST_SUITES_remove = "parselogs"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: sgi575
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: tc0
+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
+43
View File
@@ -0,0 +1,43 @@
#! /usr/bin/env python3
# Update clones of the repositories we need in KAS_REPO_REF_DIR to speed up fetches
import sys
import os
import subprocess
import pathlib
def repo_shortname(url):
# Taken from Kas (Repo.__getattr__) to ensure the logic is right
from urllib.parse import urlparse
url = urlparse(url)
return ('{url.netloc}{url.path}'
.format(url=url)
.replace('@', '.')
.replace(':', '.')
.replace('/', '.')
.replace('*', '.'))
repositories = (
"https://git.yoctoproject.org/git/poky",
"https://git.openembedded.org/meta-openembedded",
"https://git.yoctoproject.org/git/meta-virtualization",
"https://git.yoctoproject.org/git/meta-zephyr",
"https://github.com/kraj/meta-clang",
)
if __name__ == "__main__":
if "KAS_REPO_REF_DIR" not in os.environ:
print("KAS_REPO_REF_DIR needs to be set")
sys.exit(1)
base_repodir = pathlib.Path(os.environ["KAS_REPO_REF_DIR"])
for repo in repositories:
repodir = base_repodir / repo_shortname(repo)
if repodir.exists():
print("Updating %s..." % repo)
subprocess.run(["git", "-C", repodir, "fetch"], check=True)
else:
print("Cloning %s..." % repo)
subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
+32
View File
@@ -0,0 +1,32 @@
header:
version: 9
distro: poky
machine: fvp-baser-aemv8r64
defaults:
repos:
refspec: hardknott
repos:
meta-arm:
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
layers:
meta:
meta-poky:
local_conf_header:
base: |
CONF_VERSION = "1"
PACKAGE_CLASSES = "package_ipk"
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES_append = " debug-tweaks"
target:
- core-image-minimal
+19 -18
View File
@@ -4,8 +4,8 @@ meta-arm-autonomy Yocto Layer
Introduction
------------
This layer provides an hypervisor based solution (currently based on Xen) for
autonomous system. It contains recipes and classes to build host and guests
systems.
autonomous system. It contains recipes and classes to build host and guest
images.
To start using this layer, please check the
[Quick Start Guide](documentation/arm-autonomy-quickstart.md).
@@ -16,13 +16,14 @@ This layer depends on several other Yocto layers:
* meta-openembedded (https://git.openembedded.org/meta-openembedded)
* poky (https://git.yoctoproject.org/poky)
* meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
* meta-networking (git://git.openembedded.org/meta-openembedded)
Distribution Features
---------------------
This layer is adding the following Yocto DISTRO_FEATURES:
This layer adds the following Yocto DISTRO_FEATURES:
* arm-autonomy-host: this feature activates functionalities required to build
an autonomy host system. It is doing the following:
an autonomy host system. It has the following effects:
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
- add xen backend drivers to linux kernel configuration.
- To reduce the root filesystem image size the kernel image is not installed.
@@ -43,40 +44,40 @@ its documentation.
Those documentation files should be checked for variables:
- [xen-devicetree](documentation/xen-devicetree.md)
- [xenguest-manager](documentation/xenguest-manager.md)
- [xenguest-network-bridge](documentation/xenguest-network-bridge.md)
- [xenguest-network](documentation/xenguest-network.md)
BSPs
----
This layer is adding the following machines:
This layer adds the following machine:
* arm64-autonomy-guest: this machines creates a minimal BSP suitable to be used
* arm64-autonomy-guest: This machine creates a minimal BSP suitable to be used
as an autonomy guest. It is in fact only activating ARM64 architecture and
SMP in the linux kernel and is enabling the DISTRO_FEATURE
arm-autonomy-guest.
'arm-autonomy-guest'.
Images
------
This layer is adding the following images:
* arm-autonomy-host-image-minimal: this image includes all elements required
to create a minimal arm-autonomy-host system. This includes xen and tools to
manage xen guests. This image depends on 'arm-autonomy-host' distribution
feature.
* arm-autonomy-host-image-minimal: This image includes all elements required
to create a minimal arm-autonomy-host system. This includes xen, and tools to
manage xen guests and xenguest images. This image depends on
'arm-autonomy-host' distribution feature.
Recipes and classes
-------------------
This layer is adding the following recipes and classes:
This layer adds the following recipes and classes:
* [xen-devicetree](documentation/xen-devicetree.md): this is a recipe to modify
* [xen-devicetree](documentation/xen-devicetree.md): This is a recipe to modify
a device tree blob to add information required to boot xen and a Dom0 linux.
* [xenguest-mkimage](documentation/xenguest-mkimage.md): this is a tool to
* [xenguest-mkimage](documentation/xenguest-mkimage.md): This is a tool used to
create and modify images to be used as Xen guests.
* [xenguest-manager](documentation/xenguest-manager.md): this is a tool to
* [xenguest-manager](documentation/xenguest-manager.md): This is a tool used to
create/remove/start/stop xen guest generated using xenguest-mkimage.
* [xenguest-network-bridge](documentation/xenguest-network-bridge.md): this
* [xenguest-network](documentation/xenguest-network.md): This
recipe add tools and init scripts to create a bridge connected to the
external network on the host and allow guests to be connected to it.
@@ -88,5 +89,5 @@ would like to contribute, please contact the maintainers
Maintainer(s)
-------------
* Diego Sueiro <diego.sueiro@arm.com>
* Bertrand Marquis <bertrand.marquis@arm.com>
* Filipe Rinaldi <filipe.rinaldi@arm.com>
@@ -0,0 +1,26 @@
# This class is to be inherited by image recipes that want to build and install
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
#
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
# recipe via KERNEL_PACKAGE_NAME_pn-${PREFERRED_PROVIDER_alternate/kernel} and
# its value needs to be different from "kernel" since this is the default set
# for PREFERRED_PROVIDER_virtual/kernel.
#
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
#
# When building and installing an alternate kernel, the kernel-modules packages
# for both virtual/kernel and alternate/kernel will be installed.
PREFERRED_PROVIDER_alternate/kernel ??= ""
python () {
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
if alternate_kernel:
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME_pn-%s' % alternate_kernel)
if alternate_kernel_pkg_name:
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
else:
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME_pn-%s set" % alternate_kernel )
}
@@ -0,0 +1,115 @@
# Docker Extern Containers
#
# This class allows docker image tarballs to be installed in the rootfs
#
# The images can be selected using the variable CONTAINER_IMAGE_FILES which
# should contain a space seperated list of absolute paths or yocto urls for
# docker images that have been exported using docker export:
# - https://docs.docker.com/engine/reference/commandline/export/
#
# src_uri_parse_var.bbclass is used to parse CONTAINER_IMAGE_FILES
#
# There are 4 supported formats for CONTAINER_IMAGE_FILES entries:
#
# - http/https url
# - CONTAINER_IMAGE_FILES = "https://[url]:[port]/alpine.tar;md5sum=..."
#
# - file:// absolute local path from root
# - CONTAINER_IMAGE_FILES = "file:///containers/alpine2.tar"
#
# - file:// path relative to FILESEXTRAPATHS
# - CONTAINER_IMAGE_FILES = "file://foo/alpine3.tar"
# FILESEXTRAPATHS .= "/containers:"
#
# - plain absolute local path from root
# - CONTAINER_IMAGE_FILES = "/containers/foo/bar/alpine4.tar"
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# A semicolon seperated list of install arguments can follow each image path:
# - conname : the name that will be attached when the image is imported
# (default: [filename, without extension])
# - contag : the tag that will be attached when the image is imported
# (default: local)
# - conkeep : Flag for whether the exported container image file should be
# kept once the import has been completed
# (default: 0)
#
# Any other arguments, for example an md5sum, will be assumed to be fetch
# arguments, and will be kept when the path is added to the SRC_URI
#
# e.g. CONTAINER_IMAGE_FILES = "\
# https://[url]:[port]/alpine.tar;md5sum=[checksum];conkeep=1 \
# file:///containers/alpine2.tar;contag=latest;conname=docker2 \
# file://foo/alpine3.tar \
# /containers/foo/bar/alpine4.tar;contag=1.0;conkeep=1 "
#
# Resulting Manifest:
# ARCHIVE NAME TAG KEEP
# alpine.tar alpine local 1
# alpine2.tar docker2 latest 0
# alpine3.tar alpine3 local 0
# alpine4.tar alpine4 1.0 1
#
# Other configurable variables:
# CONTAINERS_INSTALL_DIR : The folder underneath ${WORKDIR} where the docker
# images will be stored
# (default: "/usr/share/docker/images")
# CONTAINERS_MANIFEST : The name of the manifest file containing image
# parameters, also stored in CONTAINERS_INSTALL_DIR
# (default: "containers.manifest")
# CONTAINERS_TAG_DEFAULT : Use this to change the value that will be used as
# contag if no value is provided
# (default: "local")
# CONTAINERS_KEEP_DEFAULT : Use this to change the value that will be used for
# conkeep if no value is provided
# (default: "0")
#
inherit features_check
REQUIRED_DISTRO_FEATURES = "docker"
RDEPENDS_${PN} = "packagegroup-docker-runtime-minimal"
CONTAINER_IMAGE_FILES ??= ""
CONTAINERS_INSTALL_DIR ??= "${datadir}/docker/images"
CONTAINERS_MANIFEST ??= "containers.manifest"
CONTAINERS_TAG_DEFAULT ??= "local"
CONTAINERS_KEEP_DEFAULT ??= "0"
inherit set_src_uri_from_var
SRC_URI_FROM_VAR_NAME = "CONTAINER_IMAGE_FILES"
# Define installation params
SRC_URI_FROM_VAR_MANIFEST_PARAMS = "conname=[basename] \
contag=${CONTAINERS_TAG_DEFAULT} conkeep=${CONTAINERS_KEEP_DEFAULT}"
SRC_URI_FROM_VAR_UNPACK_DIR = "containers"
# Read manifest and install container images
do_install() {
local archive name tag keep
if [ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" ]; then
install -d "${D}${CONTAINERS_INSTALL_DIR}"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" \
"${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
while read -r archive name tag keep _; do
[ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" ] ||
bbfatal "${archive} does not exist"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" \
"${D}${CONTAINERS_INSTALL_DIR}/${archive}"
done < "${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
fi
}
do_install[vardeps] += "CONTAINER_IMAGE_FILES"
FILES_${PN} += "${CONTAINERS_INSTALL_DIR}"
@@ -1,7 +1,7 @@
# Create a xenguest image with kernel and filesystem produced by Yocto
# This will create a .xenguest file that the xenguest-manager can use.
inherit xenguest-image
inherit xenguest_image
# We are creating our guest in a local subdirectory
# force the value so that we are not impacted if the user is changing it
@@ -63,6 +63,67 @@ IMAGE_TYPEDEP_xenguest ?= "tar"
IMAGE_TYPES_MASKED += "xenguest"
IMAGE_TYPES += "xenguest"
XENGUEST_IMAGE_RECIPE = "${PN}"
XENGUEST_IMAGE_VARS += "XENGUEST_IMAGE_RECIPE"
# Merge intermediate env files from all recipes into a single file
python do_merge_xenguestenv () {
import re
# Open final merged file in DEPLOY_DIR_IMAGE for writing, or create
outdir = d.getVar('DEPLOY_DIR_IMAGE')
with open(os.path.join(outdir,'xenguest.env'), 'w') as merged_file:
# Adds vars from xenguest_image to list
merged_env = []
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS')
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
merged_env.append(var + "=" + " ".join(value.split()) + "\n")
# Resolve dependencies for this task to find names of intermediate
# .xenguestenv files
taskdepdata = d.getVar('BB_TASKDEPDATA')
task_mc = d.getVar('BB_CURRENT_MC')
task_file = d.getVar('FILE')
# See runqueue.py function build_taskdepdata
DEPS_INDEX = 3
depdata_key = task_file + ":do_merge_xenguestenv"
# If in a multiconfig, need to add that to the key
if task_mc != "default":
depdata_key = "mc:" + task_mc + ":" + depdata_key
# Retrieve filename using regex
get_filename = re.compile(r'/([^/]+\.bb):do_deploy_xenguestenv$')
env_dir = d.getVar('XENGUEST_ENV_STAGING_DIR')
for task_dep in taskdepdata[depdata_key][DEPS_INDEX]:
if task_dep.endswith(":do_deploy_xenguestenv"):
filename = re.search(get_filename, task_dep).group(1) + ".xenguestenv"
bb.note("Merging: " + filename)
try:
with open(env_dir + "/" + filename, 'r') as f:
# Eliminate duplicates
merged_env = list(set(merged_env + f.readlines()))
except (FileNotFoundError, IOError):
bb.note(" " + filename + " has no extra vars")
# Sort Alphabetically and write
merged_env.sort()
merged_file.write("".join(merged_env))
}
do_merge_xenguestenv[dirs] = "${DEPLOY_DIR_IMAGE}"
do_merge_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS}"
do_merge_xenguestenv[vardepsexclude] += "BB_TASKDEPDATA"
do_merge_xenguestenv[recrdeptask] += "do_deploy_xenguestenv"
addtask merge_xenguestenv before do_populate_lic_deploy after do_image_complete
python __anonymous() {
# Do not do anything if we are not in the want FSTYPES
if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
@@ -3,7 +3,10 @@
# This is done using kernel-fitimage as model
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
inherit xenguest-image
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
inherit xenguest_image
# use a local copy to pack all together
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
@@ -24,7 +27,7 @@ do_assemble_xenguest_initramfs() {
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
}
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_merge_xenguestenv"
kernel_do_deploy_append() {
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then
@@ -0,0 +1,224 @@
# Set SRC_URI from Variable
# This class parses a variable named in SRC_URI_FROM_VAR_NAME for entries that
# should be added to the SRC_URI
#
# There are 4 supported formats for entries:
#
# - http/https url
# - Note that a checksum (md5sum or sha256sum) must be provided for http(s)
#
# - file:// absolute local path from root
# - In this case the filename will be added to SRC_URI and the path from '/'
# added to FILESEXTRAPATHS
#
# - file:// path relative to FILESEXTRAPATHS
# - In this case the filename will be added to SRC_URI and the preceding path
# added to FILESOVERRIDES, so that the full path to the file will
# be available in FILESPATH when it is generated by combining
# FILESEXTRAPATHS and FILESOVERRIDES.
#
# - plain absolute local path from root
# - This will be treated the same as an file:// path from root. Plain paths
# must be absolute, and cannot be relative to FILESEXTRAPATHS
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# These entries will be added to the SRC_URI so that the yocto fetcher can
# unpack a copy into ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}
#
#
# A list of arguments can follow each entry in the input variable, seperated
# by semi-colons (;). Arguments may be FETCH arguments or MANIFEST arguments.
#
# FETCH arguments will be appended to the entry in SRC_URI, for example
# "downloadfilename" to specify the filename used when storing a
# downloaded file.
# Each SRC_URI entry will automatically have the arguments
# "unpack=0;subdir=${SRC_URI_FROM_VAR_UNPACK_DIR}" added to them, so do not
# attempt to set these options.
#
# MANIFEST arguments are defined in the variable
# SRC_URI_FROM_VAR_MANIFEST_PARAMS which should be a space seperated list of
# names, each optionally followed by an equals sign (=) and a default value.
#
# The values provided for the manifest arguments will be written to the manifest
# file in ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR} as columns, in the same
# order as they appear in SRC_URI_FROM_VAR_MANIFEST_PARAMS.
#
# For entries that do not provide a value for a manifest argument, the default
# value will be used if possible.
# If no default is availale, omitting the parameter on any item will cause
# an error.
#
# "[basename]" is a special case default that will set the value to
# the filename without the path or file extension.
#
# e.g.
# SRC_URI_FROM_VAR_MANIFEST_PARAMS="conname=[basename] contag=local conkeep"
#
# Any arguments that follow an entry in SRC_URI_FROM_VAR_NAME, that are not
# named in SRC_URI_FROM_VAR_MANIFEST_PARAMS are assumed to be FETCH arguments,
# so are added to the corresponding entry in the SRC_URI.
SRC_URI_FROM_VAR_NAME ??= ""
SRC_URI_FROM_VAR_MANIFEST_PARAMS ??= ""
SRC_URI_FROM_VAR_UNPACK_DIR ??= "items"
python __anonymous() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split(' '):
if not item:
continue
if item.startswith('/'):
# If not a Yocto URL, must be an absolute path
yocto_url = "file://" + item
else:
# Otherwise assume valid Yocto URL.
# Error case is caught later
yocto_url = item
fetcher = host = path = parm = None
try:
# Attempt to parse a Yocto URL
fetcher,host,path,_,_,parm = bb.fetch.decodeurl(yocto_url)
except:
# Something invalid is in the variable!
raise bb.parse.SkipRecipe(parse_var + \
" contains an invalid entry:\n'" + \
item + "'")
# This var is space seperated list of parameter names,
# with optional default value following an equals sign
# (name=default)
item_params_str = d.getVar('SRC_URI_FROM_VAR_MANIFEST_PARAMS')
# remove directories from path
filename = os.path.basename(path)
if "downloadfilename" in parm:
filename = parm["downloadfilename"]
item_manifest_args = {"filename": filename}
if item_params_str:
# required manifest arguments have been provided
# If no default is given add "=" for map parsing
item_params_list = [ arg + "=" if '=' not in arg
else arg
for arg in item_params_str.split(' ')
]
# Generate key value pairs of argument names and
# default values
item_params_map = dict( (name.strip(), val.strip())
for name, val in (arg.split('=')
for arg in item_params_list)
)
for argname in item_params_map:
# Iterate over required manifest arguments
argvalue = parm.pop(argname, None)
if argvalue:
# a value has been provided for this item
item_manifest_args[argname] = argvalue
else:
# No value provided, process default value
default = item_params_map[argname]
if default:
# A default value is provided
if default == "[basename]":
# use the filename without extension
default = os.path.splitext(filename)[0]
# store default value in dict
item_manifest_args[argname] = default
else:
# No default provided
raise bb.fatal(parse_var + \
" entry is missing a required parameter '" + \
argname + "':\n'" + item + "'")
# Write value to var flags to ensure data structure is preserved
# Each entry of parse_var will have a varflag where the value
# is a dictionary of argument names and values
d.setVarFlags(parse_var, {item: item_manifest_args})
src_uri_entry_suffix = ';'
# HTTP(S) fetcher must provide a checksum
if fetcher.startswith('http') and not \
( 'md5sum' in parm or 'sha256sum' in parm ):
# Ensure http/https fetchers get a checksum
raise bb.parse.SkipRecipe(parse_var + \
" entry is missing a checksum:\n'" + \
item + "'")
# add remaining fetch parameters including checksum
for arg in parm:
src_uri_entry_suffix += ";" + arg + "=" + parm[arg]
# Add default and extra parameters to SRC_URI entry
src_uri_entry_suffix += ';unpack=0;subdir=' + \
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR')
if fetcher == 'file':
# Prevent local fetcher from re-creating dir structure
filedir = os.path.split(path)[0]
if filedir.startswith('/'):
# Path is from the root
d.appendVar('FILESEXTRAPATHS', filedir + ':')
else:
# Path is relative to FILESEXTRAPATHS
d.appendVar('FILESOVERRIDES', ':' + filedir)
# Add filename without path to SRC_URI
d.appendVar('SRC_URI', ' file://' + \
filename + src_uri_entry_suffix)
else:
# Add full entry to SRC_URI
d.appendVar('SRC_URI', ' ' + fetcher + \
"://" + host + path + src_uri_entry_suffix)
}
python generate_manifest() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
target_dir = os.path.join(d.getVar('WORKDIR'),
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR'))
# Write a manifest file containing the parameters so SRC_URI
# doesn't need to be parsed by do_install
with open (target_dir + "/manifest", 'w') as manifest_file:
manifest_args = d.getVarFlags(parse_var)
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split():
manifest_file.write(" ".join(manifest_args[item].values())+"\n")
}
do_unpack[cleandirs] += "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}"
do_unpack[postfuncs] += "generate_manifest"
do_unpack[vardeps] += "${SRC_URI_FROM_VAR_NAME}"
@@ -30,7 +30,7 @@ XENGUEST_IMAGE_ROOT ??= "/dev/xvda1"
# Guest kernel command line arguments
XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw"
# Extra commands to add to xenguest-image when creating the image
# Extra commands to add to xenguest_image when creating the image
XENGUEST_IMAGE_EXTRA_CMD ??= ""
# Kernel binary
@@ -43,14 +43,17 @@ XENGUEST_IMAGE_KERNEL ??= "Image"
# be included in the xenguest image)
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
# set empty partition to be used by xenguest-manager for this image
XENGUEST_IMAGE_DISK_DEVICE ??= ""
#
# XENGUEST_IMAGE_DISK PARTITIONS is used to describe the partitions to setup
# XENGUEST_IMAGE_DISK_PARTITIONS is used to describe the partitions to setup
# and their content.
# It must be set to a space separated list of entries with each entry having
# the format num:sz:fs:[file] where:
# the format num:sz:[fs]:[file] where:
# - num is a partition number
# - sz is the partition size in Gigabit
# - fs is the filesystem to use for the partition
# - sz is the partition size in MB or GB(default), e.g 1000M or 1[G]
# - fs is optional filesystem to use for the partition
# - file is optionally pointing to a file to use as content of the partition
# Please check image_types_xenguest.bbclass for rootfs handling of files
#
@@ -58,10 +61,14 @@ XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0
# and containing the root filesystem produced by Yocto
XENGUEST_IMAGE_DISK_PARTITIONS ??= "1:${XENGUEST_IMAGE_DISK_SIZE}:ext4:rootfs.tar.gz"
# XENGUEST_IMAGE_NETWORK_BRIDGE can be set to 1 to have a network interface
# on the guest connected to host bridged network. This will provide the guest
# with a network interface connected directly to the external network
XENGUEST_IMAGE_NETWORK_BRIDGE ??= "1"
# XENGUEST_IMAGE_NETWORK_TYPE can be set to "bridge", "nat" or "none".
# The "bridge" type will share the physical eth interface from dom0 with the
# domU. This will allow the domU to have access to the external network.
# The "nat" type will setup a virtual network between dom0 and domU and also
# configure and run the kea dhcp4 server on dom0 to serve the domU.
# The "none" type will not affect any networking setting between on dom0 and
# domU.
XENGUEST_IMAGE_NETWORK_TYPE ??= "bridge"
# Sub-directory in wich the guest is created. This is create in deploy as a
# subdirectory and must be coherent between all components using this class so
@@ -76,6 +83,18 @@ XENGUEST_IMAGE_DEPLOY_SUBDIR ?= "xenguest"
# - something in ${WORKDIR} if you need to clone and manipulate an image
XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}"
# These vars are used by image_types_xenguest.bbclass to generate the
# xenguest.env file. In a recipe that inherits this class and extra variables
# that should be included in xenguest.env need to be added to
# XENGUEST_IMAGE_VARS_EXTRA
XENGUEST_IMAGE_VARS ?= "\
MACHINE DISTRO DISTRO_VERSION DISTRO_FEATURES TUNE_FEATURES TARGET_FPU \
IMAGE_FEATURES INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE \
XENGUEST_IMAGE_MEMORY_SIZE XENGUEST_IMAGE_NUM_VCPUS XENGUEST_IMAGE_AUTOBOOT \
XENGUEST_IMAGE_ROOT XENGUEST_IMAGE_CMDLINE XENGUEST_IMAGE_EXTRA_CMD \
XENGUEST_IMAGE_KERNEL XENGUEST_IMAGE_DISK_SIZE XENGUEST_IMAGE_DISK_DEVICE \
XENGUEST_IMAGE_DISK_PARTITIONS XENGUEST_IMAGE_NETWORK_TYPE"
#
# Wrapper to call xenguest-mkimage
# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR
@@ -125,21 +144,27 @@ xenguest_image_create() {
# create disk if needed
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
if [ -z "$disksize" ]; then
disksize="0"
fi
if [ $disksize -gt 0 ]; then
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
case ${disksize:=0} in
0|0M|0G)
;;
*)
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
done
fi
diskdevice="${XENGUEST_IMAGE_DISK_DEVICE}"
if [ -n "$diskdevice" ]; then
call_xenguest_mkimage update --disk-device="${diskdevice}"
fi
;;
esac
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
partnum="$(expr $partnum + 1)"
done
fi
fi
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
@@ -147,14 +172,45 @@ xenguest_image_create() {
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=0
fi
if [ "${XENGUEST_IMAGE_NETWORK_BRIDGE}" = "1" ]; then
call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=1
if [ -n "${XENGUEST_IMAGE_NETWORK_TYPE}" ]; then
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="${XENGUEST_IMAGE_NETWORK_TYPE}"
else
call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=0
call_xenguest_mkimage update --set-param=XENGUEST_NETWORK_TYPE="none"
fi
}
#
XENGUEST_ENV_STAGING_DIR ??= "${STAGING_DIR}/${MACHINE}/xenguestenv"
# Create an intermediary file containing all variables used to by a
# particular recipe that inherits this class
# File will contain the values of all variables listed in:
# XENGUEST_IMAGE_VARS_EXTRA
python do_deploy_xenguestenv () {
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS_EXTRA')
if not xenguest_vars:
return
outdir = d.getVar('XENGUEST_ENV_STAGING_DIR')
# Writes file to tmp/sysroots/${MACHINE}/xenguestenv/ by default
filename = os.path.basename(d.getVar('FILE')) + '.xenguestenv'
with open(os.path.join(outdir, filename), 'w') as envf:
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
# Write value only if set
envf.write('%s="%s"\n' % (var, " ".join(value.split())))
envf.close()
}
# Since the intermediary file is deleted by do_merge_xenguestenv it
# must be re-created every time
do_deploy_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS_EXTRA}"
do_deploy_xenguestenv[dirs] = "${XENGUEST_ENV_STAGING_DIR}"
addtask deploy_xenguestenv before do_populate_sysroot
# Clone the current xenguest from deploy to manipulate it locally
# This is required if you need to change things before packing an image
# To set the local directory where to clone you must set
@@ -168,7 +224,7 @@ xenguest_image_clone() {
fi
if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then
die "xenguest-image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
die "xenguest_image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
fi
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
@@ -4,14 +4,22 @@
# The class is extending deploy function so you recipe must inherit deploy and
# have a do_deploy function (even if it is empty)
# Use standard xenguest-image
inherit xenguest-image
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
# Use standard xenguest_image
inherit xenguest_image
# Add a DTB file for the guest
# Only one file should be added, if this is set multiple times or in several
# recipes, the last recipe setting it will prevail.
XENGUEST_EXTRA_DTB ??= ""
# Add a ramdisk file for the guest
# Only one file should be added, if this is set multiple times or in several
# recipes, the last recipe setting it will prevail.
XENGUEST_EXTRA_RAMDISK ??= ""
# Append something to the guest xen configuration
# All files here will be merged together in the final xen configuration
# This can contain several files or be used in several recipes
@@ -34,6 +42,12 @@ XENGUEST_EXTRA_FILES ??= ""
# dir1/file1 file in the disk content parameters).
XENGUEST_EXTRA_DISK_FILES ??= ""
# Extra vars to be written to xenguest.env
XENGUEST_IMAGE_VARS_EXTRA += "\
XENGUEST_EXTRA_DTB XENGUEST_EXTRA_RAMDISK XENGUEST_EXTRA_XENCONFIG \
XENGUEST_EXTRA_INIT_PRE XENGUEST_EXTRA_INIT XENGUEST_EXTRA_INIT_POST \
XENGUEST_EXTRA_FILES XENGUEST_EXTRA_DISK_FILES"
do_deploy_append() {
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
@@ -44,15 +58,22 @@ do_deploy_append() {
if [ -n "${XENGUEST_EXTRA_DTB}" ]; then
if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then
die "xenguest-image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
die "xenguest_image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
fi
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
fi
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
die "xenguest_image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
fi
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
fi
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
if [ ! -f $f ]; then
die "xenguest-image: Xen config $f does not exist"
die "xenguest_image: Xen config $f does not exist"
fi
call_xenguest_mkimage partial --xen-append=$f
done
@@ -60,21 +81,21 @@ do_deploy_append() {
if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
fi
call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE}
fi
if [ -n "${XENGUEST_EXTRA_INIT}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
fi
call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT}
fi
if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
fi
call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST}
fi
@@ -82,7 +103,7 @@ do_deploy_append() {
if [ -n "${XENGUEST_EXTRA_FILES}" ]; then
for f in ${XENGUEST_EXTRA_FILES}; do
if [ ! -f $f ]; then
die "xenguest-image: Xen file $f does not exist"
die "xenguest_image: Xen file $f does not exist"
fi
call_xenguest_mkimage partial --xen-add-file=$f
done
@@ -91,12 +112,12 @@ do_deploy_append() {
if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then
for f in ${XENGUEST_EXTRA_DISK_FILES}; do
if [ ! -f $f ]; then
die "xenguest-image: Disk file $f does not exist"
die "xenguest_image: Disk file $f does not exist"
fi
call_xenguest_mkimage partial --disk-add-file=$f
done
fi
}
# Need to have xenguest-image tool
# Need to have xenguest_image tool
do_deploy[depends] += "xenguest-base-image:do_deploy"
@@ -9,3 +9,7 @@ IMAGE_FSTYPES += "xenguest"
# xenguest kernel extension to handle initramfs
KERNEL_CLASSES += "kernel-xenguest"
IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'docker', \
' packagegroup-docker-runtime-minimal', \
'', d)}"
@@ -2,8 +2,25 @@
# We need to have xen and ipv4 activated
DISTRO_FEATURES_append = " xen ipv4"
DISTRO_FEATURES_NATIVE_append = " arm-autonomy-host"
# Since meta-virtualization master branch bumped to 4.15+stable we need to
# force the 4.14+stable selection until we validate the new version
PREFERRED_VERSION_xen = "4.14+stable%"
PREFERRED_VERSION_xen-tools = "4.14+stable%"
# Don't include kernels in standard images when building arm-autonomy-host
# If the kernel image is needed in the rootfs the following should be set from
# a bbappend: RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image"
RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= ""
# Require extra machine specific settings from meta-arm-bsp dynamic-layers only
# if meta-arm-bsp is in the bblayers.conf
# Directory for meta-arm-autonomy/dynamic-layers/meta-arm-bsp machine extra settings
ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR = "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/conf/machine"
ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE ?= \
"${ARM_AUTONOMY_ARM_BSP_DYNAMIC_EXTRA_CFGDIR}/arm-autonomy-machine-extra-settings.inc"
require ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-arm-bsp', \
'${ARM_AUTONOMY_MACHINE_EXTRA_REQUIRE}' , \
'', d)}
+8 -3
View File
@@ -9,26 +9,31 @@ BBFILES += " \
BBFILE_COLLECTIONS += "meta-arm-autonomy"
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-autonomy = "6"
BBFILE_PRIORITY_meta-arm-autonomy = "5"
LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
openembedded-layer \
networking-layer \
virtualization-layer \
"
LAYERSERIES_COMPAT_meta-arm-autonomy = "dunfell"
LAYERSERIES_COMPAT_meta-arm-autonomy = "hardknott"
# We don't activate virtualization feature from meta-virtualization as it
# brings in lots of stuff we don't need. We need to disable the sanity check
# otherwise the user will see a warning on each build.
SKIP_META_VIRT_SANITY_CHECK = "1"
ARM_AUTONOMY_LAYERDIR := "${LAYERDIR}"
# Directory of our distro config files
ARM_AUTONOMY_DISTRO_CFGDIR = "${LAYERDIR}/conf/distro/include/"
ARM_AUTONOMY_DISTRO_CFGDIR = "${ARM_AUTONOMY_LAYERDIR}/conf/distro/include/"
# Add class to handle arm-autonomy distro extensions
USER_CLASSES_append = " arm-autonomy-features"
BBFILES_DYNAMIC += " \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
"
# Root directory for the meta-arm-autonomy/dynamic-layers/meta-arm-bsp
ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR = "${ARM_AUTONOMY_LAYERDIR}/dynamic-layers/meta-arm-bsp"
@@ -11,7 +11,7 @@ KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES += "tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
DISTRO_FEATURES += "arm-autonomy-guest"
+5
View File
@@ -0,0 +1,5 @@
# This file will be required by different xenguest recipes to provide
# common variables, which can be configured in local.conf
# Xenguest image file install location
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
@@ -0,0 +1,226 @@
arm-autonomy Multiconfig Build Environment Instructions
==================
This documentation explains how to simplify the process of building hosts
and guests in a single bitbake command, rather than in seperate build
folders. You can read more about multiconfig in the bitbake documentation:
- [bitbake user manual](https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html)
To achieve a multiconfig build, a number of different config files need to
be created in a single build directory.
Create a new project
----------------
Before you start, you will need to follow the instructions in
"Create a project" from the quickstart guide, to create a new project
directory with
```
oe-init-build-env my-mc-project
```
Ensure it has all the required layers in bblayers.conf as listed in
`arm-autonomy-quickstart.md`. The result should be a directory containing:
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
```
Add multiconfig
----------------
The steps required to make the project build both the host and any
number of guests as required are:
1. Create a new directory under `conf/` named `multiconfig/`
2. Create two new files in this directory:
`multiconfig/host.conf`
`multiconfig/guest.conf`
These files will contain any configurations that are specific to either the
host or the guest. The resulting directory tree should be:
```
-- conf
| -- bblayers.conf
| -- local.conf
| -- templateconf.cfg
| -- multiconfig
| -- host.conf
| -- guest.conf
```
3. In `local.conf` the following config variables must be added:
```
MACHINE ?= "fvp-base"
# ---Guest Config Start--- #
MC_GUEST = "guest"
MC_GUEST_NAME = "guest1"
MC_GUEST_IMAGERECIPE = "core-image-minimal"
MC_GUEST_MACHINE = "arm64-autonomy-guest"
MC_GUEST_INITRAMFS_IMAGE_BUNDLE ?= ""
MC_GUEST_INITRAMFS_IMAGE ?= ""
# Uncomment for initramfs
#MC_GUEST_INITRAMFS_IMAGE_BUNDLE = "1"
#MC_GUEST_INITRAMFS_IMAGE = "${MC_GUEST_IMAGERECIPE}"
# These variables are set automatically, don't override them!
MC_GUEST_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}' }"
MC_GUEST_FILENAME = "${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.xenguest"
MC_GUEST_DEP = "${@ 'virtual/kernel:do_deploy' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_IMAGERECIPE}:do_merge_xenguestenv'}"
MC_DOIMAGE_MCDEPENDS += "mc:${MC_HOST}:${MC_GUEST}:${MC_GUEST_DEP} "
BBMULTICONFIG += "${MC_GUEST} "
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS += "file://${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME};guestname=${MC_GUEST_NAME} "
# ---Guest Config End--- #
# ---Host Config Start--- #
MC_HOST = "host"
BBMULTICONFIG += "${MC_HOST} "
# ---Host Config End--- #
```
These variables will be used in both of the multiconf files. `MC_HOST` and
`MC_GUEST` should not be altered without renaming the conf files, but most
`MC_GUEST_*` variables can be customised if you desire.
4. Next set the contents of `multiconfig/guest.conf`:
```
TMPDIR = "${TOPDIR}/${MC_GUEST}"
MACHINE = "${MC_GUEST_MACHINE}"
DISTRO_FEATURES += " arm-autonomy-guest"
INITRAMFS_IMAGE_BUNDLE = "${MC_GUEST_INITRAMFS_IMAGE_BUNDLE}"
INITRAMFS_IMAGE = "${MC_GUEST_INITRAMFS_IMAGE}"
IMAGE_FSTYPES += "${@ 'cpio' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) else ''}"
# ANY OTHER GUEST CONFIG
```
To modify the MACHINE or INITRAMFS variables change the equivalent
config in local.conf rather than modifying this file directly. You can also
append any other config desired for the guest after "ANY OTHER GUEST CONFIG",
for example `XENGUEST_IMAGE_DISK_SIZE`.
Make sure not to change `${DEPLOY_DIR_IMAGE}` to anything other than
`${TMPDIR}/deploy/images`, as this is assumed by local.conf.
5. Lastly set the contents of `multiconfig/host.conf`:
```
TMPDIR = "${TOPDIR}/${MC_HOST}"
DISTRO_FEATURES += " arm-autonomy-host"
# ANY OTHER HOST CONFIG
```
Building the image
----------------
To build the multiconfig image the command is:
```
bitbake mc:host:arm-autonomy-host-image-minimal
```
The first time this is run you may see a warning related to the SRC_URI:
```
Unable to get checksum for xenguest-extern-guests SRC_URI entry foo.xenguest: file could not be found
```
This is expected, and only indicates that the guest image has not yet been
generated when the host parses the SRC_URI. By the time it is needed by the
host recipe fetch task it will be present.
During the build you should see that guest tasks are also being executed in
parallel. Once the build completes the guest will already be in the rootfs of
the host thanks to `ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST`
The final host image including the guests will be deployed in
`host/deploy/images/`
Multiple Guests
----------------
To have multiple guests with the same config the line which appends to
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS` just needs to pass the argument
'guestcount=#' to install symlink copies of the xenguest file on the host.
Documentation for the guestcount parameter can be found in
documentation/arm-autonomy-quickstart.md in the section titled
'Include guests directly in the host image'. This will ensure that the guest
is still only built once, despite resulting in multiple copies on the target.
If guests are required to have different configurations, each will need its own
config file, e.g. 'netguest.conf'. Ensure that the name of the conf file does
not contain any hyphens, as this will create errors when it becomes part of a
function name. In this file the values of TMPDIR, MACHINE, DISTRO_FEATURES etc.
should be the same as above, but with the prefix "MC_GUEST_*" modified to
something different to avoid collisions (e.g. MC_GUEST_2_*).
As before, your additional config for the guest type should
follow "ANY OTHER GUEST CONFIG"
In your local.conf, everything between `---Guest Config Start---` and
`---Guest Config End---` will need to be duplicated for each desired guest type.
All copies of variables that start `MC_GUEST` must be modified with the same
prefix as in the new guest config file (e.g. `MC_GUEST_2_*`).
Each chunk of guest config in local.conf has automatic guest variables
(found after the line "These variables are set automatically...").
These should all use the same prefix as their chunk in their values,
for example:
```
MC_GUEST_2_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_2_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_2_IMAGERECIPE}' }"
```
Guest with provisioned disk
----------------
To add guest rootfs partition to host wic image,
set `AUTONOMY_HOST_EXTRA_PARTITION` with proper wks partition entry, e.g:
```
AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy --fstype=ext4 --ondisk sda --align 1024 \
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
```
inside your host.conf file.
The rest of the configuration has to be appended to guest.conf file:
```
# ANY OTHER GUEST CONFIG
XENGUEST_IMAGE_DISK_SIZE = "0"
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
XENGUEST_IMAGE_ROOT = "/dev/xvda"
IMAGE_ROOTFS_SIZE = "102400"
IMAGE_FSTYPES = "ext4"
```
Example content of rootdisk.cfg:
```
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
```
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
according to wks file.
@@ -1,9 +1,9 @@
arm-autonomy Quick Start
==================
This documentation is explaining how to quickly start with arm-autonomy layer
This documentation explains how to quickly start with the arm-autonomy layer,
and the main features provided.
You will find in the documentation directory some more detailed documentation
In the documentation directory you will find some more detailed documentation
for each of the functionalites provided by this layer.
What to use this layer for?
@@ -29,7 +29,7 @@ First you must download the Yocto layers needed:
- all other layers you might want to use
For each of the downloaded layer make sure you checkout the release of Yocto
you want to use (for example zeus using `git checkout zeus`).
you want to use (for example hardknott using `git checkout hardknott`).
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
in order to have the required dependencies.
@@ -56,8 +56,8 @@ Here are the main steps to create an arm-autonomy project:
bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \
$LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \
$LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \
$LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-bsp
$LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-toolchain \
$LAYERDIR_BASE/meta-arm/meta-arm-bsp $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \
```
Example of a `conf/bblayers.conf`:
@@ -71,12 +71,16 @@ Here are the main steps to create an arm-autonomy project:
/home/user/arm-autonomy/meta-openembedded/meta-filesystems \
/home/user/arm-autonomy/meta-openembedded/meta-networking \
/home/user/arm-autonomy/meta-virtualization \
/home/user/arm-autonomy/meta-arm/meta-arm-autonomy \
/home/user/arm-autonomy/meta-arm/meta-arm \
/home/user/arm-autonomy/meta-arm/meta-arm-toolchain \
/home/user/arm-autonomy/meta-arm/meta-arm-bsp \
/home/user/arm-autonomy/meta-arm/meta-arm-autonomy \
"
```
Be aware that changing the order may break some dependencies if editing the
config file manually.
Those steps will have to be done for each project you will have to create.
Host project
@@ -106,7 +110,8 @@ The project will generate a Linux kernel, a root filesystem, a Xen binary and
a DTB modified to include the required entries to boot Xen and Linux as Dom0
(this DTB has the extension `-xen.dtb`).
To boot the system using an u-boot base board you will need to:
To boot the system using a u-boot base board for machines other than FVP-Base
you will need to:
- Load the kernel (by default at 0x80080000 unless you modify
XEN_DEVICETREE_DOM0_ADDR value)
- Load the xen device tree (for example at 0x83000000)
@@ -115,46 +120,88 @@ To boot the system using an u-boot base board you will need to:
In this example the addresses might need to be adapted depending on your board.
For arm-autonomy host on FVP-Base, u-boot has been modified such that
`booti 0x84000000 - 0x83000000` is the default boot command. If FVP-Base is your
MACHINE target there should be no need to interfere with u-boot.
Guest project
-------------
The guest projects are not target specific and will use a Yocto MACHINE defined
in meta-arm-autonomy to include only the Linux configuration required to run
a xen guest.
The guest projects are not target specific and will instead use a Yocto MACHINE
defined in meta-arm-autonomy to include only the Linux configuration required to
run a xen guest.
To create a guest project:
1. Follow the steps of "Create a project"
2. Optionaly add layers required to build the image and features you need.
2. Optionally add layers required to build the guest image, and any features you
need.
3. edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
3. Edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
set MACHINE to `arm64-autonomy-guest`:
```
MACHINE = "arm64-autonomy-guest"
DISTRO_FEATURES += "arm-autonomy-guest"
```
4. build the image you want.
4. Build the image you want.
For example `bitbake core-image-minimal`
The build will create a ".xenguest" image that can be use on an host project
with the xenguest-manager.
with the xenguest-manager, as well as a file "xenguest.env" containing the
variables used to configure and generate the guest image.
The guest can also be built as a 'multiconfig' sub project of the host, see
`meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md` for more
information
Include guests directly in the host image
-----------------------------------------
The layer provides a way to directly include in the host project one or several
images generated by guest projects.
The layer provides a way to directly include one or more images generated by
guest projects in the host project.
To use this feature, you must edit your host project `local.conf` file and
add set ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS to the list of xenguest images
you want to include in your host. Each xenguest image must be given using a
full path to it.
add set the value of 'ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS' to the list of
paths to xenguest images you want to include in your host.
There are 4 supported formats for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS
entries:
- http/https url
- "https://[url]:[port]/foo.xenguest;md5sum=..."
- file:// absolute local path from root
- "file:///xenguests/bar.xenguest"
- file:// path relative to FILESEXTRAPATHS
- "file://relative/baz.xenguest"
- plain absolute local path from root
- "/xenguests/absolute/xyzzy.xenguest"
It is not recommended to use other bitbake URL types, as they may result in
undefined behaviour.
A semicolon seperated list of install arguments can follow each image path:
- guestname : the name that will be attached when the image is imported
(default: [filename, without extension])
- guestcount : the number of copies of the guest to install, with
incrementing numbers appended to the name
(default: 1)
Any other arguments, for example an md5sum, will be assumed to be fetch
arguments, and will be appended to the path in the SRC_URI.
For example:
```
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "/home/user/guest-project/tmp/deploy/images/arm64-autonomy-guest/core-image-minimal-arm64-autonomy-guest.xenguest;guestname=myguest"
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "\
https://[url]:[port]/base.xenguest;md5sum=[checksum];guestname=http \
file:///guests/base.xenguest;guestname=file_abs \
file://foo/base.xenguest;guestname=file_rel;guestcount=2 \
/guests/foo/bar/base.xenguest;guestname=no_fetcher \ "
```
This will add the guest and name it `myguest` on the host project image and
the xenguest-manager will automatically boot it during startup.
Documentation for setting up a multiconfig build can be found in:
meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
Add support for your board
--------------------------
@@ -175,7 +222,7 @@ started). You can find the complete list of the kernel configuration elements
required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`.
### Define the drive and partition to use for the LVM volume
The xenguest-manager is creating disk hard drive using LVM on an empty
The xenguest-manager creates guest storage drives using LVM on an empty
partition. The default value is set to use /dev/sda2.
You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE.
@@ -184,37 +231,37 @@ Check `recipes-extended/xenguest/xenguest-manager.bbappend` for examples.
Please also read xenguest-manager.md.
### Define the interface to add to xenguest network bridge
xenguest-network bridge is creating a bridge on the host and adds network
interfaces to it so that guest connected to it have access to external network.
xenguest-network bridge creates a bridge on the host and adds network
interfaces to it so that guests connected to it have access to external network.
By default `eth0` is set as the list of interfaces to be added to the bridge.
Depending on your board or use case you might want to use an other interface
or use multiple interfaces.
You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS.
Check `recipes-extended/xenguest/xenguest-network-bridge.bbappend` for
Check `recipes-extended/xenguest/xenguest-network.bbappend` for
exmaples.
Please also read xenguest-network-bridge.md.
### Define the network configuration of the xenguest network bridge
xenguest network bridge is putting the host network interfaces in a bridge
and is configuring it by default to use dhcp.
xenguest-network puts the host network interfaces in a bridge and configures it
by default to use dhcp.
If you need a different type of configuration you can set
XENGUEST_NETWORK_BRIDGE_CONFIG in a xenguest-network-bridge.bbappend to use
XENGUEST_NETWORK_BRIDGE_CONFIG in your xenguest-network-bridge.bbappend to use
a different file.
The recipe will look for the file in ${WORKDIR} so you will need to add it to
SRC_URI in your bbappend.
The recipe will look for the file in ${WORKDIR}, so you will need to add it to
the SRC_URI in your bbappend.
The recipe will also substitute `###BRIDGE_NAME###` with the bridge name
configured in ${XENGUEST_NETWORK_BRIDGE_NAME}.
configured in ${XENGUEST_NETWORK_BRIDGE_NAME} when the config file is installed.
You can find an example configuration file in
`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`.
Please also read xenguest-network-bridge.md.
Please also read xenguest-network.md.
### Customize Dom0 and Xen boot arguments for you board
xen-devicetree is writting inside the generated DTB Xen and Linux boot
arguments as long as the address where Dom0 Linux kernel can be found.
xen-devicetree modifies the generated DTB Xen and Linux boot arguments,
as long as the address where Dom0 Linux kernel can be found.
You might need to have different values for your board or depending on your
use case.
@@ -0,0 +1,34 @@
Customizing Arm Autonomy Host image layout for N1SDP
====================================================
When buiding with `DISTRO_FEATURES += "arm-autonomy-host"` the user can
perform a couple of customizations in the generated wic image:
1. Set the guest partition size (default: 4iG) via `GUEST_PART_SIZE` and
`GUEST_PART_SIZE_UNIT` (M or G) variables to be set in any conf file. The
value of these variables should 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.
2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
`BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
bootimg is ~44M so 100M leaves just over 50M of free space.
3. The wic image partition layout and contents with a custom wks file via
`ARM_AUTONOMY_WKS_FILE` variable (default:
arm-autonomy-n1sdp-efidisk.wks.in which is affected by GUEST_PART_SIZE,
GUEST_PART_SIZE_UNIT, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
GRUB_CFG_FILE variables).
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
arm-autonomy-n1sdp-grub.cfg) variable to be set in any conf file. The full
path or relative to `ARM_AUTONOMY_WKS_FILE` should be set.
The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
Other variables can also be customized to set what files need to be included
in the wic image boot partition. Please refer to
`meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
for more details.
@@ -56,7 +56,8 @@ The following parameters are available:
the xen devicetrees are properly regenerated if the source DTBs are changed.
This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
generated during the compilation of the Linux kernel. This must be changed
if the machine your are using is not using a DTB listed in KERNEL_DEVICETREE.
if the machine you are using is not using a DTB listed in
KERNEL_DEVICETREE.
- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
modified by xen-devicetree. Those must be files that xen-devicetree can find
@@ -70,7 +71,10 @@ The following parameters are available:
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
dom0 is defined using Xen boot arguments.
This variable is set by default to "1024M".
This variable is set by default to "1024M,max:1024", and cannot be empty.
The value can simply specify a size, e.g. "1024M", but best practice is to
also provide a max, documented here:
https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
booting it.
@@ -84,7 +88,8 @@ The following parameters are available:
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
be used for Dom0 will be copied. When using u-boot, this is the address at
which you will load the kernel Image before starting Xen.
This variable is set by default to "0x80080000".
This variable is set by default to "0x80080000", and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
@@ -92,7 +97,8 @@ The following parameters are available:
size but can be bigger. You must be careful not to have a value too big as it
could slow down boot or copy other parts with it (like the DTB).
You might need to increase this if you use a kernel with a bundled initramfs.
This variable is set by default to "0x01000000".
This variable is set by default to "0x01000000" and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
must be included inside the generated DTB file. By default the only one
@@ -7,7 +7,7 @@ Introduction
xenguest-manager is a tool to manage Xenguest images generated by
[xenguest-mkimage](xenguest-mkimage.md).
On a Xen Dom0 system it will:
On a Xen Dom0 system it can:
- create a xen guest from a xenguest image: extract its components, create a
disk for the guest using LVM volumes.
- start/stop a xen guest (during init or using xenguest-manager directly).
@@ -23,7 +23,7 @@ Usage
-----
xenguest-manager must be called like this:
`xenguest-manager OPERATION [OPTIONS]`
`xenguest-manager [-v(v)] OPERATION [OPTIONS]`
The following operations are available:
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
@@ -37,6 +37,9 @@ The following operations are available:
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
not given, print the status of all guests.
Passing -v or -vv will increase the logging written to the logfile.
The terminal will always show only error messages, regardless of the logfile.
For a detailed help on available options please use:
`xenguest-manager --help`
@@ -45,19 +48,20 @@ Bitbake parameters
Several parameters are available to configure the xenguest manager during Yocto
project compilation (those can be set in your project local.conf, for example).
This config will be written to a file xenguest-manager.conf in /etc/xenguest/.
The following parameters are available:
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the
xenguest-manager on the device to create LVM disks when guests have a disk
configuration.
This is set by default to "/dev/sda2".
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the
xenguest-manager will create and use to create guest LVM disks.
This is set by default to "vg-xen".
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the
xenguest-manager will look for xenguest images to create during init. That's
the place where xenguest images can be added to have them automatically
created during next Dom0 boot. The xenguests found there will only be created
@@ -65,3 +69,76 @@ The following parameters are available:
name).
This is set by default to "/usr/share/guests".
- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager.
Must be one of ERROR, INFO, VERBOSE (default: ERROR). The logs will be
written to /var/log/xenguest.
If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
will override the setting in xenguest-manager.conf
Since /var/log is by default a volatile location, extra configuration is
required if logs are desired to be kept between reboots:
VOLATILE_LOG_DIR="no"
Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
When this is enabled, logrotate will monitor the file to ensure it does not
grow excessively large. See recipes-extended/xenguest/files/logrotate-xenguest
Init scripts
------------
Shell scripts can be executed on the host when a guest is started. Depending on
when the script should be executed it should be installed in a different
directory on the target:
- /etc/xenguest/init.pre : Executed first, prior to guest creation
- /etc/xenguest/init.d : Executed after guest creation, but before it is started
- /etc/xenguest/init.post : Executed after starting the guest
Inside the directory, scripts will be executed in alphabetical order.
Since these scripts are sourced by xenguest-manager, they can acccess functions
and variables from the parent file's scope, including:
- ${guestname} : The name of the guest being created
- ${guestdir} : The path to the guest directory
- ${guestcfgfile} : The name of the config file for the starting guest
- log() : Used to write a log to the logfile, default level INFO.
Takes an optional log level and a message body
e.g. log ERROR "blah"
Options for log level: ERROR, INFO, VERBOSE,
and FATAL which will call exit 1 immediately after logging
the message at level ERROR.
- log_command() : Used to call a shell command and log that it has been
called, as well as capturing both stdout and stderr.
By default the command output is dumped to the logfile as an
error if the command returns a status > 0, or as a verbose
message if the whole script is running in verbose mode.
An optional log level can be passed to alter the level the
log should be if the command returns a status >0, which may
be useful if the command is expected to return a non-zero
result.
e.g. log_command INFO "ls -lh ~"
Options for log level: ERROR, INFO, and VERBOSE
Attempting to call any other functions from xenguest_manager in an init script
may result in a fatal error, from which cleanup is not guarenteed.
Init scripts also have access to config variables defined in params.cfg.
An example of how to create the directory and install an init shell script can
be found in:
recipes-extended/xenguest/xenguest-network.bb
Where network-bridge.sh is installed from network-bridge.sh.in
@@ -4,9 +4,9 @@ Xenguest mkimage
Introduction
------------
xenguest-mkimage is a tool to create and modify images to be used as Guest with
Xen. It defines a format to store completely defined guests as a file or as
a directory and provides options to create and modify those images.
xenguest-mkimage is a tool to create and modify images to be used as a Guest
with Xen. It defines a format to store completely defined guests as a file or as
a directory, and provides options to create and modify those images.
A xenguest image contains all elements required to create a xen guest.
This is the base elements like a Xen configuration and a Linux kernel binary
@@ -15,8 +15,8 @@ but also some more advanced elements like init scripts or a disk definition.
The format is made to be deployable easily by storing everything in a single
file and provide tools to easily manipulate the images. It can also easily be
extended to have features like encryption or signature of images, updates or
complex configurations by providing features to have init script that will be
executed on the host embedded inside the image.
complex configurations by providing the ability to have init scripts embedded
inside the image that will be executed on the host when the guest is started.
Xenguest images content
-----------------------
@@ -35,7 +35,7 @@ before starting the guest.
### files
This directory contains files that can be used by the xen configuration, for
example the binary of the kernel referenced in xen configuration).
example the kernel image referenced in xen configuration.
This is where the kernel binary, the dtb or a ramdisk will be stored.
### init.pre, init.d and init.post
@@ -47,7 +47,7 @@ contains scripts called at a different time:
generate part of the xen configuration dynamically.
- init.d: scripts executed when the guest has been created but before it is
started. This can be used to do some xenstore operations or configure the
guest behaviour using xl, for example.
guest behaviour, using xl for example.
- init.post: scripts executed just after starting the guest. This can be
used to configure things created by xen for the guest like network
network interfaces.
@@ -58,12 +58,19 @@ order.
### disk.cfg and disk-files
disk.cfg contains the guest disk description (disk size and disk partitions).
The file contains the following entries:
- `DISK_SIZE=X`: size of the disk to create in GB
- `DISK_SIZE=X`: size of the disk to create in MB or GB(default),
e.g. 1000M or 4[G]
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
size of SIZE GB, format it with filesystem FS (can be ext2, ext3, ext4, vfat
or swap) and extract CONTENT as initial partition content
(.tar[.gz|.xz|.bz2] file or img[.gz|.bz2] file to be dumped in the partition). FS and
CONTENT can be empty.
size of SIZE MB or GB(default), e.g 1000M or 2[G].
Format it with filesystem FS (can be ext2, ext3, ext4, vfat or swap)
and extract CONTENT as initial partition content (.tar[.gz|.xz|.bz2] file
or img[.gz|.bz2] file to be dumped in the partition).
FS and CONTENT can be empty.
- `DISK_DEVICE=X`: disk or partition to be used by lvm. Setting this option
allows to bind guest disk with any partition or disk available on host,
e.g. /dev/sda3 or /dev/sdb.
This variable is not set by default, but if set, it overrides disk settings
inside xenguest-manager.conf - 'XENGUEST_VOLUME_DEVICE'.
The disk-files contain files to be used for initializing the disk partitions
content. Those should be used to create a LVM or a physical disk and initialize
@@ -99,16 +106,18 @@ For a detailed help on available operations, please use:
times to add several command line options.
- --xen-device-tree=FILE: add dtb FILE as device tree. This both adding the
file to the image and modifying the xen configuration to use it.
- --xen-ramdisk=FILE: add ramdisk FILE as guest ramdisk. This both adding the
file to the image and modifying the xen configuration to use it.
- --init-script=FILE: add guest init script. The script is embedded inside the
image file. Several script can be added and the basename of FILE is used to
distinguish them (calling the option twice with the same file will update the
script in the image with the second one).
--disk-size=SIZE: set the guest disk size to SIZE in GB. Calling this with 0
disable the guest disk.
--disk-size=SIZE: set the guest disk size to SIZE in MB or GB(default),
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
xenguest image disk. The partition is described with the arguments:
- NUM: partition number.
- SIZE: partition size in GB.
- SIZE: partition size in MB or GB(default), e.g 1000M or 2[G].
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
vfat of swap. If empty the partition is not formated.
- CONTENT: tar of img file to use to initialize the partition. The file must
@@ -1,49 +0,0 @@
xenguest network bridge
=======================
Introduction
------------
xenguest-network-bridge is creating a network bridge to allow some guests to
have a direct connection to the external network.
To do this, a bridge is created on the host using brctl with the network
interfaces added to it so that the bridge is connected to the external network.
It is also adding a guest init script which will, for guests configured to use
it, create a virtual network interface for the guest and connect it to the
network bridge on the host.
Usage
-----
On the host the package xenguest-network-bridge must be included in your image.
On the xenguest image of your guest, the parameter NETWORK_BRIDGE must be set
to 1 (using xenguest-mkimage --set-param=NETWORK_BRIDGE=1).
Bitbake parameters
------------------
Several parameters are available to configure the xenguest network bridge
during Yocto project compilation (those can be set in your project local.conf,
for example).
The following parameters are available:
- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network
bridge that is created on the host during init.
This is set by default to "xenbr0".
- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of network
interfaces that are added to the bridge when it is created on the host during
init.
This is set by default to "eth0".
- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file
to use to configure the bridge network. By default it points to have file
configuring the network using dhcp.
You can provide a different file using a bbappend and make this variable
point to it if you want to customize your network configuration.
- XENGUEST_IMAGE_NETWORK_BRIDGE: This variable can be set to 0 or 1 on guest
projects to enable or not the connection of the guest to the host bridge.
This is set by default to "1".
@@ -0,0 +1,80 @@
Xenguest Network
================
Introduction
------------
The xenguest-network package is primarly creating a network bridge to share
the host eth physical interfaces with the guests virtual interfaces (vif).
This way the guests can have access to the external network.
At the moment 3 types of network arrangements are provided:
- Bridge: where the guest vif is added to the created bridge interface;
- NAT: where a private subnet is created for the guest,
a kea dhcp4 server is started on the host to serve the guest
and the proper iptables rules are created
to allow the guest to access the external network;
- None: the guest vif is not connected to the bridge.
Usage
-----
On the host project the package xenguest-network must be included in your
image, and on the guest project the XENGUEST_NETWORK_TYPE needs to be set to
"bridge", "nat" or "none".
Bitbake parameters
------------------
Several parameters are available to configure the xenguest network bridge
during Yocto project compilation (those can be set in your project local.conf
or xenguest-network.bbappend, for example).
The following parameters are available:
- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network
bridge that is created on the host during init.
This is set by default to "xenbr0".
- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of the
physical network interfaces that are added to the bridge when it is created
on the host during init.
By default no physical interfaces are added.
- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file
to use to configure the bridge network. By default it points to have file
configuring the network using dhcp.
You can provide a different file using a bbappend and make this variable
point to it if you want to customize your network configuration.
- XENGUEST_IMAGE_NETWORK_TYPE: This variable can be set to "bridge" (default),
"nat" or "none".
The **bridge** type will add the domU vif interface to a bridge which also
contains the dom0 physical interface giving the guest direct access to the
external network.
The **nat** type will setup a private network between dom0 and domU, setup
the appropriate routing table, configure and run the kea dhcp4 server
on dom0 to serve the domU and apply the iptables rules to allow the guest
to acess the external network. The kea dhcp4 server configuration for
the guest can be customised by replacing the
"meta-arm-autonomy/recipes-extended/xenguest/files/kea-subnet4.json" file
in a xenguest-network.bbappend. The kea-subnet4.json file is installed in
the xenguest image and copied to
"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json" when the guest
image is created. It will be consumed by the
"/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" script which is called by
"/etc/xen/scripts/vif-nat" script when starting/stopping the xenguest.
After guest start, "/etc/xenguest/init.post/xenguest-network-init-post.sh"
script is called to reload kea dhcp4 server with updated configuration,
after virtual network interface is ready.
In the guest project, the NAT port forward can be customised by changing
the XENGUEST_IMAGE_HOST_PORT (default: "1000 + ${domid}") and
XENGUEST_IMAGE_GUEST_PORT (default: "22") variables in local.conf or
xenguest-base-image.bbappend. This configuration is implemented and installed
in "/etc/xenguest/guests/${guestname}/files/00-xenguest-nat-port-forward.hook"
script which is called by "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook".
The **none** type will not affect any networking setting between on dom0 and
domU.
@@ -0,0 +1,7 @@
# Require extra machine specific settings
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE ?= ""
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_n1sdp = "n1sdp-extra-settings.inc"
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_fvp-base = "fvp-base-extra-settings.inc"
ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE_juno = "juno-extra-settings.inc"
require ${ARM_BSP_DYN_MACHINE_EXTRA_REQUIRE}
@@ -0,0 +1,39 @@
# Extra machine settings for fvp-base
# FVP uses vda as hard drive and partition 2 is the
# 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
@@ -0,0 +1,26 @@
# Extra machine settings for juno
KERNEL_ALT_IMAGETYPE = "Image.lzma"
# Juno board has 2 network interfaces, add both of them to the bridge
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0 eth1"
XEN_DEVICETREE_DOM0_SIZE ?= "0x02400000"
# 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-juno-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)}"
# 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"
# set wic image type only if INITRAMFS_IMAGE_BUNDLE is not set
IMAGE_FSTYPES += "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'wic wic.gz wic.bmap', d)}"
@@ -0,0 +1,90 @@
# Extra machine settings for n1sdp
# We need to extent 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-n1sdp-efidisk.wks.in"
WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
# 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"
# Set default boot partition size and unit
BOOT_PART_SIZE ?= "100"
BOOT_PART_SIZE_UNIT ?= "M"
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
#
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel.
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
, d)}"
# From arm-autonomy-n1sdp-efidisk.wks.in, the /boot partition is /dev/sda1, and
# the "/" partition is /dev/sda2.
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda3"
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
# The XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables aftect the
# xen-devicetree.bb recipe
XEN_DEVICETREE_DEPEND = "virtual/trusted-firmware-a:do_deploy"
XEN_DEVICETREE_DTBS ?= "n1sdp-single-chip.dtb"
# XEN_MOD_DEVICETREE_DTBS are the generated devicetrees for Xen. By default the
# xen-devicetree.bb recipe adds '-xen' suffix to it
XEN_MOD_DEVICETREE_DTBS ?= "n1sdp-single-chip-xen.dtb"
# When generating the wic image we need to have the xen deployed
do_image_wic[depends] += "xen:do_deploy"
# Select the extra files to be included in the boot partition
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
# When alternate-kernel DISTRO_FEATURE is present we set the linux-yocto-rt
# by default
PREFERRED_PROVIDER_alternate/kernel ?= "\
${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \
'linux-yocto-rt', '', d)}"
KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt"
# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by
# default
KERNEL_PACKAGE_NAME_pn-linux-yocto-rt = "\
${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \
else 'kernel' }"
# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image
KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt"
# Only include the Kernel PREEMPT_RT Image if we are building with
# alternate-kernel DISTRO_FEATURE
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
EFIDIR ?= "/EFI/BOOT"
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel and also includes
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
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"
@@ -1,21 +1,50 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ...
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ':autonomy-host', '', d)}"
FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:"
FILESEXTRAPATHS_prepend_autonomy-host := "${THISDIR}/${PN}:"
DEPENDS_append_autonomy-host = " dos2unix-native"
SRC_URI_append_autonomy-host = " file://add-xen-support.patch;patchdir=../"
do_install_append_autonomy-host() {
mv -v ${D}/${UNPACK_DIR}/SOFTWARE/uEnv.txt \
${D}/${UNPACK_DIR}/SOFTWARE/uenvfile
for dir in $(ls ${D}/${UNPACK_DIR}/SITE1/)
do
unix2dos ${D}/${UNPACK_DIR}/SITE1/${dir}/images.txt
done
}
DEPLOY_EXTRA_DEPS ??= ""
DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy"
DEPLOY_EXTRA_DEPS_autonomy-host = "xen:do_deploy xen-devicetree:do_deploy"
do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}"
do_deploy_prepend_xen() {
do_deploy_prepend_autonomy-host() {
# To avoid dependency loop between firmware-image-juno:do_install,
# xen:do_deploy and xen-devicetree:do_deploy when
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
# xen-devicetree binaries copying in the do_deploy task.
cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
${D}/${UNPACK_DIR}/SOFTWARE/xen
cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \
${D}/${UNPACK_DIR}/SOFTWARE/
mkdir -p ${D}/${UNPACK_DIR}/SOFTWARE/XEN
cp -v ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/xen
for dtb in $(basename -s .dtb ${KERNEL_DEVICETREE})
do
cp -v ${DEPLOY_DIR_IMAGE}/${dtb}-xen.dtb \
${D}/${UNPACK_DIR}/SOFTWARE/XEN/${dtb}.dtb
done
bbnote "Xen binaries added under SOFTWARE/XEN directory"
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" -a "${KERNEL_ALT_IMAGETYPE}" = "Image.lzma" ]; then
# KERNEL_ALT_IMAGETYPE is expected to be Image.lzma,
# however NOR flash filesystem is DOS compatible with 8.3 naming,
# so we need to replace ".lzma" with ".lzm"
cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_ALT_IMAGETYPE} \
${D}/${UNPACK_DIR}/SOFTWARE/Image.lzm
fi
}
@@ -0,0 +1,173 @@
arm-bsp/firmware-image-juno: add xen support
This patch adds xen and dtbs binaries entries to images-r[012].txt files.
These images-r[012].txt files contain NOR filesystem entries details,
like file offset, name, path etc.
It also adds customization for uEnv.txt file, that allows to autoboot xen.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
diff -u a/images-r0.txt b/images-r0.txt
--- a/images-r0.txt 2020-11-25 20:25:38.677687712 +0100
+++ b/images-r0.txt 2020-11-25 20:36:55.482194294 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r1.txt b/images-r1.txt
--- a/images-r1.txt 2020-11-25 20:40:19.005177152 +0100
+++ b/images-r1.txt 2020-11-25 20:41:17.500886263 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r1.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/images-r2.txt b/images-r2.txt
--- a/images-r2.txt 2020-11-25 20:40:30.625119321 +0100
+++ b/images-r2.txt 2020-11-25 20:41:30.720820597 +0100
@@ -1,7 +1,7 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
-TOTALIMAGES: 10 ;Number of Images (Max: 32)
+TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
@@ -17,14 +17,14 @@
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
-NOR2FILE: \SOFTWARE\Image ;Image File Name
-NOR2NAME: norkern ;Rename kernel to norkern
+NOR2FILE: \SOFTWARE\Image.lzm ;Image File Name
+NOR2NAME: norkern.lzm ;Rename kernel to norkern.lzm
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02900000 ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name
+NOR3FILE: \SOFTWARE\XEN\juno-r2.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
@@ -64,8 +64,13 @@
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02A80000 ;Image Flash Address
NOR9NAME: uEnv.txt
-NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
+NOR9FILE: \SOFTWARE\uenvfile ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
-
+NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
+NOR10ADDRESS: 0x03000000 ;Image Flash Address
+NOR10FILE: \SOFTWARE\XEN\xen ;Image File Name
+NOR10NAME: xen
+NOR10LOAD: 00000000 ;Image Load Address
+NOR10ENTRY: 00000000 ;Image Entry Point
diff -u a/uEnv.txt b/uEnv.txt
--- a/uEnv.txt 2020-11-20 13:48:31.845078690 +0100
+++ b/uEnv.txt 2020-11-25 20:30:00.572306675 +0100
@@ -1,11 +1,16 @@
+xen_name=xen
+xen_addr=0x84000000
uenvcmd=run mybootcmd
+kernel_alt_name=norkern.lzm
+kernel_comp_addr_r=0x88080000
mybootcmd=echo Loading custom boot command; \
echo Loading kernel; \
afs load ${kernel_name} ${kernel_addr_r} ; \
-if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr_r}; fi; \
+if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_comp_addr_r}; lzmadec ${kernel_comp_addr_r} ${kernel_addr_r}; fi; \
echo Loading device tree; \
afs load ${fdtfile} ${fdt_addr_r}; \
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
afs load ${fdt_alt_name} ${fdt_addr_r}; fi; fdt addr ${fdt_addr_r}; fdt resize; \
-booti ${kernel_addr_r} - ${fdt_addr_r};
-
+echo Loading Xen; \
+afs load ${xen_name} ${xen_addr}; \
+if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr_r}; fi;
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-r1-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,78 +0,0 @@
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 11 ;Number of Images (Max: 32)
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 ;Image Flash Address
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
NOR0LOAD: 00000000 ;Image Load Address
NOR0ENTRY: 00000000 ;Image Entry Point
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
NOR1LOAD: 00000000 ;Image Load Address
NOR1ENTRY: 00000000 ;Image Entry Point
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 ;Image Flash Address
NOR2FILE: \SOFTWARE\Image ;Image File Name
NOR2NAME: norkern ;Rename kernel to norkern
NOR2LOAD: 00000000 ;Image Load Address
NOR2ENTRY: 00000000 ;Image Entry Point
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02700000 ;Image Flash Address
NOR3FILE: \SOFTWARE\juno-r2-xen.dtb ;Image File Name
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
NOR3LOAD: 00000000 ;Image Load Address
NOR3ENTRY: 00000000 ;Image Entry Point
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01D00000 ;Image Flash Address
NOR4FILE: \SOFTWARE\xen ;Image File Name
NOR4NAME: xen
NOR4LOAD: 00000000 ;Image Load Address
NOR4ENTRY: 00000000 ;Image Entry Point
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 ;Image Flash Address
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 ;Image Load Address
NOR5ENTRY: 00000000 ;Image Entry Point
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 ;Image Flash Address
NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
NOR6LOAD: 00000000 ;Image Load Address
NOR6ENTRY: 00000000 ;Image Entry Point
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BF00000 ;Image Flash Address
NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name
NOR7NAME: startup.nsh
NOR7LOAD: 00000000 ;Image Load Address
NOR7ENTRY: 00000000 ;Image Entry Point
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address
NOR8FILE: \SOFTWARE\blank.img ;Image File Name
NOR8NAME: BOOTENV
NOR8LOAD: 00000000 ;Image Load Address
NOR8ENTRY: 00000000 ;Image Entry Point
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x02600000 ;Image Flash Address
NOR9FILE: \SOFTWARE\selftest ;Image File Name
NOR9LOAD: 00000000 ;Image Load Address
NOR9ENTRY: 00000000 ;Image Entry Point
NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
NOR10ADDRESS: 0x02780000 ;Image Flash Address
NOR10NAME: uEnv.txt
NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name
NOR10LOAD: 00000000 ;Image Load Address
NOR10ENTRY: 00000000 ;Image Entry Point
@@ -1,15 +0,0 @@
xen_name=xen
xen_addr=0x84000000
uenvcmd=run mybootcmd
mybootcmd=echo Loading custom boot command; \
echo Loading kernel; \
afs load ${kernel_name} ${kernel_addr} ; \
if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr}; fi; \
echo Loading device tree; \
afs load ${fdtfile} ${fdt_addr}; \
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
afs load ${fdt_alt_name} ${fdt_addr}; fi; fdt addr ${fdt_addr}; fdt resize; \
echo Loading Xen; \
afs load ${xen_name} ${xen_addr}; \
if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr}; fi;
@@ -11,29 +11,31 @@
/delete-node/ pmu;
/delete-node/ spe-pmu;
/*
* disable IOMMU until we have a proper support in xen
*/
/delete-node/ iommu@4f000000;
/delete-node/ iommu@4f400000;
soc {
/*
* disable IOMMU until we have a proper support in xen
*/
/delete-node/ iommu@4f000000;
/delete-node/ iommu@4f400000;
/*
* Set extra registers required for PCI quirks to communicate with SCP
* and remove invalid properties due to removal
*/
pcie@68000000 {
reg = <0 0x68000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x62000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
};
/*
* Set extra registers required for PCI quirks to communicate with SCP
* and remove invalid properties due to removal
*/
pcie@68000000 {
reg = <0 0x68000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x62000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
};
pcie@70000000 {
reg = <0 0x70000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x60000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
pcie@70000000 {
reg = <0 0x70000000 0 0x1200000>,
<0 0x06000000 0 0x80000>,
<0 0x60000000 0 0x80000>;
/delete-property/ msi-map;
/delete-property/ iommu-map;
};
};
};
@@ -9,17 +9,15 @@ XEN_DEVICETREE_DTSI_MERGE_append_juno = " xen-juno.dtsi"
# Add a dtb snippet to remove pmu and iommu in dom0 on N1SDP
SRC_URI_append_n1sdp = " file://xen-n1sdp.dtsi"
XEN_DEVICETREE_DTSI_MERGE_append_n1sdp = " xen-n1sdp.dtsi"
# For N1SDP, the XEN_DEVICETREE_DEPEND and XEN_DEVICETREE_DTBS variables are
# being set in meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
# Board specific configs
XEN_DEVICETREE_DOM0_BOOTARGS_append_juno = " root=/dev/sda1 rootwait"
XEN_DEVICETREE_XEN_BOOTARGS_append_juno = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
XEN_DEVICETREE_DOM0_BOOTARGS_append_n1sdp = " root=/dev/sda1 rootwait"
XEN_DEVICETREE_DOM0_BOOTARGS_append_n1sdp = " root=/dev/sda2 rootwait"
XEN_DEVICETREE_XEN_BOOTARGS_append_n1sdp = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
XEN_DEVICETREE_DOM0_BOOTARGS_append_fvp-base = " root=/dev/vda2"
XEN_DEVICETREE_XEN_BOOTARGS_append_fvp-base = " console=dtuart dtuart=serial0 bootscrub=0"
XEN_DEVICETREE_DOM0_BOOTARGS_append_foundation-armv8 = " root=/dev/vda2"
XEN_DEVICETREE_XEN_BOOTARGS_append_foundation-armv8 = " console=dtuart dtuart=serial0 bootscrub=0"
@@ -1,44 +0,0 @@
From a41feccdb6c03f12bddb4fb650a0465f0ed6eeca Mon Sep 17 00:00:00 2001
From: Lukas Juenger <juenger@ice.rwth-aachen.de>
Date: Fri, 5 Apr 2019 15:54:04 +0200
Subject: [PATCH] xen/arm: Cap the number of interrupt lines for dom0
Dom0 vGIC will use the same number of interrupt lines as the hardware GIC.
While the hardware GIC can support up to 1020 interrupt lines,
the vGIC is only supporting up to 992 interrupt lines.
This means that Xen will not be able to boot on platforms where the hardware
GIC supports more than 992 interrupt lines.
While it would make sense to increase the limits in the vGICs, this is not
trivial because of the design choices.
At the moment, only models seem to report the maximum of interrupt lines.
They also do not have any interrupt wired above the 992 limit.
So it should be fine to cap the number of interrupt lines for dom0 to 992 lines.
Signed-off-by: Lukas Juenger <juenger@ice.rwth-aachen.de>
Acked-by: Julien Grall <julien.grall@arm.com>
---
xen/arch/arm/setup.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 444857a967..ccb0f181ea 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -888,7 +888,13 @@ void __init start_xen(unsigned long boot_phys_offset,
/* Create initial domain 0. */
/* The vGIC for DOM0 is exactly emulating the hardware GIC */
dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
- dom0_cfg.arch.nr_spis = gic_number_lines() - 32;
+ /*
+ * Xen vGIC supports a maximum of 992 interrupt lines.
+ * 32 are substracted to cover local IRQs.
+ */
+ dom0_cfg.arch.nr_spis = min(gic_number_lines(), (unsigned int) 992) - 32;
+ if ( gic_number_lines() > 992 )
+ printk(XENLOG_WARNING "Maximum number of vGIC IRQs exceeded.\n");
dom0_cfg.max_vcpus = dom0_max_vcpus();
dom0 = domain_create(0, &dom0_cfg, true);
--
2.17.1
@@ -0,0 +1,2 @@
CONFIG_DEBUG=y
CONFIG_EARLY_PRINTK_FASTMODEL=y
@@ -1,73 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
# Xen/arm 4.12.0 Configuration
#
CONFIG_64BIT=y
CONFIG_ARM_64=y
CONFIG_ARM=y
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
#
# Architecture Features
#
CONFIG_NR_CPUS=128
CONFIG_GICV3=y
CONFIG_HVM=y
# CONFIG_NEW_VGIC is not set
CONFIG_SBSA_VUART_CONSOLE=y
CONFIG_ARM_SSBD=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
#
# ARM errata workaround via the alternative framework
#
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ALL_PLAT=y
# CONFIG_QEMU is not set
# CONFIG_RCAR3 is not set
# CONFIG_MPSOC is not set
# CONFIG_NO_PLAT is not set
CONFIG_ALL64_PLAT=y
# CONFIG_ALL32_PLAT is not set
CONFIG_MPSOC_PLATFORM=y
#
# Common Features
#
CONFIG_HAS_ALTERNATIVE=y
CONFIG_HAS_DEVICE_TREE=y
CONFIG_MEM_ACCESS=y
CONFIG_HAS_PDX=y
# CONFIG_XSM is not set
CONFIG_SCHED_CREDIT=y
CONFIG_SCHED_CREDIT2=y
CONFIG_SCHED_RTDS=y
# CONFIG_SCHED_ARINC653 is not set
CONFIG_SCHED_NULL=y
CONFIG_SCHED_DEFAULT="credit2"
# CONFIG_LIVEPATCH is not set
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
CONFIG_CMDLINE=""
CONFIG_DOM0_MEM=""
#
# Device Drivers
#
CONFIG_HAS_NS16550=y
CONFIG_HAS_CADENCE_UART=y
CONFIG_HAS_MVEBU=y
CONFIG_HAS_PL011=y
CONFIG_HAS_SCIF=y
CONFIG_HAS_PASSTHROUGH=y
CONFIG_ARM_SMMU=y
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
#
# Debugging Options
#
# CONFIG_DEBUG is not set
@@ -1,73 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
# Xen/arm 4.12.0 Configuration
#
CONFIG_64BIT=y
CONFIG_ARM_64=y
CONFIG_ARM=y
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
#
# Architecture Features
#
CONFIG_NR_CPUS=128
CONFIG_GICV3=y
CONFIG_HVM=y
# CONFIG_NEW_VGIC is not set
CONFIG_SBSA_VUART_CONSOLE=y
CONFIG_ARM_SSBD=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
#
# ARM errata workaround via the alternative framework
#
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ALL_PLAT=y
# CONFIG_QEMU is not set
# CONFIG_RCAR3 is not set
# CONFIG_MPSOC is not set
# CONFIG_NO_PLAT is not set
CONFIG_ALL64_PLAT=y
# CONFIG_ALL32_PLAT is not set
CONFIG_MPSOC_PLATFORM=y
#
# Common Features
#
CONFIG_HAS_ALTERNATIVE=y
CONFIG_HAS_DEVICE_TREE=y
CONFIG_MEM_ACCESS=y
CONFIG_HAS_PDX=y
# CONFIG_XSM is not set
CONFIG_SCHED_CREDIT=y
CONFIG_SCHED_CREDIT2=y
CONFIG_SCHED_RTDS=y
# CONFIG_SCHED_ARINC653 is not set
CONFIG_SCHED_NULL=y
CONFIG_SCHED_DEFAULT="credit2"
# CONFIG_LIVEPATCH is not set
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
CONFIG_CMDLINE=""
CONFIG_DOM0_MEM=""
#
# Device Drivers
#
CONFIG_HAS_NS16550=y
CONFIG_HAS_CADENCE_UART=y
CONFIG_HAS_MVEBU=y
CONFIG_HAS_PL011=y
CONFIG_HAS_SCIF=y
CONFIG_HAS_PASSTHROUGH=y
CONFIG_ARM_SMMU=y
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
#
# Debugging Options
#
# CONFIG_DEBUG is not set
@@ -0,0 +1,2 @@
CONFIG_DEBUG=y
CONFIG_EARLY_PRINTK_JUNO=y
@@ -1,100 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
# Xen/arm 4.12.2 Configuration
#
CONFIG_64BIT=y
CONFIG_ARM_64=y
CONFIG_ARM=y
CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig"
#
# Architecture Features
#
CONFIG_NR_CPUS=128
CONFIG_ACPI=y
CONFIG_GICV3=y
CONFIG_HAS_ITS=y
CONFIG_HVM=y
# CONFIG_NEW_VGIC is not set
CONFIG_SBSA_VUART_CONSOLE=y
CONFIG_ARM_SSBD=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
#
# ARM errata workaround via the alternative framework
#
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y
CONFIG_ALL_PLAT=y
# CONFIG_QEMU is not set
# CONFIG_RCAR3 is not set
# CONFIG_MPSOC is not set
# CONFIG_NO_PLAT is not set
CONFIG_ALL64_PLAT=y
# CONFIG_ALL32_PLAT is not set
CONFIG_MPSOC_PLATFORM=y
#
# Common Features
#
CONFIG_HAS_ALTERNATIVE=y
CONFIG_HAS_DEVICE_TREE=y
# CONFIG_MEM_ACCESS is not set
CONFIG_HAS_PDX=y
# CONFIG_TMEM is not set
CONFIG_XSM=y
CONFIG_XSM_FLASK=y
CONFIG_XSM_FLASK_AVC_STATS=y
# CONFIG_XSM_FLASK_POLICY is not set
CONFIG_XSM_SILO=y
# CONFIG_XSM_DUMMY_DEFAULT is not set
# CONFIG_XSM_FLASK_DEFAULT is not set
CONFIG_XSM_SILO_DEFAULT=y
# CONFIG_ARGO is not set
#
# Schedulers
#
CONFIG_SCHED_CREDIT=y
CONFIG_SCHED_CREDIT2=y
CONFIG_SCHED_RTDS=y
# CONFIG_SCHED_ARINC653 is not set
CONFIG_SCHED_NULL=y
# CONFIG_SCHED_CREDIT_DEFAULT is not set
CONFIG_SCHED_CREDIT2_DEFAULT=y
# CONFIG_SCHED_RTDS_DEFAULT is not set
# CONFIG_SCHED_NULL_DEFAULT is not set
CONFIG_SCHED_DEFAULT="credit2"
# CONFIG_LIVEPATCH is not set
CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y
CONFIG_CMDLINE=""
CONFIG_DOM0_MEM=""
#
# Device Drivers
#
CONFIG_HAS_NS16550=y
CONFIG_HAS_CADENCE_UART=y
CONFIG_HAS_MVEBU=y
CONFIG_HAS_PL011=y
CONFIG_HAS_SCIF=y
CONFIG_HAS_PASSTHROUGH=y
CONFIG_ARM_SMMU=y
CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig"
#
# Debugging Options
#
# CONFIG_DEBUG is not set
CONFIG_DEBUG_INFO=y
# CONFIG_FRAME_POINTER is not set
# CONFIG_COVERAGE is not set
# CONFIG_LOCK_PROFILE is not set
# CONFIG_PERF_COUNTERS is not set
CONFIG_VERBOSE_DEBUG=y
# CONFIG_DEVICE_TREE_DEBUG is not set
# CONFIG_SCRUB_DEBUG is not set
@@ -0,0 +1,3 @@
CONFIG_DEBUG=y
CONFIG_EARLY_UART_CHOICE_PL011=y
CONFIG_EARLY_UART_BASE_ADDRESS=0x2a400000
@@ -0,0 +1,5 @@
CONFIG_EXPERT=y
# Enable ACPI support
CONFIG_ACPI=y
# Enable ARM Interrupt Translation Service (ITS) emulation
CONFIG_HAS_ITS=y
@@ -1,32 +1,15 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
# Machine specific settings
XEN_CONFIG_EARLY_PRINTK_juno = "juno"
XEN_CONFIG_EARLY_PRINTK_gem5-arm64 = "vexpress"
XEN_CONFIG_EARLY_PRINTK_fvp-base = "fastmodel"
XEN_CONFIG_EARLY_PRINTK_foundation-armv8 = "fastmodel"
XEN_CONFIG_EARLY_PRINTK_n1sdp = "pl011,0x2a400000"
# Foundation-armv8 support
COMPATIBLE_MACHINE_foundation-armv8 = "foundation-armv8"
SRC_URI_append_foundation-armv8 = " file://fvp/defconfig"
# FVP Base support
COMPATIBLE_MACHINE_fvp-base = "fvp-base"
SRC_URI_append_fvp-base = " file://fvp/defconfig"
FILESEXTRAPATHS_prepend_fvp-base := "${THISDIR}/files:"
SRC_URI_append_fvp-base = " file://early-printk.cfg"
# Juno support
COMPATIBLE_MACHINE_juno = "juno"
SRC_URI_append_juno = " file://juno/defconfig"
# Gem5 support
# Fix problem with number of interrupts on gem5
SRC_URI_append_gem5-arm64 = " file://4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch"
FILESEXTRAPATHS_prepend_juno := "${THISDIR}/files:"
SRC_URI_append_juno = " file://early-printk.cfg"
# N1SDP support
COMPATIBLE_MACHINE_n1sdp = "n1sdp"
SRC_URI_append_n1sdp = " file://n1sdp/defconfig"
FILESEXTRAPATHS_prepend_n1sdp := "${THISDIR}/files:"
SRC_URI_append_n1sdp = " file://n1sdp.cfg \
file://early-printk.cfg"
@@ -1,6 +0,0 @@
# Board specific configuration for the manager
# FVP and Foundation are using vda as hard drive and partition 2 is the
# default rootfs, so use vda3 for guest lvm
XENGUEST_MANAGER_VOLUME_DEVICE_foundation-armv8 ?= "/dev/vda3"
XENGUEST_MANAGER_VOLUME_DEVICE_fvp-base ?= "/dev/vda3"
@@ -1,2 +0,0 @@
# Juno board has 2 network interfaces, add both of them to the bridge
XENGUEST_NETWORK_BRIDGE_MEMBERS_juno ?= "eth0 eth1"
@@ -0,0 +1,6 @@
define KMACHINE n1sdp
define KTYPE preempt-rt
define KARCH arm64
kconf non-hardware ktypes/developer/developer.cfg
kconf non-hardware ktypes/preempt-rt/preempt-rt.cfg
@@ -0,0 +1,7 @@
# Yocto kernel-cache sets CONFIG_NLS_CODEPAGE_437=m for LINUX_KERNEL_TYPR=preempt-rt
CONFIG_NLS_CODEPAGE_437=y
# Yocto kernel-cache sets CONFIG_NLS_ISO8859_1=m for LINUX_KERNEL_TYPR=preempt-rt
CONFIG_NLS_ISO8859_1=y
# Set the timer interrupt run at 1000 Hz to have a fast response
CONFIG_HZ_1000=y
@@ -0,0 +1,3 @@
define KFEATURE_DESCRIPTION "Extra kernel configs when building with PREEMPT_RT"
kconf non-hardware preempt-rt-extras.cfg
@@ -12,6 +12,4 @@ LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE = "${@bb.utils.contains_any('DISTRO_FEATURE
'arm-autonomy-host arm-autonomy-guest', \
' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
KERNEL_FEATURES_append_fvp-base = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
KERNEL_FEATURES_append_foundation-armv8 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
@@ -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
@@ -0,0 +1,14 @@
# short-description: Create a disk image
# long-description: Creates a partitioned disk image that the user
# can directly dd to boot media.
# For Juno first partition is rootfs normally populated as /dev/sda1
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Second partition to accomodate guests images normally populated as /dev/sda2 (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
# Third partition is user defined entry normally populated as /dev/sda3
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos
@@ -0,0 +1,17 @@
# short-description: Create an EFI disk image
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
# First boot partition normally populated as /dev/sda1
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
# Second rootfs partition normally populated as /dev/sda2
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Third partition to accomodate guests images normally populated as /dev/sda3 (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/sda4
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos --configfile="${GRUB_CFG_FILE}"
@@ -0,0 +1,28 @@
set term="vt100"
set default="3"
set timeout="5"
set kernel_cmdline="earlycon=pl011,0x2A400000 console=ttyAMA0,115200 root=/dev/sda2 rootwait"
menuentry 'N1SDP ACPI Boot' {
linux /Image $kernel_cmdline acpi=force
}
menuentry 'N1SDP Single-Chip Boot (Device Tree)' {
devicetree /n1sdp-single-chip.dtb
linux /Image $kernel_cmdline
}
menuentry 'N1SDP Multi-Chip Boot (Device Tree)' {
devicetree /n1sdp-multi-chip.dtb
linux /Image $kernel_cmdline
}
menuentry 'N1SDP Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
# no_argumants under here is a workaround for a bug
# also any kernel or dom0 cmdline arguments has to be passed via dtb
# because any arguments put here will be ignored by xen
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
xen_module /Image
devicetree /n1sdp-single-chip-xen.dtb
}
@@ -0,0 +1,28 @@
set term="vt100"
set default="3"
set timeout="5"
source $prefix/arm-autonomy-n1sdp-grub.cfg
menuentry 'N1SDP PREEMPT_RT ACPI Boot' {
linux /Image-preempt-rt $kernel_cmdline acpi=force
}
menuentry 'N1SDP PREEMPT_RT Single-Chip Boot (Device Tree)' {
devicetree /n1sdp-single-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Multi-Chip Boot (Device Tree)' {
devicetree /n1sdp-multi-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
# no_argumants under here is a workaround for a bug
# also any kernel or dom0 cmdline arguments has to be passed via dtb
# because any arguments put here will be ignored by xen
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
xen_module /Image-preempt-rt
devicetree /n1sdp-single-chip-xen.dtb
}
@@ -0,0 +1 @@
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', 'xen_boot', '', d)}"
@@ -0,0 +1,16 @@
Upstream Status: Inappropriate [meta-arm-autonomy specifc u-boot config]
Signed-off-by: Nathan Dunne <nathan.dunne@arm.com>
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index e63c335f85..9ee050a4a6 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -162,7 +162,7 @@
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_name=Image\0" \
- "kernel_addr=0x80080000\0" \
+ "kernel_addr=0x84000000\0" \
"initrd_name=ramdisk.img\0" \
"initrd_addr=0x88000000\0" \
"fdtfile=devtree.dtb\0" \
@@ -0,0 +1,9 @@
# Machine specific u-boot
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
#
# FVP BASE
#
SRC_URI_append_fvp-base = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ' file://xen_u-boot_kernel_addr.patch', '', d)}"
@@ -0,0 +1,70 @@
#!/bin/sh
INSTALL_DIR="###CONTAINERS_INSTALL_DIR###"
MANIFEST="${INSTALL_DIR}/###CONTAINERS_MANIFEST###"
INIT_DIR="/etc/init.d"
DOCKER_INIT="docker.init"
find_docker_init() {
if [ -f "$INIT_DIR/$DOCKER_INIT" ]; then
$INIT_DIR/$DOCKER_INIT "start"
else
echo "ERROR: Couldn't find docker init script! ($INIT_DIR/$DOCKER_INIT)"
exit 1
fi
}
is_docker_started() {
if ! docker info > /dev/null 2>&1; then
find_docker_init
fi
}
check_manifest() {
if [ ! -f ${MANIFEST} ]; then
echo "No manifest found!"
exit 1
fi
}
has_docker_image() {
docker image inspect "$1" >/dev/null 2>&1
}
start() {
check_manifest
is_docker_started
while read -r archive name tag keep _; do
CONTAINER_IMAGE_NAME_AND_TAG="${name}:${tag}"
# Image does not exist and image file exists: Import the image.
if ! has_docker_image "${CONTAINER_IMAGE_NAME_AND_TAG}" && \
[ -f "${INSTALL_DIR}/${archive}" ]; then
echo "Importing ${CONTAINER_IMAGE_NAME_AND_TAG} container image..."
docker import "${INSTALL_DIR}/${archive}" \
"${CONTAINER_IMAGE_NAME_AND_TAG}" 2>&1 || {
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Failed."
exit $?
}
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Done."
if [ "${keep}" != "1" ]; then
rm "${INSTALL_DIR}/${archive}"
fi
fi
done < ${MANIFEST}
}
case "$1" in
start)
start && exit 0
;;
*)
echo "Usage: $0 {start}"
exit 2
esac
exit $?
@@ -0,0 +1,36 @@
#
# This recipe adds an init script to import the containers added by
# docker_extern_containers.bbclass at boot time
# Notes:
# docker_extern_containers.bbclass creates a manifest file which contains
# the columns: archive name tag keep
# for each container. This file is read by the import_containers
# script to determine the parameters of the import
#
# Since the script needs knowledge of the values of $CONTAINERS_INSTALL_DIR
# and $CONTAINERS_MANIFEST these are substituted for placeholder strings when
# the script is installed.
DESCRIPTION = "Add init script to import docker images at boot"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit docker_extern_containers
SRC_URI = "file://import_containers.sh"
inherit update-rc.d
INITSCRIPT_PARAMS = "start 30 2 3 4 5 ."
INITSCRIPT_NAME = "import_containers.sh"
S = "${WORKDIR}"
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 755 import_containers.sh ${D}${sysconfdir}/init.d
sed -i "s,###CONTAINERS_INSTALL_DIR###,${CONTAINERS_INSTALL_DIR}," \
${D}${sysconfdir}/init.d/import_containers.sh
sed -i "s,###CONTAINERS_MANIFEST###,${CONTAINERS_MANIFEST}," \
${D}${sysconfdir}/init.d/import_containers.sh
}

Some files were not shown because too many files have changed in this diff Show More