summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Stratulat <adrian.stratulat@enea.com>2020-06-16 08:30:23 +0200
committerAdrian Stratulat <adrian.stratulat@enea.com>2020-07-13 04:22:55 +0200
commitc82336bb19d4a6462af8d00366118704aa73239e (patch)
tree71bdb688cf957e3066a8500b965b59ee95573fa4
parentde9614aad1d7da8204cfe2da9c2006ea757fc106 (diff)
downloadmeta-el-nfv-access-c82336bb19d4a6462af8d00366118704aa73239e.tar.gz
Ampere/aarch64 bring-up changes
* Refactor the efi-secure-boot feature (in order for it to be disabled for certain targets) * Add support for emag8180 compilation target (used as Enea NFV Access host) * Add emag8180 support in ostree * Add support for qemuarm64 compilation target (used as Enea NFV Access VNF) Note: The aarch64 family does not support the secure-boot feature yet, so the "efi-secure-boot" has been disabled. Change-Id: I32336761d322102a07d065c9ab02ea5051854609 Signed-off-by: Adrian Stratulat <adrian.stratulat@enea.com>
-rw-r--r--classes/override_image_types_ostree.inc10
-rw-r--r--classes/sota_emag8180.bbclass13
-rw-r--r--conf/distro/eneanfvaccess.conf5
-rw-r--r--conf/template.emag8180/bblayers.conf.sample27
-rw-r--r--conf/template.emag8180/conf-notes.txt2
-rw-r--r--conf/template.emag8180/local.conf.sample249
-rw-r--r--conf/template.qemuarm64/bblayers.conf.sample26
-rw-r--r--conf/template.qemuarm64/conf-notes.txt2
-rw-r--r--conf/template.qemuarm64/local.conf.sample243
-rw-r--r--images/enea-nfv-access-host-common.inc15
-rw-r--r--images/enea-nfv-access-vnf.bb1
-rw-r--r--images/enea-nfv-access.bb11
-rw-r--r--scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemuarm64.wks5
13 files changed, 604 insertions, 5 deletions
diff --git a/classes/override_image_types_ostree.inc b/classes/override_image_types_ostree.inc
index 241afcd..34d2d1f 100644
--- a/classes/override_image_types_ostree.inc
+++ b/classes/override_image_types_ostree.inc
@@ -12,6 +12,7 @@ do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
12do_image_ostree[subimages] = "rootfs.ostree.tar.bz2" 12do_image_ostree[subimages] = "rootfs.ostree.tar.bz2"
13do_image_ostree[imgsuffix] = "." 13do_image_ostree[imgsuffix] = "."
14export OSTREE_ROOTFS 14export OSTREE_ROOTFS
15SECURE_BOOT_ENABLED = "${@bb.utils.contains("DISTRO_FEATURES", "efi-secure-boot", "1", "0", d)}"
15 16
16IMAGE_CMD_ostree () { 17IMAGE_CMD_ostree () {
17 if [ -z "$OSTREE_REPO" ]; then 18 if [ -z "$OSTREE_REPO" ]; then
@@ -128,11 +129,14 @@ IMAGE_CMD_ostree () {
128 129
129 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` 130 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "`
130 131
131 # Copy kernel and initramfs and their signature files
132 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} 132 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum}
133 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL}.p7b boot/vmlinuz-${checksum}.p7b
134 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT} boot/initramfs-${checksum} 133 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT} boot/initramfs-${checksum}
135 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT}.p7b boot/initramfs-${checksum}.p7b 134
135 if [ "${SECURE_BOOT_ENABLED}" == "1" ]; then
136 # Copy kernel and initramfs and their signature files
137 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL}.p7b boot/vmlinuz-${checksum}.p7b
138 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT}.p7b boot/initramfs-${checksum}.p7b
139 fi
136 140
137 # Copy image manifest 141 # Copy image manifest
138 cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest 142 cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest
diff --git a/classes/sota_emag8180.bbclass b/classes/sota_emag8180.bbclass
new file mode 100644
index 0000000..dff4294
--- /dev/null
+++ b/classes/sota_emag8180.bbclass
@@ -0,0 +1,13 @@
1OSTREE_BOOTLOADER ?= "grub"
2EFI_PROVIDER_sota = "grub-efi"
3PREFERRED_PROVIDER_virtual/bootloader_sota = "grub-efi"
4
5WKS_FILE_sota = "efiimage-sota.wks"
6
7OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz"
8
9# Set .otaimg to be used as source for generating hddimg
10ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg"
11
12# OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot
13OSTREE_KERNEL_ARGS ?= "rw"
diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf
index 629adfb..565a8e3 100644
--- a/conf/distro/eneanfvaccess.conf
+++ b/conf/distro/eneanfvaccess.conf
@@ -2,7 +2,7 @@ require conf/distro/enea.conf
2 2
3DISTRO_NAME = "Enea NFV Access" 3DISTRO_NAME = "Enea NFV Access"
4DISTRO_VERSION_MAJOR = "2.2" 4DISTRO_VERSION_MAJOR = "2.2"
5DISTRO_VERSION_MINOR ??= ".2" 5DISTRO_VERSION_MINOR ??= ".2-aarch64"
6DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" 6DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}"
7 7
8SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" 8SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -11,6 +11,9 @@ INHERIT += "distrooverrides"
11DISTRO_FEATURES_append = " odm efi-secure-boot" 11DISTRO_FEATURES_append = " odm efi-secure-boot"
12DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot" 12DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot"
13 13
14DISTRO_FEATURES_remove_aarch64 = "efi-secure-boot"
15DISTRO_FEATURES_OVERRIDES_remove_aarch64 = "efi-secure-boot"
16
14PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" 17PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
15PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" 18PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
16PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" 19PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
diff --git a/conf/template.emag8180/bblayers.conf.sample b/conf/template.emag8180/bblayers.conf.sample
new file mode 100644
index 0000000..fe25bf7
--- /dev/null
+++ b/conf/template.emag8180/bblayers.conf.sample
@@ -0,0 +1,27 @@
1# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
2# changes incompatibly
3POKY_BBLAYERS_CONF_VERSION = "2"
4
5BBPATH = "${TOPDIR}"
6BBFILES ?= ""
7
8BBLAYERS ?= " \
9 ##OEROOT##/meta \
10 ##OEROOT##/meta-poky \
11 ##OEROOT##/meta-intel \
12 ##OEROOT##/meta-dpdk \
13 ##OEROOT##/meta-enea-bsp-common \
14 ##OEROOT##/meta-enea-bsp-arm \
15 ##OEROOT##/meta-virtualization \
16 ##OEROOT##/meta-enea-virtualization \
17 ##OEROOT##/meta-el-common \
18 ##OEROOT##/meta-el-nfv-access \
19 ##OEROOT##/meta-openembedded/meta-oe \
20 ##OEROOT##/meta-openembedded/meta-networking \
21 ##OEROOT##/meta-openembedded/meta-filesystems \
22 ##OEROOT##/meta-openembedded/meta-python \
23 ##OEROOT##/meta-openembedded/meta-webserver \
24 ##OEROOT##/meta-java \
25 ##OEROOT##/meta-updater \
26 ##OEROOT##/meta-openembedded/meta-perl \
27 "
diff --git a/conf/template.emag8180/conf-notes.txt b/conf/template.emag8180/conf-notes.txt
new file mode 100644
index 0000000..ebd6162
--- /dev/null
+++ b/conf/template.emag8180/conf-notes.txt
@@ -0,0 +1,2 @@
1Common targets are:
2 enea-nfv-access
diff --git a/conf/template.emag8180/local.conf.sample b/conf/template.emag8180/local.conf.sample
new file mode 100644
index 0000000..b33f431
--- /dev/null
+++ b/conf/template.emag8180/local.conf.sample
@@ -0,0 +1,249 @@
1#
2# This file is your local configuration file and is where all local user settings
3# are placed. The comments in this file give some guide to the options a new user
4# to the system might want to change but pretty much any configuration option can
5# be set in this file. More adventurous users can look at local.conf.extended
6# which contains other examples of configuration which can be placed in this file
7# but new users likely won't need any of them initially.
8#
9# Lines starting with the '#' character are commented out and in some cases the
10# default values are provided as comments to show people example syntax. Enabling
11# the option is a question of removing the # character and making any change to the
12# variable as required.
13
14#
15# Machine Selection
16#
17# You need to select a specific machine to target the build with. There are a selection
18# of emulated machines available which can boot and run in the QEMU emulator:
19#
20#MACHINE ?= "qemuarm"
21#MACHINE ?= "qemuarm64"
22#MACHINE ?= "qemumips"
23#MACHINE ?= "qemumips64"
24#MACHINE ?= "qemuppc"
25#MACHINE ?= "qemux86"
26#MACHINE ?= "qemux86-64"
27#
28# There are also the following hardware board target machines included for
29# demonstration purposes:
30#
31#MACHINE ?= "beaglebone"
32#MACHINE ?= "genericx86"
33#MACHINE ?= "genericx86-64"
34#MACHINE ?= "mpc8315e-rdb"
35#MACHINE ?= "edgerouter"
36#
37# This sets the default machine to be qemux86 if no other machine is selected:
38MACHINE ?= "emag8180"
39
40#
41# Where to place downloads
42#
43# During a first build the system will download many different source code tarballs
44# from various upstream projects. This can take a while, particularly if your network
45# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
46# can preserve this directory to speed up this part of subsequent builds. This directory
47# is safe to share between multiple builds on the same machine too.
48#
49# The default is a downloads directory under TOPDIR which is the build directory.
50#
51#DL_DIR ?= "${TOPDIR}/downloads"
52
53#
54# Where to place shared-state files
55#
56# BitBake has the capability to accelerate builds based on previously built output.
57# This is done using "shared state" files which can be thought of as cache objects
58# and this option determines where those files are placed.
59#
60# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
61# from these files if no changes were made to the configuration. If changes were made
62# to the configuration, only shared state files where the state was still valid would
63# be used (done using checksums).
64#
65# The default is a sstate-cache directory under TOPDIR.
66#
67#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
68
69#
70# Where to place the build output
71#
72# This option specifies where the bulk of the building work should be done and
73# where BitBake should place its temporary files and output. Keep in mind that
74# this includes the extraction and compilation of many applications and the toolchain
75# which can use Gigabytes of hard disk space.
76#
77# The default is a tmp directory under TOPDIR.
78#
79#TMPDIR = "${TOPDIR}/tmp"
80
81#
82# Default policy config
83#
84# The distribution setting controls which policy settings are used as defaults.
85# The default value is fine for general Yocto project use, at least initially.
86# Ultimately when creating custom policy, people will likely end up subclassing
87# these defaults.
88#
89DISTRO ?= "eneanfvaccess"
90# As an example of a subclass there is a "bleeding" edge policy configuration
91# where many versions are set to the absolute latest code from the upstream
92# source control systems. This is just mentioned here as an example, its not
93# useful to most new users.
94# DISTRO ?= "poky-bleeding"
95
96#
97# Package Management configuration
98#
99# This variable lists which packaging formats to enable. Multiple package backends
100# can be enabled at once and the first item listed in the variable will be used
101# to generate the root filesystems.
102# Options are:
103# - 'package_deb' for debian style deb files
104# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
105# - 'package_rpm' for rpm style packages
106# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
107# We default to rpm:
108PACKAGE_CLASSES ?= "package_deb"
109
110#
111# SDK/ADT target architecture
112#
113# This variable specifies the architecture to build SDK/ADT items for and means
114# you can build the SDK packages for architectures other than the machine you are
115# running the build on (i.e. building i686 packages on an x86_64 host).
116# Supported values are i686 and x86_64
117#SDKMACHINE ?= "i686"
118
119#
120# Extra image configuration defaults
121#
122# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
123# images. Some of these options are added to certain image types automatically. The
124# variable can contain the following options:
125# "dbg-pkgs" - add -dbg packages for all installed packages
126# (adds symbol information for debugging/profiling)
127# "dev-pkgs" - add -dev packages for all installed packages
128# (useful if you want to develop against libs in the image)
129# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
130# (useful if you want to run the package test suites)
131# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
132# "tools-debug" - add debugging tools (gdb, strace)
133# "eclipse-debug" - add Eclipse remote debugging support
134# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
135# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
136# "debug-tweaks" - make an image suitable for development
137# e.g. ssh root access has a blank password
138# There are other application targets that can be used here too, see
139# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
140# We default to enabling the debugging tweaks.
141EXTRA_IMAGE_FEATURES = "debug-tweaks"
142
143#
144# Additional image features
145#
146# The following is a list of additional classes to use when building images which
147# enable extra features. Some available options which can be included in this variable
148# are:
149# - 'buildstats' collect build statistics
150# - 'image-mklibs' to reduce shared library files size for an image
151# - 'image-prelink' in order to prelink the filesystem image
152# - 'image-swab' to perform host system intrusion detection
153# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
154# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
155USER_CLASSES ?= "buildstats image-mklibs image-prelink"
156
157#
158# Runtime testing of images
159#
160# The build system can test booting virtual machine images under qemu (an emulator)
161# after any root filesystems are created and run tests against those images. To
162# enable this uncomment this line. See classes/testimage(-auto).bbclass for
163# further details.
164#TEST_IMAGE = "1"
165#
166# Interactive shell configuration
167#
168# Under certain circumstances the system may need input from you and to do this it
169# can launch an interactive shell. It needs to do this since the build is
170# multithreaded and needs to be able to handle the case where more than one parallel
171# process may require the user's attention. The default is iterate over the available
172# terminal types to find one that works.
173#
174# Examples of the occasions this may happen are when resolving patches which cannot
175# be applied, to use the devshell or the kernel menuconfig
176#
177# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
178# Note: currently, Konsole support only works for KDE 3.x due to the way
179# newer Konsole versions behave
180#OE_TERMINAL = "auto"
181# By default disable interactive patch resolution (tasks will just fail instead):
182PATCHRESOLVE = "noop"
183
184#
185# Disk Space Monitoring during the build
186#
187# Monitor the disk space during the build. If there is less that 1GB of space or less
188# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
189# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
190# of the build. The reason for this is that running completely out of space can corrupt
191# files and damages the build in ways which may not be easily recoverable.
192# It's necesary to monitor /tmp, if there is no space left the build will fail
193# with very exotic errors.
194BB_DISKMON_DIRS = "\
195 STOPTASKS,${TMPDIR},1G,100K \
196 STOPTASKS,${DL_DIR},1G,100K \
197 STOPTASKS,${SSTATE_DIR},1G,100K \
198 STOPTASKS,/tmp,100M,100K \
199 ABORT,${TMPDIR},100M,1K \
200 ABORT,${DL_DIR},100M,1K \
201 ABORT,${SSTATE_DIR},100M,1K \
202 ABORT,/tmp,10M,1K"
203
204#
205# Shared-state files from other locations
206#
207# As mentioned above, shared state files are prebuilt cache data objects which can
208# used to accelerate build time. This variable can be used to configure the system
209# to search other mirror locations for these objects before it builds the data itself.
210#
211# This can be a filesystem directory, or a remote url such as http or ftp. These
212# would contain the sstate-cache results from previous builds (possibly from other
213# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
214# cache locations to check for the shared objects.
215# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
216# at the end as shown in the examples below. This will be substituted with the
217# correct path within the directory structure.
218#SSTATE_MIRRORS ?= "\
219#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
220#file://.* file:///some/local/dir/sstate/PATH"
221
222
223#
224# Qemu configuration
225#
226# By default qemu will build with a builtin VNC server where graphical output can be
227# seen. The two lines below enable the SDL backend too. By default libsdl-native will
228# be built, if you want to use your host's libSDL instead of the minimal libsdl built
229# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
230PACKAGECONFIG_append_pn-qemu-native = " sdl"
231PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
232#ASSUME_PROVIDED += "libsdl-native"
233
234# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
235# track the version of this file when it was generated. This can safely be ignored if
236# this doesn't mean anything to you.
237CONF_VERSION = "1"
238
239SKIP_META_VIRT_SANITY_CHECK = "1"
240
241#
242# OSTree integration
243#
244
245SOTA_MACHINE ?= "${MACHINE}"
246
247DISTRO_FEATURES_append = " sota"
248DISTRO_FEATURES_NATIVE_append = " sota"
249INHERIT += " sota"
diff --git a/conf/template.qemuarm64/bblayers.conf.sample b/conf/template.qemuarm64/bblayers.conf.sample
new file mode 100644
index 0000000..1506900
--- /dev/null
+++ b/conf/template.qemuarm64/bblayers.conf.sample
@@ -0,0 +1,26 @@
1# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
2# changes incompatibly
3POKY_BBLAYERS_CONF_VERSION = "2"
4
5BBPATH = "${TOPDIR}"
6BBFILES ?= ""
7
8BBLAYERS ?= " \
9 ##OEROOT##/meta \
10 ##OEROOT##/meta-poky \
11 ##OEROOT##/meta-intel \
12 ##OEROOT##/meta-dpdk \
13 ##OEROOT##/meta-enea-bsp-common \
14 ##OEROOT##/meta-enea-bsp-arm \
15 ##OEROOT##/meta-virtualization \
16 ##OEROOT##/meta-enea-virtualization \
17 ##OEROOT##/meta-el-common \
18 ##OEROOT##/meta-el-nfv-access \
19 ##OEROOT##/meta-openembedded/meta-oe \
20 ##OEROOT##/meta-openembedded/meta-networking \
21 ##OEROOT##/meta-openembedded/meta-filesystems \
22 ##OEROOT##/meta-openembedded/meta-python \
23 ##OEROOT##/meta-openembedded/meta-webserver \
24 ##OEROOT##/meta-cloud-services \
25 ##OEROOT##/meta-cloud-services/meta-openstack \
26 "
diff --git a/conf/template.qemuarm64/conf-notes.txt b/conf/template.qemuarm64/conf-notes.txt
new file mode 100644
index 0000000..e55e538
--- /dev/null
+++ b/conf/template.qemuarm64/conf-notes.txt
@@ -0,0 +1,2 @@
1Common targets are:
2 enea-nfv-access-vnf
diff --git a/conf/template.qemuarm64/local.conf.sample b/conf/template.qemuarm64/local.conf.sample
new file mode 100644
index 0000000..afb56dd
--- /dev/null
+++ b/conf/template.qemuarm64/local.conf.sample
@@ -0,0 +1,243 @@
1#
2# This file is your local configuration file and is where all local user settings
3# are placed. The comments in this file give some guide to the options a new user
4# to the system might want to change but pretty much any configuration option can
5# be set in this file. More adventurous users can look at local.conf.extended
6# which contains other examples of configuration which can be placed in this file
7# but new users likely won't need any of them initially.
8#
9# Lines starting with the '#' character are commented out and in some cases the
10# default values are provided as comments to show people example syntax. Enabling
11# the option is a question of removing the # character and making any change to the
12# variable as required.
13
14#
15# Machine Selection
16#
17# You need to select a specific machine to target the build with. There are a selection
18# of emulated machines available which can boot and run in the QEMU emulator:
19#
20#MACHINE ?= "qemuarm"
21#MACHINE ?= "qemuarm64"
22#MACHINE ?= "qemumips"
23#MACHINE ?= "qemumips64"
24#MACHINE ?= "qemuppc"
25#MACHINE ?= "qemux86"
26#MACHINE ?= "qemux86-64"
27#
28# There are also the following hardware board target machines included for
29# demonstration purposes:
30#
31#MACHINE ?= "beaglebone"
32#MACHINE ?= "genericx86"
33#MACHINE ?= "genericx86-64"
34#MACHINE ?= "mpc8315e-rdb"
35#MACHINE ?= "edgerouter"
36#
37# This sets the default machine to be qemux86 if no other machine is selected:
38MACHINE ?= "qemuarm64"
39
40#
41# Where to place downloads
42#
43# During a first build the system will download many different source code tarballs
44# from various upstream projects. This can take a while, particularly if your network
45# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
46# can preserve this directory to speed up this part of subsequent builds. This directory
47# is safe to share between multiple builds on the same machine too.
48#
49# The default is a downloads directory under TOPDIR which is the build directory.
50#
51#DL_DIR ?= "${TOPDIR}/downloads"
52
53#
54# Where to place shared-state files
55#
56# BitBake has the capability to accelerate builds based on previously built output.
57# This is done using "shared state" files which can be thought of as cache objects
58# and this option determines where those files are placed.
59#
60# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
61# from these files if no changes were made to the configuration. If changes were made
62# to the configuration, only shared state files where the state was still valid would
63# be used (done using checksums).
64#
65# The default is a sstate-cache directory under TOPDIR.
66#
67#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
68
69#
70# Where to place the build output
71#
72# This option specifies where the bulk of the building work should be done and
73# where BitBake should place its temporary files and output. Keep in mind that
74# this includes the extraction and compilation of many applications and the toolchain
75# which can use Gigabytes of hard disk space.
76#
77# The default is a tmp directory under TOPDIR.
78#
79#TMPDIR = "${TOPDIR}/tmp"
80
81#
82# Default policy config
83#
84# The distribution setting controls which policy settings are used as defaults.
85# The default value is fine for general Yocto project use, at least initially.
86# Ultimately when creating custom policy, people will likely end up subclassing
87# these defaults.
88#
89DISTRO ?= "eneanfvaccess"
90# As an example of a subclass there is a "bleeding" edge policy configuration
91# where many versions are set to the absolute latest code from the upstream
92# source control systems. This is just mentioned here as an example, its not
93# useful to most new users.
94# DISTRO ?= "poky-bleeding"
95
96#
97# Package Management configuration
98#
99# This variable lists which packaging formats to enable. Multiple package backends
100# can be enabled at once and the first item listed in the variable will be used
101# to generate the root filesystems.
102# Options are:
103# - 'package_deb' for debian style deb files
104# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
105# - 'package_rpm' for rpm style packages
106# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
107# We default to rpm:
108PACKAGE_CLASSES ?= "package_deb"
109
110#
111# SDK/ADT target architecture
112#
113# This variable specifies the architecture to build SDK/ADT items for and means
114# you can build the SDK packages for architectures other than the machine you are
115# running the build on (i.e. building i686 packages on an x86_64 host).
116# Supported values are i686 and x86_64
117#SDKMACHINE ?= "i686"
118
119#
120# Extra image configuration defaults
121#
122# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
123# images. Some of these options are added to certain image types automatically. The
124# variable can contain the following options:
125# "dbg-pkgs" - add -dbg packages for all installed packages
126# (adds symbol information for debugging/profiling)
127# "dev-pkgs" - add -dev packages for all installed packages
128# (useful if you want to develop against libs in the image)
129# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
130# (useful if you want to run the package test suites)
131# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
132# "tools-debug" - add debugging tools (gdb, strace)
133# "eclipse-debug" - add Eclipse remote debugging support
134# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
135# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
136# "debug-tweaks" - make an image suitable for development
137# e.g. ssh root access has a blank password
138# There are other application targets that can be used here too, see
139# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
140# We default to enabling the debugging tweaks.
141EXTRA_IMAGE_FEATURES = "debug-tweaks"
142
143#
144# Additional image features
145#
146# The following is a list of additional classes to use when building images which
147# enable extra features. Some available options which can be included in this variable
148# are:
149# - 'buildstats' collect build statistics
150# - 'image-mklibs' to reduce shared library files size for an image
151# - 'image-prelink' in order to prelink the filesystem image
152# - 'image-swab' to perform host system intrusion detection
153# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
154# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
155USER_CLASSES ?= "buildstats image-mklibs image-prelink"
156
157#
158# Runtime testing of images
159#
160# The build system can test booting virtual machine images under qemu (an emulator)
161# after any root filesystems are created and run tests against those images. To
162# enable this uncomment this line. See classes/testimage(-auto).bbclass for
163# further details.
164#TEST_IMAGE = "1"
165#
166# Interactive shell configuration
167#
168# Under certain circumstances the system may need input from you and to do this it
169# can launch an interactive shell. It needs to do this since the build is
170# multithreaded and needs to be able to handle the case where more than one parallel
171# process may require the user's attention. The default is iterate over the available
172# terminal types to find one that works.
173#
174# Examples of the occasions this may happen are when resolving patches which cannot
175# be applied, to use the devshell or the kernel menuconfig
176#
177# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
178# Note: currently, Konsole support only works for KDE 3.x due to the way
179# newer Konsole versions behave
180#OE_TERMINAL = "auto"
181# By default disable interactive patch resolution (tasks will just fail instead):
182PATCHRESOLVE = "noop"
183
184#
185# Disk Space Monitoring during the build
186#
187# Monitor the disk space during the build. If there is less that 1GB of space or less
188# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
189# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
190# of the build. The reason for this is that running completely out of space can corrupt
191# files and damages the build in ways which may not be easily recoverable.
192# It's necesary to monitor /tmp, if there is no space left the build will fail
193# with very exotic errors.
194BB_DISKMON_DIRS = "\
195 STOPTASKS,${TMPDIR},1G,100K \
196 STOPTASKS,${DL_DIR},1G,100K \
197 STOPTASKS,${SSTATE_DIR},1G,100K \
198 STOPTASKS,/tmp,100M,100K \
199 ABORT,${TMPDIR},100M,1K \
200 ABORT,${DL_DIR},100M,1K \
201 ABORT,${SSTATE_DIR},100M,1K \
202 ABORT,/tmp,10M,1K"
203
204#
205# Shared-state files from other locations
206#
207# As mentioned above, shared state files are prebuilt cache data objects which can
208# used to accelerate build time. This variable can be used to configure the system
209# to search other mirror locations for these objects before it builds the data itself.
210#
211# This can be a filesystem directory, or a remote url such as http or ftp. These
212# would contain the sstate-cache results from previous builds (possibly from other
213# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
214# cache locations to check for the shared objects.
215# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
216# at the end as shown in the examples below. This will be substituted with the
217# correct path within the directory structure.
218#SSTATE_MIRRORS ?= "\
219#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
220#file://.* file:///some/local/dir/sstate/PATH"
221
222
223#
224# Qemu configuration
225#
226# By default qemu will build with a builtin VNC server where graphical output can be
227# seen. The two lines below enable the SDL backend too. By default libsdl-native will
228# be built, if you want to use your host's libSDL instead of the minimal libsdl built
229# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
230PACKAGECONFIG_append_pn-qemu-native = " sdl"
231PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
232#ASSUME_PROVIDED += "libsdl-native"
233
234# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
235# track the version of this file when it was generated. This can safely be ignored if
236# this doesn't mean anything to you.
237CONF_VERSION = "1"
238
239SKIP_META_VIRT_SANITY_CHECK = "1"
240
241PREFERRED_PROVIDER_virtual/kernel_qemuarm64 = "linux-ampere-guest"
242MACHINE_FEATURES += " efi"
243DPDK_TARGET_MACHINE = "armv8a"
diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc
index 1cde827..370a3a8 100644
--- a/images/enea-nfv-access-host-common.inc
+++ b/images/enea-nfv-access-host-common.inc
@@ -2,9 +2,15 @@ REQUIRE_FILES = " \
2 images/enea-nfv-access-common.inc \ 2 images/enea-nfv-access-common.inc \
3 classes/override_grub-efi.inc \ 3 classes/override_grub-efi.inc \
4 " 4 "
5REQUIRE_FILES_append_df-efi-secure-boot = " \ 5
6# override_image_types_ostree - has some secure-boot changes
7# but we guarded them
8REQUIRE_FILES_append_sota = " \
6 classes/override_image_types_ostree.inc \ 9 classes/override_image_types_ostree.inc \
7 classes/override_image_types_ota.inc \ 10 classes/override_image_types_ota.inc \
11 "
12
13REQUIRE_FILES_append_df-efi-secure-boot = " \
8 classes/override_grub-efi_secureboot.inc \ 14 classes/override_grub-efi_secureboot.inc \
9 images/secure-boot.inc \ 15 images/secure-boot.inc \
10 " 16 "
@@ -20,14 +26,21 @@ IMAGE_INSTALL += " \
20LABELS_LIVE = "installer live-boot" 26LABELS_LIVE = "installer live-boot"
21 27
22GRUB_GFXSERIAL_x86-64 = "1" 28GRUB_GFXSERIAL_x86-64 = "1"
29GRUB_GFXSERIAL_aarch64 = "1"
30GRUB_SERIAL_aarch64 = "console=ttyAMA0,115200"
31
23# Append default parameters for x86-64 targets 32# Append default parameters for x86-64 targets
24APPEND_x86-64 = "quiet" 33APPEND_x86-64 = "quiet"
25SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200" 34SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200"
26 35
36APPEND_aarch64 = "quiet"
37
27# Skip menu and boot installer immediately 38# Skip menu and boot installer immediately
28GRUB_TIMEOUT_x86-64 = "0" 39GRUB_TIMEOUT_x86-64 = "0"
29AUTO_SYSLINUXMENU_x86-64 = "0" 40AUTO_SYSLINUXMENU_x86-64 = "0"
30 41
42GRUB_TIMEOUT_aarch64 = "5"
43
31# grub-efi-native is needed in recipe-sysroot-native to generate the initial 44# grub-efi-native is needed in recipe-sysroot-native to generate the initial
32# configuration file for grub 45# configuration file for grub
33DEPENDS_append += " grub-efi-native" 46DEPENDS_append += " grub-efi-native"
diff --git a/images/enea-nfv-access-vnf.bb b/images/enea-nfv-access-vnf.bb
index a3902c2..ebbb08d 100644
--- a/images/enea-nfv-access-vnf.bb
+++ b/images/enea-nfv-access-vnf.bb
@@ -4,6 +4,7 @@ require images/enea-nfv-access-common.inc
4 4
5IMAGE_FSTYPES += "wic.qcow2" 5IMAGE_FSTYPES += "wic.qcow2"
6WKS_FILE = "enea-nfv-access-vnf-qemux86-64.wks" 6WKS_FILE = "enea-nfv-access-vnf-qemux86-64.wks"
7WKS_FILE_aarch64 = "enea-nfv-access-vnf-qemuarm64.wks"
7 8
8CLOUDINITPKGS = "cloud-init util-linux-blkid" 9CLOUDINITPKGS = "cloud-init util-linux-blkid"
9CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}" 10CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}"
diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb
index 9311992..845e668 100644
--- a/images/enea-nfv-access.bb
+++ b/images/enea-nfv-access.bb
@@ -1,7 +1,18 @@
1DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM and NETCONF Edgelink customizations" 1DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM and NETCONF Edgelink customizations"
2 2
3IMAGE_FSTYPES_append_aarch64 = " live"
4IMAGE_TYPES_MASKED_append_aarch64 = " hddimg iso"
5NOISO_aarch64 = "1"
6NOHDD_aarch64 = "0"
7
3require images/enea-nfv-access-host-common.inc 8require images/enea-nfv-access-host-common.inc
4 9
5IMAGE_INSTALL += " \ 10IMAGE_INSTALL += " \
6 element-vcpe \ 11 element-vcpe \
7 " 12 "
13
14# On AARCH64, the OVMF firmware images are required by KVM, but these images are not
15# pulled explicitly by other recipes.
16IMAGE_INSTALL_append_aarch64 = "\
17 ovmf \
18 "
diff --git a/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemuarm64.wks b/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemuarm64.wks
new file mode 100644
index 0000000..1495f17
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemuarm64.wks
@@ -0,0 +1,5 @@
1# short-description: Create an MBR partition table with PCBIOS
2# long-description: Create an MBR partition table with PCBIOS
3part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --label boot --active --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B --use-uuid --align 1024
4part / --source rootfs --fstype=ext4 --label access --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --use-uuid --align 1024
5bootloader --ptable gpt --timeout=5 --append="console=ttyS0,115200 hugepagesz=2M hugepages=256 isolcpus=1 nohz_full=1 rcu_nocbs=1 audit=0 quiet"