stage2-riscv-gnu-toolchain/gcc-6.1.0.tar.gz \
stage2-riscv-gnu-toolchain/glibc-2.23.tar.gz \
stage2-riscv-gnu-toolchain/newlib-2.2.0.tar.gz \
- stamp-riscv-gnu-toolchain-installed
+ stamp-riscv-gnu-toolchain-installed \
+ stage2-riscv-pk/riscv-pk-927979c5.tar.gz \
+ stamp-riscv-pk-installed
stage2-riscv-gnu-toolchain/riscv-gnu-toolchain-1374381e.tar.gz:
rm -f $@ $@-t
}
touch $@
+stage2-riscv-pk/riscv-pk-927979c5.tar.gz:
+ rm -f $@ $@-t
+ wget -O $@-t https://github.com/lowRISC/riscv-pk/archive/927979c5af6a69360b5dd61d3b17cd06ae73d1ac/riscv-pk-927979c5.tar.gz
+ mv $@-t $@
+
+stamp-riscv-pk-installed:
+ rm -f $@
+ @rpm -q riscv-pk >/dev/null || { \
+ echo "ERROR: You must install riscv-pk:"; \
+ echo; \
+ echo " dnf copr enable rjones/riscv"; \
+ echo " dnf install riscv-pk"; \
+ echo; \
+ echo "OR: you can build it yourself from the stage2-riscv-pk directory."; \
+ echo; \
+ exit 1; \
+ }
+ touch $@
+
# Stage 3
stage3:
Not upstream, fork of qemu 2.5.0.
https://github.com/riscv/riscv-qemu
-Status: done http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv-qemu/
+Status: done http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv
Note this package runs on x86-64 hosts, and is intended for people who
want to run Fedora/RISC-V but who do not have FPGA/hardware.
(2a) GNU cross-compiler toolchain.
https://github.com/lowRISC/riscv-gnu-toolchain
+Status: done http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv
(2b) Berkley Bootloader (bbl)
https://github.com/lowrisc/riscv-pk.git
+Status: done http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv
+
Used to boot the kernel and mount the root filesystem on FPGAs and
QEMU.
--- /dev/null
+%global debug_package %{nil}
+
+%global commit 927979c5af6a69360b5dd61d3b17cd06ae73d1ac
+%global shortcommit 927979c5
+
+Name: riscv-pk
+Version: 0
+Release: 0.1.git%{shortcommit}%{?dist}
+Summary: RISC-V proxy kernel (pk) and boot loader (bbl)
+License: BSD
+
+URL: https://github.com/lowRISC/riscv-pk
+Source0: https://github.com/riscv/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
+
+BuildRequires: riscv-gnu-toolchain
+
+
+%description
+This is the RISC-V fork of the GNU cross-compiler toolchain. It
+includes binutils and GCC.
+
+
+%prep
+%setup -q -n %{name}-%{commit}
+
+
+%build
+mkdir build
+pushd build
+# Setting RUN to /bin/true prevents pk from looking for the 'spike'
+# RISC-V cycle-accurate emulator, which would be needed to run tests
+# but we don't care about here.
+../configure --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --host=riscv64-unknown-elf RUN=/bin/true
+
+make
+popd
+
+
+%install
+pushd build
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+
+%files
+%doc README.md LICENSE
+%{_bindir}/bbl
+%{_bindir}/dummy_payload
+%{_bindir}/pk
+%{_includedir}/riscv-pk
+%{_prefix}/lib/riscv-pk
+
+
+%changelog