Skip to main content
Associate
January 7, 2024
Question

Build Error for image with custom layer

  • January 7, 2024
  • 1 reply
  • 1835 views

I am on part 4 of the digikey embedded linux series and i keep getting this error when running " bitbake custom-image" 

 

# ERROR: /home/matthew/Projects/yocto/meta-custom/recipes-core/images/custom-image.bb: Error during parse shell code, the last 5 lines are: # iterate to the next setting setting=`echo $remaining | cut -d ';' -f1` remaining=`echo $remaining | cut -d ';' -f2-` done WARNING: /home/matthew/Projects/yocto/meta-custom/recipes-core/images/custom-image.bb: Exception during build_dependencies for set_user_group WARNING: /home/matthew/Projects/yocto/meta-custom/recipes-core/images/custom-image.bb: Error during finalise of /home/matthew/Projects/yocto/meta-custom/recipes-core/images/custom-image.bb ERROR: Unable to parse /home/matthew/Projects/yocto/meta-custom/recipes-core/images/custom-image.bb Traceback (most recent call last): File "/home/matthew/Projects/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 600, in PLYLexer._parse(eof=True): elif self._state==self.ST_QUOTED: > self._parse_quoted(eof) elif self._state==self.ST_HEREDOC: File "/home/matthew/Projects/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 688, in PLYLexer._parse_quoted(eof=True): > wtree, remaining = self._wordlexer.add(input, eof) self._wordlexer = None File "/home/matthew/Projects/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 146, in WordLexer.add(data=['"', ' ', ']', ';', ' ', 't', 'h', 'e', 'n', '\n', '\t', '\t', '\t', 'b', 'r', 'e', 'a', 'k', '\n', '\t', '\t', 'f', 'i', '\n', '\t', '\t', '#', ' ', 'i', 't', 'e', 'r', 'a', 't', 'e', ' ', 't', 'o', ' ', 't', 'h', 'e', ' ', 'n', 'e', 'x', 't', ' ', 's', 'e', 't', 't', 'i', 'n', 'g', '\n', '\t', '\t', 's', 'e', 't', 't', 'i', 'n', 'g', '=', '`', 'e', 'c', 'h', 'o', ' ', '$', 'r', 'e', 'm', 'a', 'i', 'n', 'i', 'n', 'g', ' ', '|', ' ', 'c', 'u', 't', ' ', '-', 'd', ' ', "'", ';', "'", ' ', '-', 'f', '1', '`', '\n', '\t', '\t', 'r', 'e', 'm', 'a', 'i', 'n', 'i', 'n', 'g', '=', '`', 'e', 'c', 'h', 'o', ' ', '$', 'r', 'e', 'm', 'a', 'i', 'n', 'i', 'n', 'g', ' ', '|', ' ', 'c', 'u', 't', ' ', '-', 'd', ' ', "'", ';', "'", ' ', '-', 'f', '2', '-', '`', '\n', '\t', 'd', 'o', 'n', 'e', '\n'], eof=True): self._buffer += list(data) > self._parse(eof) File "/home/matthew/Projects/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 324, in WordLexer._parse(eof=True): > read, closed = parsefunc(buf, result, eof) File "/home/matthew/Projects/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 200, in WordLexer._parse_dquote(buf=['\n', '\t', 'd', 'o', 'n', 'e', '\n'], result=['"', ' ]; then\n\t\t\tbreak\n\t\tfi\n\t\t# iterate to the next setting\n\t\tsetting=', ['`', 'echo ', ['$', 'remaining', ''], ' | cut -d ', ["'", ';', "'"], ' -f1', '`'], '\n\t\tremaining=', ['`', 'echo ', ['$', 'remaining', ''], ' | cut -d ', ["'", ';', "'"], ' -f2-', '`'], ''], eof=True): if pos==-1: > raise NeedMore() bb.pysh.pyshlex.NeedMore WARNING: /home/matthew/Projects/yocto/meta-st-stm32mp/recipes-st/images/st-image-vendorfs.bb: Cooker received SIGTERM, shutting down... WARNING: /home/matthew/Projects/yocto/meta-st-stm32mp/recipes-security/optee/optee-os-stm32mp_3.12.0.bb: Cooker received SIGTERM, shutting down... WARNING: Cooker received SIGTERM, shutting down... Summary: There were 5 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

1 reply

Erwan SZYMANSKI
Technical Moderator
January 8, 2024

Hello @BambooEngineer ,
Can you please share directly your image bb file here ? If there is a syntax error as Yocto seems to tell you, it will be easier to catch for me.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate
January 8, 2024

SUMMARY = "MY CUSTOM LINUX IMAGE."

IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image
inherit extrausers

IMAGE_OVERHEAD_FACTOR ?= "1.0"
IMAGE_ROOTFS_SIZE ?= "204800"
EXTRA_USERS_PARAMS = "\ usermod -P 'tacomax' root \"

Erwan SZYMANSKI
Technical Moderator
January 9, 2024

@BambooEngineer ,
In this file particularly, I do not see obvious error.
Maybe try to process one by one, removing some parts of your custom files to see where does Yocto see a parsing error. It can either be a little hidden character or an obsolete syntax ("_append" instead of ":append" or things like this).

If you find the line where Yocto crash and you still do not understand why, please let me know.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.