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

Compare commits

..

362 Commits

Author SHA1 Message Date
Sumit Garg 2a2123dac0 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-09-14 11:49:28 -04:00
Ross Burton 8e1b0e4a57 CI: remove redundant interruptiple assignment
Change-Id: I2e95cb1bf88cf77a59b54cb529dad4d471b6eb06
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-09-14 11:49:28 -04:00
Jon Mason 9dcbf55176 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:06:19 -04:00
Jon Mason b4f3880979 CI: add ssh tests
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:06:19 -04:00
Jon Mason d841a47d6e CI: merge testimage into the build stage
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-08-09 16:06:19 -04:00
Anastasios Kavoukis b9d54fefa0 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:06:19 -04:00
Ross Burton a0b2c6fc71 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-23 10:30:33 +01:00
Ross Burton 34f64a0523 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-23 10:29:48 +01:00
Ross Burton 3b8ad597c9 CI: don't execute a job we know fails
The n1sdp/armgcc job fails due to a GCC switch conflict in gcc-runtime:

cc1: error: switch '-mcpu=armv8.2-a' conflicts with '-march=armv8-a' switch

Currently we run this job anyway, and ignore the failure. But that's 10
minutes of build time wasted every run when we know it fails.

Instead, mark the job as manually executed until we have fixed the
underlying issue.

Change-Id: I3ee48ce4d1a4f2dacc30800ff18c72fcce4e9afb
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-07-14 10:38:38 +01:00
Timothy Mertz 6a6510b508 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:33 -04:00
Jon Mason 6ebec2da19 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:25:02 -04:00
Ross Burton aa5fb3d6f9 CI: mark build jobs as interruptible
Mark the build jobs as interruptible, as they don't write to shared
resources (unlike update-repos or get-binary-toolchains). This means
that if the same branch is pushed again GitLab is likely to be able to
abort the obsolete pipeline to start the new build sooner.

Change-Id: I9284273e9b3118b616d3cb062cb957d98fc5e37e
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-06-29 11:20:47 -04:00
Ross Burton 23d9da9cee CI: report disk usage before/after pruning sstate
Change-Id: I66853ce1bf5e33c37094cc8fff04cbd4daaadf91
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-06-29 11:20:47 -04:00
Jon Mason 8f13054eea 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:57 -04:00
Ross Burton b3427f9001 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:14:53 +01:00
Ross Burton 5fc1de74b8 CI: fix preferred version of armgcc
Change-Id: I290439c0f18e5ec525f2102966b1e2a10c027720
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-05-10 11:31:39 +01:00
Jon Mason 39bc4076b2 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-05-01 07:41:05 -04:00
Jon Mason b4abab2203 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-05-01 07:41:05 -04:00
Jon Mason a6243e60bd CI: Reorder manual tasks to be alphabetical
Change-Id: I2e5bfdf5794c99da530bc2645fb56a5444444be3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-05-01 07:41:05 -04:00
Jon Mason 54b55deeb8 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-05-01 07:41:05 -04:00
Jon Mason a11e752a28 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-05-01 07:41:05 -04:00
Ross Burton f4129ee8a8 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-05-01 07:41:05 -04:00
Ross Burton c200941b15 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-05-01 07:41:05 -04:00
Ross Burton 2c5dea8979 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-05-01 07:41:05 -04:00
Ross Burton 498f88004c CI: delete-sstate needs to delete contents
Change-Id: I278d470540e20db8d789a1428e927356e3a5d8b1
2021-05-01 07:41:05 -04:00
Ross Burton 0f33099a82 CI: add task to delete all sstate
Change-Id: If89c6c27cafe6ae7e93b5db5d37b9e8ecdaee131
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-05-01 07:41:05 -04:00
Ross Burton aff8d93108 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-05-01 07:41:05 -04:00
Ross Burton 87ceedf4d2 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-05-01 07:40:55 -04:00
Nathan Dunne e219ef606e 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:32:52 -04:00
Richard Neill fc4b2f8907 arm-autonomy/linux-arm-autonomy: Drop XenStore initialisation patch
With the linux-yocto version upgrade, the xenstore initialisation patch is no
longer necessary.

Issue-Id: SCM-2263
Signed-off-by: Richard Neill <richard.neill@arm.com>
Change-Id: I293a5f81b48c57f3af1c99606af776537f35f0bb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-15 22:59:44 -04:00
Richard Neill d8074cb6a0 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:12:15 -05:00
Richard Neill 48720822d6 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: If2a79755ac1f16fafa994e16ac980a37999692db
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:22 -05:00
Ross Burton 7336830dab kas: update meta-clang to use the gatesgarth branch
When the CI was written there wasn't a gatesgarth branch, but there is now
and it is needed as master meta-clang doesn't work with gatesgarth oe-core.

Change-Id: Ief06b6c5be11dd7fc77520f5601b662bdca52891
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:11 -05:00
Ross Burton 332410055a arm/opencsd: backport patch to fix build race
Change-Id: I46ea9cfa5e149db000740b4a2c6730ced99340ef
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-04 15:17:11 -05:00
Richard Neill 7c3a55f8ff 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
Change-Id: Icf84535718779f91eb668d178a118c96e05f54de
Signed-off-by: Richard Neill <richard.neill@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-03-03 15:10:06 -05:00
Ross Burton ac9f59ca62 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-02-22 11:48:30 +00:00
Ross Burton fb196bacd6 kas: meta-kernel is no longer needed
Change-Id: I36d34828fe34c02c15afdf92330ec9a95a93c170
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-02-22 11:47:52 +00:00
Diego Sueiro 6e3e29857c arm-autonomy: Fix xenbus probe for guest kernels < 5.4.99
The arm64-autonomy-guest kernel from commit a09d4e7acdbf ("xen: Fix event
channel callback via INTX/GSI") are hanging at `hw-breakpoint: found 6
breakpoint and 4 watchpoint registers.`.
The arm-autonomy-guest kernels older than 5.4.99 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: I56c558f518336567eadd5dc69fd9334c23b19cd8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Diego Sueiro d235d4b53e arm-autonomy: Fix XenStore initialisation for host kernels < 5.4.95
The arm-autonomy-host kernels older than 5.4.95 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: Iea22c54e86db17952662faf75cae94d0ef18d4f3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Diego Sueiro 5207074884 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.

Issue-Id: SCM-2033
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Change-Id: I6bccc0c75d931d8046260c61afb53395bb9d2d1b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2021-02-18 22:50:18 -05:00
Jon Mason 7185d29de9 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-16 09:45:48 -05:00
Nathan Dunne 932d35bab0 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-25 11:11:22 -05:00
Kamil Dziezyk d12eadacd0 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>
2021-01-08 10:15:06 -05:00
Kamil Dziezyk e45752aa6f 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>
2021-01-08 10:15:06 -05:00
Kamil Dziezyk a365b3bd7e 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>
2021-01-08 10:15:06 -05:00
Nathan Dunne 7b82307c0a 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>
2021-01-08 10:15:06 -05:00
Jon Mason a72b89ccd1 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:00:43 -05:00
Ross Burton 1cd14b33c1 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-17 12:40:07 +00:00
Ross Burton 27ed22b040 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-17 12:40:05 +00:00
Ross Burton b97016fcfa 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>
2020-12-17 12:40:03 +00:00
Ross Burton eff9e62526 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>
2020-12-17 12:39:55 +00:00
Jon Mason 892c9686bf 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>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2020-12-17 12:39:55 +00:00
Ross Burton e8cc03775e 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-11 09:12:58 -05:00
Kamil Dziezyk 4cae9fe87b 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-09 15:55:34 -05:00
Ross Burton 784ef62cc4 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:51:41 +00:00
Ross Burton 1a0a9700f2 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 17:48:17 +00:00
Khasim Mohammed ba30bf591e 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 16:06:33 +00:00
Khasim Syed Mohammed 0c59d1cf42 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 16:06:31 +00:00
Kamil Dziezyk 289982e1cb 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: Ross Burton <ross.burton@arm.com>
2020-11-25 12:50:03 +00:00
Kamil Dziezyk 44e51aa5be 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-25 12:49:34 +00:00
Khasim Mohammed b8bb75b4d3 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-19 08:48:44 -05:00
Kamil Dziezyk 0057143f4b 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-19 08:48:17 -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
448 changed files with 26942 additions and 2131 deletions
+196
View File
@@ -0,0 +1,196 @@
image: ghcr.io/siemens/kas/kas
# 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
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
# 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
get-binary-toolchains:
extends: .setup
stage: prep
script:
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR
#
# 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
#
a5ds:
extends: .build
corstone700-fvp:
extends: .build
corstone700-mps3:
extends: .build
foundation-armv8:
extends: .build
fvp-base:
extends: .build
fvp-base-arm32:
extends: .build
fvp-base-arm32/external-gccarm:
extends: .build
gem5-arm64:
extends: .build
juno:
extends: .build
juno/clang:
extends: .build
musca-b1:
extends: .build
musca-s1:
extends: .build
n1sdp:
extends: .build
# This job currently fails when building gcc-runtime:
# cc1: error: switch '-mcpu=armv8.2-a' conflicts with '-march=armv8-a' switch [-Werror]
# Mark as manual so it doesn't get executed automatically
n1sdp/armgcc:
extends: .build
when: manual
qemuarm/testimage:
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:
- du -h -s $SSTATE_DIR
- find $SSTATE_DIR -type f -atime +30 -delete
- du -h -s $SSTATE_DIR
# 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
includes:
- base.yml
machine: a5ds
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
local_conf_header:
libc: |
GCCVERSION = "arm-9.2"
+45
View File
@@ -0,0 +1,45 @@
header:
version: 9
distro: poky
defaults:
repos:
refspec: gatesgarth
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"
ptest: |
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
+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 ci files
ci = metaarm.glob("ci/*.yml")
ci = set(p.stem for p in ci)
missing = machines - ci
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
+11
View File
@@ -0,0 +1,11 @@
header:
version: 9
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
refspec: gatesgarth
local_conf_header:
clang: |
TOOLCHAIN = "clang"
+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 = "${TOOLCHAIN_DIR}/${TARGET_ARCH}"
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: foundation-armv8
+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
+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
+52
View File
@@ -0,0 +1,52 @@
#!/bin/bash
set -u
HOST_ARCH=$(uname -m)
VER="10.2-2020.11"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
# These should be already created by .bitlab-ci.yml, but do here if run outside of that env
mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR
if [ $HOST_ARCH = "aarch64" ]; then
#AArch64 Linux hosted cross compilers
#AArch32 target with hard float (arm-none-linux-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
elif [ $HOST_ARCH = "x86_64" ]; then
#x86_64 Linux hosted cross compilers
#AArch32 target with hard float (arm-linux-none-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
#AArch64 GNU/Linux target (aarch64-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
#AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/gcc-arm-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
else
echo "ERROR - Unknown build arch of $HOST_ARCH"
exit 1
fi
for i in arm aarch64 aarch64_be; do
if [ ! -f $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
continue
fi
if [ -d $TOOLCHAIN_DIR/$i ]; then
echo "$TOOLCHAIN_DIR/$i EXISTS!"
MANIFEST=$(ls $TOOLCHAIN_DIR/$i | grep txt)
if [[ $MANIFEST != $VER-$HOST_ARCH-$i-none-linux-gnu*.txt ]]; then
echo "Removing old $MANIFEST for $VER-$HOST_ARCH-$i-*.txt toolchain"
rm -rf $TOOLCHAIN_DIR/$i
fi
fi
if [ ! -d $TOOLCHAIN_DIR/$i ]; then
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
mv $TOOLCHAIN_DIR/gcc-arm-$VER-$HOST_ARCH-$i-none-linux-gnu*/ $TOOLCHAIN_DIR/$i
fi
done
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
+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
+6
View File
@@ -0,0 +1,6 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm
+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
+41
View File
@@ -0,0 +1,41 @@
#! /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():
subprocess.run(["git", "-C", repodir, "fetch"], check=True)
else:
subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
+1 -1
View File
@@ -88,5 +88,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>
@@ -12,6 +12,11 @@ inherit xenguest-image
# 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
@@ -49,6 +54,13 @@ do_deploy_append() {
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
@@ -58,10 +58,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
@@ -147,10 +151,10 @@ 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
}
@@ -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,20 @@
# We need to have xen and ipv4 activated
DISTRO_FEATURES_append = " xen ipv4"
DISTRO_FEATURES_NATIVE_append = " arm-autonomy-host"
# 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)}
+7 -2
View File
@@ -14,21 +14,26 @@ LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
openembedded-layer \
networking-layer \
virtualization-layer \
"
LAYERSERIES_COMPAT_meta-arm-autonomy = "dunfell"
LAYERSERIES_COMPAT_meta-arm-autonomy = "gatesgarth"
# 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-gem5:${LAYERDIR}/dynamic-layers/meta-gem5/*/*/*.bbappend \
"
# 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"
@@ -0,0 +1,195 @@
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
----------------
Here are the steps required to make the project build both the host and any
number of guests as required.
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 a specific to either the
host or the guest
```
-- 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 edit 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_image_complete'}"
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
```
This contents shouldn't be changed directly, rather change the equivalent
config in local.conf. You can append any other config desired for the
guest at this point, 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"
```
Building the image
----------------
To build the multiconfig image the command is:
```
bitbake mc:host:arm-autonomy-host-image-minimal
```
You should see that this triggers guest tasks to be built 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 deployed image including the guest will be in `host/deploy/images/`
Multiple Guests
----------------
To have multiple guests with the same config the line which appends to
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST` just needs to be duplicated with
a different guestname.
To have different config for each guest, each will need its own config
file similar to guest.conf, ensuring TMPDIR is set to a different path,
and everything between `---Guest Config Start---` and
`---Guest Config End---` will need to be duplicated.
Any copies of variables that start `MC_GUEST` must be altered to avoid
collisions (e.g. `MC_GUEST_2_*`), and the name of the conf file must also
be added to BBMULTICONFIG.
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 host.conf file.
The rest of the configuration has to be appended to guest.conf file:
```
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"
```
content of rootdisk.cfg"
```
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
```
`_GUEST_DISK_DEVICE_` should be substituted with `/dev/sdaX`,
according to wks file.
@@ -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
@@ -115,6 +119,10 @@ 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
@@ -140,6 +148,9 @@ To create a guest project:
The build will create a ".xenguest" image that can be use on an host project
with the xenguest-manager.
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
@@ -202,7 +213,7 @@ and is configuring 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
a different file.
The recipe will look for the file in ${WORKDIR} so you will need to add it to
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 also substitute `###BRIDGE_NAME###` with the bridge name
configured in ${XENGUEST_NETWORK_BRIDGE_NAME}.
@@ -0,0 +1,29 @@
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. 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 and GRUB_CFG_FILE variables).
3. 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 custmized 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.
@@ -48,16 +48,16 @@ project compilation (those can be set in your project local.conf, for example).
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 +65,37 @@ The following parameters are available:
name).
This is set by default to "/usr/share/guests".
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
- ${LOGFILE} : The file to append any logging to, e.g.
echo "Hello, World" >> ${LOGFILE}
Sourcing also allows the script to access 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
@@ -99,6 +99,8 @@ 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
@@ -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,7 @@
# 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"
XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0"
@@ -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,40 @@
# 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"
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
GRUB_CFG_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg"
# 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}"
@@ -4,6 +4,19 @@ OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d
FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:"
DEPENDS_append_xen = " dos2unix-native"
SRC_URI_append_xen = " file://add-xen-support.patch;patchdir=../"
do_install_append_xen() {
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"
@@ -14,8 +27,24 @@ do_deploy_prepend_xen() {
# 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"
@@ -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,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 --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,7 @@
# When booting gem5-arm64 with Xen we need to set the cpu as Cortex A53 and
# remove support for pointer authentification
GEM5_RUN_EXTRA_append = " \
${@bb.utils.contains('DISTRO_FEATURES_NATIVE', 'arm-autonomy-host', \
'--param=system.cpu_cluster[0].cpus[0].isa[0].midr=0x410fd030 \
--param=system.cpu_cluster[0].cpus[0].isa[0].id_aa64isar1_el1=0x0', \
'', d)}"
@@ -0,0 +1,2 @@
CONFIG_DEBUG=y
CONFIG_EARLY_PRINTK_VEXPRESS=y
@@ -0,0 +1,4 @@
# gem5-arm64 support
COMPATIBLE_MACHINE_gem5-arm64 = "gem5-arm64"
FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}/files:"
SRC_URI_append_gem5-arm64 = " file://early-printk.cfg"
@@ -0,0 +1 @@
XENGUEST_NETWORK_BRIDGE_MEMBERS_gem5-arm64 ?= "eth0"
@@ -0,0 +1,4 @@
# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
# Linux kernel with a coredump while trying to access ZEN bit of CPACR1 core
# register.
# CONFIG_ARM64_SVE is not set
@@ -0,0 +1,3 @@
define KFEATURE_DESCRIPTION "Disable SVE support"
kconf non-hardware disable-arm64-sve.cfg
@@ -0,0 +1,15 @@
FILESEXTRAPATHS_prepend_gem5-arm64 := "${THISDIR}:"
#
# arm-autonomy kmeta extra
#
SRC_URI_append_gem5-arm64 = " file://arm-autonomy-kmeta-extra-gem5;type=kmeta;name=arm-autonomy-kmeta-extra-gem5;destsuffix=arm-autonomy-kmeta-extra-gem5"
# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping
# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core
# register.
LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE_gem5-arm64 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
'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}"
@@ -0,0 +1 @@
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '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,19 @@
# SPDX-License-Identifier: MIT
#
# Copyright (c) 2020 Arm Limited
#
SUMMARY = "Docker runtime minimal requirements"
DESCRIPTION = "The minimal set of packages required for running Docker"
inherit packagegroup
RDEPENDS_${PN} = "\
docker-ce \
docker-ce-contrib \
kernel-module-xt-nat \
kernel-module-xt-masquerade \
kernel-module-xt-addrtype \
kernel-module-xt-conntrack \
kernel-module-xt-ipvs \
"
@@ -39,9 +39,9 @@ ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS ??= ""
IMAGE_INSTALL += " \
packagegroup-core-boot \
packagegroup-core-ssh-openssh \
qemu-xen \
qemu-system-i386 \
xenguest-manager \
xenguest-network-bridge \
xenguest-network \
"
# Build xen binary
@@ -50,6 +50,24 @@ EXTRA_IMAGEDEPENDS += "xen"
# Build xen-devicetree to produce a xen ready devicetree
EXTRA_IMAGEDEPENDS += "xen-devicetree"
# Documentation for setting up a multiconfig build can be found in:
# meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
# In a multiconfig build this variable will hold a dependency string, which differs based
# on whether the guest has initramfs or not.
# It may have a space seperated list of dependency strings if mulitple guest types are
# configured
MC_DOIMAGE_MCDEPENDS ?= ""
# Example value: mc:host:guest:core-image-minimal:do_image_complete
# In a multiconfig build the host task 'do_image' has a dependency on multiconfig guest.
# This ensures that the guest image file already exists when it is needed by the host
DO_IMAGE_MCDEPENDS := "${@ '${MC_DOIMAGE_MCDEPENDS}' if d.getVar('BBMULTICONFIG') else ''}"
# Apply mc dependency. Empty string if multiconfig not enabled
do_image[mcdepends] += "${DO_IMAGE_MCDEPENDS}"
python __anonymous() {
if bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'arm-autonomy-host'")
@@ -106,7 +124,14 @@ python add_extern_guests () {
_, _, path, _, _, parm = bb.fetch.decodeurl(entry)
if 'guestname' in parm:
if os.path.islink(path):
bb.fatal("Guest file is a symlink: " + path)
realpath = os.path.realpath(path)
if not os.path.exists(realpath):
bb.fatal("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS link does not resolve: " + path)
bb.note("Guest file is a symlink:\n " + path + "\nResolved to:\n " + realpath)
path = realpath
bb.utils.mkdirhier(guestdir)
dstname = parm['guestname']
# Add file extension if not there
@@ -6,13 +6,7 @@ OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d
QEMU_TARGETS_xen = "i386"
PACKAGECONFIG[noaudio] = "--audio-drv-list='',,"
PACKAGECONFIG_append_xen = " virtfs noaudio"
PACKAGECONFIG_remove_xen = "sdl"
PACKAGECONFIG_append_xen = " noaudio"
PACKAGECONFIG_remove_xen = "fdt sdl kvm"
# Reduce the qemu package size by splitting it into
# qemu and qemu-xen packages
PACKAGES_prepend_xen := "${PN}-xen"
RDEPENDS_${PN}_xen += "${PN}-xen"
FILES_${PN}-xen_xen = "${bindir}/qemu-system-i386"
RDEPENDS_${PN}-xen_xen += "xen-tools-libxenstore xen-tools-libxenctrl \
xen-tools-libxenguest"
require ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'recipes-devtools/qemu/${BPN}-package-split.inc', '', d)}
@@ -14,7 +14,9 @@ DESCRIPTION = "Add entries in DTB for Xen and Dom0"
# Please refer to documentation/xen-devicetree.md for documentation on those
# parameters
XEN_DEVICETREE_DEPEND ?= "virtual/kernel:do_deploy"
# kernel size is passed to xen via xen.dtb so wee need to add
# 'virtual/kernel:do_deploy' as a dependency
XEN_DEVICETREE_DEPEND_append = " virtual/kernel:do_deploy"
XEN_DEVICETREE_DTBS ?= "${KERNEL_DEVICETREE}"
XEN_DEVICETREE_XEN_BOOTARGS ?= "noreboot dom0_mem=${XEN_DEVICETREE_DOM0_MEM}"
XEN_DEVICETREE_DOM0_MEM ?= "1024M"
@@ -38,10 +40,10 @@ do_deploy() {
die "xen.dtsi.in does not exist"
fi
cat ${WORKDIR}/xen.dtsi.in \
| sed -e "s,###XEN_DOM0_BOOTARGS###,${XEN_DEVICETREE_DOM0_BOOTARGS}," \
| sed -e "s,###XEN_XEN_BOOTARGS###,${XEN_DEVICETREE_XEN_BOOTARGS}," \
| sed -e "s,###XEN_DOM0_ADDR###,${XEN_DEVICETREE_DOM0_ADDR}," \
| sed -e "s,###XEN_DOM0_SIZE###,${XEN_DEVICETREE_DOM0_SIZE}," \
| sed -e "s?###XEN_DOM0_BOOTARGS###?${XEN_DEVICETREE_DOM0_BOOTARGS}?" \
| sed -e "s?###XEN_XEN_BOOTARGS###?${XEN_DEVICETREE_XEN_BOOTARGS}?" \
| sed -e "s?###XEN_DOM0_ADDR###?${XEN_DEVICETREE_DOM0_ADDR}?" \
| sed -e "s?###XEN_DOM0_SIZE###?${XEN_DEVICETREE_DOM0_SIZE}?" \
> ${WORKDIR}/xen.dtsi
# Generate final dtbs
@@ -67,6 +69,33 @@ do_deploy() {
done
}
do_deploy[depends] += "${XEN_DEVICETREE_DEPEND}"
do_deploy[prefuncs] += "calc_xen_dtb_dom0_size"
addtask deploy after do_install
python calc_xen_dtb_dom0_size() {
from math import ceil
size = 0
if d.getVar('KERNEL_IMAGE_MAXSIZE'):
bb.note('size calculation based on KERNEL_IMAGE_MAXSIZE')
size = int(d.getVar('KERNEL_IMAGE_MAXSIZE')) * 1024
else:
kernel = os.path.realpath(d.getVar('DEPLOY_DIR_IMAGE') + '/' +\
d.getVar('KERNEL_IMAGETYPE'))
size = os.stat(kernel).st_size
bb.note('size calculation based on kernel Image file: %s' % kernel)
bb.note('size in bytes: %d' % size)
# Ceil to MiB
size_required = ceil(size / (2 ** 20)) * (2 ** 20)
size_defined = int(d.getVar('XEN_DEVICETREE_DOM0_SIZE'), 16)
if size_required > size_defined:
bb.warn ("Wrong kernel size setting inside xen dtb!\n"\
"Required:\t%(req)d (%(req)#010X)\n"\
"Requested:\t%(def)d (%(def)#010X)"\
% {"req": size_required, "def": size_defined})
bb.warn ("Overriding XEN_DEVICETREE_DOM0_SIZE with "\
"%(req)d (%(req)#010X)" % {"req": size_required})
d.setVar('XEN_DEVICETREE_DOM0_SIZE', hex(size_required))
}
@@ -0,0 +1,51 @@
From f4c1a541fa351e4f613471bbf397931f9e1ddd27 Mon Sep 17 00:00:00 2001
Message-Id: <f4c1a541fa351e4f613471bbf397931f9e1ddd27.1602683707.git.diego.sueiro@arm.com>
From: Wei Chen <wei.chen@arm.com>
Date: Fri, 28 Aug 2020 02:34:04 +0000
Subject: [PATCH] xen/arm: Throw messages for unknown FP/SIMD implement ID
Arm ID_AA64PFR0_EL1 register provides two fields to describe CPU
FP/SIMD implementations. Currently, we exactly know the meaning of
0x0, 0x1 and 0xf of these fields. Xen treats value < 8 as FP/SIMD
features presented. If there is a value 0x2 bumped in the future,
Xen behaviors for value <= 0x1 can also take effect. But what Xen
done for value <= 0x1 may not always cover new value 0x2 required.
We throw these messages to break the silence when Xen detected
unknown FP/SIMD IDs to notice user to check.
Signed-off-by: Wei Chen <wei.chen@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
xen/arch/arm/setup.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 7968cee..f16b33f 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -133,6 +133,18 @@ static void __init processor_id(void)
cpu_has_simd ? " AdvancedSIMD" : "",
cpu_has_gicv3 ? " GICv3-SysReg" : "");
+ /* Warn user if we find unknown floating-point features */
+ if ( cpu_has_fp && (boot_cpu_feature64(fp) >= 2) )
+ printk(XENLOG_WARNING "WARNING: Unknown Floating-point ID:%d, "
+ "this may result in corruption on the platform\n",
+ boot_cpu_feature64(fp));
+
+ /* Warn user if we find unknown AdvancedSIMD features */
+ if ( cpu_has_simd && (boot_cpu_feature64(simd) >= 2) )
+ printk(XENLOG_WARNING "WARNING: Unknown AdvancedSIMD ID:%d, "
+ "this may result in corruption on the platform\n",
+ boot_cpu_feature64(simd));
+
printk(" Debug Features: %016"PRIx64" %016"PRIx64"\n",
boot_cpu_data.dbg64.bits[0], boot_cpu_data.dbg64.bits[1]);
printk(" Auxiliary Features: %016"PRIx64" %016"PRIx64"\n",
--
2.7.4
@@ -0,0 +1,34 @@
Upstream-Status: Backport
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
From 5499e0fc8082024bf7e2d0facd5c976e82105070 Mon Sep 17 00:00:00 2001
From: Diego Sueiro <diego.sueiro@arm.com>
Date: Thu, 20 Aug 2020 11:58:20 +0100
Subject: [PATCH] tools/hotplug: Fix hostname setting in vif-nat
Setting the hostname is failing because the "$XENBUS_PATH/domain"
doesn't exist anymore. To fix this we set it to dom$domid
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Wei Liu <wl@xen.org>
---
tools/hotplug/Linux/vif-nat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
index a76d9c784b..26144350b3 100644
--- a/tools/hotplug/Linux/vif-nat
+++ b/tools/hotplug/Linux/vif-nat
@@ -85,7 +85,7 @@ router_ip=$(routing_ip "$ip")
# Split the given IP/bits pair.
vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
-hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
+hostname=dom$domid
if [ "$vifid" != "1" ]
then
hostname="$hostname-$vifid"
--
2.17.1
@@ -0,0 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-vif-nat-fix-hostname.patch \
"
PACKAGECONFIG_remove = "\
${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', \
'sdl', '', d)}"
@@ -1,14 +1,9 @@
#
# Define early console based on board parameters
#
XEN_CONFIG_EARLY_PRINTK ??= "disable"
EXTRA_OEMAKE += "${@bb.utils.contains('XEN_CONFIG_EARLY_PRINTK', 'disable', \
'', ' CONFIG_DEBUG=y CONFIG_EARLY_PRINTK=${XEN_CONFIG_EARLY_PRINTK}',d)}"
# Make Xen machine specific
# This ensures that sstate is properly handled and that each machine can have
# its own configuration
PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGECONFIG_remove = "\
${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', \
'sdl', '', d)}"
@@ -0,0 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:"
SRC_URI += " \
file://0001-xen-arm-Throw-messages-for-unknown-FP-SIMD-implement.patch \
"
@@ -0,0 +1,138 @@
#============================================================================
# ${XEN_SCRIPT_DIR}/vif-post.d/00-vif-xenguest.hook
#
# Script for performing local configuration of a vif.
# This script will be sourced by, e.g., vif-bridge after the hotplugging
# system calls vif-bridge. The script is here and not simply executed as
# a udev rule because this allows simple access to several environment
# variables set by the calling vif-* script.
#
# Environment vars:
# command (add|remove|online|offline)
# dev vif interface name (required).
# main_ip IP address of Dom0
# ip list of IP networks for the vif, space-separated
# XENBUS_PATH path to this device's details in the XenStore (required).
#============================================================================
domid=$(xenstore_read "${XENBUS_PATH}/frontend-id")
guestname=$(xenstore_read "/local/domain/${domid}/name")
bridge=$(xenstore_read "${XENBUS_PATH}/bridge")
mac=$(xenstore_read "$XENBUS_PATH/mac")
kea_conf_file="/etc/kea/kea-dhcp4.conf"
if [ ! -f /etc/xenguest/guests/${guestname}/params.cfg ]; then
log debug "No /etc/xenguest/guests/${guestname}/params.cfg. Exiting."
return
fi
# Source the params file to get the choosen XENGUEST_NETWORK_TYPE
. /etc/xenguest/guests/${guestname}/params.cfg
# We need to get the xenguest subnet prefix to set the subnet and
# the fixed ip to assing to the guest.
get_subnet_prefix() {
# ${vif_ip} is set in the vif-nat script
echo ${vif_ip} | awk -F. '{print $1"."$2"."$3}'
}
subnetprefix=$(get_subnet_prefix)
kea_remove_conf_entry()
{
log debug "kea_remove_conf_entry"
claim_lock "vif-nat-kea"
# Remove the the xenguest kea config file inclusion in the kea main config
sed -i "/${kea_guest_config//'/'/'\/'}/d" "${kea_conf_file}"
# Remove interface entry 1st case: [ "dev1", "dev_to_remove" ]
sed -i "s/,\ \"$dev\"//" "${kea_conf_file}"
# Remove interface entry 2nd case: [ "dev_to_remove", "dev1" ]
sed -i "s/\"$dev\",\ //" "${kea_conf_file}"
# Remove interface entry 3rd case: [ "dev_to_remove" ]
sed -i "s/\[\ \"$dev\"\ \]/\[\ \]/" "${kea_conf_file}"
# Remove the generated the xenguest kea subnet conf file
rm ${XENGUEST_KEA_SUBNET_CONFIG}
keactrl reload
release_lock "vif-nat-kea"
}
kea_add_conf_entries()
{
log debug "kea_add_conf_entries"
claim_lock "vif-nat-kea"
# Include vif in the interfaces 1st case - no other entries:
search_for='\"interfaces\": \[ '
sed -i "/${search_for}\"*\"\ */ s/\ \]/,\ \"${dev}\"\ \]/g" "${kea_conf_file}"
sed -i "s/${search_for}]/${search_for}\"${dev}\"\ \]/g" "${kea_conf_file}"
# Include the xenguest kea subnet conf file in the kea main config
search_for='\"subnet4\": \['
sed -i "/$search_for/a $kea_guest_config" "${kea_conf_file}"
# Generate the xenguest kea subnet conf file
echo -e "$(eval "echo -e \"$(cat ${XENGUEST_KEA_SUBNET_TEMPLATE})\"")" \
> "${XENGUEST_KEA_SUBNET_CONFIG}"
release_lock "vif-nat-kea"
}
call_extra_hooks() {
for f in /etc/xenguest/guests/${guestname}/files/*.hook; do
if [ -x "$f" ]; then
log info "Executing $f"
. "$f"
if [ $? -ne 0 ]; then
log err "$f failed."
fi
else
log info "$f is not executable. Skipping."
fi
done
}
case "${XENGUEST_NETWORK_TYPE}" in
nat)
XENGUEST_KEA_SUBNET_TEMPLATE=${XENGUEST_KEA_SUBNET_TEMPLATE:-"/etc/xenguest/guests/${guestname}/files/kea-subnet4.json"}
if [ ! -f ${XENGUEST_KEA_SUBNET_TEMPLATE} ]; then
log debug "No ${XENGUEST_KEA_SUBNET_TEMPLATE} file. Aborting"
return
fi
XENGUEST_KEA_SUBNET_CONFIG="/etc/kea/kea-subnet4.dom$domid.json"
if [ ! -d "$(dirname ${XENGUEST_KEA_SUBNET_CONFIG})" ]; then
log debug "No kea configuration directory. Aborting"
return
fi
kea_guest_config="\ \ \ \ <?include \"${XENGUEST_KEA_SUBNET_CONFIG}\"?>"
case "$command" in
online)
kea_add_conf_entries
# Enable ip forwarding and NAT for the ${bridge} interface
sysctl -w net.ipv4.ip_forward=1
iptables_w -t nat -A POSTROUTING -o ${bridge} -j MASQUERADE -m comment --comment "dom${domid}"
;;
offline)
kea_remove_conf_entry
# Remove the NAT iptables rules created for the dom${domid}
guest_ipt_rule=$(iptables_w -t nat -vL POSTROUTING -n --line-number | grep -w dom${domid} | awk '{print $1}' | tac)
for rule in ${guest_ipt_rule}; do iptables_w -t nat --delete POSTROUTING ${rule}; done
# If there is no more NAT iptables rules we disable ip forwarding
ipt_nat_rules=$(iptables_w -t nat -vL POSTROUTING -n --line-number | grep MASQUERADE | awk '{print $1}')
[ -z "${ipt_nat_rules##*[!0-9]*}" ] && sysctl -w net.ipv4.ip_forward=0
;;
esac
# We might have extra configs to be applied (e.g.: NAT port forward).
call_extra_hooks
;;
esac
@@ -0,0 +1,48 @@
#============================================================================
# /etc/xenguest/guests/${guestname}/files/00-xenguest-nat-port-forward.hook
#
# Script for performing local configuration related to NAT port forwarding of
# a vif.
# This script will be sourced by
# /etc/xen/scripts/vif-post.d/00-vif-xenguest.hook when
# XENGUEST_IMAGE_NETWORK_TYPE="nat".
# The ${bridge} and ${domid} are set in the 00-vif-xenguest.hook context,
# and ${vip_if} in the vif-nat script context.
#
# Environment vars:
# command (add|remove|online|offline)
# dev vif interface name (required).
# main_ip IP address of Dom0
# ip list of IP networks for the vif, space-separated
# XENBUS_PATH path to this device's details in the XenStore (required).
#============================================================================
host_port="###HOST_PORT###"
guest_port="###GUEST_PORT###"
port_num_check() {
if [ ${host_port} -gt 65535 -o ${guest_port} -gt 65535 ]; then
log error "host_port=${host_port} or guest_port=${guest_port} greater than 65535."
return 1
fi
return 0
}
case "${command}" in
online)
port_num_check
if [ $? -eq 0 ]; then
iptables_w -t nat -A PREROUTING -i ${bridge} -p tcp \
--dport ${host_port} -j DNAT \
--to-destination ${vif_ip}:${guest_port} \
-m comment --comment "dom${domid}"
fi
;;
offline)
# Remove the NAT iptables rules created for the dom${domid}
guest_ipt_rule=$(iptables_w -t nat -vL PREROUTING -n --line-number \
| grep -w dom${domid} | awk '{print $1}' | tac)
for rule in ${guest_ipt_rule}; \
do iptables_w -t nat --delete PREROUTING ${rule}; done
;;
esac
@@ -0,0 +1,30 @@
# This file holds the minimal kea dhcp4 server configuration.
# It replaces existing kea dhcp configuration file via
# "/etc/init.d/kea-restore-default-config" on every system boot.
# The "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" called in the end of
# the vif-nat script will append each xenguest configuration to this file,
# to generate the final dhcp configuration.
# This file can be replaced with xenguest-network.bbappend.
{
"Dhcp4": {
"interfaces-config": {
"interfaces": [ ]
},
"lease-database": {
"type": "memfile",
"persist": false
},
"subnet4": [
{
"subnet": "192.0.2.0/24"
}
],
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [ { "output": "/var/log/kea-dhcp4.log" } ],
"severity": "INFO"
}
]
}
}
@@ -0,0 +1,29 @@
#!/bin/sh
#
# Xenguest Restore default kea dhcp4 configuration
# This script restores a dhcp4 server configuration, to prevent
# kea startup failures after random board hangs or powercuts.
#
case "$1" in
start)
ret=$(keactrl status | grep -i "dhcpv4 server" | cut -d ' ' -f 3)
if [ "$ret" = "active" ]; then
echo "WARNING: cowardly refusing to replace dhcp4 configuration"
echo "kea dhcp4 server is up and running!"
else
echo "Resetting kea dhcp4 configuration."
cp -f /etc/kea/kea-dhcp4.conf.original /etc/kea/kea-dhcp4.conf
fi
;;
status|stop|reload|force-reload|restart)
true
;;
*)
# do not advertise unreasonable commands that there is no reason
# to use with this device
echo $"Usage: $0 {start|stop|status|restart|force-reload}"
exit 1
esac
exit $?
@@ -0,0 +1,35 @@
# This file holds the guest kea dhcp4 server options running on Dom0.
# The "/etc/xen/scripts/vif-post.d/00-vif-xenguest.hook" called in the end of
# the vif-nat script will use this file to generate the final dhcp
# configuration.
# This file is added in the xenguest image and installed in dom0 under
# /etc/xenguest/guests/${guestname}/files/kea-subnet4.json when the guest
# image is created.
# Any customizations to it should be performed by replacing it via a bbappend.
# The \${vif_ip} and \${router_ip} variables are set in
# the vif-nat script context. The \${subnetprefix} and \${mac} variable are set in the
# 00-vif-xenguest.hook script context.
# The "subnet" configuration node is mandatory in order to have the dhcp
# properly running.
{
\"subnet\": \"${subnetprefix}.0/24\",
\"option-data\": [
{
\"name\": \"routers\",
\"data\": \"${router_ip}\"
},
{
\"name\": \"domain-name-servers\",
\"data\": \"8.8.8.8, 8.8.4.4\"
}
],
\"reservations\": [
{
\"hw-address\": \"${mac}\",
\"ip-address\": \"${vif_ip}\"
}
]
},
@@ -1,15 +1,21 @@
#!/bin/sh
# This script is setting up a virtual network interface connected to the
# xenguest-network-bridge if NETWORK_BRIDGE is set to 1 in the guest params
guestname="${1}"
#
# Since this script is sourced by xenguest-manager, it can access variables
# such as ${guestname} from the parent file's scope, as well as those in
# params.cfg, for example XENGUEST_NETWORK_TYPE
BRIDGE_NAME="###BRIDGE_NAME###"
# get guest parameters
. ./params.cfg
if [ "${NETWORK_BRIDGE:-}" = "1" ]; then
echo "vif = ['${BRIDGE_NAME}']" >> ${guestname}.cfg
fi
case "${XENGUEST_NETWORK_TYPE:=}" in
nat)
echo "vif = ['script=vif-nat']" >> ${guestcfgfile}
;;
bridge)
echo "vif = ['script=vif-bridge,bridge=${BRIDGE_NAME}']" >> ${guestcfgfile}
;;
*)
echo "${@}: XENGUEST_NETWORK_TYPE=$XENGUEST_NETWORK_TYPE invalid"
;;
esac
@@ -12,6 +12,9 @@ fi
source ${XENGUEST_CONF_BASE}/xenguest-manager.conf
# Make sure we properly initialized the Dom0
/usr/bin/xenguest-manager check-xen || exit $?
# Create guest list
guestlist=$(/usr/bin/xenguest-manager list)
@@ -62,8 +65,10 @@ case "$1" in
;;
stop)
echo "Stopping xenguest"
# update guest list
guestlist=$(xenguest-manager status | grep Running | cut -d ":" -f1)
for f in ${guestlist}; do
/usr/bin/xenguest-manager stop ${f}
xl shutdown -w ${f} || xl destroy ${f}
done
;;
reload)

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