diff options
| author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2021-08-09 05:22:08 +0300 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-08-09 10:20:30 -0700 |
| commit | a8c964d14c3587dd52466a0ff284953993fbf94b (patch) | |
| tree | 4ad216e4cd9b1106fdc58690b08806919a670b4d /meta-oe | |
| parent | 5013bd7b3040e3249ca632f507cffa14ff80e757 (diff) | |
| download | meta-openembedded-a8c964d14c3587dd52466a0ff284953993fbf94b.tar.gz | |
image_types_sparse: fix sparse image generation
After changing image_types_sparse to follow new override syntax, using
this class generates the syntax error, because CONVERSION_CMD:sparse()
function is added to the generated shell file, but color can not be a
part of the function name. Rewrite it to be the variable rather than the
function, so that it does not end up the run.do_image_FOO file.
DEBUG: Executing shell function do_image_ext4
[.......]/temp/run.do_image_ext4.1247938: line 184: `CONVERSION_CMD:sparse': not a valid identifier
WARNING: [.......]/temp/run.do_image_ext4.1247938:151 exit 2 from 'export systemd_user_unitdir="/usr/lib/systemd/user"'
WARNING: Backtrace (BB generated script):
#1: main, [.......]/temp/run.do_image_ext4.1247938, line 151
ERROR: Execution of '[.......]/temp/run.do_image_ext4.1247938' failed with exit code 2:
[.......]/temp/run.do_image_ext4.1247938: line 184: `CONVERSION_CMD:sparse': not a valid identifier
WARNING: [.......]/temp/run.do_image_ext4.1247938:151 exit 2 from 'export systemd_user_unitdir="/usr/lib/systemd/user"'
WARNING: Backtrace (BB generated script):
#1: main, [.......]/temp/run.do_image_ext4.1247938, line 151
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/classes/image_types_sparse.bbclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index af3879372b..65d980fd91 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | inherit image_types | 1 | inherit image_types |
| 2 | 2 | ||
| 3 | CONVERSIONTYPES += "sparse" | 3 | CONVERSIONTYPES += "sparse" |
| 4 | CONVERSION_CMD:sparse() { | 4 | CONVERSION_CMD:sparse = " \ |
| 5 | in="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" | 5 | case "${type}" in \ |
| 6 | out="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" | 6 | ext*) \ |
| 7 | case "${type}" in | 7 | ext2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ |
| 8 | ext*) | 8 | "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ |
| 9 | ext2simg "$in" "$out" | 9 | ;; \ |
| 10 | ;; | 10 | *) \ |
| 11 | *) | 11 | img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \ |
| 12 | img2simg "$in" "$out" | 12 | "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \ |
| 13 | ;; | 13 | ;; \ |
| 14 | esac | 14 | esac \ |
| 15 | } | 15 | " |
| 16 | CONVERSION_DEPENDS_sparse = "android-tools-native" | 16 | CONVERSION_DEPENDS_sparse = "android-tools-native" |
