Dasharo firmware building guide
Intro
This guide shows how to build Dasharo firmware for NovaCustom devices.
Requirements
This guide was verified on Ubuntu 22.04. In practice, any Linux distribution with Docker support should be enough to complete it.
Make sure that you have following packages installed:
- Docker
-
Git
sudo apt -y install gitsudo dnf -y install git
Laptops consist of two firmware components:
Build Dasharo EC firmware
-
Clone the Dasharo ec repository:
git clone https://github.com/Dasharo/ec.git -
Navigate to the source code directory and checkout to the desired revision:
cd ecReplace
X.Y.Zwith a valid versionWarning
Releases predating ns5x_adl_v1.7.0, i.e. earlier than October 2023, might not build in custom shells on OS'es other than Fedora. In such case, it is recommended to run
bashbeforebuild.sh. See issue #407.git checkout novacustom_v540tu_vX.Y.Zgit checkout novacustom_v560tu_vX.Y.Zgit checkout novacustom_ns5x_adl_vX.Y.Zgit checkout novacustom_nv4x_adl_vX.Y.Zgit checkout novacustom_ns5x_tgl_vX.Y.Zgit checkout novacustom_nv4x_tgl_vX.Y.Z -
Checkout submodules:
git submodule update --init --recursive --checkout -
Build the EC firmware:
EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=v540tu ./build.shThe resulting image will be placed in:
novacustom_v540tu_ec.rom.EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=v560tu ./build.shThe resulting image will be placed in:
novacustom_v560tu_ec.rom.EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=ns5x_adl ./build.shThe resulting image will be placed in:
novacustom_ns5x_adl_ec.rom.EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=nv4x_adl ./build.shThe resulting image will be placed in:
novacustom_nv4x_adl_ec.rom.EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=ns5x_tgl ./build.shThe resulting image will be placed in:
novacustom_ns5x_tgl_ec.rom.EC_BOARD_VENDOR=novacustom EC_BOARD_MODEL=nv4x_tgl ./build.shThe resulting image will be placed in:
novacustom_nv4x_tgl_ec.rom.
Build Dasharo BIOS firmware
-
Clone the Dasharo coreboot repository:
cd .. git clone https://github.com/Dasharo/coreboot.git -
Navigate to the source code directory and checkout to the desired revision:
cd corebootReplace
X.Y.Zwith a valid versiongit checkout novacustom_v540tu_vX.Y.Zgit checkout novacustom_v560tu_vX.Y.Zgit checkout novacustom_ns5x_adl_vX.Y.Zgit checkout novacustom_nv4x_adl_vX.Y.Zgit checkout novacustom_ns5x_tgl_vX.Y.Zgit checkout novacustom_nv4x_tgl_vX.Y.Z -
Copy the previously built EC firmware to the coreboot folder:
cp ../ec/novacustom_v540tu_ec.rom ec.romcp ../ec/novacustom_v560tu_ec.rom ec.romcp ../ec/novacustom_ns5x_adl_ec.rom ec.romcp ../ec/novacustom_nv4x_adl_ec.rom ec.romcp ../ec/novacustom_ns5x_tgl_ec.rom ec.romcp ../ec/novacustom_nv4x_tgl_ec.rom ec.rom -
Checkout submodules:
git submodule update --init --recursive --checkout -
Start docker container:
docker run --rm -it -u $UID \ -v $PWD:/home/coreboot/coreboot \ -w /home/coreboot/coreboot \ coreboot/coreboot-sdk:2023-11-24_2731fa619b /bin/bash- If the build commands ahead fail, try using an older container
docker run --rm -it -u $UID \ -v $PWD:/home/coreboot/coreboot \ -w /home/coreboot/coreboot \ coreboot/coreboot-sdk:2021-09-23_b0d87f753c /bin/bash
- If the build commands ahead fail, try using an older container
-
Inside of the container, configure the build process:
make distclean && cp configs/config.novacustom_v540tu .configmake distclean && cp configs/config.novacustom_v560tu .configmake distclean && cp configs/config.novacustom_ns5x_adl .configmake distclean && cp configs/config.novacustom_nv4x_adl .configmake distclean && cp configs/config.novacustom_ns5x_tgl .configmake distclean && cp configs/config.novacustom_nv4x_tgl .config -
Start the build process:
make olddefconfig && make
This will produce a Dasharo binary placed in build/coreboot.rom.
The binary will not contain a boot splash logo. Refer to logo customization for including one.
Build Instructions
-
Clone the Dasharo coreboot repository:
git clone https://github.com/Dasharo/coreboot.git cd coreboot -
Checkout to a specific version (optional):
git checkout novacustom_nuc_box_v0.9.0 -
Checkout submodules:
git submodule update --init --checkout -
Build the firmware:
./build.sh nuc_box
The resulting coreboot image will be: novacustom_nuc_box_v0.9.0.rom
Intro
This section presents the crucial steps required to build the Dasharo Heads firmware. For more information, you may also refer to the official Heads building documentation.
Requirements
This guide was verified on Ubuntu 22.04. In practice, any Linux distribution with Docker support should be enough to complete it.
Make sure that you have following packages installed:
- Docker
-
Git
sudo apt -y install git
Building
-
Clone and navigate to the Dasharo Heads repository:
git clone https://github.com/Dasharo/heads.git cd heads -
Checkout to the desired revision:
git checkout novacustom_v54x_mtl_v0.9.0git checkout novacustom_v56x_mtl_v0.9.0git checkout novacustom_nv4x_adl_v0.9.2 -
Start the build inside the docker container:
Why not just run
./docker_repro.sh?docker_repro.shmounts the repository at its actual host path inside the container (e.g./home/user/heads). The build system records that path as the cross-compiler's installation prefix, so two builds from different checkout locations produce different binaries. The official Dasharo releases are always built with the repository mounted at/home/coreboot/coreboot, which is what the commands below replicate.This may be addressed in later releases, but to be safe and match the released binary hash, always use the explicit mount below instead of
docker_repro.sh.The correct docker image version for each release is recorded in
.circleci/config.yml. The commands below read it automatically, so they stay correct across releases without any manual edits.DOCKER_IMAGE=$(grep -oP '^\s*-?\s*image:\s*\K(tlaurion/heads-dev-env:[^\s]+)' \ .circleci/config.yml | head -n 1) docker run --rm -it \ -v "$(pwd)":/home/coreboot/coreboot \ -w /home/coreboot/coreboot \ "${DOCKER_IMAGE}" \ -- make BOARD=novacustom-v540tuThis will produce a Dasharo binary placed in
build/x86/novacustom-v540tu/dasharo-novacustom-v540tu-*.rom.DOCKER_IMAGE=$(grep -oP '^\s*-?\s*image:\s*\K(tlaurion/heads-dev-env:[^\s]+)' \ .circleci/config.yml | head -n 1) docker run --rm -it \ -v "$(pwd)":/home/coreboot/coreboot \ -w /home/coreboot/coreboot \ "${DOCKER_IMAGE}" \ -- make BOARD=novacustom-v560tuThis will produce a Dasharo binary placed in
build/x86/novacustom-v560tu/dasharo-novacustom-v560tu-*.rom.DOCKER_IMAGE=$(grep -oP '^\s*-?\s*image:\s*\K(tlaurion/heads-dev-env:[^\s]+)' \ .circleci/config.yml | head -n 1) docker run --rm -it \ -v "$(pwd)":/home/coreboot/coreboot \ -w /home/coreboot/coreboot \ "${DOCKER_IMAGE}" \ -- make BOARD=novacustom-nv4x_adlThis will produce a Dasharo binary placed in
build/x86/novacustom-nv4x_adl/dasharo-novacustom-nv4x_adl-novacustom_nv4x_adl_v0.9.2.rom.
Install Dasharo firmware
The Dasharo firmware can be flashed in following ways, depending on your situation:
- To flash Dasharo for the first time, refer to the initial deployment guide.
- To update Dasharo, refer to the firmware update guide.