Compare commits

...

35 Commits

Author SHA1 Message Date
David Abdurachmanov 45c9a4ee18
Rebuild for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-17 12:22:13 +03:00
David Abdurachmanov 1be5ab62c9
Update to v5.0 and rebuild for U-Boot v2019.10
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-09 16:05:04 +03:00
David Abdurachmanov 3f40cd8e06
Bumpv OpenSBI revision
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-30 15:48:45 +03:00
David Abdurachmanov a01ae49a66
Bump Release for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-26 22:58:31 +02:00
David Abdurachmanov 0e55b45b8b
Bump to latest revision
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-24 08:45:33 +03:00
David Abdurachmanov fab442dfed
Do not use U-Boot files to find the latest kernel
We have moved to booti from bootm (wrapped kernel) and thus old
U-Boot scripts and files are no more available. Detect kernel file
and version directly from the filesystem based on modification time.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-30 14:14:01 -07:00
David Abdurachmanov a232dac507
Rebuild for new U-Boot
Removes CONFIG_PREBOOT for SiFive FU540

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-30 11:53:05 -07:00
David Abdurachmanov ac54d009a7
Rebuild for U-Boot 2019.10 RC3
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-27 19:07:31 -07:00
David Abdurachmanov 90bc151ab9
Fix dtbFile
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-26 08:23:54 -07:00
David Abdurachmanov 665a9111d2
Fix changelog dates
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-26 08:13:54 -07:00
David Abdurachmanov 4550d07820
Add DTB for SiFive FU540 from upstream kernel
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-26 06:07:21 -07:00
David Abdurachmanov b650e4e05a
Fix SiFive FU540 build
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-24 23:07:01 -07:00
David Abdurachmanov c969f1972e
Fix version
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-24 15:37:47 -07:00
David Abdurachmanov a43576762c
Add SiFive Unleashed (FU540) payload firmware variant
This also enabled debug messages in OpenSBI via FW_OPTIONS=0x2.

Currently we do not add DTB from the kernel, but that will happen
in next commits.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-24 15:33:06 -07:00
David Abdurachmanov de06b32eae
Package binary firmware for Fedora
For booting on SiFive Unleashed we need to have binary version of
firmware.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-24 09:09:15 -07:00
David Abdurachmanov db60b0dba2
Bump revision
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-23 14:12:18 -07:00
David Abdurachmanov d1cdbba78c
Rebuilt for kernel-5.2.0-0.rc7.git0.1.0.riscv64.fc31
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-07-03 13:09:57 +03:00
David Abdurachmanov a232a01d51
Update to OpenSBI 4.0 commit
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-07-02 14:35:30 +03:00
David Abdurachmanov 278f616e41
Rebuild for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-29 16:30:20 +03:00
David Abdurachmanov 789cb6499f
Rebuild for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-29 11:39:07 +03:00
David Abdurachmanov 3b19419cd3
Rebuild for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-28 17:50:13 +03:00
David Abdurachmanov 63c7712469
Rebuild for new U-Boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-26 10:22:20 +03:00
David Abdurachmanov f641ec9126
Fix OpenSBI packaging (new structure)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-24 12:47:45 +03:00
David Abdurachmanov 1c2e604ea9
Update OpenSBI revision
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-24 11:41:14 +03:00
David Abdurachmanov ed98f94be5
Update revision (new kernel, new U-Boot)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-21 18:57:12 +03:00
David Abdurachmanov 12607f5e81
Update OpenSBI revision and rebuild for kernel-5.1.0-0.rc7.git4.1.1.riscv64.fc31
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-05-06 14:02:10 +03:00
David Abdurachmanov 485e1770b9
Rebuild for kernel-5.1.0-0.rc4.git2.1.1.riscv64.fc31
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-04-14 09:49:19 +02:00
David Abdurachmanov c27534a944
Rebuild for new u-boot with SMP support for RISC-V
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-04-08 16:12:28 +02:00
David Abdurachmanov ce93b31b22
Update revision and bump for new u-boot
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-04-06 16:22:24 +02:00
David Abdurachmanov cffb7f138c Update version and rebuild for new u-boot & kernel
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-04-05 20:39:09 +02:00
David Abdurachmanov c787c0569e
Run file for uboot payload
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-03-30 22:32:52 +01:00
David Abdurachmanov e293bfefcd
Fix typos id directory names
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-03-30 22:29:43 +01:00
David Abdurachmanov 944f2d4691
Fix typo in macro
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-03-30 22:16:10 +01:00
David Abdurachmanov 4415806684
Update SPEC to incl. U-Boot
Use U-Boot klist to find kernel version and file. Add additional build
with QEMU Virt machine (S mode) U-Boot as payload.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-03-30 22:13:23 +01:00
David Abdurachmanov eb25d0f265
Disable documentation for now
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-03-20 22:55:52 +01:00
3 changed files with 177 additions and 28 deletions

Binary file not shown.

View File

@ -3,8 +3,9 @@
Name: opensbi-unstable
# The last part is short hash
Version: 2019.03.20.e921fc2
Release: 1%{?dist}
# Format: <TAG>.<NUMBER_OF_COMMITS_AFTER_TAG>.<YEAR>.<MONTH>.<DAY>.<SHORT_COMMIT>
Version: v0.5.0.2019.10.09.be92da2
Release: 2%{?dist}
Summary: RISC-V Open Source Supervisor Binary Interface
License: BSD
@ -12,8 +13,8 @@ URL: https://github.com/riscv/opensbi
# Download tarball, e.g.:
# https://github.com/riscv/opensbi/archive/%full_commit.tar.gz
%global full_commit e921fc26911bd27cf715483b60c22920812aab21
Source0: https://github.com/riscv/riscv-pk/archive/%{full_commit}.tar.gz
%global full_commit be92da280d87c38a2e0adc5d3f43bab7b5468f09
Source0: https://github.com/riscv/opensbi/archive/%{full_commit}.tar.gz
BuildRequires: systemd-udev
BuildRequires: grubby-deprecated
@ -26,11 +27,14 @@ BuildRequires: kernel-core
BuildRequires: make
BuildRequires: dtc
BuildRequires: gzip
BuildRequires: file
# U-Boot binary builds for all platforms
BuildRequires: uboot-images-riscv64
# For docs
BuildRequires: doxygen
BuildRequires: doxygen-latex
BuildRequires: doxygen-doxywizard
BuildRequires: graphviz
#BuildRequires: doxygen
#BuildRequires: doxygen-latex
#BuildRequires: doxygen-doxywizard
#BuildRequires: graphviz
%description
@ -68,30 +72,69 @@ Summary: OpenSBI QEMU virt machine firmware with Fedora kernel embedded
OpenSBI QEMU virt machine firmware with Fedora kernel embedded as payload.
%package images-riscv64
Summary: OpenSBI firmware binaries with Fedora U-Boot embedded
%description images-riscv64
OpenSBI firmware images for all supported platforms with embedded Fedora
U-Boot bootloader.
%prep
%autosetup -n opensbi-%{full_commit}
%build
# Find Fedora kernel image in /boot
vmlinuz=$(find /boot | grep vmlinuz | grep -v -E '(rescue|hmac)')
if [[ "$vmlinuz" = *$'\n'* ]]; then
echo "We expected to find a single file!"
exit 1
fi
mkdir -p fedora-builds/{kernel,uboot-qemu-virt,uboot-sifive-fu540}
for build in kernel uboot-qemu-virt uboot-sifive-fu540; do
cp -r $(ls -1 | grep -v fedora-builds) "fedora-builds/$build"
done
echo "Payload: $vmlinuz"
# BUILD: kernel
pushd fedora-builds/kernel
cp "$vmlinuz" Image.gz
gunzip Image.gz
latestKernel=$(ls -1t /lib/modules/*/vmlinuz | head -n1)
make PLATFORM=qemu/virt FW_PAYLOAD_PATH="$PWD/Image"
make docs
file "$latestKernel"
echo "Payload: $latestKernel"
make PLATFORM=qemu/virt FW_PAYLOAD_PATH="$latestKernel"
#make docs
# BUILD: kernel
popd
# BUILD: uboot-qemu-virt
pushd fedora-builds/uboot-qemu-virt
ubootFile=/usr/share/uboot/qemu-riscv64_smode/u-boot.bin
file $ubootFile
make PLATFORM=qemu/virt FW_OPTIONS=0x2 FW_PAYLOAD_PATH="$ubootFile"
# BUILD: uboot-qemu-virt
popd
# BUILD: uboot-sifive-fu540
pushd fedora-builds/uboot-sifive-fu540
ubootFile=/usr/share/uboot/sifive_fu540/u-boot.bin
# We only have one kernel installed in buildroot
dtbFile=$(echo /boot/dtb-*/sifive/hifive-unleashed-a00.dtb)
#dtbFile=$(find /boot/dtb-*/sifive -type f -name hifive-unleashed-a00.dtb -print -quit 2>/dev/null)
file $ubootFile
file $dtbFile
make PLATFORM=sifive/fu540 FW_OPTIONS=0x2 FW_PAYLOAD_PATH="$ubootFile" FW_PAYLOAD_FDT_PATH="$dtbFile"
# BUILD: uboot-sifive-fu540
popd
%install
# BUILD: kernel
pushd fedora-builds/kernel
make PLATFORM=qemu/virt I=%{buildroot} install
make I=%{buildroot} install_docs
#make I=%{buildroot} install_docs
mkdir -p %{buildroot}%{_usr}
mv %{buildroot}/lib %{buildroot}%{_libdir}
@ -100,19 +143,42 @@ mv %{buildroot}/include %{buildroot}%{_usr}/
mkdir -p %{buildroot}%{_datadir}/%{name}
mv %{buildroot}/platform %{buildroot}%{_datadir}/%{name}/
mkdir -p %{buildroot}%{_pkgdocdir}
mv %{buildroot}/docs/refman.pdf %{buildroot}%{_pkgdocdir}/
rm -rf %{buildroot}/docs
#mkdir -p %{buildroot}%{_pkgdocdir}
#mv %{buildroot}/docs/refman.pdf %{buildroot}%{_pkgdocdir}/
#rm -rf %{buildroot}/docs
# Find Fedora kernel image in /boot and extract version
vmlinuz=$(find /boot | grep vmlinuz | grep -v -E '(rescue|hmac)')
vmlinuz_version=$(echo "$vmlinuz" | cut -d'-' -f2-)
latestKernelVersion=$(ls -1t /lib/modules/*/vmlinuz | head -n1 | cut -d'/' -f4)
mkdir -p %{buildroot}/boot/opensbi/unstable
cp build/platform/qemu/virt/firmware/fw_jump.elf \
%{buildroot}/boot/opensbi/unstable/fw_jump.elf
cp build/platform/qemu/virt/firmware/fw_payload.elf \
%{buildroot}/boot/opensbi/unstable/fw_payload-${vmlinuz_version}.elf
%{buildroot}/boot/opensbi/unstable/fw_payload-${latestKernelVersion}.elf
# BUILD: kernel
popd
# BUILD: uboot-qemu-virt
pushd fedora-builds/uboot-qemu-virt
cp build/platform/qemu/virt/firmware/fw_payload.elf \
%{buildroot}/boot/opensbi/unstable/fw_payload-uboot-qemu-virt-smode.elf
cp build/platform/qemu/virt/firmware/fw_payload.bin \
%{buildroot}/boot/opensbi/unstable/fw_payload-uboot-qemu-virt-smode.bin
# BUILD: uboot-qemu-virt
popd
# BUILD: uboot-sifive-fu540
pushd fedora-builds/uboot-sifive-fu540
cp build/platform/sifive/fu540/firmware/fw_payload.elf \
%{buildroot}/boot/opensbi/unstable/fw_payload-uboot-sifive-fu540.elf
cp build/platform/sifive/fu540/firmware/fw_payload.bin \
%{buildroot}/boot/opensbi/unstable/fw_payload-uboot-sifive-fu540.bin
# BUILD: uboot-sifive-fu540
popd
%files
@ -122,15 +188,98 @@ cp build/platform/qemu/virt/firmware/fw_payload.elf \
%files fedora
/boot/opensbi/unstable/fw_payload-*.elf
%exclude /boot/opensbi/unstable/fw_payload-uboot-qemu-virt-smode.elf
%files libsbi-devel
%doc %{_pkgdocdir}/refman.pdf
#%%doc %%{_pkgdocdir}/refman.pdf
%{_prefix}/include/sbi/*
%{_prefix}/include/sbi_utils/*
%{_libdir}/libsbi.a
%{_libdir}/libsbiutils.a
%files platform-virt
%{_datadir}/%{name}
%files images-riscv64
/boot/opensbi/unstable/fw_payload-uboot-qemu-virt-smode.{bin,elf}
/boot/opensbi/unstable/fw_payload-uboot-sifive-fu540.{bin,elf}
%changelog
* Thu Oct 17 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.5.0.2019.10.09.be92da2-2
- Rebuild for new U-Boot
* Wed Oct 09 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.5.0.2019.10.09.be92da2-1
- Update to the official v0.5 OpenSBI
- Rebuild for the official U-Boot v2019.10
* Mon Sep 30 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.42.2019.09.30.1e9f888-1
- Bump OpenSBI revision
* Thu Sep 26 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.32.2019.09.24.98ee15c-2
- Bump Release for new U-Boot
* Fri Aug 30 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.32.2019.09.24.98ee15c-1
- Bump OpenSBI to latest revision
* Fri Aug 30 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.22.2019.08.24.3cbb419-4
- Rebuild for new U-Boot
* Tue Aug 27 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.22.2019.08.24.3cbb419-3
- Rebuild for U-Boot 2019.10 RC3
* Mon Aug 26 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.22.2019.08.24.3cbb419-2
- Add DTB for SiFive FU540 from upstream kernel
* Sat Aug 24 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4.22.2019.08.24.3cbb419-1
- Add SiFive Unleashed (FU540) U-Boot payload firmware variant
* Fri Aug 23 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> v0.4-22-g3cbb419-0
- Update OpenSBI to incl. fixes for TLB flush
* Wed Jul 03 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.07.03.ce228ee-1
- Rebuilt for kernel-5.2.0-0.rc7.git0.1.0.riscv64.fc31
* Tue Jul 02 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.07.02.ce228ee-0
- Update to OpenSBI 4.0 commit
- Might improve situation where not all cores come online if QEMU instance is
configured with more than 2 cores
* Sat Jun 29 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.24.65aa587-5
- Rebuild for new U-Boot
* Sat Jun 29 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.24.65aa587-4
- Rebuild for new U-Boot
* Fri Jun 28 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.24.65aa587-3
- Rebuild for new U-Boot
* Wed Jun 26 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.24.65aa587-2
- Rebuild for new U-Boot
* Mon Jun 24 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.24.65aa587-1
- Update OpenSBI revision
* Fri Jun 21 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.06.21.cd2dfdc-1
- Update OpenSBI revision (new kernel, new U-Boot)
* Mon May 06 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.05.06.243a5e0-1
- Update OpenSBI revision and rebuild for kernel-5.1.0-0.rc7.git4.1.1.riscv64.fc31
* Sun Apr 14 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.04.05.40086da-3
- Rebuild for kernel-5.1.0-0.rc4.git2.1.1.riscv64.fc31
* Mon Apr 08 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.04.05.40086da-2
- Rebuild for new uboot (SMP support)
* Fri Apr 05 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.04.05.40086da-1
- Update revision and rebuild for new u-boot
* Fri Apr 05 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.04.05.09f9768-1
- Update version and bump for new u-boot & kernel
* Sat Mar 30 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.03.30.f9cfe30-1
- Change the way we find kernel
- Add a QEMU Virt machine build with U-Boot
* Wed Mar 20 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> 2019.03.20.e921fc2-1
- Initial version