Compare commits

...

3 Commits

Author SHA1 Message Date
David Abdurachmanov 6680b0f7fc
Bump for new kernel; Modify CLFAGS
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-09-24 08:36:50 +03:00
David Abdurachmanov eed039ac94
Add missing BR for kernel install to work
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-26 05:56:09 -07:00
David Abdurachmanov 3f05a48204
Update FSBL DTB from upstream kernel
The DTB in upstream kernrel is stable compared to what's in FSBL DTB right now.
It's not worth updating DTB in ZSBL as you cannot use the binary.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-08-26 05:41:55 -07:00
2 changed files with 19 additions and 4 deletions

View File

@ -7,7 +7,7 @@ index b7204ed..c69639e 100644
OBJCOPY=${CROSSCOMPILE}objcopy
OBJDUMP=${CROSSCOMPILE}objdump
-CFLAGS=-I. -O2 -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -mexplicit-relocs
+CFLAGS=-I. -O2 -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -mexplicit-relocs -Wno-main
+CFLAGS=-I. -O2 -ggdb -march=rv64imafdc -mabi=lp64d -Wall -mcmodel=medany -mexplicit-relocs -Wno-main -no-pie -fno-PIE
CCASFLAGS=-I. -mcmodel=medany -mexplicit-relocs
LDFLAGS=-nostdlib -nostartfiles

View File

@ -4,7 +4,7 @@
Name: freedom-u540-c000-bootloader
Version: 2019.08.25.128f282
Release: 1%{?dist}
Release: 3%{?dist}
Summary: SiFive FU540 ZSBL and FSBL
License: Apache-2.0 | GPLv2+
@ -15,12 +15,15 @@ Source0: %{name}-%{version}.tar.xz
Patch0: drop-unneeded-sectiosn-fix-string.patch
# We depend on kernel for a new DTB
BuildRequires: kernel-core
# Needed for kernel to properly install
BuildRequires: systemd-udev
BuildRequires: grubby-deprecated
# Needed to generate version information
BuildRequires: git
# Needed to compile DTB ( ZSBL and FSBL)
BuildRequires: dtc
# We depend on kernel for a new DTB
BuildRequires: kernel-core
BuildRequires: gcc
BuildRequires: binutils
@ -34,6 +37,11 @@ Provides booloaders for SiFive (FU540) HiFive Unleashed board:
%autosetup -p1
%build
# Replace old DTB in FSBL with new one from kernel (upstream)
rm -fv ./fsbl/ux00_fsbl.dts
# We only have 1 kernel installed in buildroot
cp -fv /boot/dtb-*/sifive/hifive-unleashed-a00.dtb ./fsbl/ux00_fsbl.dtb
make CROSSCOMPILE=
%install
@ -46,6 +54,13 @@ install -m 755 fsbl.bin %{buildroot}/boot/freedom-u540-c000-bootloader/unstable/
/boot/freedom-u540-c000-bootloader/unstable/{zsbl,fsbl}.bin
%changelog
* Tue Sep 24 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.08.25.128f282-3
- Bump for new kernel
- Ensure CFLAGS incl. -no-pie -fno-PIE
* Mon Aug 26 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.08.25.128f282-2
- Update FSBL DTB from upstream kernel
* Sun Aug 25 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> 2019.08.25.128f282-1
- Add initial version