system76 / firmware-open

System76 Open Firmware
Other
944 stars 84 forks source link

Error when running build.sh script #520

Closed YerimB closed 4 months ago

YerimB commented 4 months ago

I'm getting an make error after some time when running ./scripts/build.sh addw3.

Steps to reproduce

I am on the branch master and followed the README.md instructions by running the following commands successively:

./scripts/install-deps.sh
source ~/.cargo/env
./scripts/build.sh addw3 # Error occurs here

Actual behavior

After some time of the command running I'm getting the following output:

'build/coreboot.rom' -> '/home/yem/Softwares/firmware-open/build/addw3/firmware.rom'
  CC        scratch/board/system76/common/scratch/../smfi.rel
  CC        scratch/board/system76/common/scratch/main.rel
  CC        scratch/board/system76/common/scratch/stdio.rel
  LINK      scratch/scratch.ihx
  OBJCOPY   scratch/scratch.rom
  XXD       include/scratch.h
  CC        flash/board/system76/common/flash/main.rel
  LINK      flash/flash.ihx
  OBJCOPY   flash/flash.rom
  XXD       include/flash.h
  CC        board/system76/common/main.rel
  CC        arch/8051/arch.rel
  ...
  CC        board/system76/common/pnp.rel
src/board/system76/addw3/gpio.c:37: error 283: function declarator with no prototype
  CC        board/system76/common/power.rel
  CC        board/system76/common/ps2.rel
  CC        board/system76/common/pwm.rel
  CC        board/system76/common/scratch.rel
  CC        board/system76/common/security.rel
make: *** [src/arch/8051/toolchain.mk:52: build/board/system76/addw3/gpio.rel] Error 1
make: *** Waiting for unfinished jobs....
  CC        board/system76/common/smbus.rel

Additional info

The only changes I made are in the submodule ec:

Modified ec/src/board/system76/addw3/board.mk: Updated the fan points (Double checked it).
Created ec/config.mk to try running make directly in ec/:

# cat ec/config.mk
BOARD?=system76/addw3
crawfxrd commented 4 months ago

Already fixed in https://github.com/system76/ec/pull/417.

You either need to use a newer EC commit or downgrade SDCC.