-
-
Notifications
You must be signed in to change notification settings - Fork 206
Description
To build EC, some changes are needed for Heads to build it and add it in rom from a Heads future commit so it's automatically flashed as part as internal upgrade alongside coreboot. Users should not care.
The nix docker image will need to be updated with required deps and first build successfully.
Following https://docs.dasharo.com/unified/novacustom/recovery/#ec-firmware-recovery
Debian deps equiv to nix will be needed:
-
avr-libc avrdude binutils-avr clang-format clang-format-19 gcc-avr libcap-dev libftdi1 libhidapi-dev libhidapi-libusb0 libudev-dev libusb-0.1-4 sdcc sdcc-libraries
(map to nix equivalents and put under flake.nix with high level deps which should install lower ones) -
As well as cargo and probably others
Error on debian-13 following upstream docs :
user@debian-13:~/ec$ make BOARD=arduino/mega2560
CC arduino/mega2560/2026-01-12_6d9d6cf/arch/avr/gpio.o
CC arduino/mega2560/2026-01-12_6d9d6cf/arch/avr/i2c.o
CC arduino/mega2560/2026-01-12_6d9d6cf/arch/avr/i2c_slave.o
CC arduino/mega2560/2026-01-12_6d9d6cf/arch/avr/uart.o
CC arduino/mega2560/2026-01-12_6d9d6cf/board/arduino/mega2560/battery.o
CC arduino/mega2560/2026-01-12_6d9d6cf/board/arduino/mega2560/i2c.o
CC arduino/mega2560/2026-01-12_6d9d6cf/board/arduino/mega2560/main.o
CC arduino/mega2560/2026-01-12_6d9d6cf/board/arduino/mega2560/parallel.o
CC arduino/mega2560/2026-01-12_6d9d6cf/common/i2c.o
CC arduino/mega2560/2026-01-12_6d9d6cf/common/keymap.o
CC arduino/mega2560/2026-01-12_6d9d6cf/common/version.o
LINK arduino/mega2560/2026-01-12_6d9d6cf/ec.elf
OBJCOPY arduino/mega2560/2026-01-12_6d9d6cf/ec.ihx
OBJCOPY arduino/mega2560/2026-01-12_6d9d6cf/ec.rom
avr-objcopy: build/arduino/mega2560/2026-01-12_6d9d6cf/ec.ihx: invalid operation
make: *** [src/arch/avr/toolchain.mk:24: build/arduino/mega2560/2026-01-12_6d9d6cf/ec.rom] Error 1
Attached make -d output cc @mkopec (note that debian is not supposed to be supported, just info:
make_debug_on_debian_13.txt
Input for #2039
TODO:
- add tooling in Heads so "System Information" can provide current EC version
- nix flake.nix maybe flake.lock will adapted with all EC builder needed dependencies
- add target/mega2560.mk to build EC
- boards configs adding target/mega2560.mk
- coreboot configs point to ec.rom for coreboot configs to have
CONFIG_EC_SYSTEM76_EC_UPDATE=y
CONFIG_EC_SYSTEM76_EC_UPDATE_FILE="ec.rom"
or DASHARO_EC counterpart?
Something else @mkopec ?