Dasharo / dasharo-issues

The Dasharo issue tracker
https://dasharo.com/
25 stars 0 forks source link

Can't build EC firmware for NovaCustom NS5x/NS7x ADL v1.6.0 #407

Open pietrushnic opened 1 year ago

pietrushnic commented 1 year ago

Dasharo version

v1.6.0

Dasharo variant

:man_shrugging:

Affected component(s) or functionality

EC

Brief summary

cannot build EC by following https://docs.dasharo.com/unified/novacustom/building-manual/#build-dasharo-ec-firmware

How reproducible

always

How to reproduce

https://docs.dasharo.com/unified/novacustom/building-manual/#build-dasharo-ec-firmware

Expected behavior

reproducible build

Actual behavior

[23:37:45] pietrushnic:ec git:(master) $ git checkout novacustom_ns5x_adl_v1.6.0
Note: switching to 'novacustom_ns5x_adl_v1.6.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c3984466f49e ESPI systems should always power off if in S5 state
[23:37:51] pietrushnic:ec git:(c3984466f49e) $ git submodule update --init --recursive --checkout

Submodule 'ecflash' (https://github.com/system76/ecflash.git) registered for path 'ecflash'
Submodule 'ecsim' (https://github.com/system76/ecsim.git) registered for path 'ecsim'
Submodule 'ecspy' (https://github.com/system76/ecspy.git) registered for path 'ecspy'
Cloning into '/home/pietrushnic/src/3mdeb/dasharo/v1.6.0-review/ec/ecflash'...
Cloning into '/home/pietrushnic/src/3mdeb/dasharo/v1.6.0-review/ec/ecsim'...
Cloning into '/home/pietrushnic/src/3mdeb/dasharo/v1.6.0-review/ec/ecspy'...
Submodule path 'ecflash': checked out '2b94b81b971dce74f11fc8549fa8d6c4acd68657'
Submodule path 'ecsim': checked out '2d672adae558a5f2841a44af17d92d0a98f27acc'
Submodule 'area8051' (https://gitlab.redox-os.org/redox-os/area8051.git) registered for path 'ecsim/area8051'
Cloning into '/home/pietrushnic/src/3mdeb/dasharo/v1.6.0-review/ec/ecsim/area8051'...
Submodule path 'ecsim/area8051': checked out '2be60cac8994810214a57becec0ae61f7029aa0e'
Submodule path 'ecspy': checked out '3ff52b23483afe8965e89f2cea89bd571ca28900'
[23:38:01] pietrushnic:ec git:(c3984466f49e) $ EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=ns5x_adl ./build.sh

./build.sh: 5: Bad substitution
dirname: missing operand
Try 'dirname --help' for more information.
./build.sh: 46: Bad substitution
miczyg1 commented 1 year ago

shell difference? Script seems to be made for bash

pietrushnic commented 1 year ago

Yes, it is a shell difference, but it should not matter. Why can't implement it in a shell agile way?

miczyg1 commented 1 year ago

Yes, it is a shell difference, but it should not matter. Why can't implement it in a shell agile way?

No reason probably. Just nobody thought about it yet.

macpijan commented 1 year ago

What is the shell in question, and how the problem is triggered, since the bash is explicitely called: https://github.com/Dasharo/ec/blob/master/build.sh#L3

I would argue that bash is standard enough for a shell scripts.

pietrushnic commented 1 year ago

I use zsh and with some other people https://github.com/ohmyzsh/ohmyzsh

I would argue that bash is standard enough for a shell scripts.

And because of that, we should cryptically fail? Why can't we check if the dependencies were resolved?

mkopec commented 1 year ago

I'm not seeing this issue on zsh 5.9 w/ omz on Fedora. Moreover there is a shebang #!/usr/bin/env bash at the beginning of the script so I guess it shouldn't matter which shell the user is using as long as bash is installed?

pietrushnic commented 1 year ago

@mkopec so it means the problem is different.

coreutiles version problem?

[15:33:26] pietrushnic:ec git:(c3984466f49e*) $ EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=ns5x_adl ./build.sh
./build.sh: 5: Bad substitution
dirname: missing operand
Try 'dirname --help' for more information.
./build.sh: 46: Bad substitution
[15:33:36] pietrushnic:ec git:(c3984466f49e*) $ dirname --version
dirname (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie and Jim Meyering.
[15:33:53] pietrushnic:ec git:(c3984466f49e*) $ bash
pietrushnic@nivrim:~/src/3mdeb/dasharo/v1.6.0-review/ec$ EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=ns5x_adl ./build.sh
Built '2023-03-20_c398446' for 'novacustom/ns5x_adl'
make: 'all' is up to date.
0+0 records in
0+0 records out
0 bytes copied, 7.2944e-05 s, 0.0 kB/s
pietrushnic@nivrim:~/src/3mdeb/dasharo/v1.6.0-review/ec$ dirname --version
dirname (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie and Jim Meyering.
pietrushnic@nivrim:~/src/3mdeb/dasharo/v1.6.0-review/ec$ zsh --version
zsh 5.8 (x86_64-debian-linux-gnu)