summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass2
-rw-r--r--classes/image_types_ota.bbclass2
-rw-r--r--classes/sota.bbclass13
-rw-r--r--classes/sota_freedom-u540.bbclass12
4 files changed, 22 insertions, 7 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index a9a8174..2e8e8f5 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -7,8 +7,6 @@ OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}"
7OSTREE_COMMIT_BODY ??= "" 7OSTREE_COMMIT_BODY ??= ""
8OSTREE_UPDATE_SUMMARY ??= "0" 8OSTREE_UPDATE_SUMMARY ??= "0"
9OSTREE_DEPLOY_DEVICETREE ??= "0" 9OSTREE_DEPLOY_DEVICETREE ??= "0"
10OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}"
11GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
12 10
13BUILD_OSTREE_TARBALL ??= "1" 11BUILD_OSTREE_TARBALL ??= "1"
14 12
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 12375ec..31e3887 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -45,6 +45,8 @@ do_image_ota[cleandirs] = "${OTA_SYSROOT}"
45do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \ 45do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \
46 ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}" 46 ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}"
47IMAGE_CMD_ota () { 47IMAGE_CMD_ota () {
48 export OSTREE_BOOT_PARTITION=${OSTREE_BOOT_PARTITION}
49
48 ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT} 50 ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT}
49 ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME} 51 ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME}
50 mkdir -p ${OTA_SYSROOT}/boot/loader.0 52 mkdir -p ${OTA_SYSROOT}/boot/loader.0
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index 1a9d68b..86863d9 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -38,15 +38,17 @@ EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native
38INITRAMFS_FSTYPES ?= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" 38INITRAMFS_FSTYPES ?= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}"
39 39
40# Please redefine OSTREE_REPO in order to have a persistent OSTree repo 40# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
41export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" 41OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
42export OSTREE_OSNAME ?= "poky" 42OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}"
43export OSTREE_BOOTLOADER ??= 'u-boot' 43OSTREE_OSNAME ?= "poky"
44export OSTREE_BOOT_PARTITION ??= "/boot" 44OSTREE_BOOTLOADER ??= 'u-boot'
45OSTREE_BOOT_PARTITION ??= "/boot"
45 46
46INITRAMFS_IMAGE ?= "initramfs-ostree-image" 47INITRAMFS_IMAGE ?= "initramfs-ostree-image"
47 48
48GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" 49GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo"
49GARAGE_SIGN_KEYNAME ?= "garage-key" 50GARAGE_SIGN_KEYNAME ?= "garage-key"
51GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
50GARAGE_TARGET_VERSION ?= "" 52GARAGE_TARGET_VERSION ?= ""
51GARAGE_TARGET_URL ?= "" 53GARAGE_TARGET_URL ?= ""
52GARAGE_CUSTOMIZE_TARGET ?= "" 54GARAGE_CUSTOMIZE_TARGET ?= ""
@@ -58,8 +60,9 @@ SOTA_MACHINE_m3ulcb = "m3ulcb"
58SOTA_MACHINE_intel-corei7-64 ?= "minnowboard" 60SOTA_MACHINE_intel-corei7-64 ?= "minnowboard"
59SOTA_MACHINE_qemux86-64 ?= "qemux86-64" 61SOTA_MACHINE_qemux86-64 ?= "qemux86-64"
60SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi" 62SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi"
63SOTA_MACHINE_freedom-u540 ?= "freedom-u540"
61 64
62SOTA_OVERRIDES_BLACKLIST = "ostree ota" 65SOTA_OVERRIDES_BLACKLIST = "ostree ota"
63SOTA_REQUIRED_VARIABLES = "OSTREE_REPO OSTREE_OSNAME OSTREE_BOOTLOADER OSTREE_BOOT_PARTITION GARAGE_SIGN_REPO" 66SOTA_REQUIRED_VARIABLES = "OSTREE_REPO OSTREE_BRANCHNAME OSTREE_OSNAME OSTREE_BOOTLOADER OSTREE_BOOT_PARTITION GARAGE_SIGN_REPO GARAGE_TARGET_NAME"
64 67
65inherit sota_sanity sota_${SOTA_MACHINE} image_repo_manifest 68inherit sota_sanity sota_${SOTA_MACHINE} image_repo_manifest
diff --git a/classes/sota_freedom-u540.bbclass b/classes/sota_freedom-u540.bbclass
new file mode 100644
index 0000000..c287154
--- /dev/null
+++ b/classes/sota_freedom-u540.bbclass
@@ -0,0 +1,12 @@
1OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}"
2
3OSTREE_BOOTLOADER ?= "u-boot"
4INITRAMFS_FSTYPES = "cpio.gz"
5PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot"
6
7IMAGE_BOOT_FILES += "uEnv.txt"
8IMAGE_BOOT_FILES_remove = "fitImage"
9
10OSTREE_KERNEL_ARGS_sota ?= "earlycon=sbi console=ttySIF0 ramdisk_size=16384 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/mmcblk0p3"
11
12WKS_FILE_sota = "freedom-u540-opensbi-sota.wks"