summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitreview5
-rw-r--r--README3
-rw-r--r--classes/override_grub-efi.inc89
-rw-r--r--classes/override_grub-efi_secureboot.inc31
-rw-r--r--classes/override_image_types_ostree.inc155
-rw-r--r--classes/override_image_types_ota.inc98
-rw-r--r--classes/override_live-vm-common.inc29
-rw-r--r--classes/sota_atom-c3000.bbclass4
-rw-r--r--classes/sota_xeon-d.bbclass4
-rw-r--r--conf/distro/eneanfvaccess.conf19
-rw-r--r--conf/layer.conf1
-rw-r--r--conf/template.atom-c3000-debug/bblayers.conf.sample31
-rw-r--r--conf/template.atom-c3000-debug/conf-notes.txt2
-rw-r--r--conf/template.atom-c3000-debug/local.conf.sample270
-rw-r--r--conf/template.atom-c3000/conf-notes.txt2
-rw-r--r--conf/template.atom-c3000/local.conf.sample36
-rw-r--r--conf/template.qemux86-64-esdk/conf-notes.txt2
-rw-r--r--conf/template.qemux86-64/bblayers.conf.sample2
-rw-r--r--conf/template.qemux86-64/conf-notes.txt2
-rw-r--r--conf/template.xeon-d-debug/bblayers.conf.sample31
-rw-r--r--conf/template.xeon-d-debug/conf-notes.txt2
-rw-r--r--conf/template.xeon-d-debug/local.conf.sample271
-rw-r--r--conf/template.xeon-d/conf-notes.txt2
-rw-r--r--conf/template.xeon-d/local.conf.sample36
-rw-r--r--files/group52
-rw-r--r--files/passwd25
-rw-r--r--images/core-image-minimal-initramfs.bbappend22
-rw-r--r--images/enea-edge-common.inc40
-rw-r--r--images/enea-edge-host-common.inc84
-rw-r--r--images/enea-edge-runtime-debug.bb9
-rw-r--r--images/enea-edge-runtime-esdk.bb (renamed from images/enea-nfv-access-esdk.bb)0
-rw-r--r--images/enea-edge-runtime-sdk.bb (renamed from images/enea-nfv-access-sdk.bb)4
-rw-r--r--images/enea-edge-runtime.bb7
-rw-r--r--images/enea-edge-vnf.bb15
-rw-r--r--images/enea-nfv-access-common.inc15
-rw-r--r--images/enea-nfv-access-host-common.inc69
-rw-r--r--images/enea-nfv-access-vnf.bb16
-rw-r--r--images/enea-nfv-access.bb7
-rw-r--r--recipes-core/systemd/files/basic.conf.in50
-rw-r--r--recipes-core/systemd/systemd_247.6.bbappend25
-rw-r--r--scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks (renamed from scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks)0
41 files changed, 1047 insertions, 520 deletions
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..39fc438
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
1[gerrit]
2host=gerrit.enea.se
3port=29418
4project=linux/meta-el-nfv-access.git
5track=1
diff --git a/README b/README
index 2c463ba..9dc40dd 100644
--- a/README
+++ b/README
@@ -10,13 +10,10 @@ Dependencies
10This layer depends on: 10This layer depends on:
11 11
12 URI: git://git.yoctoproject.org/poky 12 URI: git://git.yoctoproject.org/poky
13 branch: rocko
14 13
15 URI: git://git.enea.com/linux/meta-nfv-access-common 14 URI: git://git.enea.com/linux/meta-nfv-access-common
16 branch: develop
17 15
18 URI: git://git.enea.com/linux/meta-enea-virtualization 16 URI: git://git.enea.com/linux/meta-enea-virtualization
19 branch: develop
20 17
21 18
22 19
diff --git a/classes/override_grub-efi.inc b/classes/override_grub-efi.inc
deleted file mode 100644
index 15a7063..0000000
--- a/classes/override_grub-efi.inc
+++ /dev/null
@@ -1,89 +0,0 @@
1GRUB_GRAPHICS ?= "console=tty0"
2
3python build_efi_cfg() {
4 import sys
5
6 workdir = d.getVar('WORKDIR')
7 if not workdir:
8 bb.error("WORKDIR not defined, unable to package")
9 return
10
11 gfxserial = d.getVar('GRUB_GFXSERIAL') or ""
12
13 labels = d.getVar('LABELS')
14 if not labels:
15 bb.debug(1, "LABELS not defined, nothing to do")
16 return
17
18 if labels == []:
19 bb.debug(1, "No labels, nothing to do")
20 return
21
22 cfile = d.getVar('GRUB_CFG')
23 if not cfile:
24 bb.fatal('Unable to read GRUB_CFG')
25
26 try:
27 cfgfile = open(cfile, 'w')
28 except OSError:
29 bb.fatal('Unable to open %s' % cfile)
30
31 cfgfile.write('# Automatically created by OE\n')
32
33 opts = d.getVar('GRUB_OPTS')
34 if opts:
35 for opt in opts.split(';'):
36 cfgfile.write('%s\n' % opt)
37
38 cfgfile.write('default=%s\n' % (labels.split()[0]))
39
40 timeout = d.getVar('GRUB_TIMEOUT')
41 if timeout:
42 cfgfile.write('timeout=%s\n' % timeout)
43 else:
44 cfgfile.write('timeout=50\n')
45
46 root = d.getVar('GRUB_ROOT')
47 if not root:
48 bb.fatal('GRUB_ROOT not defined')
49
50 if gfxserial == "1":
51 btypes = [ [ " serial console", d.getVar('GRUB_SERIAL') or "" ],
52 [ " graphics console", d.getVar('GRUB_GRAPHICS') or "" ] ]
53 else:
54 btypes = [ [ "", "" ] ]
55
56 for label in labels.split():
57 localdata = d.createCopy()
58
59 overrides = localdata.getVar('OVERRIDES')
60 if not overrides:
61 bb.fatal('OVERRIDES not defined')
62
63 for btype in btypes:
64 localdata.setVar('OVERRIDES', label + ':' + overrides)
65
66 cfgfile.write('\nmenuentry \'%s%s\'{\n' % (label, btype[0]))
67 lb = label
68 if label == "install":
69 lb = "install-efi"
70 cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
71
72 cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
73
74 append = localdata.getVar('APPEND')
75 initrd = localdata.getVar('INITRD')
76
77 if append:
78 append = replace_rootfs_uuid(d, append)
79 cfgfile.write(' %s' % (append))
80
81 cfgfile.write(' %s' % btype[1])
82 cfgfile.write('\n')
83
84 if initrd:
85 cfgfile.write('initrd /initrd')
86 cfgfile.write('\n}\n')
87
88 cfgfile.close()
89}
diff --git a/classes/override_grub-efi_secureboot.inc b/classes/override_grub-efi_secureboot.inc
deleted file mode 100644
index b944ec8..0000000
--- a/classes/override_grub-efi_secureboot.inc
+++ /dev/null
@@ -1,31 +0,0 @@
1efi_populate() {
2 # DEST must be the root of the image so that EFIDIR is not
3 # nested under a top level directory.
4 DEST=$1
5
6 install -d ${DEST}${EFIDIR}
7
8 GRUB_IMAGE="grub-efi-bootia32.efi"
9 DEST_IMAGE="bootia32.efi"
10 if [ "${TARGET_ARCH}" = "x86_64" ]; then
11 GRUB_IMAGE="grub-efi-bootx64.efi"
12 DEST_IMAGE="bootx64.efi"
13 fi
14
15 #Install EFI binaries
16 install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR}
17
18 #Install kernel and initramfs sig
19 install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}.p7b ${DEST}/vmlinuz.p7b
20 install -m 0644 ${INITRD_LIVE}.p7b ${DEST}/initrd.p7b
21
22 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
23 printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh
24
25 install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
26
27 #Install UEFI keys
28 install -d ${DEST}/uefi_sb_keys
29 install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.crt ${DEST}/uefi_sb_keys/
30 install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.esl ${DEST}/uefi_sb_keys/
31}
diff --git a/classes/override_image_types_ostree.inc b/classes/override_image_types_ostree.inc
deleted file mode 100644
index 241afcd..0000000
--- a/classes/override_image_types_ostree.inc
+++ /dev/null
@@ -1,155 +0,0 @@
1# overrides meta-updater/classes/image_types_ostree.bbclass
2# - add do_image_ostree flags:
3# - dirs, cleandirs: to avoid mktemp, rm, cd, and to also remove at clean
4# - subimages, imgsuffix: to use automatic link creation
5# - override of IMAGE_CMD_ostree
6# - use the added flags
7# - IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE
8
9OSTREE_ROOTFS="${WORKDIR}/ostree-root"
10do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
11do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
12do_image_ostree[subimages] = "rootfs.ostree.tar.bz2"
13do_image_ostree[imgsuffix] = "."
14export OSTREE_ROOTFS
15
16IMAGE_CMD_ostree () {
17 if [ -z "$OSTREE_REPO" ]; then
18 bbfatal "OSTREE_REPO should be set in your local.conf"
19 fi
20
21 if [ -z "$OSTREE_BRANCHNAME" ]; then
22 bbfatal "OSTREE_BRANCHNAME should be set in your local.conf"
23 fi
24
25 cp -a ${IMAGE_ROOTFS}/* ${OSTREE_ROOTFS}
26 chmod a+rx ${OSTREE_ROOTFS}
27 sync
28
29 for d in var/*; do
30 if [ "${d}" != "var/local" ]; then
31 rm -rf ${d}
32 fi
33 done
34
35 # Create sysroot directory to which physical sysroot will be mounted
36 mkdir sysroot
37 ln -sf sysroot/ostree ostree
38
39 rm -rf tmp/*
40 ln -sf sysroot/tmp tmp
41
42 mkdir -p usr/rootdirs
43
44 mv etc usr/
45 # Implement UsrMove
46 dirs="bin sbin lib"
47
48 for dir in ${dirs} ; do
49 if [ -d ${dir} ] && [ ! -L ${dir} ] ; then
50 mv ${dir} usr/rootdirs/
51 rm -rf ${dir}
52 ln -sf usr/rootdirs/${dir} ${dir}
53 fi
54 done
55
56 if [ -n "$SYSTEMD_USED" ]; then
57 mkdir -p usr/etc/tmpfiles.d
58 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
59 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
60 echo "L /var/rootdirs/home - - - - /sysroot/home" >>${tmpfiles_conf}
61 else
62 mkdir -p usr/etc/init.d
63 tmpfiles_conf=usr/etc/init.d/tmpfiles.sh
64 echo '#!/bin/sh' > ${tmpfiles_conf}
65 echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf}
66 echo "ln -sf /sysroot/home /var/rootdirs/home" >> ${tmpfiles_conf}
67
68 ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh
69 fi
70
71 # Preserve OSTREE_BRANCHNAME for future information
72 mkdir -p usr/share/sota/
73 echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname
74
75 # Preserve data in /home to be later copied to /sysroot/home by sysroot
76 # generating procedure
77 mkdir -p usr/homedirs
78 if [ -d "home" ] && [ ! -L "home" ]; then
79 mv home usr/homedirs/home
80 ln -sf var/rootdirs/home home
81 fi
82
83 # Move persistent directories to /var
84 dirs="opt mnt media srv"
85
86 for dir in ${dirs}; do
87 if [ -d ${dir} ] && [ ! -L ${dir} ]; then
88 if [ "$(ls -A $dir)" ]; then
89 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr"
90 fi
91
92 if [ -n "$SYSTEMD_USED" ]; then
93 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf}
94 else
95 echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf}
96 fi
97 rm -rf ${dir}
98 ln -sf var/rootdirs/${dir} ${dir}
99 fi
100 done
101
102 if [ -d root ] && [ ! -L root ]; then
103 if [ "$(ls -A root)" ]; then
104 bberror "Data in /root directory is not preserved by OSTree."
105 exit 1
106 fi
107
108 if [ -n "$SYSTEMD_USED" ]; then
109 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf}
110 else
111 echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf}
112 fi
113
114 rm -rf root
115 ln -sf var/roothome root
116 fi
117
118 if [ -n "${SOTA_SECONDARY_ECUS}" ]; then
119 mkdir -p var/sota/ecus
120 cp ${SOTA_SECONDARY_ECUS} var/sota/ecus
121 fi
122
123 # Creating boot directories is required for "ostree admin deploy"
124
125 mkdir -p boot/loader.0
126 mkdir -p boot/loader.1
127 ln -sf boot/loader.0 boot/loader
128
129 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "`
130
131 # Copy kernel and initramfs and their signature files
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}
135 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_INITRAMFS_IMAGE}-${MACHINE}${RAMDISK_EXT}.p7b boot/initramfs-${checksum}.p7b
136
137 # Copy image manifest
138 cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest
139
140 # Create a tarball that can be then commited to OSTree repo
141 OSTREE_TAR=${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ostree.tar.bz2
142 tar -C ${OSTREE_ROOTFS} --xattrs --xattrs-include='*' -cjf ${OSTREE_TAR} .
143 sync
144
145 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
146 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
147 fi
148
149 # Commit the result
150 ostree --repo=${OSTREE_REPO} commit \
151 --tree=dir=${OSTREE_ROOTFS} \
152 --skip-if-unchanged \
153 --branch=${OSTREE_BRANCHNAME} \
154 --subject="Commit-id: ${IMAGE_NAME}"
155}
diff --git a/classes/override_image_types_ota.inc b/classes/override_image_types_ota.inc
deleted file mode 100644
index 17508b2..0000000
--- a/classes/override_image_types_ota.inc
+++ /dev/null
@@ -1,98 +0,0 @@
1# overrides meta-updater/classes/image_types_ota.bbclass
2# - add do_image_otaimg flags:
3# - dirs, cleandirs: to avoid mktemp, rm, cd, and to also remove at clean
4# - override of IMAGE_CMD_otaimg
5# - use the added flags
6# - avoid untar-ing the ostree image, and use OSTREE_ROOTFS
7# - IMGDEPLOYDIR, instead of DEPLOY_DIR_IMAGE
8
9OSTREE_REPO = "${WORKDIR}/ostree-repo"
10PHYS_SYSROOT = "${WORKDIR}/ota-sysroot"
11
12do_image_otaimg[dirs] = "${PHYS_SYSROOT}"
13do_image_otaimg[cleandirs] = "${PHYS_SYSROOT}"
14
15IMAGE_CMD_otaimg () {
16 if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then
17 if [ -z "$OSTREE_REPO" ]; then
18 bbfatal "OSTREE_REPO should be set in your local.conf"
19 fi
20
21 if [ -z "$OSTREE_OSNAME" ]; then
22 bbfatal "OSTREE_OSNAME should be set in your local.conf"
23 fi
24
25 if [ -z "$OSTREE_BRANCHNAME" ]; then
26 bbfatal "OSTREE_BRANCHNAME should be set in your local.conf"
27 fi
28
29 ostree admin --sysroot=${PHYS_SYSROOT} init-fs ${PHYS_SYSROOT}
30 ostree admin --sysroot=${PHYS_SYSROOT} os-init ${OSTREE_OSNAME}
31
32 mkdir -p ${PHYS_SYSROOT}/boot/loader.0
33 ln -s loader.0 ${PHYS_SYSROOT}/boot/loader
34
35 if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then
36 mkdir -p ${PHYS_SYSROOT}/boot/grub2
37 ln -s ../loader/grub.cfg ${PHYS_SYSROOT}/boot/grub2/grub.cfg
38 elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then
39 touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt
40 else
41 bberror "Invalid bootloader: ${OSTREE_BOOTLOADER}"
42 fi;
43
44 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME})
45
46 ostree --repo=${PHYS_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${ostree_target_hash}
47 export OSTREE_BOOT_PARTITION="/boot"
48 kargs_list=""
49 for arg in ${OSTREE_KERNEL_ARGS}; do
50 kargs_list="${kargs_list} --karg-append=$arg"
51 done
52
53 ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${ostree_target_hash}
54
55 cp -a ${IMAGE_ROOTFS}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
56 # Create /var/sota if it doesn't exist yet
57 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
58 # Ensure the permissions are correctly set
59 chmod 700 ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
60
61 cp -a ${OSTREE_ROOTFS}/var/local ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
62 cp -a ${OSTREE_ROOTFS}/usr/homedirs/home ${PHYS_SYSROOT}/ || true
63 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
64 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
65 # Set package version for the first deployment
66 target_version=${ostree_target_hash}
67 if [ -n "${GARAGE_TARGET_VERSION}" ]; then
68 target_version=${GARAGE_TARGET_VERSION}
69 elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then
70 target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version")
71 fi
72 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import
73 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import/installed_versions
74
75 # Calculate image type
76 OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${PHYS_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}")
77
78 if [ $OTA_ROOTFS_SIZE -lt 0 ]; then
79 exit -1
80 fi
81 eval local COUNT=\"0\"
82 eval local MIN_COUNT=\"60\"
83 if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then
84 eval COUNT=\"$MIN_COUNT\"
85 fi
86
87 # create image
88 dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024
89 mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg -L otaroot -d ${PHYS_SYSROOT}
90 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg
91 ln -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg
92 # for forward compatibility
93 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ota-ext4
94 ln -s ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ota-ext4
95 fi
96}
97
98IMAGE_TYPEDEP_otaimg = "ostree"
diff --git a/classes/override_live-vm-common.inc b/classes/override_live-vm-common.inc
new file mode 100644
index 0000000..3ac92b9
--- /dev/null
+++ b/classes/override_live-vm-common.inc
@@ -0,0 +1,29 @@
1# efi_populate_common DEST BOOTLOADER
2efi_populate_common() {
3 # DEST must be the root of the image so that EFIDIR is not
4 # nested under a top level directory.
5 DEST=$1
6
7 install -d ${DEST}${EFIDIR}
8
9 ## ENEA_start ##
10 # install -m 0644 ${DEPLOY_DIR_IMAGE}/$2-${EFI_BOOT_IMAGE} ${DEST}${EFIDIR}/${EFI_BOOT_IMAGE}
11 ## ENEA_end ##
12
13 EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
14 printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEST}/startup.nsh
15
16 ## ENEA_start ##
17 # Install EFI binaries
18 install -m 0644 ${DEPLOY_DIR_IMAGE}/${SBFOLDER}/*.efi ${DEST}${EFIDIR}
19
20 # Install kernel and initramfs sig
21 install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${SB_FILE_EXT} ${DEST}/${KERNEL_IMAGETYPE}${SB_FILE_EXT}
22 install -m 0644 ${INITRD_LIVE}${SB_FILE_EXT} ${DEST}/initrd${SB_FILE_EXT}
23
24 # Install UEFI keys
25 install -d ${DEST}/uefi_sb_keys
26 install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.crt ${DEST}/uefi_sb_keys/
27 install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.esl ${DEST}/uefi_sb_keys/
28 ## ENEA_end ##
29}
diff --git a/classes/sota_atom-c3000.bbclass b/classes/sota_atom-c3000.bbclass
index dff4294..a6bc65f 100644
--- a/classes/sota_atom-c3000.bbclass
+++ b/classes/sota_atom-c3000.bbclass
@@ -4,10 +4,10 @@ PREFERRED_PROVIDER_virtual/bootloader_sota = "grub-efi"
4 4
5WKS_FILE_sota = "efiimage-sota.wks" 5WKS_FILE_sota = "efiimage-sota.wks"
6 6
7OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" 7OSTREE_INITRAMFS_FSTYPES ?= "cpio.gz"
8 8
9# Set .otaimg to be used as source for generating hddimg 9# Set .otaimg to be used as source for generating hddimg
10ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" 10ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4"
11 11
12# OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot 12# OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot
13OSTREE_KERNEL_ARGS ?= "rw" 13OSTREE_KERNEL_ARGS ?= "rw"
diff --git a/classes/sota_xeon-d.bbclass b/classes/sota_xeon-d.bbclass
index dff4294..a6bc65f 100644
--- a/classes/sota_xeon-d.bbclass
+++ b/classes/sota_xeon-d.bbclass
@@ -4,10 +4,10 @@ PREFERRED_PROVIDER_virtual/bootloader_sota = "grub-efi"
4 4
5WKS_FILE_sota = "efiimage-sota.wks" 5WKS_FILE_sota = "efiimage-sota.wks"
6 6
7OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" 7OSTREE_INITRAMFS_FSTYPES ?= "cpio.gz"
8 8
9# Set .otaimg to be used as source for generating hddimg 9# Set .otaimg to be used as source for generating hddimg
10ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" 10ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ota-ext4"
11 11
12# OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot 12# OSTree initrd needs 'ramdisk_size' and 'rw' parameters in order to boot
13OSTREE_KERNEL_ARGS ?= "rw" 13OSTREE_KERNEL_ARGS ?= "rw"
diff --git a/conf/distro/eneanfvaccess.conf b/conf/distro/eneanfvaccess.conf
index 617b5dd..40e6e1b 100644
--- a/conf/distro/eneanfvaccess.conf
+++ b/conf/distro/eneanfvaccess.conf
@@ -1,20 +1,31 @@
1require conf/distro/enea.conf 1require conf/distro/enea.conf
2 2
3DISTRO_NAME = "Enea NFV Access" 3DISTRO_NAME = "Enea Edge Runtime"
4DISTRO_VERSION_MAJOR ??= "2.2" 4DISTRO_VERSION_MAJOR ??= "2.6"
5DISTRO_VERSION_MINOR ??= ".3" 5DISTRO_VERSION_MINOR ??= ".0"
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')}"
9 9
10# OSTree integration
11require ${@bb.utils.contains('SOTA_MACHINE', '${MACHINE}', 'conf/distro/sota.conf.inc', '', d)}
12
10INHERIT += "distrooverrides" 13INHERIT += "distrooverrides"
11DISTRO_FEATURES_append = " odm efi-secure-boot" 14DISTRO_FEATURES_append = " odm efi-secure-boot usrmerge"
15DISTRO_FEATURES_remove = "x11 opengl wayland vulkan pulseaudio alsa"
12DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot" 16DISTRO_FEATURES_OVERRIDES += "odm efi-secure-boot"
13 17
14PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native" 18PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
15PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" 19PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
16PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native" 20PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
17 21
22# Override ESP mount path set by meta/conf/image-uefi.conf to align with meta-secure-core paths
23EFI_PREFIX_df-efi-secure-boot = "/boot/efi"
18SBFOLDER = "bootloader" 24SBFOLDER = "bootloader"
19 25
20HOSTTOOLS_append = " scp" 26HOSTTOOLS_append = " scp"
27
28BB_HASHBASE_WHITELIST_append += "\
29 SAMPLE_UEFI_SB_KEYS_DIR \
30 SAMPLE_BOOT_KEYS_DIR \
31"
diff --git a/conf/layer.conf b/conf/layer.conf
index 7fec7c8..db496a4 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -11,3 +11,4 @@ BBFILE_COLLECTIONS += "el-nfv-access"
11BBFILE_PATTERN_el-nfv-access = "^${LAYERDIR}/" 11BBFILE_PATTERN_el-nfv-access = "^${LAYERDIR}/"
12BBFILE_PRIORITY_el-nfv-access = "7" 12BBFILE_PRIORITY_el-nfv-access = "7"
13LAYERDEPENDS_el-nfv-access = "nfv-access-common enea-virtualization" 13LAYERDEPENDS_el-nfv-access = "nfv-access-common enea-virtualization"
14LAYERSERIES_COMPAT_el-nfv-access = "hardknott"
diff --git a/conf/template.atom-c3000-debug/bblayers.conf.sample b/conf/template.atom-c3000-debug/bblayers.conf.sample
new file mode 100644
index 0000000..71c77cc
--- /dev/null
+++ b/conf/template.atom-c3000-debug/bblayers.conf.sample
@@ -0,0 +1,31 @@
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-nfv-access-bsp-common \
14 ##OEROOT##/meta-nfv-access-bsp-x86 \
15 ##OEROOT##/meta-virtualization \
16 ##OEROOT##/meta-enea-virtualization \
17 ##OEROOT##/meta-nfv-access-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 ##OEROOT##/meta-secure-core/meta \
28 ##OEROOT##/meta-secure-core/meta-signing-key \
29 ##OEROOT##/meta-secure-core/meta-efi-secure-boot \
30 ##OEROOT##/meta-enea-user-keys \
31 "
diff --git a/conf/template.atom-c3000-debug/conf-notes.txt b/conf/template.atom-c3000-debug/conf-notes.txt
new file mode 100644
index 0000000..d4da82b
--- /dev/null
+++ b/conf/template.atom-c3000-debug/conf-notes.txt
@@ -0,0 +1,2 @@
1Common targets are:
2 enea-edge-runtime-debug
diff --git a/conf/template.atom-c3000-debug/local.conf.sample b/conf/template.atom-c3000-debug/local.conf.sample
new file mode 100644
index 0000000..1c5fbb2
--- /dev/null
+++ b/conf/template.atom-c3000-debug/local.conf.sample
@@ -0,0 +1,270 @@
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 ?= "atom-c3000"
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 = " \
142 tools-debug \
143 debug-tweaks \
144 "
145
146#
147# Additional image features
148#
149# The following is a list of additional classes to use when building images which
150# enable extra features. Some available options which can be included in this variable
151# are:
152# - 'buildstats' collect build statistics
153# - 'image-mklibs' to reduce shared library files size for an image
154# - 'image-prelink' in order to prelink the filesystem image
155# - 'image-swab' to perform host system intrusion detection
156# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
157# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
158# NOTE: image-prelink is removed by sota.conf.inc
159USER_CLASSES ?= "buildstats image-mklibs image-prelink"
160
161#
162# Runtime testing of images
163#
164# The build system can test booting virtual machine images under qemu (an emulator)
165# after any root filesystems are created and run tests against those images. To
166# enable this uncomment this line. See classes/testimage(-auto).bbclass for
167# further details.
168#TEST_IMAGE = "1"
169#
170# Interactive shell configuration
171#
172# Under certain circumstances the system may need input from you and to do this it
173# can launch an interactive shell. It needs to do this since the build is
174# multithreaded and needs to be able to handle the case where more than one parallel
175# process may require the user's attention. The default is iterate over the available
176# terminal types to find one that works.
177#
178# Examples of the occasions this may happen are when resolving patches which cannot
179# be applied, to use the devshell or the kernel menuconfig
180#
181# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
182# Note: currently, Konsole support only works for KDE 3.x due to the way
183# newer Konsole versions behave
184#OE_TERMINAL = "auto"
185# By default disable interactive patch resolution (tasks will just fail instead):
186PATCHRESOLVE = "noop"
187
188#
189# Disk Space Monitoring during the build
190#
191# Monitor the disk space during the build. If there is less that 1GB of space or less
192# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
193# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
194# of the build. The reason for this is that running completely out of space can corrupt
195# files and damages the build in ways which may not be easily recoverable.
196# It's necesary to monitor /tmp, if there is no space left the build will fail
197# with very exotic errors.
198BB_DISKMON_DIRS = "\
199 STOPTASKS,${TMPDIR},1G,100K \
200 STOPTASKS,${DL_DIR},1G,100K \
201 STOPTASKS,${SSTATE_DIR},1G,100K \
202 STOPTASKS,/tmp,100M,100K \
203 ABORT,${TMPDIR},100M,1K \
204 ABORT,${DL_DIR},100M,1K \
205 ABORT,${SSTATE_DIR},100M,1K \
206 ABORT,/tmp,10M,1K"
207
208#
209# Shared-state files from other locations
210#
211# As mentioned above, shared state files are prebuilt cache data objects which can
212# used to accelerate build time. This variable can be used to configure the system
213# to search other mirror locations for these objects before it builds the data itself.
214#
215# This can be a filesystem directory, or a remote url such as http or ftp. These
216# would contain the sstate-cache results from previous builds (possibly from other
217# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
218# cache locations to check for the shared objects.
219# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
220# at the end as shown in the examples below. This will be substituted with the
221# correct path within the directory structure.
222#SSTATE_MIRRORS ?= "\
223#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
224#file://.* file:///some/local/dir/sstate/PATH"
225
226
227#
228# Qemu configuration
229#
230# By default qemu will build with a builtin VNC server where graphical output can be
231# seen. The two lines below enable the SDL backend too. By default libsdl-native will
232# be built, if you want to use your host's libSDL instead of the minimal libsdl built
233# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
234PACKAGECONFIG_append_pn-qemu-native = " sdl"
235PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
236#ASSUME_PROVIDED += "libsdl-native"
237
238# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
239# track the version of this file when it was generated. This can safely be ignored if
240# this doesn't mean anything to you.
241CONF_VERSION = "1"
242
243SKIP_META_VIRT_SANITY_CHECK = "1"
244
245# Various packages dynamically add users and groups to the system at package
246# install time. For programs that do not care what the uid/gid is of the
247# resulting users/groups, the order of the install will determine the final
248# uid/gid. This can lead to non-deterministic uid/gid values from one build
249# to another. Use the following settings to specify that all user/group adds
250# should be created based on a static passwd/group file.
251#
252# Note, if you enable or disable the useradd-staticids in a configured system,
253# the TMPDIR may contain incorrect uid/gid values. Clearing the TMPDIR
254# will correct this condition.
255#
256# By default the system looks in the BBPATH for files/passwd and files/group
257# the default can be overriden by spefying USERADD_UID/GID_TABLES.
258#
259USERADDEXTENSION = "useradd-staticids"
260USERADD_UID_TABLES = "files/passwd"
261USERADD_GID_TABLES = "files/group"
262ROOTFS_POSTPROCESS_COMMAND_remove = "systemd_create_users;"
263#
264# In order to prevent generating a system where a dynamicly assigned uid/gid
265# can exist, you should enable the following setting. This will force the
266# system to error out if the user/group name is not defined in the
267# files/passwd or files/group (or specified replacements.)
268# Unfortunately, setting the variable below breaks the build, so do not set it
269# for now
270# USERADD_ERROR_DYNAMIC = "1"
diff --git a/conf/template.atom-c3000/conf-notes.txt b/conf/template.atom-c3000/conf-notes.txt
index ebd6162..580c5c9 100644
--- a/conf/template.atom-c3000/conf-notes.txt
+++ b/conf/template.atom-c3000/conf-notes.txt
@@ -1,2 +1,2 @@
1Common targets are: 1Common targets are:
2 enea-nfv-access 2 enea-edge-runtime
diff --git a/conf/template.atom-c3000/local.conf.sample b/conf/template.atom-c3000/local.conf.sample
index 8c24e77..54d065c 100644
--- a/conf/template.atom-c3000/local.conf.sample
+++ b/conf/template.atom-c3000/local.conf.sample
@@ -152,6 +152,7 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
152# - 'image-swab' to perform host system intrusion detection 152# - 'image-swab' to perform host system intrusion detection
153# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink 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 154# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
155# NOTE: image-prelink is removed by sota.conf.inc
155USER_CLASSES ?= "buildstats image-mklibs image-prelink" 156USER_CLASSES ?= "buildstats image-mklibs image-prelink"
156 157
157# 158#
@@ -238,12 +239,29 @@ CONF_VERSION = "1"
238 239
239SKIP_META_VIRT_SANITY_CHECK = "1" 240SKIP_META_VIRT_SANITY_CHECK = "1"
240 241
241# 242# Various packages dynamically add users and groups to the system at package
242# OSTree integration 243# install time. For programs that do not care what the uid/gid is of the
243# 244# resulting users/groups, the order of the install will determine the final
244 245# uid/gid. This can lead to non-deterministic uid/gid values from one build
245SOTA_MACHINE ?= "${MACHINE}" 246# to another. Use the following settings to specify that all user/group adds
246 247# should be created based on a static passwd/group file.
247DISTRO_FEATURES_append = " sota" 248#
248DISTRO_FEATURES_NATIVE_append = " sota" 249# Note, if you enable or disable the useradd-staticids in a configured system,
249INHERIT += " sota" 250# the TMPDIR may contain incorrect uid/gid values. Clearing the TMPDIR
251# will correct this condition.
252#
253# By default the system looks in the BBPATH for files/passwd and files/group
254# the default can be overriden by spefying USERADD_UID/GID_TABLES.
255#
256USERADDEXTENSION = "useradd-staticids"
257USERADD_UID_TABLES = "files/passwd"
258USERADD_GID_TABLES = "files/group"
259ROOTFS_POSTPROCESS_COMMAND_remove = "systemd_create_users;"
260#
261# In order to prevent generating a system where a dynamicly assigned uid/gid
262# can exist, you should enable the following setting. This will force the
263# system to error out if the user/group name is not defined in the
264# files/passwd or files/group (or specified replacements.)
265# Unfortunately, setting the variable below breaks the build, so do not set it
266# for now
267# USERADD_ERROR_DYNAMIC = "1"
diff --git a/conf/template.qemux86-64-esdk/conf-notes.txt b/conf/template.qemux86-64-esdk/conf-notes.txt
index e939ec6..14d7575 100644
--- a/conf/template.qemux86-64-esdk/conf-notes.txt
+++ b/conf/template.qemux86-64-esdk/conf-notes.txt
@@ -1,2 +1,2 @@
1Common targets are: 1Common targets are:
2 enea-nfv-access-esdk 2 enea-edge-runtime-esdk
diff --git a/conf/template.qemux86-64/bblayers.conf.sample b/conf/template.qemux86-64/bblayers.conf.sample
index ea5510a..214386c 100644
--- a/conf/template.qemux86-64/bblayers.conf.sample
+++ b/conf/template.qemux86-64/bblayers.conf.sample
@@ -21,6 +21,4 @@ BBLAYERS ?= " \
21 ##OEROOT##/meta-openembedded/meta-filesystems \ 21 ##OEROOT##/meta-openembedded/meta-filesystems \
22 ##OEROOT##/meta-openembedded/meta-python \ 22 ##OEROOT##/meta-openembedded/meta-python \
23 ##OEROOT##/meta-openembedded/meta-webserver \ 23 ##OEROOT##/meta-openembedded/meta-webserver \
24 ##OEROOT##/meta-cloud-services \
25 ##OEROOT##/meta-cloud-services/meta-openstack \
26 " 24 "
diff --git a/conf/template.qemux86-64/conf-notes.txt b/conf/template.qemux86-64/conf-notes.txt
index e55e538..2b65747 100644
--- a/conf/template.qemux86-64/conf-notes.txt
+++ b/conf/template.qemux86-64/conf-notes.txt
@@ -1,2 +1,2 @@
1Common targets are: 1Common targets are:
2 enea-nfv-access-vnf 2 enea-edge-vnf
diff --git a/conf/template.xeon-d-debug/bblayers.conf.sample b/conf/template.xeon-d-debug/bblayers.conf.sample
new file mode 100644
index 0000000..71c77cc
--- /dev/null
+++ b/conf/template.xeon-d-debug/bblayers.conf.sample
@@ -0,0 +1,31 @@
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-nfv-access-bsp-common \
14 ##OEROOT##/meta-nfv-access-bsp-x86 \
15 ##OEROOT##/meta-virtualization \
16 ##OEROOT##/meta-enea-virtualization \
17 ##OEROOT##/meta-nfv-access-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 ##OEROOT##/meta-secure-core/meta \
28 ##OEROOT##/meta-secure-core/meta-signing-key \
29 ##OEROOT##/meta-secure-core/meta-efi-secure-boot \
30 ##OEROOT##/meta-enea-user-keys \
31 "
diff --git a/conf/template.xeon-d-debug/conf-notes.txt b/conf/template.xeon-d-debug/conf-notes.txt
new file mode 100644
index 0000000..d4da82b
--- /dev/null
+++ b/conf/template.xeon-d-debug/conf-notes.txt
@@ -0,0 +1,2 @@
1Common targets are:
2 enea-edge-runtime-debug
diff --git a/conf/template.xeon-d-debug/local.conf.sample b/conf/template.xeon-d-debug/local.conf.sample
new file mode 100644
index 0000000..3f8ef4a
--- /dev/null
+++ b/conf/template.xeon-d-debug/local.conf.sample
@@ -0,0 +1,271 @@
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 ?= "xeon-d"
39
40
41#
42# Where to place downloads
43#
44# During a first build the system will download many different source code tarballs
45# from various upstream projects. This can take a while, particularly if your network
46# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
47# can preserve this directory to speed up this part of subsequent builds. This directory
48# is safe to share between multiple builds on the same machine too.
49#
50# The default is a downloads directory under TOPDIR which is the build directory.
51#
52#DL_DIR ?= "${TOPDIR}/downloads"
53
54#
55# Where to place shared-state files
56#
57# BitBake has the capability to accelerate builds based on previously built output.
58# This is done using "shared state" files which can be thought of as cache objects
59# and this option determines where those files are placed.
60#
61# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
62# from these files if no changes were made to the configuration. If changes were made
63# to the configuration, only shared state files where the state was still valid would
64# be used (done using checksums).
65#
66# The default is a sstate-cache directory under TOPDIR.
67#
68#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
69
70#
71# Where to place the build output
72#
73# This option specifies where the bulk of the building work should be done and
74# where BitBake should place its temporary files and output. Keep in mind that
75# this includes the extraction and compilation of many applications and the toolchain
76# which can use Gigabytes of hard disk space.
77#
78# The default is a tmp directory under TOPDIR.
79#
80#TMPDIR = "${TOPDIR}/tmp"
81
82#
83# Default policy config
84#
85# The distribution setting controls which policy settings are used as defaults.
86# The default value is fine for general Yocto project use, at least initially.
87# Ultimately when creating custom policy, people will likely end up subclassing
88# these defaults.
89#
90DISTRO ?= "eneanfvaccess"
91# As an example of a subclass there is a "bleeding" edge policy configuration
92# where many versions are set to the absolute latest code from the upstream
93# source control systems. This is just mentioned here as an example, its not
94# useful to most new users.
95# DISTRO ?= "poky-bleeding"
96
97#
98# Package Management configuration
99#
100# This variable lists which packaging formats to enable. Multiple package backends
101# can be enabled at once and the first item listed in the variable will be used
102# to generate the root filesystems.
103# Options are:
104# - 'package_deb' for debian style deb files
105# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
106# - 'package_rpm' for rpm style packages
107# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
108# We default to rpm:
109PACKAGE_CLASSES ?= "package_deb"
110
111#
112# SDK/ADT target architecture
113#
114# This variable specifies the architecture to build SDK/ADT items for and means
115# you can build the SDK packages for architectures other than the machine you are
116# running the build on (i.e. building i686 packages on an x86_64 host).
117# Supported values are i686 and x86_64
118#SDKMACHINE ?= "i686"
119
120#
121# Extra image configuration defaults
122#
123# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
124# images. Some of these options are added to certain image types automatically. The
125# variable can contain the following options:
126# "dbg-pkgs" - add -dbg packages for all installed packages
127# (adds symbol information for debugging/profiling)
128# "dev-pkgs" - add -dev packages for all installed packages
129# (useful if you want to develop against libs in the image)
130# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
131# (useful if you want to run the package test suites)
132# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
133# "tools-debug" - add debugging tools (gdb, strace)
134# "eclipse-debug" - add Eclipse remote debugging support
135# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
136# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
137# "debug-tweaks" - make an image suitable for development
138# e.g. ssh root access has a blank password
139# There are other application targets that can be used here too, see
140# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
141# We default to enabling the debugging tweaks.
142EXTRA_IMAGE_FEATURES = " \
143 tools-debug \
144 debug-tweaks \
145 "
146
147#
148# Additional image features
149#
150# The following is a list of additional classes to use when building images which
151# enable extra features. Some available options which can be included in this variable
152# are:
153# - 'buildstats' collect build statistics
154# - 'image-mklibs' to reduce shared library files size for an image
155# - 'image-prelink' in order to prelink the filesystem image
156# - 'image-swab' to perform host system intrusion detection
157# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
158# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
159# NOTE: image-prelink is removed by sota.conf.inc
160USER_CLASSES ?= "buildstats image-mklibs image-prelink"
161
162#
163# Runtime testing of images
164#
165# The build system can test booting virtual machine images under qemu (an emulator)
166# after any root filesystems are created and run tests against those images. To
167# enable this uncomment this line. See classes/testimage(-auto).bbclass for
168# further details.
169#TEST_IMAGE = "1"
170#
171# Interactive shell configuration
172#
173# Under certain circumstances the system may need input from you and to do this it
174# can launch an interactive shell. It needs to do this since the build is
175# multithreaded and needs to be able to handle the case where more than one parallel
176# process may require the user's attention. The default is iterate over the available
177# terminal types to find one that works.
178#
179# Examples of the occasions this may happen are when resolving patches which cannot
180# be applied, to use the devshell or the kernel menuconfig
181#
182# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
183# Note: currently, Konsole support only works for KDE 3.x due to the way
184# newer Konsole versions behave
185#OE_TERMINAL = "auto"
186# By default disable interactive patch resolution (tasks will just fail instead):
187PATCHRESOLVE = "noop"
188
189#
190# Disk Space Monitoring during the build
191#
192# Monitor the disk space during the build. If there is less that 1GB of space or less
193# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
194# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
195# of the build. The reason for this is that running completely out of space can corrupt
196# files and damages the build in ways which may not be easily recoverable.
197# It's necesary to monitor /tmp, if there is no space left the build will fail
198# with very exotic errors.
199BB_DISKMON_DIRS = "\
200 STOPTASKS,${TMPDIR},1G,100K \
201 STOPTASKS,${DL_DIR},1G,100K \
202 STOPTASKS,${SSTATE_DIR},1G,100K \
203 STOPTASKS,/tmp,100M,100K \
204 ABORT,${TMPDIR},100M,1K \
205 ABORT,${DL_DIR},100M,1K \
206 ABORT,${SSTATE_DIR},100M,1K \
207 ABORT,/tmp,10M,1K"
208
209#
210# Shared-state files from other locations
211#
212# As mentioned above, shared state files are prebuilt cache data objects which can
213# used to accelerate build time. This variable can be used to configure the system
214# to search other mirror locations for these objects before it builds the data itself.
215#
216# This can be a filesystem directory, or a remote url such as http or ftp. These
217# would contain the sstate-cache results from previous builds (possibly from other
218# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
219# cache locations to check for the shared objects.
220# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
221# at the end as shown in the examples below. This will be substituted with the
222# correct path within the directory structure.
223#SSTATE_MIRRORS ?= "\
224#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
225#file://.* file:///some/local/dir/sstate/PATH"
226
227
228#
229# Qemu configuration
230#
231# By default qemu will build with a builtin VNC server where graphical output can be
232# seen. The two lines below enable the SDL backend too. By default libsdl-native will
233# be built, if you want to use your host's libSDL instead of the minimal libsdl built
234# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
235PACKAGECONFIG_append_pn-qemu-native = " sdl"
236PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
237#ASSUME_PROVIDED += "libsdl-native"
238
239# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
240# track the version of this file when it was generated. This can safely be ignored if
241# this doesn't mean anything to you.
242CONF_VERSION = "1"
243
244SKIP_META_VIRT_SANITY_CHECK = "1"
245
246# Various packages dynamically add users and groups to the system at package
247# install time. For programs that do not care what the uid/gid is of the
248# resulting users/groups, the order of the install will determine the final
249# uid/gid. This can lead to non-deterministic uid/gid values from one build
250# to another. Use the following settings to specify that all user/group adds
251# should be created based on a static passwd/group file.
252#
253# Note, if you enable or disable the useradd-staticids in a configured system,
254# the TMPDIR may contain incorrect uid/gid values. Clearing the TMPDIR
255# will correct this condition.
256#
257# By default the system looks in the BBPATH for files/passwd and files/group
258# the default can be overriden by spefying USERADD_UID/GID_TABLES.
259#
260USERADDEXTENSION = "useradd-staticids"
261USERADD_UID_TABLES = "files/passwd"
262USERADD_GID_TABLES = "files/group"
263ROOTFS_POSTPROCESS_COMMAND_remove = "systemd_create_users;"
264#
265# In order to prevent generating a system where a dynamicly assigned uid/gid
266# can exist, you should enable the following setting. This will force the
267# system to error out if the user/group name is not defined in the
268# files/passwd or files/group (or specified replacements.)
269# Unfortunately, setting the variable below breaks the build, so do not set it
270# for now
271# USERADD_ERROR_DYNAMIC = "1"
diff --git a/conf/template.xeon-d/conf-notes.txt b/conf/template.xeon-d/conf-notes.txt
index ebd6162..580c5c9 100644
--- a/conf/template.xeon-d/conf-notes.txt
+++ b/conf/template.xeon-d/conf-notes.txt
@@ -1,2 +1,2 @@
1Common targets are: 1Common targets are:
2 enea-nfv-access 2 enea-edge-runtime
diff --git a/conf/template.xeon-d/local.conf.sample b/conf/template.xeon-d/local.conf.sample
index 3b1063e..ace57dd 100644
--- a/conf/template.xeon-d/local.conf.sample
+++ b/conf/template.xeon-d/local.conf.sample
@@ -153,6 +153,7 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
153# - 'image-swab' to perform host system intrusion detection 153# - 'image-swab' to perform host system intrusion detection
154# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink 154# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
155# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended 155# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
156# NOTE: image-prelink is removed by sota.conf.inc
156USER_CLASSES ?= "buildstats image-mklibs image-prelink" 157USER_CLASSES ?= "buildstats image-mklibs image-prelink"
157 158
158# 159#
@@ -239,12 +240,29 @@ CONF_VERSION = "1"
239 240
240SKIP_META_VIRT_SANITY_CHECK = "1" 241SKIP_META_VIRT_SANITY_CHECK = "1"
241 242
242# 243# Various packages dynamically add users and groups to the system at package
243# OSTree integration 244# install time. For programs that do not care what the uid/gid is of the
244# 245# resulting users/groups, the order of the install will determine the final
245 246# uid/gid. This can lead to non-deterministic uid/gid values from one build
246SOTA_MACHINE ?= "${MACHINE}" 247# to another. Use the following settings to specify that all user/group adds
247 248# should be created based on a static passwd/group file.
248DISTRO_FEATURES_append = " sota" 249#
249DISTRO_FEATURES_NATIVE_append = " sota" 250# Note, if you enable or disable the useradd-staticids in a configured system,
250INHERIT += " sota" 251# the TMPDIR may contain incorrect uid/gid values. Clearing the TMPDIR
252# will correct this condition.
253#
254# By default the system looks in the BBPATH for files/passwd and files/group
255# the default can be overriden by spefying USERADD_UID/GID_TABLES.
256#
257USERADDEXTENSION = "useradd-staticids"
258USERADD_UID_TABLES = "files/passwd"
259USERADD_GID_TABLES = "files/group"
260ROOTFS_POSTPROCESS_COMMAND_remove = "systemd_create_users;"
261#
262# In order to prevent generating a system where a dynamicly assigned uid/gid
263# can exist, you should enable the following setting. This will force the
264# system to error out if the user/group name is not defined in the
265# files/passwd or files/group (or specified replacements.)
266# Unfortunately, setting the variable below breaks the build, so do not set it
267# for now
268# USERADD_ERROR_DYNAMIC = "1"
diff --git a/files/group b/files/group
new file mode 100644
index 0000000..ffb9c82
--- /dev/null
+++ b/files/group
@@ -0,0 +1,52 @@
1root:x:0:
2daemon:x:1:
3bin:x:2:
4sys:x:3:
5adm:x:4:
6tty:x:5:
7disk:x:6:
8lp:x:7:
9mail:x:8:
10news:x:9:
11uucp:x:10:
12man:x:12:
13proxy:x:13:
14kmem:x:15:
15input:x:19:
16dialout:x:20:
17fax:x:21:
18voice:x:22:
19cdrom:x:24:
20floppy:x:25:
21tape:x:26:
22sudo:x:27:
23audio:x:29:
24dip:x:30:
25www-data:x:33:
26backup:x:34:
27operator:x:37:
28list:x:38:
29irc:x:39:
30src:x:40:
31gnats:x:41:
32shadow:x:42:
33utmp:x:43:
34video:x:44:
35sasl:x:45:
36plugdev:x:46:
37kvm:x:47:qemu
38staff:x:50:
39games:x:60:
40shutdown:x:70:
41users:x:100:
42render:x:983:
43systemd-bus-proxy:x:985:
44systemd-timesync:x:988:
45systemd-journal:x:989:
46sshd:x:991:
47qemu:x:992:
48docker:x:995:
49messagebus:x:996:
50bind:x:998:
51_apt:x:999:
52nogroup:x:65534:
diff --git a/files/passwd b/files/passwd
new file mode 100644
index 0000000..2b3f831
--- /dev/null
+++ b/files/passwd
@@ -0,0 +1,25 @@
1root:x:0:0:root:/home/root:/bin/sh
2daemon:x:1:1:daemon:/usr/sbin:/bin/sh
3bin:x:2:2:bin:/bin:/bin/sh
4sys:x:3:3:sys:/dev:/bin/sh
5sync:x:4:65534:sync:/bin:/bin/sync
6games:x:5:60:games:/usr/games:/bin/sh
7man:x:6:12:man:/var/cache/man:/bin/sh
8lp:x:7:7:lp:/var/spool/lpd:/bin/sh
9mail:x:8:8:mail:/var/mail:/bin/sh
10news:x:9:9:news:/var/spool/news:/bin/sh
11uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
12proxy:x:13:13:proxy:/bin:/bin/sh
13www-data:x:33:33:www-data:/var/www:/bin/sh
14backup:x:34:34:backup:/var/backups:/bin/sh
15list:x:38:38:Mailing List Manager:/var/list:/bin/sh
16irc:x:39:39:ircd:/var/run/ircd:/bin/sh
17gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
18systemd-bus-proxy:x:989:985::/:/bin/nologin
19systemd-timesync:x:992:988::/:/bin/nologin
20sshd:x:993:991::/var/run/sshd:/bin/false
21qemu:x:994:992::/home/qemu:/bin/sh
22messagebus:x:997:996::/var/lib/dbus:/bin/false
23bind:x:998:998::/var/cache/bind:/bin/sh
24_apt:x:999:999::/nonexistent:/bin/false
25nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
diff --git a/images/core-image-minimal-initramfs.bbappend b/images/core-image-minimal-initramfs.bbappend
index 2ca1d47..88dd198 100644
--- a/images/core-image-minimal-initramfs.bbappend
+++ b/images/core-image-minimal-initramfs.bbappend
@@ -1,5 +1,21 @@
1PACKAGE_INSTALL += " nfv-installer kernel-modules" 1PACKAGE_INSTALL += " nfv-installer kernel-modules"
2 2
3# ostree-switchroot is used by the init script to switch root to the 3INITRAMFS_SCRIPTS = " \
4# ostree version specified in the kernel command line 4 initramfs-framework-base \
5PACKAGE_INSTALL_append_sota = " ostree-switchroot" 5 initramfs-module-udev \
6 initramfs-module-setup-live \
7"
8
9# run-postinsts does not belong in the minimal initramfs
10PACKAGE_INSTALL_remove = "run-postinsts"
11
12PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras"
13
14create_enea_symlink() {
15 # enea image used in bare metal installation
16 cd ${DEPLOY_DIR_IMAGE}
17 ln -sf ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.gz enea-image-minimal-initramfs-${MACHINE}.cpio.gz
18 cd -
19}
20
21IMAGE_POSTPROCESS_COMMAND_append += " create_enea_symlink;"
diff --git a/images/enea-edge-common.inc b/images/enea-edge-common.inc
new file mode 100644
index 0000000..b174064
--- /dev/null
+++ b/images/enea-edge-common.inc
@@ -0,0 +1,40 @@
1require images/enea-image-common.inc
2
3IMAGE_FEATURES += "ssh-server-openssh"
4
5IMAGE_INSTALL += " \
6 packagegroup-enea-virtualization \
7 kernel-modules \
8 "
9
10# run-postinsts duplicates dpkg-configure if package_deb is used
11PACKAGE_INSTALL_remove = "${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'run-postinsts', '', d)}"
12
13PACKAGE_EXCLUDE_x86-64_sota += "grub-common-extras"
14
15# After installing packages inside the rootfs, remove backup DPKG status file
16rootfs_postinstall_dpkg_cleanup () {
17 if ${@bb.utils.contains('PACKAGE_CLASSES', 'package_deb', 'true', 'false', d)}; then
18 rm -f ${IMAGE_ROOTFS}/var/lib/dpkg/status-old
19 fi
20}
21ROOTFS_POSTINSTALL_COMMAND_append += " rootfs_postinstall_dpkg_cleanup;"
22
23IMAGE_FSTYPES += "ext4 ext4.gz tar.gz"
24
25# Remove aktualizr packages from the image, we don't use it and creates odd dependencies, e.g.
26# it creates a systemd unit that depends on network-online.target, which leads to enabling
27# NetworkManager-wait-online.service, delaying boot up.
28SOTA_CLIENT_PROV = ""
29IMAGE_INSTALL_remove_sota = " \
30 aktualizr \
31 aktualizr-info \
32 "
33
34# We currently don't use automatic push/sign/check to a backend server, so skip running useless
35# OSTree tasks during image build.
36IMAGE_FSTYPES_remove_sota = " \
37 ostreepush \
38 garagesign \
39 garagecheck \
40 "
diff --git a/images/enea-edge-host-common.inc b/images/enea-edge-host-common.inc
new file mode 100644
index 0000000..3df6cb9
--- /dev/null
+++ b/images/enea-edge-host-common.inc
@@ -0,0 +1,84 @@
1IMAGE_FSTYPES += "hddimg"
2IMAGE_FSTYPES_remove = "wic"
3
4REQUIRE_FILES = " \
5 images/enea-edge-common.inc \
6 "
7REQUIRE_FILES_append_df-efi-secure-boot = " \
8 classes/override_live-vm-common.inc \
9 images/secure-boot.inc \
10 "
11
12require ${REQUIRE_FILES}
13
14IMAGE_INSTALL += " \
15 packagegroup-enea-virtualization-host \
16 packagegroup-enea-virtualization-4gusb-modems \
17 "
18
19# Set labels for GRUB and SYSLINUX
20LABELS_LIVE = "installer live-boot"
21
22# Append default parameters for x86-64 targets
23APPEND_x86-64 = "quiet console=tty0 console=ttyS0,115200"
24SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200"
25
26# Skip menu and boot installer immediately
27GRUB_TIMEOUT_x86-64 = "0"
28AUTO_SYSLINUXMENU_x86-64 = "0"
29
30# If building with sota enabled, build the otaimg before the hddimg, because
31# the hddimg needs it as a base image
32python __anonymous() {
33 ## ENEA_start ##
34 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
35 d.appendVarFlag("do_bootimg", "depends", " %s:do_image_ota_ext4" % d.getVar("IMAGE_BASENAME", True))
36 ## ENEA_end ##
37}
38
39# Append OSTree specific parameters to the kernel command line before creating the live image
40python do_bootimg_prepend () {
41 ## ENEA_start ##
42 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
43 ostree_osname = d.getVar('OSTREE_OSNAME')
44 checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL'))
45
46 # The boot tree is identified through a sha256 checksum over the kernel binary
47 ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0"
48
49 d.setVar("APPEND", d.getVar("APPEND") + ostree_params)
50 ## ENEA_end ##
51}
52
53# Before building the OSTree image, move DPKG data to /usr/dpkg, because
54# OSTree does not preserve the contents of /var
55IMAGE_CMD_ostree_prepend () {
56 ## ENEA_start ##
57 # Note: We do configure DPKG admindir at build time, but we can't do the same for APT since
58 # yocto hardcodes /var/lib/dpkg paths in various places in OE-core, which we can't override,
59 # so instead we move the contents to their expected location here and configure apt at runtime
60 # via a configuration fragment to use the new location.
61 mkdir -p usr/dpkg/lib/dpkg
62 if [ "$(ls -A var/lib/dpkg)" ]; then
63 mv var/lib/dpkg/* usr/dpkg/lib/dpkg/
64 fi
65 # In Enea Edge, the EFI binaries (shim, seloader etc.) are copied from the yocto deploy dir to
66 # the installation image (hddimg) - see "classes/override_live-vm-common.inc" in this repo;
67 # and during Enea Edge installation (via utils.sh) from hddimg to the destination disk.
68 # Files installed by the package manager end up under OSTree /boot hardlink tree, but are
69 # never actually used. To avoid confusion and save some resources, clean them up.
70 rm -rf boot/*
71 ## ENEA_end ##
72}
73
74IMAGE_CMD_ota_prepend () {
75 ## ENEA_start ##
76 if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then
77 # Upstream bbclass creates /boot/grub2, complement it with /boot/grub
78 # Note: /boot/grub2 is a dir with /boot/grub2/grub.cfg -> ../loader/grub.cfg symlink
79 # while /boot/grub -> loader is a symlink to also account for /boot/grub/grubenv
80 mkdir -p ${OTA_SYSROOT}/boot
81 ln -s loader ${OTA_SYSROOT}/boot/grub
82 fi
83 ## ENEA_end ##
84}
diff --git a/images/enea-edge-runtime-debug.bb b/images/enea-edge-runtime-debug.bb
new file mode 100644
index 0000000..4736f24
--- /dev/null
+++ b/images/enea-edge-runtime-debug.bb
@@ -0,0 +1,9 @@
1DESCRIPTION = "Image for the host side of the Enea Edge Runtime with ODM and NETCONF Edgelink customizations"
2
3require images/enea-edge-host-common.inc
4
5IMAGE_INSTALL += " \
6 element-vcpe \
7 gdbserver \
8 oprofile \
9 "
diff --git a/images/enea-nfv-access-esdk.bb b/images/enea-edge-runtime-esdk.bb
index d424ef6..d424ef6 100644
--- a/images/enea-nfv-access-esdk.bb
+++ b/images/enea-edge-runtime-esdk.bb
diff --git a/images/enea-nfv-access-sdk.bb b/images/enea-edge-runtime-sdk.bb
index a957add..c6a15b4 100644
--- a/images/enea-nfv-access-sdk.bb
+++ b/images/enea-edge-runtime-sdk.bb
@@ -1,6 +1,6 @@
1DESCRIPTION = "Image for building the SDK for the host side of the Enea NFV Access Platform with ODM customizations" 1DESCRIPTION = "Image for building the SDK for the host side of the Enea Edge Runtime with ODM customizations"
2 2
3require images/enea-nfv-access-host-common.inc 3require images/enea-edge-host-common.inc
4 4
5IMAGE_INSTALL += " \ 5IMAGE_INSTALL += " \
6 element-odm-sdk \ 6 element-odm-sdk \
diff --git a/images/enea-edge-runtime.bb b/images/enea-edge-runtime.bb
new file mode 100644
index 0000000..5071619
--- /dev/null
+++ b/images/enea-edge-runtime.bb
@@ -0,0 +1,7 @@
1DESCRIPTION = "Image for the host side of the Enea Edge Runtime with ODM and NETCONF Edgelink customizations"
2
3require images/enea-edge-host-common.inc
4
5IMAGE_INSTALL += " \
6 element-vcpe \
7 "
diff --git a/images/enea-edge-vnf.bb b/images/enea-edge-vnf.bb
new file mode 100644
index 0000000..5d2365b
--- /dev/null
+++ b/images/enea-edge-vnf.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "VNF image of the Enea Edge Runtime, includes kernel, rootfs and boot parameters"
2
3require images/enea-edge-common.inc
4
5IMAGE_FSTYPES += "wic.qcow2"
6WKS_FILE = "enea-edge-vnf-qemux86-64.wks"
7
8CLOUDINITPKGS = "cloud-init util-linux-blkid"
9
10IMAGE_INSTALL += " \
11 packagegroup-enea-virtualization-guest \
12 nfv-init \
13 iperf3 \
14 ${CLOUDINITPKGS} \
15 "
diff --git a/images/enea-nfv-access-common.inc b/images/enea-nfv-access-common.inc
deleted file mode 100644
index 3f9fc84..0000000
--- a/images/enea-nfv-access-common.inc
+++ /dev/null
@@ -1,15 +0,0 @@
1require images/enea-image-common.inc
2
3IMAGE_FEATURES += "ssh-server-openssh"
4
5IMAGE_INSTALL += " \
6 packagegroup-enea-virtualization \
7 kernel-modules \
8 "
9
10IMAGE_FSTYPES = "ext4 ext4.gz tar.gz"
11
12# Add ostree specific image types if sota support is set
13IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'otaimg wic', ' ', d)}"
14SOTA_CLIENT = ""
15SOTA_CLIENT_PROV = ""
diff --git a/images/enea-nfv-access-host-common.inc b/images/enea-nfv-access-host-common.inc
deleted file mode 100644
index 1cde827..0000000
--- a/images/enea-nfv-access-host-common.inc
+++ /dev/null
@@ -1,69 +0,0 @@
1REQUIRE_FILES = " \
2 images/enea-nfv-access-common.inc \
3 classes/override_grub-efi.inc \
4 "
5REQUIRE_FILES_append_df-efi-secure-boot = " \
6 classes/override_image_types_ostree.inc \
7 classes/override_image_types_ota.inc \
8 classes/override_grub-efi_secureboot.inc \
9 images/secure-boot.inc \
10 "
11
12require ${REQUIRE_FILES}
13
14IMAGE_INSTALL += " \
15 packagegroup-enea-virtualization-host \
16 packagegroup-enea-virtualization-4gusb-modems \
17 "
18
19# Set labels for GRUB and SYSLINUX
20LABELS_LIVE = "installer live-boot"
21
22GRUB_GFXSERIAL_x86-64 = "1"
23# Append default parameters for x86-64 targets
24APPEND_x86-64 = "quiet"
25SYSLINUX_DEFAULT_CONSOLE_x86-64 = "console=ttyS0,115200"
26
27# Skip menu and boot installer immediately
28GRUB_TIMEOUT_x86-64 = "0"
29AUTO_SYSLINUXMENU_x86-64 = "0"
30
31# grub-efi-native is needed in recipe-sysroot-native to generate the initial
32# configuration file for grub
33DEPENDS_append += " grub-efi-native"
34
35# If building with sota enabled, build the otaimg before the hddimg, because
36# the hddimg needs it as a base image
37python __anonymous() {
38 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
39 d.appendVarFlag("do_bootimg", "depends", " %s:do_image_otaimg" % d.getVar("IMAGE_BASENAME", True))
40}
41
42# Append OSTree specific parameters to the kernel command line before creating the live image
43python do_bootimg_prepend () {
44 if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d):
45 ostree_osname = d.getVar('OSTREE_OSNAME')
46 checksum = bb.utils.sha256_file(d.getVar('DEPLOY_DIR_IMAGE') + "/" + d.getVar('OSTREE_KERNEL'))
47
48 # The boot tree is identified through a sha256 checksum over the kernel binary
49 ostree_params = " ostree=/ostree/boot.1/" + ostree_osname + "/" + checksum + "/0"
50
51 d.setVar("APPEND", d.getVar("APPEND") + ostree_params)
52}
53
54# Get rid of GRUB dependencies added by ostree. See:
55# https://git.enea.com/cgit/linux/meta-updater.git/tree/classes/image_types_ota.bbclass#n45
56python __anonymous () {
57 d.delVarFlag("do_image_otaimg", "depends")
58 d.setVarFlag("do_image_otaimg", "depends", "e2fsprogs-native:do_populate_sysroot")
59}
60
61# Before building the OSTree image, move DPKG data to /usr/dpkg, because
62# OSTree does not preserve the contents of /var
63IMAGE_CMD_ostree_prepend () {
64
65 install -d ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg
66 if [ "$(ls -A ${IMAGE_ROOTFS}/var/lib/dpkg)" ]; then
67 mv ${IMAGE_ROOTFS}/var/lib/dpkg/* ${IMAGE_ROOTFS}/usr/dpkg/lib/dpkg/
68 fi
69}
diff --git a/images/enea-nfv-access-vnf.bb b/images/enea-nfv-access-vnf.bb
deleted file mode 100644
index a3902c2..0000000
--- a/images/enea-nfv-access-vnf.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1DESCRIPTION = "VNF image of the Enea NFV Access Platform, includes kernel, rootfs and boot parameters"
2
3require images/enea-nfv-access-common.inc
4
5IMAGE_FSTYPES += "wic.qcow2"
6WKS_FILE = "enea-nfv-access-vnf-qemux86-64.wks"
7
8CLOUDINITPKGS = "cloud-init util-linux-blkid"
9CLOUDINITPKGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'cloud-init-systemd', '', d)}"
10
11IMAGE_INSTALL += " \
12 packagegroup-enea-virtualization-guest \
13 nfv-init \
14 iperf3 \
15 ${CLOUDINITPKGS} \
16 "
diff --git a/images/enea-nfv-access.bb b/images/enea-nfv-access.bb
deleted file mode 100644
index 9311992..0000000
--- a/images/enea-nfv-access.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1DESCRIPTION = "Image for the host side of the Enea NFV Access Platform with ODM and NETCONF Edgelink customizations"
2
3require images/enea-nfv-access-host-common.inc
4
5IMAGE_INSTALL += " \
6 element-vcpe \
7 "
diff --git a/recipes-core/systemd/files/basic.conf.in b/recipes-core/systemd/files/basic.conf.in
new file mode 100644
index 0000000..6532f64
--- /dev/null
+++ b/recipes-core/systemd/files/basic.conf.in
@@ -0,0 +1,50 @@
1# This file is part of systemd.
2#
3# systemd is free software; you can redistribute it and/or modify it
4# under the terms of the GNU Lesser General Public License as published by
5# the Free Software Foundation; either version 2.1 of the License, or
6# (at your option) any later version.
7
8# The superuser
9u root 0 "Super User" /root
10
11# Administrator group: can *see* more than normal users
12g adm - - -
13
14# Access to certain kernel and userspace facilities
15g kmem - - -
16g tty @TTY_GID@ - -
17g utmp - - -
18
19# Hardware access groups
20g audio - - -
21g cdrom - - -
22g dialout - - -
23g disk - - -
24g input - - -
25g lp - - -
26g tape - - -
27g video - - -
28
29# Default group for normal users
30g users @USERS_GID@ - -
31## ENEA_start ##
32# Handle systemd-sysusers hardcoded users/groups interfering with OSTree upgrades:
33# - nothing in NFVA uses the wheel group, do not create it;
34# - the 'nobody' group was automatically created for the existing 'nobody' user,
35# which is not necessary, NFVA already has 'nogroup' (GID 65534);
36#
37# Administrator group: can *do* more than normal users
38# g wheel - - -
39# The nobody user for NFS file systems
40# u @NOBODY_USER_NAME@ 65534 "Nobody" -
41#
42# Keep the next users/groups in sync with those in <layer>/files/{passwd,group}
43# If an upgrade updates /etc/{passwd,group} then the next users and groups already exist
44# and the next lines will do nothing. If the upgrade did not update /etc/{passwd,group}
45# we must dynamically add them, with fixed ids. Ids are the same as in
46# <layer>/files/{passwd,group}
47g kvm 47 - -
48m qemu kvm
49g render 983 - -
50## ENEA_end ##
diff --git a/recipes-core/systemd/systemd_247.6.bbappend b/recipes-core/systemd/systemd_247.6.bbappend
new file mode 100644
index 0000000..eb2b118
--- /dev/null
+++ b/recipes-core/systemd/systemd_247.6.bbappend
@@ -0,0 +1,25 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI_append_sota = " file://basic.conf.in"
4
5GROUPADD_PARAM_${PN}_append_sota = "; -r render"
6
7# systemd uses certain groups unless configured not to (e.g. journal logs are more
8# broadly available to the 'wheel' group unless told otherwise), while some resources
9# are using to the 'nobody' group. Configure systemd to:
10# - not use the 'wheel' group (journal access will be restriced to root user);
11# - use the proper group for 'nobody', which should have GID 65534 (for NFVA 'nogroup');
12EXTRA_OEMESON += " \
13 -Dwheel-group=false \
14 -Dnobody-group=nogroup \
15"
16
17do_configure_prepend_sota() {
18 cp ${WORKDIR}/basic.conf.in ${S}/sysusers.d/basic.conf.in
19}
20
21do_install_append () {
22 # Update default udev rules for /dev/kvm to be less permissive
23 sed -e 's/\(KERNEL=="kvm".*\)0666/\10660/' \
24 -i ${D}${rootlibexecdir}/udev/rules.d/50-udev-default.rules
25}
diff --git a/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks b/scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks
index 89c8e4d..89c8e4d 100644
--- a/scripts/lib/wic/canned-wks/enea-nfv-access-vnf-qemux86-64.wks
+++ b/scripts/lib/wic/canned-wks/enea-edge-vnf-qemux86-64.wks