Coreboot: Difference between revisions

imported>Milahu
m remove "this can take some hours" - it does not, when we build only one toolchain
imported>Lenzj
No edit summary
Line 1: Line 1:
== Building in nix-shell ==
== Building in nix-shell ==
Note: the following was tested and working on NixOS 21.11 (Porcupine) while compiling the QEMU target for Coreboot v4.15 as well as Coreboot master (7b168c92f6).
To build your own coreboot bios:
To build your own coreboot bios:


Line 17: Line 19:
     #gnatboot # gnat1
     #gnatboot # gnat1
     ncurses # make menuconfig
     ncurses # make menuconfig
     #flex bison # Generate flashmap descriptor parser
     m4 flex bison # Generate flashmap descriptor parser
     #clang
     #clang
     zlib
     zlib
Line 34: Line 36:


<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>
# clone coreboot git repository (latest master)
git clone https://review.coreboot.org/coreboot.git --depth 1
git clone https://review.coreboot.org/coreboot.git --depth 1
# or for a specific coreboot version (I.E. version 4.15)
git clone --branch 4.15 https://review.coreboot.org/coreboot.git --depth 1
# get 3rd party submodules in coreboot repository
cd coreboot
cd coreboot
du -sh . # 200 MByte
du -sh . # ~200 MByte
git submodule update --init --checkout --depth 1
git submodule update --init --checkout --depth 1
du -sh . # 700 MByte
du -sh . # ~700 MByte


# configure
# configure
Line 44: Line 51:
make menuconfig MENUCONFIG_COLOR=blackbg # blackbg = dark mode
make menuconfig MENUCONFIG_COLOR=blackbg # blackbg = dark mode


# build toolchain for a 64 bit target
# build toolchain for a x86 target
# list all targets: make help
# Note: the i386 toolchain is used for all x86 platforms including x86_64.
make crossgcc-x64 CPUS=$(nproc)
# See https://doc.coreboot.org/tutorial/part1.html
# to list all targets: make help
make crossgcc-i386 CPUS=$(nproc)


# build firmware
# build firmware