nixos-riscv/overlay.nix

39 lines
1.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

final: prev:
# Changes to packages from nixpkgs
{
opensbi = prev.opensbi.overrideAttrs (old: {
makeFlags = old.makeFlags ++ [
# Build OpenSBI without compressed instructions
"PLATFORM_RISCV_ISA=rv64gv"
# Check with: riscv64-unknown-elf-objdump -d -M no-aliases rotate
];
});
# Fix GCC 13 format-overflow warning/error:
# ../src/shared/install.c:444:64: error: %s directive argument is null [-Werror=format-overflow=]
# 444 | err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemd = prev.systemd.overrideAttrs (old: {
CFLAGS = "-Wno-error=format-overflow";
});
qemu = prev.qemu.override { rutabagaSupport = false; };
uboot-custom = prev.ubootQemuRiscv64Smode.override {
extraConfig = ''
CONFIG_CMD_QFW=y
'';
};
opensbi-uboot = prev.opensbi.overrideAttrs (old: {
makeFlags = old.makeFlags ++ [
# Build OpenSBI without compressed instructions
"PLATFORM_RISCV_ISA=rv64gv"
# Check with: riscv64-unknown-elf-objdump -d -M no-aliases rotate
"FW_PAYLOAD_PATH=${final.uboot-custom}/u-boot.bin"
];
});
}