diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/override_grub-efi.inc | 89 | ||||
-rw-r--r-- | classes/override_grub-efi_secureboot.inc | 31 | ||||
-rw-r--r-- | classes/override_image_types_ostree.inc | 155 | ||||
-rw-r--r-- | classes/override_image_types_ota.inc | 98 | ||||
-rw-r--r-- | classes/override_live-vm-common.inc | 29 | ||||
-rw-r--r-- | classes/sota_atom-c3000.bbclass | 4 | ||||
-rw-r--r-- | classes/sota_xeon-d.bbclass | 4 |
7 files changed, 33 insertions, 377 deletions
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 @@ | |||
1 | GRUB_GRAPHICS ?= "console=tty0" | ||
2 | |||
3 | python 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 @@ | |||
1 | efi_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 | |||
9 | OSTREE_ROOTFS="${WORKDIR}/ostree-root" | ||
10 | do_image_ostree[dirs] = "${OSTREE_ROOTFS}" | ||
11 | do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" | ||
12 | do_image_ostree[subimages] = "rootfs.ostree.tar.bz2" | ||
13 | do_image_ostree[imgsuffix] = "." | ||
14 | export OSTREE_ROOTFS | ||
15 | |||
16 | IMAGE_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 | |||
9 | OSTREE_REPO = "${WORKDIR}/ostree-repo" | ||
10 | PHYS_SYSROOT = "${WORKDIR}/ota-sysroot" | ||
11 | |||
12 | do_image_otaimg[dirs] = "${PHYS_SYSROOT}" | ||
13 | do_image_otaimg[cleandirs] = "${PHYS_SYSROOT}" | ||
14 | |||
15 | IMAGE_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 | |||
98 | IMAGE_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 | ||
2 | efi_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 | ||
5 | WKS_FILE_sota = "efiimage-sota.wks" | 5 | WKS_FILE_sota = "efiimage-sota.wks" |
6 | 6 | ||
7 | OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" | 7 | OSTREE_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 |
10 | ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" | 10 | ROOTFS_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 |
13 | OSTREE_KERNEL_ARGS ?= "rw" | 13 | OSTREE_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 | ||
5 | WKS_FILE_sota = "efiimage-sota.wks" | 5 | WKS_FILE_sota = "efiimage-sota.wks" |
6 | 6 | ||
7 | OSTREE_INITRAMFS_FSTYPES ?= "ext4.gz" | 7 | OSTREE_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 |
10 | ROOTFS_sota = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.otaimg" | 10 | ROOTFS_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 |
13 | OSTREE_KERNEL_ARGS ?= "rw" | 13 | OSTREE_KERNEL_ARGS ?= "rw" |