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

feat(firmware_recipes): Add firmware recipes according to platform #9

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pkgs/firmware/openSBI/openSBI.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
, toolchain
, openssl
, platform
, bao_build
, bash
}:

Expand Down
39 changes: 39 additions & 0 deletions pkgs/firmware/qemu-aarch64-virt.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) Bao Project and Contributors. All rights reserved.
{ pkgs
, stdenv
, fetchFromGitHub
, toolchain
, platform
}:
let
u-boot = pkgs.callPackage ./u-boot/u-boot.nix
{
inherit toolchain;
};

atf = pkgs.callPackage ./atf/atf.nix {
inherit toolchain;
inherit u-boot;
inherit platform;
};
in
stdenv.mkDerivation rec {
pname = "qemu_aarch64_virt";
version = "firmware";

dontUnpack = true;
dontBuild = true;

nativeBuildInputs = [
u-boot
atf
];

installPhase = ''
mkdir -p $out
touch $out/test_derivation.txt
find ${atf} -type f -exec cp {} $out \;
find ${u-boot} -type f -exec cp {} $out \;
'';
}
31 changes: 31 additions & 0 deletions pkgs/firmware/qemu-riscv64-virt.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) Bao Project and Contributors. All rights reserved.
{ pkgs
, stdenv
, fetchFromGitHub
, toolchain
, platform
}:
let
sbi = pkgs.callPackage ./openSBI/openSBI.nix {
inherit toolchain;
inherit platform;
};
in
stdenv.mkDerivation rec {
pname = "qemu_riscv64_virt";
version = "firmware";

dontUnpack = true;
dontBuild = true;

nativeBuildInputs = [
sbi
];

installPhase = ''
mkdir -p $out
touch $out/test_derivation.txt
find ${sbi} -type f -exec cp {} $out \;
'';
}
Loading