PinePhone Sculpt Build Problems

Norman Feske norman.feske at genode-labs.com
Mon Mar 13 11:45:14 CET 2023


Hi John,

thank you for reporting.

The sculpt_image.run script is intended for the automation of image 
releases. It is useful only if your are planning make your custom built 
image publicly available for others. For mere experimenting and testing, 
the sculpt_test.run script is probably easier to use.

> /home/mainuser/Devel/genode_main/genode/repos/gems/run/sculpt_image.run
> can't read "arg": no such variable
>      while executing
> "puts stderr "missing run-tool argument: $arg""
>      (procedure "assert_run_arg" line 4)
>      invoked from within
> "assert_run_arg "--image-uboot-gzip-best""
>      (file 
> "/home/mainuser/Devel/genode_main/genode/repos/gems/run/sculpt_image.run" line 34)
> ...
> 
> This is too cryptic for me, as I am anything but a build system expert.

That's a slip-up on my side. I just fixed it on staging [1].

[1] 
https://github.com/genodelabs/genode/commit/c376660a097b2194182175e91f6343d130f1cb3d

> The following steps may be unnecessary, but I was just trying things 
> that seemed reasonable.  Running "prepare_port pine_uboot" worked fine, 
> but "make u-boot/pine BOARD=pinephone" says:
> 
> checking library dependencies...
>    Program u-boot/pine/pine_uboot
> /bin/sh: 0: Illegal option -o pipefail
> /bin/sh: 0: Illegal option -o pipefail
> /bin/sh: 0: Illegal option -o pipefail
> make[3]: *** [Makefile:556: 
> /home/mainuser/Devel/genode_main/genode/build/arm_v8a/u-boot/pine/arm_trusted_firmware/sun50i_a64/debug] Error 2
> make[2]: *** 
> [/home/mainuser/Devel/genode_main/genode/repos/allwinner/src/u-boot/pine/target.mk:35: /home/mainuser/Devel/genode_main/genode/build/arm_v8a/u-boot/pine/arm_trusted_firmware/sun50i_a64/debug/bl31.bin] Error 2
> make[1]: *** [var/libdeps:23: pine_uboot.prg] Error 2
> make: *** [Makefile:336: gen_deps_and_build_targets] Error 2
> 
> I probably made a configuration mistake or forgot a step (or multiple).

It seems like the shell (implicitly) used by the build system of the ARM 
trusted firmware (ATF), does not know the '-o pipefail' argument that 
Genode's build systems sets by default [2] for safety reasons.

What puzzles me is that we explicitly "unexport" the '.SHELLFLAGS' in in 
the u-boot/pine/target.mk [3]. For some reason, the argument still ends 
up in the sub make for the ATF.

As an immediate work-around, you might remove the '-o pinefail' from 
Genode's build.mk file.

[2] 
https://github.com/genodelabs/genode/blob/master/tool/builddir/build.mk#L95
[3] 
https://github.com/genodelabs/genode-allwinner/blob/master/src/u-boot/pine/target.mk#L29


Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

https://www.genode-labs.com · https://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list