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

Compare commits

..

66 Commits

Author SHA1 Message Date
Ross Burton 5c84950712 arm-toolchain/layer.conf: remove BB_DANGLINGAPPENDS_WARNONLY
This appears to be historical from when the toolchain was in meta-linaro.

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

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

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

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

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

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-03-11 11:53:35 -05:00
Ross Burton a0382c6a57 CI: pin Kas container to 2.6.3
Pin the Kas container to the 2.6.3 release, using debian-10, as newer
images use debian-11 which isn't a supported host distribution for
Gatesgarth.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-01-28 15:00:10 -05:00
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
636 changed files with 15885 additions and 20691 deletions
-1
View File
@@ -1 +0,0 @@
__pycache__
+24 -97
View File
@@ -1,6 +1,7 @@
image: ghcr.io/siemens/kas/kas
# We need 2.6.3 as this is the latest container with an old enough distro
image: ghcr.io/siemens/kas/kas:2.6.3
# First do a common bootstrap, and then build all the targets
# First do a common bootstrap, and then build all the targets
stages:
- prep
- bootstrap
@@ -27,7 +28,6 @@ stages:
- mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
# Must do this here, as it's the only way to make sure the toolchain is installed on the same builder
- ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
- sudo apt update && sudo apt install telnet -y
# Generalised fragment to do a Kas build
.build:
@@ -38,17 +38,6 @@ stages:
- kas build $KASFILES
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
# Workaround for Zephyr not currectly handling TESTIMAGE_AUTO
.build_and_test:
extends: .setup
script:
- KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- kas build $KASFILES -c testimage
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
#
# Prep stage, update repositories once
#
@@ -56,7 +45,7 @@ update-repos:
extends: .setup
stage: prep
script:
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
- flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
#
# Bootstrap stage, bootstrap and machine coverage
@@ -68,39 +57,20 @@ n1sdp/bootstrap:
extends: .build
stage: bootstrap
n1sdp/clang/clang-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
- ./ci/check-machine-coverage
coverage: '/Coverage: \d+/'
#
# Build stage, the actual build jobs
#
# Validate layers are Yocto Project Compatible
check-layers:
extends: .setup
coverage: '/Coverage: \d+/'
script:
- kas shell --update --force-checkout ci/base.yml:ci/meta-arm-autonomy.yml:ci/meta-openembedded.yml --command \
"$CI_PROJECT_DIR/ci/check-layers.py $CI_PROJECT_DIR/ci/check-layers.yml $CI_PROJECT_DIR $KAS_WORK_DIR"
pending-updates:
extends: .setup
artifacts:
paths:
- update-report.html
script:
- kas shell ci/qemuarm64.yml:ci/meta-openembedded.yml -c "$CI_PROJECT_DIR/scripts/machine-summary.py -t updates.html -o $CI_PROJECT_DIR/update-report.html $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp)"
corstone500:
a5ds:
extends: .build
corstone700-fvp:
@@ -109,10 +79,11 @@ corstone700-fvp:
corstone700-mps3:
extends: .build
fvp-base/testimage:
foundation-armv8:
extends: .build
fvp-base:
extends: .build
tags:
- x86_64
fvp-base-arm32:
extends: .build
@@ -120,33 +91,15 @@ fvp-base-arm32:
fvp-base-arm32/external-gccarm:
extends: .build
fvp-baser-aemv8r64:
extends: .build
fvps:
extends: .build
gem5-arm64:
extends: .build
gem5-arm64/xen:
extends: .build
gem5-atp-arm64:
extends: .build
generic-arm64:
extends: .build
juno:
extends: .build
juno/clang:
extends: .build
microbit-v1/testimage-zephyr:
extends: .build_and_test
musca-b1:
extends: .build
@@ -156,19 +109,14 @@ musca-s1:
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
qemu-cortex-a53:
extends: .build
qemu-cortex-m3/testimage-zephyr:
extends: .build_and_test
qemu-cortex-r5:
extends: .build
qemuarm64-sbsa:
qemuarm/testimage:
extends: .build
qemuarm64-secureboot/testimage:
@@ -183,18 +131,6 @@ qemuarm64-secureboot/clang/musl/testimage:
qemuarm64-secureboot/musl/testimage:
extends: .build
qemuarm64/xen:
extends: .build
qemuarm/clang/testimage:
extends: .build
qemuarm/testimage:
extends: .build
qemuarm/xen:
extends: .build
qemuarmv5/testimage:
extends: .build
@@ -203,16 +139,7 @@ sgi575:
tc0:
extends: .build
tags:
- x86_64
tc1:
extends: .build
tags:
- x86_64
toolchains:
extends: .build
#
# Utility tasks, not executed automatically
@@ -223,14 +150,14 @@ delete-dl-dir:
stage: prep
when: manual
script:
- rm -rf $DL_DIR/*
- rm -rf $DL_DIR/*
delete-repo-dir:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $KAS_REPO_REF_DIR/*
- rm -rf $KAS_REPO_REF_DIR/*
# Delete all sstate
delete-sstate:
@@ -238,14 +165,14 @@ delete-sstate:
stage: prep
when: manual
script:
- rm -rf $SSTATE_DIR/*
- rm -rf $SSTATE_DIR/*
delete-toolchains:
extends: .setup
stage: prep
when: manual
script:
- rm -rf $TOOLCHAIN_DIR/*
- rm -rf $TOOLCHAIN_DIR/*
# Wipe out old sstate
prune-sstate:
@@ -253,9 +180,9 @@ prune-sstate:
stage: prep
when: manual
script:
- du -h -s $SSTATE_DIR
- find $SSTATE_DIR -type f -atime +30 -delete
- du -h -s $SSTATE_DIR
- du -h -s $SSTATE_DIR
- find $SSTATE_DIR -type f -atime +30 -delete
- du -h -s $SSTATE_DIR
# Report on disk usage
usage:
@@ -263,4 +190,4 @@ usage:
stage: prep
when: manual
script:
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
- du -h -s $DL_DIR $SSTATE_DIR $KAS_REPO_REF_DIR $TOOLCHAIN_DIR
+13 -36
View File
@@ -1,46 +1,23 @@
Introduction
------------
This repository contains the Arm layers for OpenEmbedded.
This repository contains Arm layers for OpenEmbedded
* meta-arm
meta-arm:
This layer provides support for general recipes for the Arm
architecture. Anything that's not needed explicitly for BSPs, the IOTA
distribution, or destined to be upstreamed belongs here.
This layer contains general recipes for the Arm architecture, such as firmware, FVPs, and Arm-specific integration.
meta-arm-bsp:
This layer provides support for Arm reference platforms
* meta-arm-autonomy
meta-arm-iota:
This layer provides support for Arm's IOTA Linux Distribution
This layer is the distribution for a reference stack for autonomous systems.
meta-arm-toolchain:
This layer provides support for Arm's GNU-A toolset releases
* meta-arm-bsp
This layer contains machines for Arm reference platforms, for example FVP Base, N1SDP, and Juno.
* meta-arm-toolchain
This layer contains recipes for Arm's binary toolchains (GCC and Clang for -A and -M), and a recipe to build Arm's GCC.
* meta-atp
This layer contains recipes for the Adaptive Traffic Generation integration into meta-gem5.
* meta-gem5
This layer contains recipes and machines for gem5, a system-level and processor simulator.
Other Directories
-----------------
* ci
This directory contains gitlab continuous integration configuration files (KAS yaml files) as well as scripts needed for this
* kas
This directory contains KAS yaml files to describe builds for systems not used in CI
* scripts
This directory contains scripts used in running the CI tests
meta-arm-autonomy:
This layer provides a reference stack for autonomous systems.
Contributing
------------
+1 -1
View File
@@ -3,4 +3,4 @@ header:
includes:
- base.yml
machine: qemuarm64
machine: a5ds
+2 -2
View File
@@ -2,5 +2,5 @@ header:
version: 9
local_conf_header:
cc: |
GCCVERSION = "arm-10.3"
libc: |
GCCVERSION = "arm-9.2"
+8 -13
View File
@@ -5,7 +5,7 @@ distro: poky
defaults:
repos:
refspec: honister
refspec: gatesgarth
repos:
meta-arm:
@@ -26,22 +26,17 @@ env:
local_conf_header:
base: |
CONF_VERSION = "2"
CONF_VERSION = "1"
PACKAGE_CLASSES = "package_ipk"
LICENSE_FLAGS_WHITELIST += "armcompiler Arm-FVP-EULA"
PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES:append = " debug-tweaks"
LICENSE_FLAGS_WHITELIST += "armcompiler"
PACKAGECONFIG_remove_pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES_append = " debug-tweaks"
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
INHERIT += "rm_work"
PACKAGECONFIG:append:pn-perf = " coresight"
noptest: |
DISTRO_FEATURES:remove = "ptest"
sstate_mirror: |
BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"
BB_HASHSERVE = "auto"
BB_SIGNATURE_HANDLER = "OEEquivHash"
SSTATE_MIRRORS = "file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH"
PACKAGECONFIG_append_pn-perf = " coresight"
ptest: |
DISTRO_FEATURES_remove = "ptest"
machine: unset
-44
View File
@@ -1,44 +0,0 @@
#! /usr/bin/env python3
import argparse
import pathlib
import re
import subprocess
import sys
import yaml
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("config", type=argparse.FileType())
parser.add_argument("metaarm", type=pathlib.Path, help="Path to meta-arm")
parser.add_argument("others", type=pathlib.Path, help="Path to parent of dependencies")
args = parser.parse_args()
config = yaml.safe_load(args.config)
layers = config["layers"]
dependencies = config["dependencies"]
found_layers = [p for p in args.metaarm.glob("meta-*") if p.is_dir()]
print(f"Testing {len(layers)} layers: {', '.join(layers)}.")
print(f"Found {len(found_layers)} layers in meta-arm.")
print()
cli = ["yocto-check-layer-wrapper",]
cli.extend([args.metaarm / layer for layer in layers])
cli.append("--dependency")
cli.extend([args.others / layer for layer in dependencies])
cli.append("--no-auto-dependency")
passed = 0
process = subprocess.Popen(cli, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
while True:
line = process.stdout.readline()
if process.poll() is not None:
break
print(line.strip())
if re.search(r"meta-.+ PASS", line):
passed += 1
print(f"Coverage: {int(passed / len(found_layers) * 100)}%")
sys.exit(process.returncode)
-13
View File
@@ -1,13 +0,0 @@
layers:
- meta-arm
- meta-arm-bsp
- meta-arm-toolchain
- meta-gem5
- meta-arm-autonomy
dependencies:
- meta-openembedded/meta-oe
- meta-openembedded/meta-networking
- meta-openembedded/meta-python
- meta-openembedded/meta-filesystems
- poky/meta-poky
- meta-virtualization
+6 -8
View File
@@ -2,7 +2,6 @@
from pathlib import Path
import sys
from listmachines import list_machines
metaarm = Path.cwd()
@@ -10,16 +9,15 @@ if metaarm.name != "meta-arm":
print("Not running inside meta-arm")
sys.exit(1)
# Find all layers
layers = (p.name for p in metaarm.glob("meta-*") if p.is_dir())
# All machine configurations
machines = list_machines(layers)
machines = metaarm.glob("meta-*/conf/machine/*.conf")
machines = set(p.stem for p in machines)
# All kas files
kas = metaarm.glob("ci/*.yml")
kas = set(p.stem for p in kas)
# All ci files
ci = metaarm.glob("ci/*.yml")
ci = set(p.stem for p in ci)
missing = machines - kas
missing = machines - ci
print(f"The following machines are missing: {', '.join(sorted(missing))}.")
covered = len(machines) - len(missing)
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
target:
- binutils-cross-aarch64
- clang-cross-aarch64
- clang-native
- python3-native
- opkg-native
- rpm-native
+1 -1
View File
@@ -4,7 +4,7 @@ header:
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
refspec: master
refspec: gatesgarth
local_conf_header:
clang: |
@@ -3,4 +3,4 @@ header:
includes:
- base.yml
machine: corstone500
machine: foundation-armv8
-9
View File
@@ -5,12 +5,3 @@ header:
machine: fvp-base
local_conf_header:
testimagefvp: |
INHERIT = "fvpboot"
# This fails but we can't add to the ignorelist from meta-arm yet
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14604
TEST_SUITES:remove = "parselogs"
# Tell testimage to connect to localhost:8022, and forward that to SSH in the FVP.
TEST_TARGET_IP = "localhost:8022"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
-7
View File
@@ -1,7 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: fvp-baser-aemv8r64
-20
View File
@@ -1,20 +0,0 @@
# Simple target to build the FVPs that are publically available
header:
version: 9
includes:
- base.yml
machine: qemuarm64
local_conf_header:
sdk: |
SDKMACHINE = "x86_64"
target:
- nativesdk-fvp-base-a-aem
- nativesdk-fvp-n1-edge
- nativesdk-fvp-sgi575
- nativesdk-fvp-corstone500
- nativesdk-fvp-corstone700
- nativesdk-fvp-tc0
+5 -1
View File
@@ -2,13 +2,17 @@ header:
version: 9
includes:
- base.yml
- meta-openembedded.yml
repos:
meta-arm:
layers:
meta-gem5:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-oe:
machine: gem5-arm64
target:
-15
View File
@@ -1,15 +0,0 @@
header:
version: 9
includes:
- gem5-arm64.yml
repos:
meta-arm:
layers:
meta-atp:
machine: gem5-atp-arm64
target:
- atp-native
- core-image-minimal
-6
View File
@@ -1,6 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: generic-arm64
+1 -1
View File
@@ -2,7 +2,7 @@
set -u
HOST_ARCH=$(uname -m)
VER="10.3-2021.07"
VER="10.2-2020.11"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
-29
View File
@@ -1,29 +0,0 @@
#! /usr/bin/env python3
import pathlib
import typing
import sys
"""
List all of the machines available under the listed sub-layers of meta-arm.
"""
def list_machines(layers: typing.Sequence[str]) -> typing.Set[str]:
machines = set()
# We know we're in meta-arm/scripts, so find the top-level directory
metaarm = pathlib.Path(__file__).resolve().parent.parent
if metaarm.name != "meta-arm":
raise Exception("Not running inside meta-arm")
for layer in layers:
machines |= set(p.stem for p in (metaarm / layer / "conf" / "machine").glob("*.conf"))
return machines
if __name__ == "__main__":
if len(sys.argv) > 1:
machines = list_machines(sys.argv[1:])
print(" ".join(sorted(machines)))
sys.exit(0)
else:
print("Usage:\n$ %s [layer name ...] " % sys.argv[0])
sys.exit(1)
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- meta-openembedded.yml
- meta-virtualization.yml
repos:
meta-arm:
layers:
meta-arm-autonomy:
@@ -5,7 +5,5 @@ repos:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
layers:
meta-filesystems:
meta-networking:
meta-oe:
meta-python:
-8
View File
@@ -1,8 +0,0 @@
header:
version: 9
includes:
- meta-openembedded.yml
repos:
meta-virtualization:
url: git://git.yoctoproject.org/meta-virtualization
+1 -2
View File
@@ -1,9 +1,8 @@
header:
version: 9
includes:
- meta-openembedded.yml
- meta-python.yml
repos:
meta-zephyr:
url: https://git.yoctoproject.org/git/meta-zephyr
refspec: master
-16
View File
@@ -1,16 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common"
failing_tests: |
ZEPHYRTESTS:remove = "context early_sleep sleep"
machine: microbit-v1
target:
- zephyr-kernel-test-all
+1 -1
View File
@@ -2,7 +2,7 @@ header:
version: 9
includes:
- base.yml
- meta-openembedded.yml
- meta-python.yml
machine: musca-s1
-14
View File
@@ -1,14 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove += "common device poll queue sleep"
machine: qemu-cortex-a53
target:
- zephyr-kernel-test-all
-16
View File
@@ -1,16 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
local_conf_header:
tclibc: |
TCLIBC = "newlib"
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common context pending poll sleep"
machine: qemu-cortex-m3
target:
- zephyr-kernel-test-all
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- base.yml
- meta-zephyr.yml
machine: qemu-cortex-r5
target:
- zephyr-philosophers
-11
View File
@@ -1,11 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: qemuarm64-sbsa
target:
- core-image-base
- perf
- sbsa-acs
+5
View File
@@ -4,3 +4,8 @@ header:
- base.yml
machine: qemuarmv5
local_conf_header:
bugs: |
# Remove parselogs until errors can be resolved
TEST_SUITES_remove = "parselogs"
-4
View File
@@ -4,7 +4,3 @@ header:
- base.yml
machine: tc0
target:
- tc-artifacts-image
- perf
-10
View File
@@ -1,10 +0,0 @@
header:
version: 9
includes:
- base.yml
machine: tc1
target:
- tc-artifacts-image
- perf
-8
View File
@@ -1,8 +0,0 @@
header:
version: 9
local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
+1 -1
View File
@@ -10,7 +10,7 @@ local_conf_header:
TEST_SERVER_IP = "127.0.0.1"
QEMU_USE_SLIRP = "1"
packages: |
IMAGE_FEATURES:append = " ssh-server-dropbear"
IMAGE_FEATURES_append = " ssh-server-dropbear"
# Multiple targets are available, put it down to just one
target:
-20
View File
@@ -1,20 +0,0 @@
header:
version: 9
includes:
- base.yml
# Target is arm64 and SDK is x86-64 to ensure that we exercise both
# architectures
machine: qemuarm64
local_conf_header:
toolchains: |
SDKMACHINE = "x86_64"
# No target armcompiler as currently there is no arm64 build
target:
- nativesdk-armcompiler
- gcc-aarch64-none-elf
- nativesdk-gcc-aarch64-none-elf
- gcc-arm-none-eabi
- nativesdk-gcc-arm-none-eabi
-2
View File
@@ -36,8 +36,6 @@ if __name__ == "__main__":
for repo in repositories:
repodir = base_repodir / repo_shortname(repo)
if repodir.exists():
print("Updating %s..." % repo)
subprocess.run(["git", "-C", repodir, "fetch"], check=True)
else:
print("Cloning %s..." % repo)
subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
-11
View File
@@ -1,11 +0,0 @@
header:
version: 9
includes:
- meta-virtualization.yml
local_conf_header:
meta-virt: |
DISTRO_FEATURES:append = " virtualization xen"
target:
- xen-image-minimal
-41
View File
@@ -1,41 +0,0 @@
header:
version: 9
distro: poky
machine: fvp-baser-aemv8r64
defaults:
repos:
refspec: honister
repos:
meta-arm:
url: https://git.yoctoproject.org/git/meta-arm
path: layers/meta-arm
layers:
meta-arm:
meta-arm-bsp:
meta-arm-toolchain:
poky:
url: https://git.yoctoproject.org/git/poky
path: layers/poky
layers:
meta:
meta-poky:
env:
FVP_BASE_R_AEM_TARBALL_URI: ""
FVP_BASE_R_ARM_EULA_ACCEPT: "False"
local_conf_header:
base: |
CONF_VERSION = "2"
PACKAGE_CLASSES = "package_ipk"
PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl"
EXTRA_IMAGE_FEATURES:append = " debug-tweaks"
IMAGE_CLASSES:append = " ${@oe.utils.ifelse(d.getVar('FVP_BASE_R_AEM_TARBALL_URI'), 'fvpboot', '')}"
LICENSE_FLAGS_WHITELIST:append = " ${@oe.utils.vartrue('FVP_BASE_R_ARM_EULA_ACCEPT', 'Arm-FVP-EULA', '', d)}"
target:
- core-image-minimal
-8
View File
@@ -1,8 +0,0 @@
header:
version: 9
includes:
- fvp-baser-aemv8r64-bsp.yml
local_conf_header:
base-rt: |
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
+17 -18
View File
@@ -4,8 +4,8 @@ meta-arm-autonomy Yocto Layer
Introduction
------------
This layer provides an hypervisor based solution (currently based on Xen) for
autonomous system. It contains recipes and classes to build host and guest
images.
autonomous system. It contains recipes and classes to build host and guests
systems.
To start using this layer, please check the
[Quick Start Guide](documentation/arm-autonomy-quickstart.md).
@@ -16,14 +16,13 @@ This layer depends on several other Yocto layers:
* meta-openembedded (https://git.openembedded.org/meta-openembedded)
* poky (https://git.yoctoproject.org/poky)
* meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
* meta-networking (git://git.openembedded.org/meta-openembedded)
Distribution Features
---------------------
This layer adds the following Yocto DISTRO_FEATURES:
This layer is adding the following Yocto DISTRO_FEATURES:
* arm-autonomy-host: this feature activates functionalities required to build
an autonomy host system. It has the following effects:
an autonomy host system. It is doing the following:
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
- add xen backend drivers to linux kernel configuration.
- To reduce the root filesystem image size the kernel image is not installed.
@@ -44,40 +43,40 @@ its documentation.
Those documentation files should be checked for variables:
- [xen-devicetree](documentation/xen-devicetree.md)
- [xenguest-manager](documentation/xenguest-manager.md)
- [xenguest-network](documentation/xenguest-network.md)
- [xenguest-network-bridge](documentation/xenguest-network-bridge.md)
BSPs
----
This layer adds the following machine:
This layer is adding the following machines:
* arm64-autonomy-guest: This machine creates a minimal BSP suitable to be used
* arm64-autonomy-guest: this machines creates a minimal BSP suitable to be used
as an autonomy guest. It is in fact only activating ARM64 architecture and
SMP in the linux kernel and is enabling the DISTRO_FEATURE
'arm-autonomy-guest'.
arm-autonomy-guest.
Images
------
This layer is adding the following images:
* arm-autonomy-host-image-minimal: This image includes all elements required
to create a minimal arm-autonomy-host system. This includes xen, and tools to
manage xen guests and xenguest images. This image depends on
'arm-autonomy-host' distribution feature.
* arm-autonomy-host-image-minimal: this image includes all elements required
to create a minimal arm-autonomy-host system. This includes xen and tools to
manage xen guests. This image depends on 'arm-autonomy-host' distribution
feature.
Recipes and classes
-------------------
This layer adds the following recipes and classes:
This layer is adding the following recipes and classes:
* [xen-devicetree](documentation/xen-devicetree.md): This is a recipe to modify
* [xen-devicetree](documentation/xen-devicetree.md): this is a recipe to modify
a device tree blob to add information required to boot xen and a Dom0 linux.
* [xenguest-mkimage](documentation/xenguest-mkimage.md): This is a tool used to
* [xenguest-mkimage](documentation/xenguest-mkimage.md): this is a tool to
create and modify images to be used as Xen guests.
* [xenguest-manager](documentation/xenguest-manager.md): This is a tool used to
* [xenguest-manager](documentation/xenguest-manager.md): this is a tool to
create/remove/start/stop xen guest generated using xenguest-mkimage.
* [xenguest-network](documentation/xenguest-network.md): This
* [xenguest-network-bridge](documentation/xenguest-network-bridge.md): this
recipe add tools and init scripts to create a bridge connected to the
external network on the host and allow guests to be connected to it.
@@ -1,26 +0,0 @@
# This class is to be inherited by image recipes that want to build and install
# an alternate kernel (set via PREFERRED_PROVIDER_alternate/kernel).
#
# It is mandatory to also set the KERNEL_PACKAGE_NAME for the alternate kernel
# recipe via KERNEL_PACKAGE_NAME:pn-${PREFERRED_PROVIDER_alternate/kernel} and
# its value needs to be different from "kernel" since this is the default set
# for PREFERRED_PROVIDER_virtual/kernel.
#
# An example of these settings can be found at meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc
#
# When building and installing an alternate kernel, the kernel-modules packages
# for both virtual/kernel and alternate/kernel will be installed.
PREFERRED_PROVIDER_alternate/kernel ??= ""
python () {
alternate_kernel = d.getVar('PREFERRED_PROVIDER_alternate/kernel')
if alternate_kernel:
alternate_kernel_pkg_name = d.getVar('KERNEL_PACKAGE_NAME:pn-%s' % alternate_kernel)
if alternate_kernel_pkg_name:
d.appendVar('EXTRA_IMAGEDEPENDS', ' ' + alternate_kernel)
d.appendVar('IMAGE_INSTALL', ' kernel-modules')
d.appendVar('IMAGE_INSTALL', ' ' + alternate_kernel_pkg_name + '-modules')
else:
raise bb.parse.SkipRecipe("No KERNEL_PACKAGE_NAME:pn-%s set" % alternate_kernel )
}
@@ -1,115 +0,0 @@
# Docker Extern Containers
#
# This class allows docker image tarballs to be installed in the rootfs
#
# The images can be selected using the variable CONTAINER_IMAGE_FILES which
# should contain a space seperated list of absolute paths or yocto urls for
# docker images that have been exported using docker export:
# - https://docs.docker.com/engine/reference/commandline/export/
#
# src_uri_parse_var.bbclass is used to parse CONTAINER_IMAGE_FILES
#
# There are 4 supported formats for CONTAINER_IMAGE_FILES entries:
#
# - http/https url
# - CONTAINER_IMAGE_FILES = "https://[url]:[port]/alpine.tar;md5sum=..."
#
# - file:// absolute local path from root
# - CONTAINER_IMAGE_FILES = "file:///containers/alpine2.tar"
#
# - file:// path relative to FILESEXTRAPATHS
# - CONTAINER_IMAGE_FILES = "file://foo/alpine3.tar"
# FILESEXTRAPATHS .= "/containers:"
#
# - plain absolute local path from root
# - CONTAINER_IMAGE_FILES = "/containers/foo/bar/alpine4.tar"
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# A semicolon seperated list of install arguments can follow each image path:
# - conname : the name that will be attached when the image is imported
# (default: [filename, without extension])
# - contag : the tag that will be attached when the image is imported
# (default: local)
# - conkeep : Flag for whether the exported container image file should be
# kept once the import has been completed
# (default: 0)
#
# Any other arguments, for example an md5sum, will be assumed to be fetch
# arguments, and will be kept when the path is added to the SRC_URI
#
# e.g. CONTAINER_IMAGE_FILES = "\
# https://[url]:[port]/alpine.tar;md5sum=[checksum];conkeep=1 \
# file:///containers/alpine2.tar;contag=latest;conname=docker2 \
# file://foo/alpine3.tar \
# /containers/foo/bar/alpine4.tar;contag=1.0;conkeep=1 "
#
# Resulting Manifest:
# ARCHIVE NAME TAG KEEP
# alpine.tar alpine local 1
# alpine2.tar docker2 latest 0
# alpine3.tar alpine3 local 0
# alpine4.tar alpine4 1.0 1
#
# Other configurable variables:
# CONTAINERS_INSTALL_DIR : The folder underneath ${WORKDIR} where the docker
# images will be stored
# (default: "/usr/share/docker/images")
# CONTAINERS_MANIFEST : The name of the manifest file containing image
# parameters, also stored in CONTAINERS_INSTALL_DIR
# (default: "containers.manifest")
# CONTAINERS_TAG_DEFAULT : Use this to change the value that will be used as
# contag if no value is provided
# (default: "local")
# CONTAINERS_KEEP_DEFAULT : Use this to change the value that will be used for
# conkeep if no value is provided
# (default: "0")
#
inherit features_check
REQUIRED_DISTRO_FEATURES = "docker"
RDEPENDS:${PN} = "packagegroup-docker-runtime-minimal"
CONTAINER_IMAGE_FILES ??= ""
CONTAINERS_INSTALL_DIR ??= "${datadir}/docker/images"
CONTAINERS_MANIFEST ??= "containers.manifest"
CONTAINERS_TAG_DEFAULT ??= "local"
CONTAINERS_KEEP_DEFAULT ??= "0"
inherit set_src_uri_from_var
SRC_URI_FROM_VAR_NAME = "CONTAINER_IMAGE_FILES"
# Define installation params
SRC_URI_FROM_VAR_MANIFEST_PARAMS = "conname=[basename] \
contag=${CONTAINERS_TAG_DEFAULT} conkeep=${CONTAINERS_KEEP_DEFAULT}"
SRC_URI_FROM_VAR_UNPACK_DIR = "containers"
# Read manifest and install container images
do_install() {
local archive name tag keep
if [ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" ]; then
install -d "${D}${CONTAINERS_INSTALL_DIR}"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/manifest" \
"${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
while read -r archive name tag keep _; do
[ -f "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" ] ||
bbfatal "${archive} does not exist"
install -m 644 \
"${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}/${archive}" \
"${D}${CONTAINERS_INSTALL_DIR}/${archive}"
done < "${D}${CONTAINERS_INSTALL_DIR}/${CONTAINERS_MANIFEST}"
fi
}
do_install[vardeps] += "CONTAINER_IMAGE_FILES"
FILES:${PN} += "${CONTAINERS_INSTALL_DIR}"
@@ -1,7 +1,7 @@
# Create a xenguest image with kernel and filesystem produced by Yocto
# This will create a .xenguest file that the xenguest-manager can use.
inherit xenguest_image
inherit xenguest-image
# We are creating our guest in a local subdirectory
# force the value so that we are not impacted if the user is changing it
@@ -22,7 +22,7 @@ xenguest_image_add_kernel() {
# Add rootfs file to the image
xenguest_image_add_rootfs() {
call_xenguest_mkimage partial \
--disk-add-file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_TYPEDEP:xenguest}:rootfs.${IMAGE_TYPEDEP:xenguest}
--disk-add-file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_TYPEDEP_xenguest}:rootfs.${IMAGE_TYPEDEP_xenguest}
}
# Pack xenguest image
@@ -57,73 +57,12 @@ do_bootimg_xenguest[depends] += "xenguest-base-image:do_deploy"
do_bootimg_xenguest[depends] += "${PN}:do_rootfs"
# This set in python anonymous after, just set a default value here
IMAGE_TYPEDEP:xenguest ?= "tar"
IMAGE_TYPEDEP_xenguest ?= "tar"
# We must not be built at rootfs build time because we need the kernel
IMAGE_TYPES_MASKED += "xenguest"
IMAGE_TYPES += "xenguest"
XENGUEST_IMAGE_RECIPE = "${PN}"
XENGUEST_IMAGE_VARS += "XENGUEST_IMAGE_RECIPE"
# Merge intermediate env files from all recipes into a single file
python do_merge_xenguestenv () {
import re
# Open final merged file in DEPLOY_DIR_IMAGE for writing, or create
outdir = d.getVar('DEPLOY_DIR_IMAGE')
with open(os.path.join(outdir,'xenguest.env'), 'w') as merged_file:
# Adds vars from xenguest_image to list
merged_env = []
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS')
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
merged_env.append(var + "=" + " ".join(value.split()) + "\n")
# Resolve dependencies for this task to find names of intermediate
# .xenguestenv files
taskdepdata = d.getVar('BB_TASKDEPDATA')
task_mc = d.getVar('BB_CURRENT_MC')
task_file = d.getVar('FILE')
# See runqueue.py function build_taskdepdata
DEPS_INDEX = 3
depdata_key = task_file + ":do_merge_xenguestenv"
# If in a multiconfig, need to add that to the key
if task_mc != "default":
depdata_key = "mc:" + task_mc + ":" + depdata_key
# Retrieve filename using regex
get_filename = re.compile(r'/([^/]+\.bb):do_deploy_xenguestenv$')
env_dir = d.getVar('XENGUEST_ENV_STAGING_DIR')
for task_dep in taskdepdata[depdata_key][DEPS_INDEX]:
if task_dep.endswith(":do_deploy_xenguestenv"):
filename = re.search(get_filename, task_dep).group(1) + ".xenguestenv"
bb.note("Merging: " + filename)
try:
with open(env_dir + "/" + filename, 'r') as f:
# Eliminate duplicates
merged_env = list(set(merged_env + f.readlines()))
except (FileNotFoundError, IOError):
bb.note(" " + filename + " has no extra vars")
# Sort Alphabetically and write
merged_env.sort()
merged_file.write("".join(merged_env))
}
do_merge_xenguestenv[dirs] = "${DEPLOY_DIR_IMAGE}"
do_merge_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS}"
do_merge_xenguestenv[vardepsexclude] += "BB_TASKDEPDATA"
do_merge_xenguestenv[recrdeptask] += "do_deploy_xenguestenv"
addtask merge_xenguestenv before do_populate_lic_deploy after do_image_complete
python __anonymous() {
# Do not do anything if we are not in the want FSTYPES
if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d):
@@ -158,7 +97,7 @@ python __anonymous() {
# do_bootimg_xenguest will need the tar file
d.appendVarFlag('do_bootimg_xenguest', 'depends', ' %s:do_image_tar' % (d.getVar('PN')))
# set our TYPEDEP to the proper compression
d.setVar('IMAGE_TYPEDEP:xenguest', 'tar' + (rootfs_file.split('.tar', 1)[1] or ''))
d.setVar('IMAGE_TYPEDEP_xenguest', 'tar' + (rootfs_file.split('.tar', 1)[1] or ''))
if kernel_needed:
# Tell do_bootimg_xenguest to call xenguest_image_add_kernel
@@ -3,10 +3,7 @@
# This is done using kernel-fitimage as model
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
inherit xenguest_image
inherit xenguest-image
# use a local copy to pack all together
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
@@ -27,9 +24,9 @@ do_assemble_xenguest_initramfs() {
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
}
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_merge_xenguestenv"
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
kernel_do_deploy:append() {
kernel_do_deploy_append() {
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then
install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest "$deployDir/Image-${INITRAMFS_NAME}.xenguest"
ln -snf Image-${INITRAMFS_NAME}.xenguest $deployDir/Image-${INITRAMFS_LINK_NAME}.xenguest
@@ -1,224 +0,0 @@
# Set SRC_URI from Variable
# This class parses a variable named in SRC_URI_FROM_VAR_NAME for entries that
# should be added to the SRC_URI
#
# There are 4 supported formats for entries:
#
# - http/https url
# - Note that a checksum (md5sum or sha256sum) must be provided for http(s)
#
# - file:// absolute local path from root
# - In this case the filename will be added to SRC_URI and the path from '/'
# added to FILESEXTRAPATHS
#
# - file:// path relative to FILESEXTRAPATHS
# - In this case the filename will be added to SRC_URI and the preceding path
# added to FILESOVERRIDES, so that the full path to the file will
# be available in FILESPATH when it is generated by combining
# FILESEXTRAPATHS and FILESOVERRIDES.
#
# - plain absolute local path from root
# - This will be treated the same as an file:// path from root. Plain paths
# must be absolute, and cannot be relative to FILESEXTRAPATHS
#
# It is not recommended to use other yocto URL types, as they may result in
# undefined behaviour.
#
# These entries will be added to the SRC_URI so that the yocto fetcher can
# unpack a copy into ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}
#
#
# A list of arguments can follow each entry in the input variable, seperated
# by semi-colons (;). Arguments may be FETCH arguments or MANIFEST arguments.
#
# FETCH arguments will be appended to the entry in SRC_URI, for example
# "downloadfilename" to specify the filename used when storing a
# downloaded file.
# Each SRC_URI entry will automatically have the arguments
# "unpack=0;subdir=${SRC_URI_FROM_VAR_UNPACK_DIR}" added to them, so do not
# attempt to set these options.
#
# MANIFEST arguments are defined in the variable
# SRC_URI_FROM_VAR_MANIFEST_PARAMS which should be a space seperated list of
# names, each optionally followed by an equals sign (=) and a default value.
#
# The values provided for the manifest arguments will be written to the manifest
# file in ${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR} as columns, in the same
# order as they appear in SRC_URI_FROM_VAR_MANIFEST_PARAMS.
#
# For entries that do not provide a value for a manifest argument, the default
# value will be used if possible.
# If no default is availale, omitting the parameter on any item will cause
# an error.
#
# "[basename]" is a special case default that will set the value to
# the filename without the path or file extension.
#
# e.g.
# SRC_URI_FROM_VAR_MANIFEST_PARAMS="conname=[basename] contag=local conkeep"
#
# Any arguments that follow an entry in SRC_URI_FROM_VAR_NAME, that are not
# named in SRC_URI_FROM_VAR_MANIFEST_PARAMS are assumed to be FETCH arguments,
# so are added to the corresponding entry in the SRC_URI.
SRC_URI_FROM_VAR_NAME ??= ""
SRC_URI_FROM_VAR_MANIFEST_PARAMS ??= ""
SRC_URI_FROM_VAR_UNPACK_DIR ??= "items"
python __anonymous() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split(' '):
if not item:
continue
if item.startswith('/'):
# If not a Yocto URL, must be an absolute path
yocto_url = "file://" + item
else:
# Otherwise assume valid Yocto URL.
# Error case is caught later
yocto_url = item
fetcher = host = path = parm = None
try:
# Attempt to parse a Yocto URL
fetcher,host,path,_,_,parm = bb.fetch.decodeurl(yocto_url)
except:
# Something invalid is in the variable!
raise bb.parse.SkipRecipe(parse_var + \
" contains an invalid entry:\n'" + \
item + "'")
# This var is space seperated list of parameter names,
# with optional default value following an equals sign
# (name=default)
item_params_str = d.getVar('SRC_URI_FROM_VAR_MANIFEST_PARAMS')
# remove directories from path
filename = os.path.basename(path)
if "downloadfilename" in parm:
filename = parm["downloadfilename"]
item_manifest_args = {"filename": filename}
if item_params_str:
# required manifest arguments have been provided
# If no default is given add "=" for map parsing
item_params_list = [ arg + "=" if '=' not in arg
else arg
for arg in item_params_str.split(' ')
]
# Generate key value pairs of argument names and
# default values
item_params_map = dict( (name.strip(), val.strip())
for name, val in (arg.split('=')
for arg in item_params_list)
)
for argname in item_params_map:
# Iterate over required manifest arguments
argvalue = parm.pop(argname, None)
if argvalue:
# a value has been provided for this item
item_manifest_args[argname] = argvalue
else:
# No value provided, process default value
default = item_params_map[argname]
if default:
# A default value is provided
if default == "[basename]":
# use the filename without extension
default = os.path.splitext(filename)[0]
# store default value in dict
item_manifest_args[argname] = default
else:
# No default provided
raise bb.fatal(parse_var + \
" entry is missing a required parameter '" + \
argname + "':\n'" + item + "'")
# Write value to var flags to ensure data structure is preserved
# Each entry of parse_var will have a varflag where the value
# is a dictionary of argument names and values
d.setVarFlags(parse_var, {item: item_manifest_args})
src_uri_entry_suffix = ';'
# HTTP(S) fetcher must provide a checksum
if fetcher.startswith('http') and not \
( 'md5sum' in parm or 'sha256sum' in parm ):
# Ensure http/https fetchers get a checksum
raise bb.parse.SkipRecipe(parse_var + \
" entry is missing a checksum:\n'" + \
item + "'")
# add remaining fetch parameters including checksum
for arg in parm:
src_uri_entry_suffix += ";" + arg + "=" + parm[arg]
# Add default and extra parameters to SRC_URI entry
src_uri_entry_suffix += ';unpack=0;subdir=' + \
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR')
if fetcher == 'file':
# Prevent local fetcher from re-creating dir structure
filedir = os.path.split(path)[0]
if filedir.startswith('/'):
# Path is from the root
d.appendVar('FILESEXTRAPATHS', filedir + ':')
else:
# Path is relative to FILESEXTRAPATHS
d.appendVar('FILESOVERRIDES', ':' + filedir)
# Add filename without path to SRC_URI
d.appendVar('SRC_URI', ' file://' + \
filename + src_uri_entry_suffix)
else:
# Add full entry to SRC_URI
d.appendVar('SRC_URI', ' ' + fetcher + \
"://" + host + path + src_uri_entry_suffix)
}
python generate_manifest() {
parse_var = d.getVar('SRC_URI_FROM_VAR_NAME')
if not parse_var:
return
target_dir = os.path.join(d.getVar('WORKDIR'),
d.getVar('SRC_URI_FROM_VAR_UNPACK_DIR'))
# Write a manifest file containing the parameters so SRC_URI
# doesn't need to be parsed by do_install
with open (target_dir + "/manifest", 'w') as manifest_file:
manifest_args = d.getVarFlags(parse_var)
parse_var_items = d.getVar(parse_var)
if parse_var_items:
for item in parse_var_items.split():
manifest_file.write(" ".join(manifest_args[item].values())+"\n")
}
do_unpack[cleandirs] += "${WORKDIR}/${SRC_URI_FROM_VAR_UNPACK_DIR}"
do_unpack[postfuncs] += "generate_manifest"
do_unpack[vardeps] += "${SRC_URI_FROM_VAR_NAME}"
@@ -4,11 +4,8 @@
# The class is extending deploy function so you recipe must inherit deploy and
# have a do_deploy function (even if it is empty)
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
# Use standard xenguest_image
inherit xenguest_image
# Use standard xenguest-image
inherit xenguest-image
# Add a DTB file for the guest
# Only one file should be added, if this is set multiple times or in several
@@ -42,13 +39,7 @@ XENGUEST_EXTRA_FILES ??= ""
# dir1/file1 file in the disk content parameters).
XENGUEST_EXTRA_DISK_FILES ??= ""
# Extra vars to be written to xenguest.env
XENGUEST_IMAGE_VARS_EXTRA += "\
XENGUEST_EXTRA_DTB XENGUEST_EXTRA_RAMDISK XENGUEST_EXTRA_XENCONFIG \
XENGUEST_EXTRA_INIT_PRE XENGUEST_EXTRA_INIT XENGUEST_EXTRA_INIT_POST \
XENGUEST_EXTRA_FILES XENGUEST_EXTRA_DISK_FILES"
do_deploy:append() {
do_deploy_append() {
if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \
-z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then
die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty"
@@ -58,14 +49,14 @@ do_deploy:append() {
if [ -n "${XENGUEST_EXTRA_DTB}" ]; then
if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then
die "xenguest_image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
die "xenguest-image: DTB file ${XENGUEST_EXTRA_DTB} does not exist"
fi
call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB}
fi
if [ -n "${XENGUEST_EXTRA_RAMDISK}" ]; then
if [ ! -f ${XENGUEST_EXTRA_RAMDISK} ]; then
die "xenguest_image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
die "xenguest-image: DTB file ${XENGUEST_EXTRA_RAMDISK} does not exist"
fi
call_xenguest_mkimage partial --xen-ramdisk=${XENGUEST_EXTRA_RAMDISK}
fi
@@ -73,7 +64,7 @@ do_deploy:append() {
if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then
for f in ${XENGUEST_EXTRA_XENCONFIG}; do
if [ ! -f $f ]; then
die "xenguest_image: Xen config $f does not exist"
die "xenguest-image: Xen config $f does not exist"
fi
call_xenguest_mkimage partial --xen-append=$f
done
@@ -81,21 +72,21 @@ do_deploy:append() {
if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist"
fi
call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE}
fi
if [ -n "${XENGUEST_EXTRA_INIT}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT} does not exist"
fi
call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT}
fi
if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then
if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then
die "xenguest_image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist"
fi
call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST}
fi
@@ -103,7 +94,7 @@ do_deploy:append() {
if [ -n "${XENGUEST_EXTRA_FILES}" ]; then
for f in ${XENGUEST_EXTRA_FILES}; do
if [ ! -f $f ]; then
die "xenguest_image: Xen file $f does not exist"
die "xenguest-image: Xen file $f does not exist"
fi
call_xenguest_mkimage partial --xen-add-file=$f
done
@@ -112,12 +103,12 @@ do_deploy:append() {
if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then
for f in ${XENGUEST_EXTRA_DISK_FILES}; do
if [ ! -f $f ]; then
die "xenguest_image: Disk file $f does not exist"
die "xenguest-image: Disk file $f does not exist"
fi
call_xenguest_mkimage partial --disk-add-file=$f
done
fi
}
# Need to have xenguest_image tool
# Need to have xenguest-image tool
do_deploy[depends] += "xenguest-base-image:do_deploy"
@@ -30,7 +30,7 @@ XENGUEST_IMAGE_ROOT ??= "/dev/xvda1"
# Guest kernel command line arguments
XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw"
# Extra commands to add to xenguest_image when creating the image
# Extra commands to add to xenguest-image when creating the image
XENGUEST_IMAGE_EXTRA_CMD ??= ""
# Kernel binary
@@ -43,17 +43,14 @@ XENGUEST_IMAGE_KERNEL ??= "Image"
# be included in the xenguest image)
XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}"
# set empty partition to be used by xenguest-manager for this image
XENGUEST_IMAGE_DISK_DEVICE ??= ""
#
# XENGUEST_IMAGE_DISK_PARTITIONS is used to describe the partitions to setup
# XENGUEST_IMAGE_DISK PARTITIONS is used to describe the partitions to setup
# and their content.
# It must be set to a space separated list of entries with each entry having
# the format num:sz:[fs]:[file] where:
# the format num:sz:fs:[file] where:
# - num is a partition number
# - sz is the partition size in MB or GB(default), e.g 1000M or 1[G]
# - fs is optional filesystem to use for the partition
# - sz is the partition size in Gigabit
# - fs is the filesystem to use for the partition
# - file is optionally pointing to a file to use as content of the partition
# Please check image_types_xenguest.bbclass for rootfs handling of files
#
@@ -83,18 +80,6 @@ XENGUEST_IMAGE_DEPLOY_SUBDIR ?= "xenguest"
# - something in ${WORKDIR} if you need to clone and manipulate an image
XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}"
# These vars are used by image_types_xenguest.bbclass to generate the
# xenguest.env file. In a recipe that inherits this class and extra variables
# that should be included in xenguest.env need to be added to
# XENGUEST_IMAGE_VARS_EXTRA
XENGUEST_IMAGE_VARS ?= "\
MACHINE DISTRO DISTRO_VERSION DISTRO_FEATURES TUNE_FEATURES TARGET_FPU \
IMAGE_FEATURES INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE \
XENGUEST_IMAGE_MEMORY_SIZE XENGUEST_IMAGE_NUM_VCPUS XENGUEST_IMAGE_AUTOBOOT \
XENGUEST_IMAGE_ROOT XENGUEST_IMAGE_CMDLINE XENGUEST_IMAGE_EXTRA_CMD \
XENGUEST_IMAGE_KERNEL XENGUEST_IMAGE_DISK_SIZE XENGUEST_IMAGE_DISK_DEVICE \
XENGUEST_IMAGE_DISK_PARTITIONS XENGUEST_IMAGE_NETWORK_TYPE"
#
# Wrapper to call xenguest-mkimage
# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR
@@ -144,27 +129,21 @@ xenguest_image_create() {
# create disk if needed
disksize="${XENGUEST_IMAGE_DISK_SIZE}"
case ${disksize:=0} in
0|0M|0G)
;;
*)
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
done
fi
diskdevice="${XENGUEST_IMAGE_DISK_DEVICE}"
if [ -n "$diskdevice" ]; then
call_xenguest_mkimage update --disk-device="${diskdevice}"
fi
;;
esac
if [ -z "$disksize" ]; then
disksize="0"
fi
if [ $disksize -gt 0 ]; then
# setup disk size
call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize
diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}"
if [ -n "$diskparts" ]; then
for arg in $diskparts; do
call_xenguest_mkimage update --disk-add-part=$arg
partnum="$(expr $partnum + 1)"
done
fi
fi
if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then
call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1
@@ -179,38 +158,7 @@ xenguest_image_create() {
fi
}
XENGUEST_ENV_STAGING_DIR ??= "${STAGING_DIR}/${MACHINE}/xenguestenv"
# Create an intermediary file containing all variables used to by a
# particular recipe that inherits this class
# File will contain the values of all variables listed in:
# XENGUEST_IMAGE_VARS_EXTRA
python do_deploy_xenguestenv () {
xenguest_vars = d.getVar('XENGUEST_IMAGE_VARS_EXTRA')
if not xenguest_vars:
return
outdir = d.getVar('XENGUEST_ENV_STAGING_DIR')
# Writes file to tmp/sysroots/${MACHINE}/xenguestenv/ by default
filename = os.path.basename(d.getVar('FILE')) + '.xenguestenv'
with open(os.path.join(outdir, filename), 'w') as envf:
for var in xenguest_vars.split():
value = d.getVar(var)
if value:
# Write value only if set
envf.write('%s="%s"\n' % (var, " ".join(value.split())))
envf.close()
}
# Since the intermediary file is deleted by do_merge_xenguestenv it
# must be re-created every time
do_deploy_xenguestenv[vardeps] += "${XENGUEST_IMAGE_VARS_EXTRA}"
do_deploy_xenguestenv[dirs] = "${XENGUEST_ENV_STAGING_DIR}"
addtask deploy_xenguestenv before do_populate_sysroot
#
# Clone the current xenguest from deploy to manipulate it locally
# This is required if you need to change things before packing an image
# To set the local directory where to clone you must set
@@ -224,7 +172,7 @@ xenguest_image_clone() {
fi
if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then
die "xenguest_image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
die "xenguest-image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest"
fi
rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}
@@ -1,7 +1,7 @@
# This files is added when DISTRO_FEATURES contains arm-autonomy-guest
# We need to have ipv4 activated
DISTRO_FEATURES:append = " ipv4"
DISTRO_FEATURES_append = " ipv4"
# Build a xenguest type image
IMAGE_CLASSES += "image_types_xenguest"
@@ -10,6 +10,6 @@ IMAGE_FSTYPES += "xenguest"
# xenguest kernel extension to handle initramfs
KERNEL_CLASSES += "kernel-xenguest"
IMAGE_INSTALL:append = "${@bb.utils.contains('DISTRO_FEATURES', 'docker', \
IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'docker', \
' packagegroup-docker-runtime-minimal', \
'', d)}"
@@ -1,15 +1,13 @@
# This files is added when DISTRO_FEATURES contains arm-autonomy-host
ARM_AUTONOMY_HOST_OVERRIDES = ":autonomy-host"
# We need to have xen and ipv4 activated
DISTRO_FEATURES:append = " xen ipv4"
DISTRO_FEATURES_NATIVE:append = " arm-autonomy-host"
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 ?= ""
# 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
+4 -4
View File
@@ -9,7 +9,7 @@ BBFILES += " \
BBFILE_COLLECTIONS += "meta-arm-autonomy"
BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-autonomy = "5"
BBFILE_PRIORITY_meta-arm-autonomy = "6"
LAYERDEPENDS_meta-arm-autonomy = " \
core \
yocto \
@@ -17,7 +17,7 @@ LAYERDEPENDS_meta-arm-autonomy = " \
networking-layer \
virtualization-layer \
"
LAYERSERIES_COMPAT_meta-arm-autonomy = "honister"
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
@@ -29,11 +29,11 @@ ARM_AUTONOMY_LAYERDIR := "${LAYERDIR}"
ARM_AUTONOMY_DISTRO_CFGDIR = "${ARM_AUTONOMY_LAYERDIR}/conf/distro/include/"
# Add class to handle arm-autonomy distro extensions
USER_CLASSES:append = " arm-autonomy-features"
USER_CLASSES_append = " arm-autonomy-features"
BBFILES_DYNAMIC += " \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \
meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bb \
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"
@@ -8,10 +8,10 @@ require conf/machine/include/arm/arch-armv8a.inc
KERNEL_IMAGETYPE = "Image"
IMAGE_FSTYPES:append = " tar.bz2"
IMAGE_FSTYPES += "tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.10%"
PREFERRED_VERSION_linux-yocto ?= "5.4%"
DISTRO_FEATURES += "arm-autonomy-guest"
-5
View File
@@ -1,5 +0,0 @@
# This file will be required by different xenguest recipes to provide
# common variables, which can be configured in local.conf
# Xenguest image file install location
XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/"
@@ -32,16 +32,16 @@ Ensure it has all the required layers in bblayers.conf as listed in
Add multiconfig
----------------
The steps required to make the project build both the host and any
number of guests as required are:
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 are specific to either the
host or the guest. The resulting directory tree should be:
These files will contain any configurations that a specific to either the
host or the guest
```
-- conf
@@ -73,12 +73,12 @@ MC_GUEST_INITRAMFS_IMAGE ?= ""
#MC_GUEST_INITRAMFS_IMAGE_BUNDLE = "1"
#MC_GUEST_INITRAMFS_IMAGE = "${MC_GUEST_IMAGERECIPE}"
# These variables are set automatically, don't override them!
# 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_merge_xenguestenv'}"
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} "
@@ -114,10 +114,9 @@ IMAGE_FSTYPES += "${@ 'cpio' if d.getVar('MC_GUEST_INITRAMFS_IMAGE_BUNDLE',d) el
# ANY OTHER GUEST CONFIG
```
To modify the MACHINE or INITRAMFS variables change the equivalent
config in local.conf rather than modifying this file directly. You can also
append any other config desired for the guest after "ANY OTHER GUEST CONFIG",
for example `XENGUEST_IMAGE_DISK_SIZE`.
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.
@@ -128,8 +127,6 @@ Make sure not to change `${DEPLOY_DIR_IMAGE}` to anything other than
TMPDIR = "${TOPDIR}/${MC_HOST}"
DISTRO_FEATURES += " arm-autonomy-host"
# ANY OTHER HOST CONFIG
```
Building the image
@@ -140,56 +137,29 @@ To build the multiconfig image the command is:
bitbake mc:host:arm-autonomy-host-image-minimal
```
The first time this is run you may see a warning related to the SRC_URI:
```
Unable to get checksum for xenguest-extern-guests SRC_URI entry foo.xenguest: file could not be found
```
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`
This is expected, and only indicates that the guest image has not yet been
generated when the host parses the SRC_URI. By the time it is needed by the
host recipe fetch task it will be present.
During the build you should see that guest tasks are also being executed in
parallel. Once the build completes the guest will already be in the rootfs of
the host thanks to `ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST`
The final host image including the guests will be deployed in
`host/deploy/images/`
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_GUESTS` just needs to pass the argument
'guestcount=#' to install symlink copies of the xenguest file on the host.
Documentation for the guestcount parameter can be found in
documentation/arm-autonomy-quickstart.md in the section titled
'Include guests directly in the host image'. This will ensure that the guest
is still only built once, despite resulting in multiple copies on the target.
`ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUEST` just needs to be duplicated with
a different guestname.
If guests are required to have different configurations, each will need its own
config file, e.g. 'netguest.conf'. Ensure that the name of the conf file does
not contain any hyphens, as this will create errors when it becomes part of a
function name. In this file the values of TMPDIR, MACHINE, DISTRO_FEATURES etc.
should be the same as above, but with the prefix "MC_GUEST_*" modified to
something different to avoid collisions (e.g. MC_GUEST_2_*).
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.
As before, your additional config for the guest type should
follow "ANY OTHER GUEST CONFIG"
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.
In your local.conf, everything between `---Guest Config Start---` and
`---Guest Config End---` will need to be duplicated for each desired guest type.
All copies of variables that start `MC_GUEST` must be modified with the same
prefix as in the new guest config file (e.g. `MC_GUEST_2_*`).
Each chunk of guest config in local.conf has automatic guest variables
(found after the line "These variables are set automatically...").
These should all use the same prefix as their chunk in their values,
for example:
```
MC_GUEST_2_FILENAME_PREFIX = "${@ 'Image-initramfs' if d.getVar('MC_GUEST_2_INITRAMFS_IMAGE_BUNDLE',d) else '${MC_GUEST_2_IMAGERECIPE}' }"
```
Guest with provisioned disk
----------------
@@ -202,12 +172,11 @@ AUTONOMY_HOST_EXTRA_PARTITION = "part --label provisioned-guest --source rawcopy
--sourceparams=file=${TOPDIR}/${MC_GUEST}/deploy/images/${MC_GUEST_MACHINE}/${MC_GUEST_FILENAME_PREFIX}-${MC_GUEST_MACHINE}.ext4"
```
inside your host.conf file.
inside host.conf file.
The rest of the configuration has to be appended to guest.conf file:
```
# ANY OTHER GUEST CONFIG
XENGUEST_IMAGE_DISK_SIZE = "0"
XENGUEST_IMAGE_SRC_URI_XEN_CONFIG = "file://\${TOPDIR}/path/to/rootdisk.cfg"
XENGUEST_IMAGE_DISK_DEVICE = "_GUEST_DISK_DEVICE_"
@@ -216,7 +185,7 @@ IMAGE_ROOTFS_SIZE = "102400"
IMAGE_FSTYPES = "ext4"
```
Example content of rootdisk.cfg:
content of rootdisk.cfg"
```
disk = ["phy:_GUEST_DISK_DEVICE_,xvda,w"]
@@ -1,9 +1,9 @@
arm-autonomy Quick Start
==================
This documentation explains how to quickly start with the arm-autonomy layer,
This documentation is explaining how to quickly start with arm-autonomy layer
and the main features provided.
In the documentation directory you will find some more detailed documentation
You will find in the documentation directory some more detailed documentation
for each of the functionalites provided by this layer.
What to use this layer for?
@@ -29,7 +29,7 @@ First you must download the Yocto layers needed:
- all other layers you might want to use
For each of the downloaded layer make sure you checkout the release of Yocto
you want to use (for example honister using `git checkout honister`).
you want to use (for example zeus using `git checkout zeus`).
Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
in order to have the required dependencies.
@@ -110,8 +110,7 @@ The project will generate a Linux kernel, a root filesystem, a Xen binary and
a DTB modified to include the required entries to boot Xen and Linux as Dom0
(this DTB has the extension `-xen.dtb`).
To boot the system using a u-boot base board for machines other than FVP-Base
you will need to:
To boot the system using an u-boot base board you will need to:
- Load the kernel (by default at 0x80080000 unless you modify
XEN_DEVICETREE_DOM0_ADDR value)
- Load the xen device tree (for example at 0x83000000)
@@ -120,88 +119,53 @@ 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
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 instead use a Yocto MACHINE
defined in meta-arm-autonomy to include only the Linux configuration required to
run a xen guest.
The guest projects are not target specific and will use a Yocto MACHINE defined
in meta-arm-autonomy to include only the Linux configuration required to run
a xen guest.
To create a guest project:
1. Follow the steps of "Create a project"
2. Optionally add layers required to build the guest image, and any features you
need.
2. Optionaly add layers required to build the image and features you need.
3. Edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
3. edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and
set MACHINE to `arm64-autonomy-guest`:
```
MACHINE = "arm64-autonomy-guest"
DISTRO_FEATURES += "arm-autonomy-guest"
```
4. Build the image you want.
4. build the image you want.
For example `bitbake core-image-minimal`
The build will create a ".xenguest" image that can be use on an host project
with the xenguest-manager, as well as a file "xenguest.env" containing the
variables used to configure and generate the guest image.
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
`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 one or more images generated by
guest projects in the host project.
The layer provides a way to directly include in the host project one or several
images generated by guest projects.
To use this feature, you must edit your host project `local.conf` file and
add set the value of 'ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS' to the list of
paths to xenguest images you want to include in your host.
There are 4 supported formats for ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS
entries:
- http/https url
- "https://[url]:[port]/foo.xenguest;md5sum=..."
- file:// absolute local path from root
- "file:///xenguests/bar.xenguest"
- file:// path relative to FILESEXTRAPATHS
- "file://relative/baz.xenguest"
- plain absolute local path from root
- "/xenguests/absolute/xyzzy.xenguest"
It is not recommended to use other bitbake URL types, as they may result in
undefined behaviour.
A semicolon seperated list of install arguments can follow each image path:
- guestname : the name that will be attached when the image is imported
(default: [filename, without extension])
- guestcount : the number of copies of the guest to install, with
incrementing numbers appended to the name
(default: 1)
Any other arguments, for example an md5sum, will be assumed to be fetch
arguments, and will be appended to the path in the SRC_URI.
add set ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS to the list of xenguest images
you want to include in your host. Each xenguest image must be given using a
full path to it.
For example:
```
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "\
https://[url]:[port]/base.xenguest;md5sum=[checksum];guestname=http \
file:///guests/base.xenguest;guestname=file_abs \
file://foo/base.xenguest;guestname=file_rel;guestcount=2 \
/guests/foo/bar/base.xenguest;guestname=no_fetcher \ "
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "/home/user/guest-project/tmp/deploy/images/arm64-autonomy-guest/core-image-minimal-arm64-autonomy-guest.xenguest;guestname=myguest"
```
Documentation for setting up a multiconfig build can be found in:
meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md
This will add the guest and name it `myguest` on the host project image and
the xenguest-manager will automatically boot it during startup.
Add support for your board
--------------------------
@@ -222,7 +186,7 @@ started). You can find the complete list of the kernel configuration elements
required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`.
### Define the drive and partition to use for the LVM volume
The xenguest-manager creates guest storage drives using LVM on an empty
The xenguest-manager is creating disk hard drive using LVM on an empty
partition. The default value is set to use /dev/sda2.
You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE.
@@ -231,37 +195,37 @@ Check `recipes-extended/xenguest/xenguest-manager.bbappend` for examples.
Please also read xenguest-manager.md.
### Define the interface to add to xenguest network bridge
xenguest-network bridge creates a bridge on the host and adds network
interfaces to it so that guests connected to it have access to external network.
xenguest-network bridge is creating a bridge on the host and adds network
interfaces to it so that guest connected to it have access to external network.
By default `eth0` is set as the list of interfaces to be added to the bridge.
Depending on your board or use case you might want to use an other interface
or use multiple interfaces.
You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS.
Check `recipes-extended/xenguest/xenguest-network.bbappend` for
Check `recipes-extended/xenguest/xenguest-network-bridge.bbappend` for
exmaples.
Please also read xenguest-network-bridge.md.
### Define the network configuration of the xenguest network bridge
xenguest-network puts the host network interfaces in a bridge and configures it
by default to use dhcp.
xenguest network bridge is putting the host network interfaces in a bridge
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 your xenguest-network-bridge.bbappend to use
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 SRC_URI in your bbappend.
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} when the config file is installed.
configured in ${XENGUEST_NETWORK_BRIDGE_NAME}.
You can find an example configuration file in
`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`.
Please also read xenguest-network.md.
Please also read xenguest-network-bridge.md.
### Customize Dom0 and Xen boot arguments for you board
xen-devicetree modifies the generated DTB Xen and Linux boot arguments,
as long as the address where Dom0 Linux kernel can be found.
xen-devicetree is writting inside the generated DTB Xen and Linux boot
arguments as long as the address where Dom0 Linux kernel can be found.
You might need to have different values for your board or depending on your
use case.
@@ -11,24 +11,19 @@ perform a couple of customizations in the generated wic image:
1 MiB per physical volume, hence it needs to be taken into account when
setting GUEST_PART_SIZE.
2. Set the boot partition size (default: 100M) via `BOOT_PART_SIZE` and
`BOOT_PART_SIZE_UNIT` (M or G) variables in any conf file. The default
bootimg is ~44M so 100M leaves just over 50M of free space.
3. The wic image partition layout and contents with a custom wks file via
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, BOOT_PART_SIZE, BOOT_PART_SIZE_UNIT and
GRUB_CFG_FILE variables).
GUEST_PART_SIZE_UNIT and GRUB_CFG_FILE variables).
4. Custom grub.cfg file via `GRUB_CFG_FILE` (default:
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 customized to set what files need to be included
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.
@@ -56,8 +56,7 @@ The following parameters are available:
the xen devicetrees are properly regenerated if the source DTBs are changed.
This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
generated during the compilation of the Linux kernel. This must be changed
if the machine you are using is not using a DTB listed in
KERNEL_DEVICETREE.
if the machine your are using is not using a DTB listed in KERNEL_DEVICETREE.
- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
modified by xen-devicetree. Those must be files that xen-devicetree can find
@@ -71,10 +70,7 @@ The following parameters are available:
This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value
containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to
dom0 is defined using Xen boot arguments.
This variable is set by default to "1024M,max:1024", and cannot be empty.
The value can simply specify a size, e.g. "1024M", but best practice is to
also provide a max, documented here:
https://wiki.xenproject.org/wiki/Xen_Project_Best_Practices
This variable is set by default to "1024M".
- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when
booting it.
@@ -88,8 +84,7 @@ The following parameters are available:
- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to
be used for Dom0 will be copied. When using u-boot, this is the address at
which you will load the kernel Image before starting Xen.
This variable is set by default to "0x80080000", and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
This variable is set by default to "0x80080000".
- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at
${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the
@@ -97,8 +92,7 @@ The following parameters are available:
size but can be bigger. You must be careful not to have a value too big as it
could slow down boot or copy other parts with it (like the DTB).
You might need to increase this if you use a kernel with a bundled initramfs.
This variable is set by default to "0x01000000" and cannot be empty.
Values for this variable can be in hex (prefixed with '0x') or in decimal.
This variable is set by default to "0x01000000".
- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that
must be included inside the generated DTB file. By default the only one
@@ -7,7 +7,7 @@ Introduction
xenguest-manager is a tool to manage Xenguest images generated by
[xenguest-mkimage](xenguest-mkimage.md).
On a Xen Dom0 system it can:
On a Xen Dom0 system it will:
- create a xen guest from a xenguest image: extract its components, create a
disk for the guest using LVM volumes.
- start/stop a xen guest (during init or using xenguest-manager directly).
@@ -23,7 +23,7 @@ Usage
-----
xenguest-manager must be called like this:
`xenguest-manager [-v(v)] OPERATION [OPTIONS]`
`xenguest-manager OPERATION [OPTIONS]`
The following operations are available:
- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file
as guest GUESTNAME. If GUESTNAME is not given the image file name is used
@@ -37,9 +37,6 @@ The following operations are available:
- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is
not given, print the status of all guests.
Passing -v or -vv will increase the logging written to the logfile.
The terminal will always show only error messages, regardless of the logfile.
For a detailed help on available options please use:
`xenguest-manager --help`
@@ -48,7 +45,6 @@ Bitbake parameters
Several parameters are available to configure the xenguest manager during Yocto
project compilation (those can be set in your project local.conf, for example).
This config will be written to a file xenguest-manager.conf in /etc/xenguest/.
The following parameters are available:
@@ -69,22 +65,6 @@ The following parameters are available:
name).
This is set by default to "/usr/share/guests".
- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager.
Must be one of ERROR, INFO, VERBOSE (default: ERROR). The logs will be
written to /var/log/xenguest.
If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
will override the setting in xenguest-manager.conf
Since /var/log is by default a volatile location, extra configuration is
required if logs are desired to be kept between reboots:
VOLATILE_LOG_DIR="no"
Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
When this is enabled, logrotate will monitor the file to ensure it does not
grow excessively large. See recipes-extended/xenguest/files/logrotate-xenguest
Init scripts
------------
@@ -100,7 +80,7 @@ directory on the target:
Inside the directory, scripts will be executed in alphabetical order.
Since these scripts are sourced by xenguest-manager, they can acccess functions
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
@@ -109,34 +89,11 @@ and variables from the parent file's scope, including:
- ${guestcfgfile} : The name of the config file for the starting guest
- log() : Used to write a log to the logfile, default level INFO.
Takes an optional log level and a message body
e.g. log ERROR "blah"
- ${LOGFILE} : The file to append any logging to, e.g.
echo "Hello, World" >> ${LOGFILE}
Options for log level: ERROR, INFO, VERBOSE,
and FATAL which will call exit 1 immediately after logging
the message at level ERROR.
Sourcing also allows the script to access params.cfg.
- log_command() : Used to call a shell command and log that it has been
called, as well as capturing both stdout and stderr.
By default the command output is dumped to the logfile as an
error if the command returns a status > 0, or as a verbose
message if the whole script is running in verbose mode.
An optional log level can be passed to alter the level the
log should be if the command returns a status >0, which may
be useful if the command is expected to return a non-zero
result.
e.g. log_command INFO "ls -lh ~"
Options for log level: ERROR, INFO, and VERBOSE
Attempting to call any other functions from xenguest_manager in an init script
may result in a fatal error, from which cleanup is not guarenteed.
Init scripts also have access to config variables defined in params.cfg.
An example of how to create the directory and install an init shell script can
be found in:
@@ -4,9 +4,9 @@ Xenguest mkimage
Introduction
------------
xenguest-mkimage is a tool to create and modify images to be used as a Guest
with Xen. It defines a format to store completely defined guests as a file or as
a directory, and provides options to create and modify those images.
xenguest-mkimage is a tool to create and modify images to be used as Guest with
Xen. It defines a format to store completely defined guests as a file or as
a directory and provides options to create and modify those images.
A xenguest image contains all elements required to create a xen guest.
This is the base elements like a Xen configuration and a Linux kernel binary
@@ -15,8 +15,8 @@ but also some more advanced elements like init scripts or a disk definition.
The format is made to be deployable easily by storing everything in a single
file and provide tools to easily manipulate the images. It can also easily be
extended to have features like encryption or signature of images, updates or
complex configurations by providing the ability to have init scripts embedded
inside the image that will be executed on the host when the guest is started.
complex configurations by providing features to have init script that will be
executed on the host embedded inside the image.
Xenguest images content
-----------------------
@@ -35,7 +35,7 @@ before starting the guest.
### files
This directory contains files that can be used by the xen configuration, for
example the kernel image referenced in xen configuration.
example the binary of the kernel referenced in xen configuration).
This is where the kernel binary, the dtb or a ramdisk will be stored.
### init.pre, init.d and init.post
@@ -47,7 +47,7 @@ contains scripts called at a different time:
generate part of the xen configuration dynamically.
- init.d: scripts executed when the guest has been created but before it is
started. This can be used to do some xenstore operations or configure the
guest behaviour, using xl for example.
guest behaviour using xl, for example.
- init.post: scripts executed just after starting the guest. This can be
used to configure things created by xen for the guest like network
network interfaces.
@@ -58,19 +58,12 @@ order.
### disk.cfg and disk-files
disk.cfg contains the guest disk description (disk size and disk partitions).
The file contains the following entries:
- `DISK_SIZE=X`: size of the disk to create in MB or GB(default),
e.g. 1000M or 4[G]
- `DISK_SIZE=X`: size of the disk to create in GB
- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a
size of SIZE MB or GB(default), e.g 1000M or 2[G].
Format it with filesystem FS (can be ext2, ext3, ext4, vfat or swap)
and extract CONTENT as initial partition content (.tar[.gz|.xz|.bz2] file
or img[.gz|.bz2] file to be dumped in the partition).
FS and CONTENT can be empty.
- `DISK_DEVICE=X`: disk or partition to be used by lvm. Setting this option
allows to bind guest disk with any partition or disk available on host,
e.g. /dev/sda3 or /dev/sdb.
This variable is not set by default, but if set, it overrides disk settings
inside xenguest-manager.conf - 'XENGUEST_VOLUME_DEVICE'.
size of SIZE GB, format it with filesystem FS (can be ext2, ext3, ext4, vfat
or swap) and extract CONTENT as initial partition content
(.tar[.gz|.xz|.bz2] file or img[.gz|.bz2] file to be dumped in the partition). FS and
CONTENT can be empty.
The disk-files contain files to be used for initializing the disk partitions
content. Those should be used to create a LVM or a physical disk and initialize
@@ -112,12 +105,12 @@ For a detailed help on available operations, please use:
image file. Several script can be added and the basename of FILE is used to
distinguish them (calling the option twice with the same file will update the
script in the image with the second one).
--disk-size=SIZE: set the guest disk size to SIZE in MB or GB(default),
e.g 1000M or 2[G]. Calling this with 0 disable the guest disk.
--disk-size=SIZE: set the guest disk size to SIZE in GB. Calling this with 0
disable the guest disk.
- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the
xenguest image disk. The partition is described with the arguments:
- NUM: partition number.
- SIZE: partition size in MB or GB(default), e.g 1000M or 2[G].
- SIZE: partition size in GB.
- FS: filesystem to format the partition with. This can be ext2, ext3, ext4,
vfat of swap. If empty the partition is not formated.
- CONTENT: tar of img file to use to initialize the partition. The file must
@@ -1,7 +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"
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}
@@ -1,39 +1,7 @@
# Extra machine settings for fvp-base
# FVP uses vda as hard drive and partition 1 is the
# default rootfs, so use vda2 for guest lvm
XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/vda2"
# We need to extend the wks search path to be able to find the wks file set in
# ARM_AUTONOMY_WKS_FILE.
WKS_SEARCH_PATH:prepend := "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic:"
ARM_AUTONOMY_WKS_FILE ?= "arm-autonomy-fvp-base-disk.wks.in"
# set wks file only if INITRAMFS_IMAGE_BUNDLE is not set
WKS_FILE = "${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', '',\
'${ARM_AUTONOMY_WKS_FILE}', d)}"
XEN_FILE ?= "xen-fvp-base"
DTB_FILE ?= "${@ get_xen_dtb_filename(d)}"
XEN_ADDR ?= "0x84000000"
DTB_ADDR ?= "0x83000000"
FVP_DATA += "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${XEN_FILE}@${XEN_ADDR} \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${DTB_FILE}@${DTB_ADDR}"
# Set the wks guest partition size and unit. It must be aligned with the sum of
# all XENGUEST_IMAGE_DISK_SIZE set for the guests. By default, LVM2 metadata is
# 1 MiB per physical volume, hence it needs to be taken into account when
# setting GUEST_PART_SIZE. The XENGUEST_IMAGE_DISK_SIZE default value is 4GiB.
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# 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"
# This function uses the "KERNEL_DEVICETREE" variable and manipulates it to
# return the xen kernel device tree file name.
def get_xen_dtb_filename(d):
kernel_dtb_filename = d.getVar('KERNEL_DEVICETREE',d)
xen_dtb_filename = os.path.splitext(os.path.basename(kernel_dtb_filename))[0] + '-xen.dtb'
return xen_dtb_filename
@@ -7,7 +7,7 @@ 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:"
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
@@ -2,7 +2,7 @@
# 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:"
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}"
@@ -14,19 +14,8 @@ WKS_FILE = "${ARM_AUTONOMY_WKS_FILE}"
GUEST_PART_SIZE ?= "4097"
GUEST_PART_SIZE_UNIT ?= "M"
# Set default boot partition size and unit
BOOT_PART_SIZE ?= "100"
BOOT_PART_SIZE_UNIT ?= "M"
# The GRUB_CFG_FILE affects arm-autonomy-n1sdp-efidisk.wks.in file
#
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel.
GRUB_CFG_FILE ?= "${@bb.utils.contains('DISTRO_FEATURES','alternate-kernel', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-rt-grub.cfg', \
'${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg' \
, d)}"
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.
@@ -49,46 +38,3 @@ do_image_wic[depends] += "xen:do_deploy"
IMAGE_EFI_BOOT_FILES += "xen-n1sdp.efi;xen.efi"
IMAGE_EFI_BOOT_FILES += "${XEN_MOD_DEVICETREE_DTBS}"
# When alternate-kernel DISTRO_FEATURE is present we set the linux-yocto-rt
# by default
PREFERRED_PROVIDER_alternate/kernel ?= "\
${@bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', \
'linux-yocto-rt', '', d)}"
KERNEL_PACKAGE_NAME_alternate/kernel ?= "kernel-rt"
# When alternate-kernel DISTRO_FEATURE is present we set the kernel-rt by
# default
KERNEL_PACKAGE_NAME:pn-linux-yocto-rt = "\
${@ d.getVar('KERNEL_PACKAGE_NAME_alternate/kernel') \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) \
else 'kernel' }"
# Relative path from DEPLOY_DIR_IMAGE of the Kernel PREEMPT_RT deployed Image
KERNEL_RT_IMAGE ?= "kernel-rt/Image-n1sdp.bin;Image-preempt-rt"
# Only include the Kernel PREEMPT_RT Image if we are building with
# alternate-kernel DISTRO_FEATURE
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('KERNEL_RT_IMAGE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
EFIDIR ?= "/EFI/BOOT"
GRUB_CFG_EXTRA_FILE ?= "${ARM_AUTONOMY_ARM_BSP_DYNAMIC_DIR}/wic/arm-autonomy-n1sdp-grub.cfg;.${EFIDIR}}"
# When alternate-kernel DISTRO_FEATURE is present we set the
# arm-autonomy-n1sdp-rt-grub.cfg by default. This GRUB config file has
# additional entries for booting with the PREEMPT_RT kernel and also includes
# the main GRUB config file set by GRUB_CFG_EXTRA_FILE.
IMAGE_EFI_BOOT_FILES += "\
${@ d.getVar('GRUB_CFG_EXTRA_FILE',d) or '' \
if bb.utils.contains('DISTRO_FEATURES', 'alternate-kernel', True, False, d) and \
d.getVar('PREFERRED_PROVIDER_alternate/kernel') else ''}"
# Additionnal kernel modules are necessary for n1sdp to be able to mount FAT
# filesystems using CP437.
MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = " kernel-module-nls-cp437 kernel-module-nls-iso8859-1"
# '-mcpu=' and '-march=' conflicts for xen build
# lets not set '-march=' and let xen to overwrite '-mcpu='
TUNE_CCARGS:remove:pn-xen = "${TUNE_CCARGS_MARCH}${TUNE_CCARGS_MARCH_OPTS}"
@@ -1,14 +1,14 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ...
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
FILESEXTRAPATHS:prepend:autonomy-host := "${THISDIR}/${PN}:"
FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:"
DEPENDS:append:autonomy-host = " dos2unix-native"
DEPENDS_append_xen = " dos2unix-native"
SRC_URI:append:autonomy-host = " file://add-xen-support.patch;patchdir=../"
SRC_URI_append_xen = " file://add-xen-support.patch;patchdir=../"
do_install:append:autonomy-host() {
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/)
@@ -18,11 +18,11 @@ do_install:append:autonomy-host() {
}
DEPLOY_EXTRA_DEPS ??= ""
DEPLOY_EXTRA_DEPS:autonomy-host = "xen:do_deploy xen-devicetree:do_deploy"
DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy"
do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}"
do_deploy:prepend:autonomy-host() {
do_deploy_prepend_xen() {
# To avoid dependency loop between firmware-image-juno:do_install,
# xen:do_deploy and xen-devicetree:do_deploy when
# INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and
@@ -1,10 +0,0 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS:prepend:autonomy-host:fvp-base := "${THISDIR}/${PN}:"
#
# FVP BASE
#
SRC_URI:append:autonomy-host:fvp-base = " file://xen_u-boot_kernel_addr.patch"
@@ -1,23 +1,23 @@
# Platform dependent parameters
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
# Add a dtb snippet to turn off iommu in dom0 on Juno board
SRC_URI:append:juno = " file://xen-juno.dtsi"
XEN_DEVICETREE_DTSI_MERGE:append:juno = " xen-juno.dtsi"
SRC_URI_append_juno = " file://xen-juno.dtsi"
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"
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_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/sda2 rootwait"
XEN_DEVICETREE_XEN_BOOTARGS:append:n1sdp = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no"
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/vda1"
XEN_DEVICETREE_XEN_BOOTARGS:append:fvp-base = " console=dtuart dtuart=serial0 bootscrub=0"
XEN_DEVICETREE_DOM0_BOOTARGS_append_fvp-base = " root=/dev/vda2"
XEN_DEVICETREE_XEN_BOOTARGS_append_fvp-base = " console=dtuart dtuart=serial0 bootscrub=0"
@@ -1,15 +1,15 @@
# FVP Base support
COMPATIBLE_MACHINE:fvp-base = "fvp-base"
FILESEXTRAPATHS:prepend:fvp-base := "${THISDIR}/files:"
SRC_URI:append:fvp-base = " file://early-printk.cfg"
COMPATIBLE_MACHINE_fvp-base = "fvp-base"
FILESEXTRAPATHS_prepend_fvp-base := "${THISDIR}/files:"
SRC_URI_append_fvp-base = " file://early-printk.cfg"
# Juno support
COMPATIBLE_MACHINE:juno = "juno"
FILESEXTRAPATHS:prepend:juno := "${THISDIR}/files:"
SRC_URI:append:juno = " file://early-printk.cfg"
COMPATIBLE_MACHINE_juno = "juno"
FILESEXTRAPATHS_prepend_juno := "${THISDIR}/files:"
SRC_URI_append_juno = " file://early-printk.cfg"
# N1SDP support
COMPATIBLE_MACHINE:n1sdp = "n1sdp"
FILESEXTRAPATHS:prepend:n1sdp := "${THISDIR}/files:"
SRC_URI:append:n1sdp = " file://n1sdp.cfg \
COMPATIBLE_MACHINE_n1sdp = "n1sdp"
FILESEXTRAPATHS_prepend_n1sdp := "${THISDIR}/files:"
SRC_URI_append_n1sdp = " file://n1sdp.cfg \
file://early-printk.cfg"
@@ -0,0 +1,15 @@
FILESEXTRAPATHS_prepend := "${THISDIR}:"
#
# arm-autonomy kmeta extra
#
SRC_URI_append = " file://arm-autonomy-kmeta-extra;type=kmeta;name=arm-autonomy-kmeta-extra;destsuffix=arm-autonomy-kmeta-extra"
# 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 = "${@bb.utils.contains_any('DISTRO_FEATURES', \
'arm-autonomy-host arm-autonomy-guest', \
' features/arm-autonomy/disable-arm64-sve.scc','',d)}"
KERNEL_FEATURES_append_fvp-base = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}"
@@ -1,14 +0,0 @@
# short-description: Create a disk image
# long-description: Creates a partitioned disk image that the user
# can directly dd to boot media.
# For FVP Base first partition is rootfs normally populated as /dev/vda1
part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024
# Second partition to accomodate guests images normally populated as /dev/vda2 (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/vda3
${AUTONOMY_HOST_EXTRA_PARTITION}
bootloader --ptable msdos
@@ -3,7 +3,7 @@
# can directly dd to boot media. Uses a custom grub.cfg file to configure the boot.
# First boot partition normally populated as /dev/sda1
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --size="${BOOT_PART_SIZE}${BOOT_PART_SIZE_UNIT}" --label msdos --active --align 1024
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
@@ -1,28 +0,0 @@
set term="vt100"
set default="3"
set timeout="5"
source $prefix/arm-autonomy-n1sdp-grub.cfg
menuentry 'N1SDP PREEMPT_RT ACPI Boot' {
linux /Image-preempt-rt $kernel_cmdline acpi=force
}
menuentry 'N1SDP PREEMPT_RT Single-Chip Boot (Device Tree)' {
devicetree /n1sdp-single-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Multi-Chip Boot (Device Tree)' {
devicetree /n1sdp-multi-chip.dtb
linux /Image-preempt-rt $kernel_cmdline
}
menuentry 'N1SDP PREEMPT_RT Arm Autonomy (Xen) Single-Chip Boot (Device Tree)' {
# no_argumants under here is a workaround for a bug
# also any kernel or dom0 cmdline arguments has to be passed via dtb
# because any arguments put here will be ignored by xen
xen_hypervisor /xen.efi no_arguments=use_dtb_for_xen_or_kernel_cmdline
xen_module /Image-preempt-rt
devicetree /n1sdp-single-chip-xen.dtb
}
@@ -1,6 +1,6 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ...
OVERRIDES:append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
# Xen image to put in the image
# This should point to a file in the deploy image directory
@@ -9,21 +9,21 @@ BOOT_WRAPPER_AARCH64_XEN ??= "xen-${MACHINE}"
# Xen command line for the image
BOOT_WRAPPER_AARCH64_XEN_CMDLINE ??= "noreboot dom0_mem=256M"
BOOT_WRAPPER_AARCH64_XEN_CMDLINE:gem5-arm64 = "noreboot dom0_mem=256M console=dtuart \
BOOT_WRAPPER_AARCH64_XEN_CMDLINE_gem5-arm64 = "noreboot dom0_mem=256M console=dtuart \
dtuart=/uart@1c090000 bootscrub=0"
# Fix command line in the axf file for gem5-arm64 when Xen is present
BOOT_WRAPPER_AARCH64_CMDLINE_xen:gem5-arm64 = "console=hvc0 root=/dev/vda rw"
BOOT_WRAPPER_AARCH64_CMDLINE_xen_gem5-arm64 = "console=hvc0 root=/dev/vda rw"
# Image generated by boot wrapper when Xen is present
BOOT_WRAPPER_AARCH64_IMAGE:xen ?= "xen-system.axf"
BOOT_WRAPPER_AARCH64_IMAGE_xen ?= "xen-system.axf"
EXTRA_OECONF:append:xen = " \
EXTRA_OECONF_append_xen = " \
--with-xen=${WORKDIR}/kernel/arch/arm64/boot/Image \
--with-xen-cmdline="" \
"
EXTRA_OEMAKE:append:xen = " \
EXTRA_OEMAKE_append_xen = " \
XEN_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_XEN} \
XEN_CMDLINE="${BOOT_WRAPPER_AARCH64_XEN_CMDLINE}" \
"
@@ -1,7 +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', 'xen', \
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,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}"
@@ -1,3 +1 @@
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
GRUB_BUILDIN:append:autonomy-host = " xen_boot"
GRUB_BUILDIN += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen_boot', '', d)}"
@@ -1,4 +1,4 @@
Upstream-Status: Inappropriate [meta-arm-autonomy specific u-boot config]
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
@@ -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)}"
@@ -1,70 +0,0 @@
#!/bin/sh
INSTALL_DIR="###CONTAINERS_INSTALL_DIR###"
MANIFEST="${INSTALL_DIR}/###CONTAINERS_MANIFEST###"
INIT_DIR="/etc/init.d"
DOCKER_INIT="docker.init"
find_docker_init() {
if [ -f "$INIT_DIR/$DOCKER_INIT" ]; then
$INIT_DIR/$DOCKER_INIT "start"
else
echo "ERROR: Couldn't find docker init script! ($INIT_DIR/$DOCKER_INIT)"
exit 1
fi
}
is_docker_started() {
if ! docker info > /dev/null 2>&1; then
find_docker_init
fi
}
check_manifest() {
if [ ! -f ${MANIFEST} ]; then
echo "No manifest found!"
exit 1
fi
}
has_docker_image() {
docker image inspect "$1" >/dev/null 2>&1
}
start() {
check_manifest
is_docker_started
while read -r archive name tag keep _; do
CONTAINER_IMAGE_NAME_AND_TAG="${name}:${tag}"
# Image does not exist and image file exists: Import the image.
if ! has_docker_image "${CONTAINER_IMAGE_NAME_AND_TAG}" && \
[ -f "${INSTALL_DIR}/${archive}" ]; then
echo "Importing ${CONTAINER_IMAGE_NAME_AND_TAG} container image..."
docker import "${INSTALL_DIR}/${archive}" \
"${CONTAINER_IMAGE_NAME_AND_TAG}" 2>&1 || {
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Failed."
exit $?
}
echo "Import ${CONTAINER_IMAGE_NAME_AND_TAG} container image: Done."
if [ "${keep}" != "1" ]; then
rm "${INSTALL_DIR}/${archive}"
fi
fi
done < ${MANIFEST}
}
case "$1" in
start)
start && exit 0
;;
*)
echo "Usage: $0 {start}"
exit 2
esac
exit $?
@@ -1,36 +0,0 @@
#
# This recipe adds an init script to import the containers added by
# docker_extern_containers.bbclass at boot time
# Notes:
# docker_extern_containers.bbclass creates a manifest file which contains
# the columns: archive name tag keep
# for each container. This file is read by the import_containers
# script to determine the parameters of the import
#
# Since the script needs knowledge of the values of $CONTAINERS_INSTALL_DIR
# and $CONTAINERS_MANIFEST these are substituted for placeholder strings when
# the script is installed.
DESCRIPTION = "Add init script to import docker images at boot"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit docker_extern_containers
SRC_URI = "file://import_containers.sh"
inherit update-rc.d
INITSCRIPT_PARAMS = "start 30 2 3 4 5 ."
INITSCRIPT_NAME = "import_containers.sh"
S = "${WORKDIR}"
do_install:append() {
install -d ${D}${sysconfdir}/init.d
install -m 755 import_containers.sh ${D}${sysconfdir}/init.d
sed -i "s,###CONTAINERS_INSTALL_DIR###,${CONTAINERS_INSTALL_DIR}," \
${D}${sysconfdir}/init.d/import_containers.sh
sed -i "s,###CONTAINERS_MANIFEST###,${CONTAINERS_MANIFEST}," \
${D}${sysconfdir}/init.d/import_containers.sh
}
@@ -8,7 +8,7 @@ DESCRIPTION = "The minimal set of packages required for running Docker"
inherit packagegroup
RDEPENDS:${PN} = "\
RDEPENDS_${PN} = "\
docker-ce \
docker-ce-contrib \
kernel-module-xt-nat \
@@ -1 +0,0 @@
CONFIG_FEATURE_TAR_LONG_OPTIONS=y
@@ -1,8 +0,0 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS:prepend:autonomy-host := "${THISDIR}/${PN}:"
# The --exclude flag in Busybox tar is required by xenguest-mkimage
SRC_URI:append:autonomy-host = " file://feature_tar_long_options.cfg"
@@ -1,16 +1,36 @@
# Recipe to create a minimal Arm Autonomy reference stack host image
# Recipe to create a minimal Arm Autonomy stack host image
DESCRIPTION = "Arm Autonomy stack host minimal image"
# When alternate-kernel DISTRO_FEATURE is present we will build
# and install the alternate kernel
inherit ${@bb.utils.filter('DISTRO_FEATURES', 'alternate-kernel', d)}
inherit core-image features_check
inherit core-image
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# The ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS variable can be used to include in the
# image one or several xenguest images.
# The list must be space separated and each entry must have the following
# format: URL[;guestname=NAME]
# - URL can be the full path to a file or a Yocto compatible SRC_URI url
# - guestname=NAME can be used to specify the name of the guest. If not
# specified the basename of the file (without .xenguest extension) is used.
# Here are examples of values:
# /home/mydir/myguest.xenguest;guestname=guest1
# http://www.url.com/testguest.xenguest
#
# If you are using the output of an other Yocto project, you should use the
# full path syntax instead of the Yocto SRC_URI to be able to use the
# symlink version of your image (as the real file has a new name on each
# build as it includes the date). You must not use SRC_URI type file:// as
# it will try to include the symlink and not the destination file which will
# be detected by the recipe and output an error 'Guest file is a symlink'.
#
# Guests can also be added using a bbapend to this recipe by adding entries
# to SRC_URI with parameter ;guestname=NAME to specify the destination
# guestname. The parameter guestname must be present as it is used to detect
# guests to be added
ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS ??= ""
# Includes minimal set required to start and manage guest. The xen specific
# modules are not explicitly included as they are built as part of the kernel
# image for performance reasons. It doesn't include all kernel modules to
@@ -20,7 +40,6 @@ IMAGE_INSTALL += " \
packagegroup-core-boot \
packagegroup-core-ssh-openssh \
qemu-system-i386 \
xenguest-extern-guests \
xenguest-manager \
xenguest-network \
"
@@ -31,5 +50,96 @@ EXTRA_IMAGEDEPENDS += "xen"
# Build xen-devicetree to produce a xen ready devicetree
EXTRA_IMAGEDEPENDS += "xen-devicetree"
REQUIRED_DISTRO_FEATURES += 'arm-autonomy-host'
REQUIRED_DISTRO_FEATURES += 'xen'
# 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'")
if bb.utils.contains('DISTRO_FEATURES', 'xen', False, True, d):
raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'xen'")
# Check in ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS for extra guests and add them
# to SRC_URI with xenguest parameter if not set
guestlist = d.getVar('ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS')
if guestlist:
for guest in guestlist.split():
# If the user just specified a file instead of file://FILE, add
# the file:// prefix
if guest.startswith('/'):
guestfile = ''
guestname = ''
if ';guestname=' in guest:
# user specified a guestname
guestname = guest.split(';guestname=')[1]
guestfile = guest.split(';guestname=')[0]
else:
# no guestname so use the basename
guestname = os.path.basename(guest)
guestfile = guest
# in case we have a link we need the destination
guestfile = os.path.realpath(guestfile)
# make sure the file exist to give a meaningfull error
if not os.path.exists(guestfile):
raise bb.parse.SkipRecipe("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS entry does not exist: " + guest)
# In case the file is a symlink make sure we use the destination
d.appendVar('SRC_URI', ' file://' + guestfile + ';guestname=' + guestname)
else:
# we have a Yocto URL
try:
_, _, path, _, _, parm = bb.fetch.decodeurl(guest)
# force guestname param in if not already there
if not 'guestname' in parm:
guest += ';guestname=' + os.path.basename(path)
d.appendVar('SRC_URI', ' ' + guest)
except:
raise bb.parse.SkipRecipe("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS contains an invalid entry: " + guest)
}
python add_extern_guests () {
# Destination directory on the rootfs
guestdir = d.getVar('IMAGE_ROOTFS') + d.getVar('datadir') + '/guests'
# Parse SRC_URI for files with ;guestname= parameter
src_uri = d.getVar('SRC_URI')
for entry in src_uri.split():
_, _, path, _, _, parm = bb.fetch.decodeurl(entry)
if 'guestname' in parm:
if os.path.islink(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
if not dstname.endswith('.xenguest'):
dstname += '.xenguest'
if not bb.utils.copyfile(path, guestdir + '/' + dstname):
bb.fatal("Fail to copy Guest file " + path)
}
IMAGE_PREPROCESS_COMMAND += "add_extern_guests; "
@@ -3,9 +3,7 @@
# configuration by adding network network interface configuration file under
# interfaces.d directory.
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
do_install:append:autonomy-host() {
do_install_append() {
# Add scan of interfaces.d to interfaces file
cp -f ${WORKDIR}/interfaces ${WORKDIR}/interfaces.subdir
echo "source-directory ${sysconfdir}/network/interfaces.d/" \
@@ -1,20 +1,16 @@
# if arm-autonomy-host or arm-autonomy-guest are activated, we need to install
# the getty-wrapper to spawn the login console on /dev/hvc0.
# This is normally done in meta-virtualization if virtualization and xen
# DISTRO_FEATURES are activated.
# if arm-autonomy-guest is activated, we are running as a xen guest so we must
# have a console on hvc0
# This is normally done in meta-virtualization if xen is activated but here
# we don't have xen activated.
#
# In both arm-autonomy-host and arm-autonomy-guest we don't have virtualization
# in DISTRO_FEATURE. Hence, manually include sysvinit-inittab_virtualization.inc
# to install the getty-wrapper.
require ${@bb.utils.contains_any('DISTRO_FEATURES', \
'arm-autonomy-host arm-autonomy-guest', \
'recipes-core/sysvinit/sysvinit-inittab_virtualization.inc', \
'', d)}
SYSVINIT_ADDHVC0 = "${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-guest', 'true', 'false', d)}"
# For arm-autonomy-guest we don't have xen in DISTRO_FEATURES. Hence, manually
# include sysvinit-inittab_xen.inc to append the getty-wrapper entry to
# /etc/inittab.
require ${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-guest', \
'recipes-core/sysvinit/sysvinit-inittab_xen.inc', \
'', d)}
do_install_append() {
if ${SYSVINIT_ADDHVC0}; then
echo "" >> ${D}${sysconfdir}/inittab
echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> \
${D}${sysconfdir}/inittab
fi
}
@@ -1,8 +0,0 @@
# For Xen we only need the i386 binaries
QEMU_TARGETS = "i386"
PACKAGECONFIG[noaudio] = "--audio-drv-list='',,"
PACKAGECONFIG:append = " noaudio"
PACKAGECONFIG:remove = "fdt sdl kvm"
require recipes-devtools/qemu/qemu-package-split.inc
@@ -1,3 +1,12 @@
require ${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', \
'qemu-autonomy-host.inc', '', d)}
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ...
OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}"
# For Xen we only need the i386 binaries
QEMU_TARGETS_xen = "i386"
PACKAGECONFIG[noaudio] = "--audio-drv-list='',,"
PACKAGECONFIG_append_xen = " noaudio"
PACKAGECONFIG_remove_xen = "fdt sdl kvm"
require ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'recipes-devtools/qemu/${BPN}-package-split.inc', '', d)}
@@ -12,54 +12,29 @@ S = "${WORKDIR}"
DESCRIPTION = "Add entries in DTB for Xen and Dom0"
# Please refer to documentation/xen-devicetree.md for documentation on these
# customizable parameters
# kernel size is passed to xen via xen.dtb so we need to add
# Please refer to documentation/xen-devicetree.md for documentation on those
# parameters
# 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_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,max:1024M"
XEN_DEVICETREE_DOM0_MEM ?= "1024M"
XEN_DEVICETREE_DOM0_BOOTARGS ?= "console=hvc0 earlycon=xen"
XEN_DEVICETREE_DOM0_ADDR ?= "0x80080000"
XEN_DEVICETREE_DOM0_SIZE ?= "0x01000000"
XEN_DEVICETREE_DTSI_MERGE ?= "xen.dtsi"
# Our package does not generate any packages for the rootfs, but instead
# contributes to deploy
# Our package does not generate any package for the rootfs but contributes to
# deploy
inherit nopackages deploy
DEPENDS += "dtc-native"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[noexec] = "1"
# Validate xen devicetree variables
python __anonymous() {
# Compare values of a list of variables to a regex pattern
def validate_type(pattern, var_list):
for varname in var_list:
if d.getVar(varname):
if not pattern.match(d.getVar(varname)):
raise bb.parse.SkipRecipe(d.getVar(varname) + "' is not a valid value for " + varname + "!")
else:
raise bb.parse.SkipRecipe('Required variable ' + varname + ' is empty!')
import re
num_vars_to_check = ['XEN_DEVICETREE_DOM0_ADDR', 'XEN_DEVICETREE_DOM0_SIZE']
size_vars_to_check = ['XEN_DEVICETREE_DOM0_MEM']
num_pattern = re.compile(r'((0x[0-9a-fA-F]+)|[0-9]+)$')
size_pattern = re.compile(r'[0-9]+[MG](,max:[0-9]+[MG])?$')
validate_type(num_pattern, num_vars_to_check)
validate_type(size_pattern, size_vars_to_check)
}
do_deploy() {
if [ ! -f ${WORKDIR}/xen.dtsi.in ]; then
die "xen.dtsi.in does not exist"
@@ -113,18 +88,14 @@ python calc_xen_dtb_dom0_size() {
bb.note('size in bytes: %d' % size)
# Ceil to MiB
size_required = ceil(size / (2 ** 20)) * (2 ** 20)
xen_devicetree_dom0_size = d.getVar('XEN_DEVICETREE_DOM0_SIZE')
if xen_devicetree_dom0_size[:2] == "0x":
size_defined = int(xen_devicetree_dom0_size, 16)
else:
size_defined = int(xen_devicetree_dom0_size)
size_defined = int(d.getVar('XEN_DEVICETREE_DOM0_SIZE'), 16)
if size_required > size_defined:
bb.note ("Wrong kernel size setting inside xen dtb!\n"\
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.note ("Overriding XEN_DEVICETREE_DOM0_SIZE with "\
bb.warn ("Overriding XEN_DEVICETREE_DOM0_SIZE with "\
"%(req)d (%(req)#010X)" % {"req": size_required})
d.setVar('XEN_DEVICETREE_DOM0_SIZE', hex(size_required))
}
@@ -1,4 +1,9 @@
PACKAGECONFIG:remove = "\
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,7 +0,0 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS:prepend:autonomy-host := "${THISDIR}/${PN}-4.14:"
SRC_URI:append:autonomy-host = " file://0001-vif-nat-fix-hostname.patch"
@@ -1,10 +1,9 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
# Make Xen machine specific
# This ensures that sstate is properly handled and that each machine can have
# its own configuration
PACKAGE_ARCH:autonomy-host = "${MACHINE_ARCH}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGECONFIG:remove:autonomy-host = "sdl"
PACKAGECONFIG_remove = "\
${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', \
'sdl', '', d)}"
@@ -1,9 +1,5 @@
# Use OVERRIDES to minimize the usage of
# ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', ...
OVERRIDES:append = "${ARM_AUTONOMY_HOST_OVERRIDES}"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:"
FILESEXTRAPATHS:prepend:autonomy-host := "${THISDIR}/${PN}-4.14:"
SRC_URI:append:autonomy-host = " \
SRC_URI += " \
file://0001-xen-arm-Throw-messages-for-unknown-FP-SIMD-implement.patch \
"

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