Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit bc8a2ad

Browse files
committed
Merge multiple PRs in one
This combined merge takes these PRs in one: #177, #179, #182, #183 (with cherry-pick), and #187.
6 parents 2d9446b + 4d0104d + 188ddd7 + f684b10 + 96908e6 + 79bde35 commit bc8a2ad

21 files changed

Lines changed: 42 additions & 308 deletions

File tree

docker/build-common-util.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ EOF
3838
fi
3939
# lower compression levels in a PR build, to save build time
4040
if [ -z ${CI_ARCHIVER_MODE+x} ]; then
41-
echo "ZIP_COMPRESSION_LEVEL ?= \"-1\"" >> conf/auto.conf
4241
echo "XZ_COMPRESSION_LEVEL ?= \"-0\"" >> conf/auto.conf
4342
fi
4443
}

docker/post-build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ set -u
2828
# create auto.conf using functions in build-common-util.sh
2929
auto_conf_common
3030

31+
# post-build testing builds images but only .wic is sufficient
32+
# (default in IMAGE_FSTYPES). We skip compression and bmap formats
33+
# to optimize testing time
34+
echo "REFKIT_VM_IMAGE_TYPES = \"\"" >> conf/auto.conf
35+
3136
export BUILD_ID=${CI_BUILD_ID}
3237
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE BUILD_ID"
3338

docker/tester-exec.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,8 @@ testimg() {
7777
wget ${_WGET_OPTS} ${CI_BUILD_URL}/images/${MACHINE}/${FILENAME}.bmap
7878
wget ${_WGET_OPTS} ${CI_BUILD_URL}/images/${MACHINE}/${FILENAME}.xz -O - | unxz - > ${FILENAME}
7979
if [ ! -s ${FILENAME} ]; then
80-
wget ${_WGET_OPTS} ${CI_BUILD_URL}/images/${MACHINE}/${FILENAME}.zip
81-
if [ -s ${FILENAME}.zip ]; then
82-
unzip ${FILENAME}.zip
83-
else
84-
echo "ERROR: No file ${FILENAME}.xz or ${FILENAME}.zip found, can not continue."
80+
echo "ERROR: No file ${FILENAME}.xz, can not continue."
8581
exit 1
86-
fi
8782
fi
8883
set -e
8984

meta-oic

Submodule meta-oic updated from b9ba736 to c8e87a3

meta-refkit-computervision/recipes-image/images/refkit-image-computervision.bb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REFKIT_IMAGE_COMPUTERVISION_EXTRA_FEATURES += "${@ '' if (d.getVar('IMAGE_MODE')
1515
# Example for customization in local.conf when building
1616
# refkit-image-computervision.bb:
1717
# IMAGE_BASENAME_pn-refkit-image-computervision = "my-refkit-image-reference"
18-
# REFKIT_IMAGE_COMPUTERVISION_EXTRA_INSTALL_append = "my-own-package"
19-
# REFKIT_IMAGE_COMPUTERVISION_EXTRA_FEATURES_append = "dev-pkgs"
18+
# REFKIT_IMAGE_COMPUTERVISION_EXTRA_INSTALL_append = " my-own-package"
19+
# REFKIT_IMAGE_COMPUTERVISION_EXTRA_FEATURES_append = " dev-pkgs"
2020

2121
inherit refkit-image

meta-refkit-core/classes/image-dsk.bbclass

Lines changed: 12 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,6 @@
55
# it with the efi stub obtained from systemd-boot.
66
# The layout of the image is described in a separate, customizable json file.
77

8-
# A layout files is built accordingly to the following example:
9-
# {
10-
# "gpt_initial_offset_mb": 3, <- Space allocated for the 1st GPT
11-
# "gpt_tail_padding_mb": 3, <- Space allocated for the 2nd GPT
12-
# "primary_uefi_boot_partition": { <-- Name of the entry in the dictionary
13-
# "name": "primary_uefi", <-- Name of the partition in the GPT (MAX 16 ch)
14-
# "uuid": 0, <-- UUID of the partition, 0 means random
15-
# "size_mb": 30, <-- Size of the partition in MB
16-
# "source": "${S}/hdd/boot", <-- Directory containing the root for the partition
17-
# "filesystem": "vfat", <-- Filesystem for the partition
18-
# "type": "ef00" <-- Type of the partition, to be used in the GPT
19-
# },
20-
# [...] Iterate partitions as needed
21-
# }
22-
#
23-
# The main rootfs partition is a special case and must be named "rootfs".
24-
# This is required to identify it and pass its Partition UUID to the kernel, for booting.
25-
26-
278
# By default, the full image is meant to fit into 4*10^9 bytes, i.e.
289
# "4GB" regardless whether 1000 or 1024 is used as base. 64M are reserved
2910
# for potential partitioning overhead.
@@ -49,16 +30,6 @@ do_uefiapp[depends] += " \
4930
${INITRD_IMAGE}:do_image_complete \
5031
"
5132

52-
IMAGE_DEPENDS_dsk += " \
53-
gptfdisk-native:do_populate_sysroot \
54-
parted-native:do_populate_sysroot \
55-
mtools-native:do_populate_sysroot \
56-
dosfstools-native:do_populate_sysroot \
57-
dosfstools-native:do_populate_sysroot \
58-
python-native:do_populate_sysroot \
59-
bmap-tools-native:do_populate_sysroot \
60-
"
61-
6233
# Always ensure that the INITRD_IMAGE gets added to the initramfs .cpio.
6334
# This needs to be done even when the actual .dsk image format is inactive,
6435
# because the .cpio file gets copied into the rootfs, and that rootfs
@@ -77,35 +48,7 @@ REMOVABLE_MEDIA_ROOTFS_PARTUUID_VALUE ?= "deadbeef-dead-beef-dead-beefdeadbeef"
7748
PARTITION_TYPE_EFI = "EF00"
7849
PARTITION_TYPE_EFI_BACKUP = "2700"
7950

80-
DSK_IMAGE_LAYOUT ??= ' \
81-
{ \
82-
"gpt_initial_offset_mb": 3, \
83-
"gpt_tail_padding_mb": 3, \
84-
"partition_01_primary_uefi_boot": { \
85-
"name": "primary_uefi", \
86-
"uuid": 0, \
87-
"size_mb": ${REFKIT_VFAT_MB}, \
88-
"source": "${IMAGE_ROOTFS}/boot/", \
89-
"filesystem": "vfat", \
90-
"type": "${PARTITION_TYPE_EFI}" \
91-
}, \
92-
"partition_02_secondary_uefi_boot": { \
93-
"name": "secondary_uefi", \
94-
"uuid": 0, \
95-
"size_mb": ${REFKIT_VFAT_MB}, \
96-
"source": "${IMAGE_ROOTFS}/boot/", \
97-
"filesystem": "vfat", \
98-
"type": "${PARTITION_TYPE_EFI_BACKUP}" \
99-
}, \
100-
"partition_03_rootfs": { \
101-
"name": "rootfs", \
102-
"uuid": "${REMOVABLE_MEDIA_ROOTFS_PARTUUID_VALUE}", \
103-
"size_mb": 3700, \
104-
"source": "${IMAGE_ROOTFS}", \
105-
"filesystem": "ext4", \
106-
"type": "8300" \
107-
} \
108-
}'
51+
DSK_IMAGE_LAYOUT ??= '{}'
10952

11053
inherit deploy
11154

@@ -140,9 +83,10 @@ export PART_%(pnum)d_FS=%(filesystem)s
14083
partition_table = json.loads(layout)
14184

14285
full_image_size_mb = partition_table["gpt_initial_offset_mb"] + \
143-
partition_table["gpt_tail_padding_mb"]
86+
partition_table["gpt_tail_padding_mb"] \
87+
if partition_table else 0
14488

145-
rootfs_type = None
89+
rootfs_type = ''
14690
pnum = 0
14791
for key in sorted(partition_table.keys()):
14892
if not isinstance(partition_table[key], dict):
@@ -154,7 +98,7 @@ export PART_%(pnum)d_FS=%(filesystem)s
15498
partition_table[key]['uuid'] = str(uuid.uuid4())
15599
# Store these for the creation of the UEFI binary
156100
if partition_table[key]['name'] == 'rootfs':
157-
rootfs_type = partition_table[key]['filesystem']
101+
rootfs_type = 'rootfstype=%s ' % partition_table[key]['filesystem']
158102
int_part_uuid = d.getVar('INT_STORAGE_ROOTFS_PARTUUID_VALUE', True)
159103
else:
160104
int_part_uuid = partition_table[key]["uuid"]
@@ -168,8 +112,8 @@ export PART_%(pnum)d_FS=%(filesystem)s
168112
}
169113
pnum = pnum + 1
170114

171-
assert rootfs_type is not None
172-
partition_data += "export PART_COUNT=%d\n" % pnum
115+
if pnum > 0:
116+
partition_data += "export PART_COUNT=%d\n" % pnum
173117

174118
if os.path.exists(d.expand('${B}/initrd')):
175119
os.remove(d.expand('${B}/initrd'))
@@ -188,7 +132,7 @@ export PART_%(pnum)d_FS=%(filesystem)s
188132

189133
def generate_app(partuuid, cmdline, suffix):
190134
with open(d.expand('${B}/cmdline' + suffix + '.txt'), 'w') as f:
191-
f.write(d.expand('${APPEND} root=PARTUUID=%s rootfstype=%s %s' % \
135+
f.write(d.expand('${APPEND} root=PARTUUID=%s %s%s' % \
192136
(partuuid, rootfs_type, cmdline)))
193137
check_call(d.expand('objcopy ' +
194138
'--add-section .osrel=${B}/machine.txt ' +
@@ -209,9 +153,10 @@ export PART_%(pnum)d_FS=%(filesystem)s
209153
generate_app(d.getVar('REMOVABLE_MEDIA_ROOTFS_PARTUUID_VALUE', True), "installer", "")
210154
generate_app(d.getVar('INT_STORAGE_ROOTFS_PARTUUID_VALUE', True), "", "_internal_storage")
211155

212-
with open(d.expand('${B}/emmc-partitions-data'), 'w') as emmc_part_data:
213-
emmc_part_data.write(partition_data)
214-
shutil.copyfile(d.expand('${B}/emmc-partitions-data'), d.expand('${DEPLOYDIR}/emmc-partitions-data'))
156+
if partition_data:
157+
with open(d.expand('${B}/emmc-partitions-data'), 'w') as emmc_part_data:
158+
emmc_part_data.write(partition_data)
159+
shutil.copyfile(d.expand('${B}/emmc-partitions-data'), d.expand('${DEPLOYDIR}/emmc-partitions-data'))
215160

216161
# The RMC database is deployed unconditionally but not read if the BIOS is in SecureBoot mode.
217162
# XXX: However, the check for SecureBoot is not present. The bug is tracked in
@@ -280,21 +225,3 @@ do_rootfs[depends] += '${@bb.utils.contains('IMAGE_FEATURES','secureboot','sbsig
280225

281226
ROOTFS_POSTPROCESS_COMMAND += " ${@bb.utils.contains('IMAGE_FEATURES','secureboot','uefiapp_sign;','',d)} "
282227
ROOTFS_POSTPROCESS_COMMAND += " uefiapp_deploy; "
283-
284-
# All variables explicitly passed to image-dsk.py.
285-
IMAGE_DSK_VARIABLES = " \
286-
APPEND \
287-
IMGDEPLOYDIR \
288-
DSK_IMAGE_LAYOUT \
289-
IMAGE_LINK_NAME \
290-
IMAGE_NAME \
291-
IMAGE_ROOTFS \
292-
ROOTFS_TYPE \
293-
REMOVABLE_MEDIA_ROOTFS_PARTUUID_VALUE \
294-
PARTITION_TYPE_EFI \
295-
PARTITION_TYPE_EFI_BACKUP \
296-
S \
297-
"
298-
299-
IMAGE_CMD_dsk = "${PYTHON} ${IMAGE_DSK_BASE}/lib/image-dsk.py ${@' '.join(["'%s=%s'" % (x, d.getVar(x, True) or '') for x in d.getVar('IMAGE_DSK_VARIABLES', True).split()])}"
300-
IMAGE_CMD_dsk[vardeps] = "${IMAGE_DSK_VARIABLES}"

meta-refkit-core/classes/image_types_extra.bbclass

Lines changed: 0 additions & 10 deletions
This file was deleted.

meta-refkit-core/classes/refkit-image.bbclass

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,8 @@ NOISO = "1"
212212
REFKIT_QB_DRIVE_TYPE = "/dev/vd"
213213
QB_DRIVE_TYPE = "${REFKIT_QB_DRIVE_TYPE}"
214214

215-
inherit image_types_extra
216-
217215
# Replace the default "live" (aka HDDIMG) images with whole-disk images
218-
REFKIT_VM_IMAGE_TYPES ?= ""
216+
REFKIT_VM_IMAGE_TYPES ??= ""
219217
IMAGE_FSTYPES_append = " ${REFKIT_VM_IMAGE_TYPES}"
220218

221219
# unconditionally set in x86-base.inc so we just remove it to avoid

meta-refkit-core/conf/distro/include/refkit-config.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ BAD_RECOMMENDATIONS_append_refkit-config = " bluez5-client"
107107
# Prefer systemd way of creating getty@.service symlinks using
108108
# systemd-getty-generator (instead of the Yocto default
109109
# systemd-serialgetty that creates everything in do_install).
110-
PACKAGECONFIG_append_pn-systemd_refkit-config = "serial-getty-generator"
110+
PACKAGECONFIG_append_pn-systemd_refkit-config = " serial-getty-generator"
111111

112112
# OE-core 7355a3c4f665e066925ea6327ac72365ab1f2f39 added a PACKAGECONFIG
113113
# to configure cairo/python3-cairo and enabled it by default. It used to

0 commit comments

Comments
 (0)