Hello All,
I am trying to build the PinePhone sculpt image from source, using the "First system image of mobile Sculpt OS" Genodians article and the various "README" files as guides.
First, I made the recommended changes to "build.conf" (hopefully correctly). When running "make run/sculpt_image KERNEL=hw BOARD=pinephone SCULPT=phone DEPOT=omit", it eventually gives the following error:
including /home/mainuser/Devel/genode_main/genode/tool/run/image/uboot including /home/mainuser/Devel/genode_main/genode/repos/allwinner/tool/run/image/pine_uboot_sdcard including /home/mainuser/Devel/genode_main/genode/tool/run/boot_dir/hw including /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.
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). Building the regular PC version of Scuplt works fine.
Does any of this sound familiar to anyone?
Thanks!
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/c376660a097b2194182175e91f6343d1...
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/t...
Cheers Norman