Add stage 2 riscv-pk package, containing the Berkeley bootloader (bbl).
[fedora-riscv.git] / stage2-riscv-pk / riscv-pk.spec
1 %global debug_package %{nil}
2
3 %global commit      927979c5af6a69360b5dd61d3b17cd06ae73d1ac
4 %global shortcommit 927979c5
5
6 Name:           riscv-pk
7 Version:        0
8 Release:        0.1.git%{shortcommit}%{?dist}
9 Summary:        RISC-V proxy kernel (pk) and boot loader (bbl)
10 License:        BSD
11
12 URL:            https://github.com/lowRISC/riscv-pk
13 Source0:        https://github.com/riscv/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
14
15 BuildRequires:  riscv-gnu-toolchain
16
17
18 %description
19 This is the RISC-V fork of the GNU cross-compiler toolchain.  It
20 includes binutils and GCC.
21
22
23 %prep
24 %setup -q -n %{name}-%{commit}
25
26
27 %build
28 mkdir build
29 pushd build
30 # Setting RUN to /bin/true prevents pk from looking for the 'spike'
31 # RISC-V cycle-accurate emulator, which would be needed to run tests
32 # but we don't care about here.
33 ../configure --prefix=%{_prefix} \
34              --libdir=%{_libdir} \
35              --host=riscv64-unknown-elf RUN=/bin/true
36
37 make
38 popd
39
40
41 %install
42 pushd build
43 make install DESTDIR=$RPM_BUILD_ROOT
44 popd
45
46
47 %files
48 %doc README.md LICENSE
49 %{_bindir}/bbl
50 %{_bindir}/dummy_payload
51 %{_bindir}/pk
52 %{_includedir}/riscv-pk
53 %{_prefix}/lib/riscv-pk
54
55
56 %changelog