Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building across architectures #5

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Commits on Jan 9, 2022

  1. Makefile.inc: Replace hardcoded architecture in initramfs name

    Add an ARCH variable and replace the hardcoded "amd64" with a string
    derived from `uname -m` in order to build non-x86 initramfs images.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    2dcb53c View commit details
    Browse the repository at this point in the history
  2. Makefile.inc: Build coreboot toolchain according to ARCH

    Replace crossgcc-i386 with crossgcc-${ARCH} based on the
    architecture passed in from Makefile.inc.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    62bacea View commit details
    Browse the repository at this point in the history
  3. Makefile.inc: Make VPD support optional

    Make VPD support optional in order to enable builds for more mainboard
    targets. VPD should still be added for production usage, this is
    mostly intended to help get new targets up and running.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    65bd945 View commit details
    Browse the repository at this point in the history
  4. qemu: Patch coreboot buildgcc to build -linux toolchains

    This will be used when cross-compiling Linux kernels.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    70bf6f9 View commit details
    Browse the repository at this point in the history
  5. Use Linux arch in kernel config name

    Linux and `uname` don't always agree on what to call a given
    architecture. This adds a LINUX_ARCH variable that will be used for
    kernel config names and for cross-compilation.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    f03d6f8 View commit details
    Browse the repository at this point in the history
  6. Makefile.inc: Add LINUX_IMAGE_RELATIVE_PATH variable

    Accomodate different paths to the kernel image for various
    architectures.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    9cb801c View commit details
    Browse the repository at this point in the history
  7. qemu: Add ARCH detection in Makefile

    Make the build and qemu invocation more cross-platform friendly.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    f06344c View commit details
    Browse the repository at this point in the history
  8. Makefile.inc: Make Go variables cross-compiler friendly

    GOARCH needs to reflect the target architecture. GOROOT needs to point
    at GOROOT that is compatible with the host.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    abc61a4 View commit details
    Browse the repository at this point in the history
  9. Enable building a toolchain for Linux

    Leverage coreboot's buildgcc to build a suitable Linux toolchain if
    needed.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    cba5ee4 View commit details
    Browse the repository at this point in the history
  10. qemu: Use $(PLATFORM) to determine $(OUT) name

    This is needed due to mismatched machine names used by `uname` and
    qemu-system-*.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    23a775b View commit details
    Browse the repository at this point in the history
  11. qemu: Split out common portions of make run rule

    This will be useful later when we add targets for other architectures.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    085a7d1 View commit details
    Browse the repository at this point in the history
  12. qemu-amd64: update coreboot hash to 4.15

    GCC 8.3.0 seems to have compilation issues, and we may as well update
    to the latest coreboot release anyway.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    f0f8dd0 View commit details
    Browse the repository at this point in the history
  13. qemu: Split kernel-x86_64.config

    This attempts to make a "splitconfig" type of kernel configuration for
    x86_64 so that we only include options that are intentionally enabled.
    Other options will be set to default values by `make olddefconfig`.
    
    Tested by building from scratch and booting to u-root shell using
    qemu-system-x86_64.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    f9fe1af View commit details
    Browse the repository at this point in the history
  14. [notformerge] Make coreboot's buildgcc use a gzip'd gcc tarball

    Decompressing GCC takes a significant amount of time. Gzip can be
    decompressed using multiple threads (buildgcc will use `pigz` if
    available), so this just trades decompression speed and download
    time (download should only occur once anyway).
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    e4b1a7b View commit details
    Browse the repository at this point in the history
  15. WIP: qemu: Add aarch64 targets and config files

    This gives us a target to build. It does not work yet.
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    a698747 View commit details
    Browse the repository at this point in the history
  16. WIP: qemu: Add ppc64le targets and config files

    This gives us a target to build. It does not work yet.
    
    Note: This should use the power9 qemu target for coreboot once it's merged:
      https://review.coreboot.org/c/coreboot/+/57084
    
    Signed-off-by: David Hendricks <david.hendricks@gmail.com>
    dhendrix committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    2f60370 View commit details
    Browse the repository at this point in the history