diff options
author | OYTIS <tossel@gmail.com> | 2018-10-25 17:31:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 17:31:34 +0200 |
commit | d2ca4d8b48a88570b612154703562b55b55ce0ca (patch) | |
tree | 383a4b7e1ef89e777c334cbb03e9b4f11e56bb49 | |
parent | ce96109093527808be935313cde400973862e2de (diff) | |
parent | f07be1805cc22b5428ff529b705731360b485d06 (diff) | |
download | meta-updater-d2ca4d8b48a88570b612154703562b55b55ce0ca.tar.gz |
Merge pull request #410 from agners/use-imgdeploydir
Use IMGDEPLOYDIR
-rw-r--r-- | README.adoc | 2 | ||||
-rw-r--r-- | classes/image_types_ota.bbclass | 15 | ||||
-rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 2 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/otaimage.py | 4 | ||||
-rw-r--r-- | scripts/qemucommand.py | 2 |
5 files changed, 8 insertions, 17 deletions
diff --git a/README.adoc b/README.adoc index 3f9c392..cccba9f 100644 --- a/README.adoc +++ b/README.adoc | |||
@@ -46,7 +46,7 @@ bitbake agl-demo-platform | |||
46 | and get as a result an `ostree_repo` folder in your images directory (`tmp/deploy/images/$\{MACHINE}/ostree_repo`). It will contain: | 46 | and get as a result an `ostree_repo` folder in your images directory (`tmp/deploy/images/$\{MACHINE}/ostree_repo`). It will contain: |
47 | 47 | ||
48 | * your OSTree repository, with the rootfs committed as an OSTree deployment, | 48 | * your OSTree repository, with the rootfs committed as an OSTree deployment, |
49 | * an `otaimg` bootstrap image, which is an OSTree physical sysroot as a burnable filesystem image, and optionally | 49 | * an `ota-ext4` bootstrap image, which is an OSTree physical sysroot as a burnable filesystem image, and optionally |
50 | * some machine-dependent live images (e.g. `.wic` for Raspberry Pi or `.porter-sdimg-ota` Renesas Porter board). | 50 | * some machine-dependent live images (e.g. `.wic` for Raspberry Pi or `.porter-sdimg-ota` Renesas Porter board). |
51 | 51 | ||
52 | Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. | 52 | Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 929d092..ed1d579 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -136,21 +136,12 @@ IMAGE_CMD_ota-ext4 () { | |||
136 | eval COUNT=\"$MIN_COUNT\" | 136 | eval COUNT=\"$MIN_COUNT\" |
137 | fi | 137 | fi |
138 | 138 | ||
139 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg | 139 | dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 seek=${OTA_ROOTFS_SIZE} count=$COUNT bs=1024 |
140 | sync | 140 | mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} |
141 | dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=${OTA_ROOTFS_SIZE} count=$COUNT bs=1024 | ||
142 | mkfs.ext4 -O ^64bit ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -L otaroot -d ${OTA_SYSROOT} | ||
143 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg | ||
144 | ln -s ${IMAGE_NAME}.otaimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg | ||
145 | } | 141 | } |
146 | 142 | ||
147 | IMAGE_CMD_ota-tar () { | 143 | IMAGE_CMD_ota-tar () { |
148 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg.tar | 144 | tar -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-tar -C ${OTA_SYSROOT} . |
149 | tar -cf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg.tar -C ${OTA_SYSROOT} . | ||
150 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar | ||
151 | ln -s ${IMAGE_NAME}.otaimg.tar ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar | ||
152 | # To fit in with the rest of yocto's image utils, we create a rootfs.ota-tar in the deploy dir | ||
153 | cp ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ota-tar | ||
154 | } | 145 | } |
155 | 146 | ||
156 | do_otasetup[doc] = "Sets up the base ota rootfs used for subsequent image generation" | 147 | do_otasetup[doc] = "Sets up the base ota rootfs used for subsequent image generation" |
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index b555d92..c7b18dd 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
@@ -66,7 +66,7 @@ class GeneralTests(OESelftestTestCase): | |||
66 | def test_add_package(self): | 66 | def test_add_package(self): |
67 | deploydir = get_bb_var('DEPLOY_DIR_IMAGE') | 67 | deploydir = get_bb_var('DEPLOY_DIR_IMAGE') |
68 | imagename = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal') | 68 | imagename = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal') |
69 | image_path = deploydir + '/' + imagename + '.otaimg' | 69 | image_path = deploydir + '/' + imagename + '.ota-ext4' |
70 | logger = logging.getLogger("selftest") | 70 | logger = logging.getLogger("selftest") |
71 | 71 | ||
72 | logger.info('Running bitbake with man in the image package list') | 72 | logger.info('Running bitbake with man in the image package list') |
diff --git a/scripts/lib/wic/plugins/source/otaimage.py b/scripts/lib/wic/plugins/source/otaimage.py index ee8088b..4b30776 100644 --- a/scripts/lib/wic/plugins/source/otaimage.py +++ b/scripts/lib/wic/plugins/source/otaimage.py | |||
@@ -39,13 +39,13 @@ class OTAImagePlugin(RawCopyPlugin): | |||
39 | Called to do the actual content population for a partition i.e. it | 39 | Called to do the actual content population for a partition i.e. it |
40 | 'prepares' the partition to be incorporated into the image. | 40 | 'prepares' the partition to be incorporated into the image. |
41 | """ | 41 | """ |
42 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 42 | bootimg_dir = get_bitbake_var("IMGDEPLOYDIR") |
43 | if not bootimg_dir: | 43 | if not bootimg_dir: |
44 | logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 44 | logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") |
45 | 45 | ||
46 | logger.debug('Bootimg dir: %s' % bootimg_dir) | 46 | logger.debug('Bootimg dir: %s' % bootimg_dir) |
47 | 47 | ||
48 | src = bootimg_dir + "/" + get_bitbake_var("IMAGE_LINK_NAME") + ".otaimg" | 48 | src = bootimg_dir + "/" + get_bitbake_var("IMAGE_LINK_NAME") + ".ota-ext4" |
49 | 49 | ||
50 | logger.debug('Preparing partition using image %s' % (src)) | 50 | logger.debug('Preparing partition using image %s' % (src)) |
51 | source_params['file'] = src | 51 | source_params['file'] = src |
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 86362f7..4abfd4e 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
@@ -6,7 +6,7 @@ from subprocess import check_output, CalledProcessError | |||
6 | 6 | ||
7 | EXTENSIONS = { | 7 | EXTENSIONS = { |
8 | 'intel-corei7-64': 'wic', | 8 | 'intel-corei7-64': 'wic', |
9 | 'qemux86-64': 'otaimg' | 9 | 'qemux86-64': 'ota-ext4' |
10 | } | 10 | } |
11 | 11 | ||
12 | 12 | ||