diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 58 | ||||
-rw-r--r-- | classes/sdcard_image-rpi-ota.bbclass | 190 | ||||
-rw-r--r-- | classes/sota.bbclass | 9 | ||||
-rw-r--r-- | classes/sota_am335x-evm-wifi.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_m3ulcb.bbclass | 1 | ||||
-rw-r--r-- | classes/sota_porter.bbclass | 1 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 8 |
7 files changed, 68 insertions, 201 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 1f8e195..172f2c8 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -5,6 +5,7 @@ inherit image | |||
5 | IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ | 5 | IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ |
6 | openssl-native:do_populate_sysroot \ | 6 | openssl-native:do_populate_sysroot \ |
7 | coreutils-native:do_populate_sysroot \ | 7 | coreutils-native:do_populate_sysroot \ |
8 | unzip-native:do_populate_sysroot \ | ||
8 | virtual/kernel:do_deploy \ | 9 | virtual/kernel:do_deploy \ |
9 | ${OSTREE_INITRAMFS_IMAGE}:do_image_complete" | 10 | ${OSTREE_INITRAMFS_IMAGE}:do_image_complete" |
10 | 11 | ||
@@ -104,6 +105,7 @@ IMAGE_CMD_ostree () { | |||
104 | if [ -d root ] && [ ! -L root ]; then | 105 | if [ -d root ] && [ ! -L root ]; then |
105 | if [ "$(ls -A root)" ]; then | 106 | if [ "$(ls -A root)" ]; then |
106 | bberror "Data in /root directory is not preserved by OSTree." | 107 | bberror "Data in /root directory is not preserved by OSTree." |
108 | exit 1 | ||
107 | fi | 109 | fi |
108 | 110 | ||
109 | if [ -n "$SYSTEMD_USED" ]; then | 111 | if [ -n "$SYSTEMD_USED" ]; then |
@@ -159,7 +161,7 @@ IMAGE_CMD_ostree () { | |||
159 | } | 161 | } |
160 | 162 | ||
161 | IMAGE_TYPEDEP_ostreepush = "ostree" | 163 | IMAGE_TYPEDEP_ostreepush = "ostree" |
162 | IMAGE_DEPENDS_ostreepush = "aktualizr-native:do_populate_sysroot" | 164 | IMAGE_DEPENDS_ostreepush = "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot " |
163 | IMAGE_CMD_ostreepush () { | 165 | IMAGE_CMD_ostreepush () { |
164 | # Print warnings if credetials are not set or if the file has not been found. | 166 | # Print warnings if credetials are not set or if the file has not been found. |
165 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 167 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
@@ -176,4 +178,58 @@ IMAGE_CMD_ostreepush () { | |||
176 | fi | 178 | fi |
177 | } | 179 | } |
178 | 180 | ||
181 | IMAGE_TYPEDEP_garagesign = "ostreepush" | ||
182 | IMAGE_DEPENDS_garagesign = "garage-sign-native:do_populate_sysroot" | ||
183 | IMAGE_CMD_garagesign () { | ||
184 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | ||
185 | # if credentials are issued by a server that doesn't support offline signing, exit silently | ||
186 | unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec 2>&1 >/dev/null || exit 0 | ||
187 | |||
188 | java_version=$( java -version 2>&1 | awk -F '"' '/version/ {print $2}' ) | ||
189 | if [ "${java_version}" = "" ]; then | ||
190 | bberror "Java is required for synchronization with update backend, but is not installed on the host machine" | ||
191 | exit 1 | ||
192 | elif [ "${java_version}" \< "1.8" ]; then | ||
193 | bberror "Java version >= 8 is required for synchronization with update backend" | ||
194 | exit 1 | ||
195 | fi | ||
196 | |||
197 | if [ ! -d "${GARAGE_SIGN_REPO}" ]; then | ||
198 | garage-sign init --repo ${GARAGE_SIGN_REPO} --home-dir ${GARAGE_SIGN_REPO} --credentials ${SOTA_PACKED_CREDENTIALS} | ||
199 | fi | ||
200 | |||
201 | if [ -n "${GARAGE_SIGN_REPOSERVER}" ]; then | ||
202 | reposerver_args="--reposerver ${GARAGE_SIGN_REPOSERVER}" | ||
203 | else | ||
204 | reposerver_args="" | ||
205 | fi | ||
206 | |||
207 | ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}) | ||
208 | |||
209 | # Push may fail due to race condition when multiple build machines try to push simultaneously | ||
210 | # in which case targets.json should be pulled again and the whole procedure repeated | ||
211 | push_success=0 | ||
212 | for push_retries in $( seq 3 ); do | ||
213 | garage-sign targets pull --repo ${GARAGE_SIGN_REPO} --home-dir ${GARAGE_SIGN_REPO} ${reposerver_args} | ||
214 | garage-sign targets add --repo ${GARAGE_SIGN_REPO} --home-dir ${GARAGE_SIGN_REPO} --name ${OSTREE_BRANCHNAME} --format OSTREE --version ${OSTREE_BRANCHNAME} --length 0 --url "https://example.com/" --sha256 ${ostree_target_hash} --hardwareids ${MACHINE} | ||
215 | garage-sign targets sign --repo ${GARAGE_SIGN_REPO} --home-dir ${GARAGE_SIGN_REPO} --key-name=targets | ||
216 | errcode=0 | ||
217 | garage-sign targets push --repo ${GARAGE_SIGN_REPO} --home-dir ${GARAGE_SIGN_REPO} ${reposerver_args} || errcode=$? | ||
218 | if [ "$errcode" -eq "0" ]; then | ||
219 | push_success=1 | ||
220 | break | ||
221 | else | ||
222 | bbwarn "Push to garage repository has failed, retrying" | ||
223 | fi | ||
224 | done | ||
225 | |||
226 | if [ "$push_success" -ne "1" ]; then | ||
227 | bberror "Couldn't push to garage repository" | ||
228 | exit 1 | ||
229 | fi | ||
230 | else | ||
231 | bbwarn "SOTA_PACKED_CREDENTIALS not set. Please add SOTA_PACKED_CREDENTIALS." | ||
232 | fi | ||
233 | } | ||
234 | |||
179 | # vim:set ts=4 sw=4 sts=4 expandtab: | 235 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/classes/sdcard_image-rpi-ota.bbclass b/classes/sdcard_image-rpi-ota.bbclass deleted file mode 100644 index 9c859fe..0000000 --- a/classes/sdcard_image-rpi-ota.bbclass +++ /dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | inherit image_types | ||
2 | inherit linux-raspberrypi-base | ||
3 | |||
4 | # | ||
5 | # Create an image that can by written onto a SD card using dd. | ||
6 | # | ||
7 | # The disk layout used is: | ||
8 | # | ||
9 | # 0 -> IMAGE_ROOTFS_ALIGNMENT - reserved for other data | ||
10 | # IMAGE_ROOTFS_ALIGNMENT -> BOOT_SPACE - bootloader and kernel | ||
11 | # BOOT_SPACE -> SDIMG_OTA_SIZE - rootfs | ||
12 | # | ||
13 | |||
14 | # Default Free space = 1.3x | ||
15 | # Use IMAGE_OVERHEAD_FACTOR to add more space | ||
16 | # <---------> | ||
17 | # 4MiB 40MiB SDIMG_OTA_ROOTFS | ||
18 | # <-----------------------> <----------> <----------------------> | ||
19 | # ------------------------ ------------ ------------------------ | ||
20 | # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | OTAROOT_SIZE | | ||
21 | # ------------------------ ------------ ------------------------ | ||
22 | # ^ ^ ^ ^ | ||
23 | # | | | | | ||
24 | # 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_OTA_ROOTFS | ||
25 | |||
26 | # This image depends on the rootfs image | ||
27 | IMAGE_TYPEDEP_rpi-sdimg-ota = "${SDIMG_OTA_ROOTFS_TYPE}" | ||
28 | |||
29 | # Set kernel and boot loader | ||
30 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" | ||
31 | |||
32 | # Set initramfs extension | ||
33 | KERNEL_INITRAMFS ?= "" | ||
34 | |||
35 | # Kernel image name | ||
36 | SDIMG_OTA_KERNELIMAGE_raspberrypi ?= "kernel.img" | ||
37 | SDIMG_OTA_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" | ||
38 | SDIMG_OTA_KERNELIMAGE_raspberrypi3 ?= "kernel7.img" | ||
39 | |||
40 | # Boot partition volume id | ||
41 | BOOTDD_VOLUME_ID ?= "${MACHINE}" | ||
42 | |||
43 | # Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) | ||
44 | BOOT_SPACE ?= "40960" | ||
45 | |||
46 | # Set alignment to 4MB [in KiB] | ||
47 | IMAGE_ROOTFS_ALIGNMENT = "4096" | ||
48 | |||
49 | # Use an uncompressed ext3 by default as rootfs | ||
50 | SDIMG_OTA_ROOTFS_TYPE ?= "otaimg" | ||
51 | SDIMG_OTA_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${SDIMG_OTA_ROOTFS_TYPE}" | ||
52 | |||
53 | IMAGE_DEPENDS_rpi-sdimg-ota = " \ | ||
54 | parted-native \ | ||
55 | mtools-native \ | ||
56 | dosfstools-native \ | ||
57 | virtual/kernel:do_deploy \ | ||
58 | ${IMAGE_BOOTLOADER} \ | ||
59 | u-boot \ | ||
60 | " | ||
61 | IMAGE_TYPEDEP_rpi-sdimg-ota = "otaimg" | ||
62 | |||
63 | # SD card image name | ||
64 | SDIMG_OTA = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg-ota" | ||
65 | |||
66 | # Compression method to apply to SDIMG_OTA after it has been created. Supported | ||
67 | # compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg-ota file | ||
68 | # is kept and a new compressed file is created if one of these compression | ||
69 | # formats is chosen. If SDIMG_OTA_COMPRESSION is set to any other value it is | ||
70 | # silently ignored. | ||
71 | #SDIMG_OTA_COMPRESSION ?= "" | ||
72 | |||
73 | # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. | ||
74 | FATPAYLOAD ?= "" | ||
75 | |||
76 | IMAGE_CMD_rpi-sdimg-ota () { | ||
77 | |||
78 | # Align partitions | ||
79 | OTAROOT_SIZE=`du -Lb ${SDIMG_OTA_ROOTFS} | cut -f1` | ||
80 | OTAROOT_SIZE=$(expr ${OTAROOT_SIZE} / 1024 + 1) | ||
81 | BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) | ||
82 | BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) | ||
83 | SDIMG_OTA_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $OTAROOT_SIZE) | ||
84 | |||
85 | echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $OTAROOT_SIZE KiB" | ||
86 | |||
87 | # Check if we are building with device tree support | ||
88 | DTS="${@get_dts(d, None)}" | ||
89 | |||
90 | # Initialize sdcard image file | ||
91 | dd if=/dev/zero of=${SDIMG_OTA} bs=1024 count=0 seek=${SDIMG_OTA_SIZE} | ||
92 | |||
93 | # Create partition table | ||
94 | parted -s ${SDIMG_OTA} mklabel msdos | ||
95 | # Create boot partition and mark it as bootable | ||
96 | parted -s ${SDIMG_OTA} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) | ||
97 | parted -s ${SDIMG_OTA} set 1 boot on | ||
98 | # Create rootfs partition to the end of disk | ||
99 | parted -s ${SDIMG_OTA} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s | ||
100 | parted ${SDIMG_OTA} print | ||
101 | |||
102 | # Create a vfat image with boot files | ||
103 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG_OTA} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') | ||
104 | rm -f ${WORKDIR}/boot.img | ||
105 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS | ||
106 | sync | ||
107 | |||
108 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ | ||
109 | |||
110 | if test -n "${DTS}"; then | ||
111 | # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder | ||
112 | DT_OVERLAYS="${@split_overlays(d, 0)}" | ||
113 | DT_ROOT="${@split_overlays(d, 1)}" | ||
114 | |||
115 | # Copy board device trees to root folder | ||
116 | for DTB in ${DT_ROOT}; do | ||
117 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
118 | |||
119 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb | ||
120 | done | ||
121 | |||
122 | # Copy device tree overlays to dedicated folder | ||
123 | mmd -i ${WORKDIR}/boot.img overlays | ||
124 | for DTB in ${DT_OVERLAYS}; do | ||
125 | DTB_EXT=${DTB##*.} | ||
126 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` | ||
127 | |||
128 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.${DTB_EXT} ::overlays/${DTB_BASE_NAME}.${DTB_EXT} | ||
129 | done | ||
130 | fi | ||
131 | |||
132 | case "${KERNEL_IMAGETYPE}" in | ||
133 | "uImage") | ||
134 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_OTA_KERNELIMAGE} | ||
135 | ;; | ||
136 | *) | ||
137 | bbfatal "Kernel uImage is required for OTA image. Please set KERNEL_IMAGETYPE to \"uImage\"" | ||
138 | ;; | ||
139 | esac | ||
140 | |||
141 | if [ -n ${FATPAYLOAD} ] ; then | ||
142 | echo "Copying payload into VFAT" | ||
143 | for entry in ${FATPAYLOAD} ; do | ||
144 | # add the || true to stop aborting on vfat issues like not supporting .~lock files | ||
145 | mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true | ||
146 | done | ||
147 | fi | ||
148 | |||
149 | # Add stamp file | ||
150 | echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info | ||
151 | mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: | ||
152 | |||
153 | # Burn Partitions | ||
154 | sync | ||
155 | dd if=${WORKDIR}/boot.img of=${SDIMG_OTA} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync | ||
156 | # If SDIMG_OTA_ROOTFS_TYPE is a .xz file use xzcat | ||
157 | if echo "${SDIMG_OTA_ROOTFS_TYPE}" | egrep -q "*\.xz" | ||
158 | then | ||
159 | xzcat ${SDIMG_OTA_ROOTFS} | dd of=${SDIMG_OTA} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync | ||
160 | else | ||
161 | dd if=${SDIMG_OTA_ROOTFS} of=${SDIMG_OTA} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync | ||
162 | fi | ||
163 | |||
164 | # Optionally apply compression | ||
165 | case "${SDIMG_OTA_COMPRESSION}" in | ||
166 | "gzip") | ||
167 | gzip -k9 "${SDIMG_OTA}" | ||
168 | ;; | ||
169 | "bzip2") | ||
170 | bzip2 -k9 "${SDIMG_OTA}" | ||
171 | ;; | ||
172 | "xz") | ||
173 | xz -k "${SDIMG_OTA}" | ||
174 | ;; | ||
175 | esac | ||
176 | } | ||
177 | |||
178 | ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " | ||
179 | |||
180 | rpi_generate_sysctl_config() { | ||
181 | # systemd sysctl config | ||
182 | test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \ | ||
183 | echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf | ||
184 | |||
185 | # sysv sysctl config | ||
186 | IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf" | ||
187 | test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \ | ||
188 | sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF} | ||
189 | echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF} | ||
190 | } | ||
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 1865356..f5a42c1 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -5,11 +5,13 @@ python __anonymous() { | |||
5 | 5 | ||
6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" | 6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
7 | 7 | ||
8 | HOSTTOOLS_NONFATAL += "java" | ||
9 | |||
8 | SOTA_CLIENT ??= "aktualizr" | 10 | SOTA_CLIENT ??= "aktualizr" |
9 | SOTA_CLIENT_PROV ??= "aktualizr-auto-prov" | 11 | SOTA_CLIENT_PROV ??= "aktualizr-auto-prov" |
10 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" | 12 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" |
11 | IMAGE_CLASSES += " image_types_ostree image_types_ota" | 13 | IMAGE_CLASSES += " image_types_ostree image_types_ota" |
12 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" | 14 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign otaimg wic', ' ', d)}" |
13 | 15 | ||
14 | PACKAGECONFIG_append_pn-curl = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', " ssl", " ", d)}" | 16 | PACKAGECONFIG_append_pn-curl = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', " ssl", " ", d)}" |
15 | PACKAGECONFIG_remove_pn-curl = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', " gnutls", " ", d)}" | 17 | PACKAGECONFIG_remove_pn-curl = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', " gnutls", " ", d)}" |
@@ -25,6 +27,11 @@ OSTREE_BRANCHNAME ?= "${MACHINE}" | |||
25 | OSTREE_OSNAME ?= "poky" | 27 | OSTREE_OSNAME ?= "poky" |
26 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" | 28 | OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" |
27 | 29 | ||
30 | |||
31 | GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" | ||
32 | GARAGE_SIGN_KEYNAME ?= "garage-key" | ||
33 | GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" | ||
34 | |||
28 | SOTA_MACHINE ??="none" | 35 | SOTA_MACHINE ??="none" |
29 | SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" | 36 | SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" |
30 | SOTA_MACHINE_raspberrypi3 ?= "raspberrypi" | 37 | SOTA_MACHINE_raspberrypi3 ?= "raspberrypi" |
diff --git a/classes/sota_am335x-evm-wifi.bbclass b/classes/sota_am335x-evm-wifi.bbclass index 821e8fb..adefb47 100644 --- a/classes/sota_am335x-evm-wifi.bbclass +++ b/classes/sota_am335x-evm-wifi.bbclass | |||
@@ -1,5 +1,3 @@ | |||
1 | IMAGE_CLASSES += "image_types_uboot" | ||
2 | |||
3 | KERNEL_IMAGETYPE_sota = "uImage" | 1 | KERNEL_IMAGETYPE_sota = "uImage" |
4 | 2 | ||
5 | OSTREE_BOOTLOADER ?= "u-boot" | 3 | OSTREE_BOOTLOADER ?= "u-boot" |
diff --git a/classes/sota_m3ulcb.bbclass b/classes/sota_m3ulcb.bbclass index 21d04ba..6b63af4 100644 --- a/classes/sota_m3ulcb.bbclass +++ b/classes/sota_m3ulcb.bbclass | |||
@@ -2,7 +2,6 @@ | |||
2 | OSTREE_KERNEL = "Image" | 2 | OSTREE_KERNEL = "Image" |
3 | 3 | ||
4 | EXTRA_IMAGEDEPENDS_append_sota = " m3ulcb-ota-bootfiles" | 4 | EXTRA_IMAGEDEPENDS_append_sota = " m3ulcb-ota-bootfiles" |
5 | IMAGE_CLASSES_append_sota = " image_types_uboot " | ||
6 | IMAGE_BOOT_FILES_sota += "m3ulcb-ota-bootfiles/*" | 5 | IMAGE_BOOT_FILES_sota += "m3ulcb-ota-bootfiles/*" |
7 | 6 | ||
8 | OSTREE_BOOTLOADER ?= "u-boot" | 7 | OSTREE_BOOTLOADER ?= "u-boot" |
diff --git a/classes/sota_porter.bbclass b/classes/sota_porter.bbclass index a8f5ba1..75ae579 100644 --- a/classes/sota_porter.bbclass +++ b/classes/sota_porter.bbclass | |||
@@ -2,7 +2,6 @@ | |||
2 | OSTREE_KERNEL = "uImage+dtb" | 2 | OSTREE_KERNEL = "uImage+dtb" |
3 | 3 | ||
4 | EXTRA_IMAGEDEPENDS_append_sota = " porter-bootfiles" | 4 | EXTRA_IMAGEDEPENDS_append_sota = " porter-bootfiles" |
5 | IMAGE_CLASSES_append_sota = " image_types_uboot " | ||
6 | IMAGE_BOOT_FILES_sota += "porter-bootfiles/*" | 5 | IMAGE_BOOT_FILES_sota += "porter-bootfiles/*" |
7 | 6 | ||
8 | OSTREE_BOOTLOADER ?= "u-boot" | 7 | OSTREE_BOOTLOADER ?= "u-boot" |
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index cc6b666..51d07b2 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -1,11 +1,9 @@ | |||
1 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" | ||
2 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota.xz', 'rpi-sdimg.xz', d)}" | ||
3 | |||
4 | IMAGE_FSTYPES_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'wic rpi-sdimg rpi-sdimg.xz', '', d)}" | ||
5 | |||
6 | KERNEL_IMAGETYPE_sota = "uImage" | 1 | KERNEL_IMAGETYPE_sota = "uImage" |
7 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | 2 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" |
8 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" | 3 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" |
9 | UBOOT_MACHINE_raspberrypi3_sota ?= "rpi_3_32b_defconfig" | 4 | UBOOT_MACHINE_raspberrypi3_sota ?= "rpi_3_32b_defconfig" |
10 | 5 | ||
11 | OSTREE_BOOTLOADER ?= "u-boot" | 6 | OSTREE_BOOTLOADER ?= "u-boot" |
7 | |||
8 | # OSTree puts its own boot.scr to bcm2835-bootfiles | ||
9 | IMAGE_BOOT_FILES_remove_sota += "boot.scr" | ||