blob: 025a3e477fb3aed247dc6481fec41109f6270dca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
%global debug_package %{nil}
Name: seabios.git
Version: 1.7.3
Release: 22.b0.g5b63109%{?dist}
Summary: Open-source legacy BIOS implementation - git snapshot
Group: Applications/Emulators
License: LGPLv3
Source0: seabios.git-g5b63109.tar.xz
Source1: descriptor-bios.pl
Source10: config.bios.qemu
Source11: config.bios.qemu-256k
Source12: config.bios.fast
Source15: config.bios.coreboot
Source16: config.bios.csm
Source20: config.vga.stdvga
Source21: config.vga.cirrus
Source22: config.vga.vmware
Source23: config.vga.qxl
Source24: config.vga.virtio
Source25: config.vga.bochs-display
Source26: config.vga.ramfb
Source27: config.vga.ati
BuildRequires: make gcc python
BuildRequires: perl perl-JSON
%description
SeaBIOS is an open-source legacy BIOS implementation which can be used as
a coreboot payload. It implements the standard BIOS calling interfaces
that a typical x86 proprietary BIOS implements.
%package coreboot
Summary: Open-source legacy BIOS implementation - git snapshot
%description coreboot
SeaBIOS build as coreboot payload.
%package csm
Summary: Open-source legacy BIOS implementation - git snapshot
%description csm
SeaBIOS build as CSM for OVMF.
%package -n seavgabios.git
Summary: Open-source VGABIOS implementation - git snapshot
%description -n seavgabios.git
SeaBIOS open-source VGABIOS implementation
%prep
%setup -q -n %{name}
%build
extra="-%{release}-git-snapshot-by-kraxel.org"
function do_build() {
local cfg="$1"
local target="$2"
make distclean
rm -rf out
cp "$cfg" ".config"
yes "" | make oldconfig
rm -f "src/fw/"*.hex
make EXTRAVERSION="$extra"
make EXTRAVERSION="$extra" $target
}
echo "%{version}" > .version
mkdir rpm.bin
mkdir rpm.doc
do_build %{SOURCE10} out/bios.bin
cp out/bios.bin rpm.bin/bios-qemu.bin
cp out/src/fw/*dsdt*.aml rpm.bin/
cp .config rpm.doc/bios-qemu.config
do_build %{SOURCE11} out/bios.bin
cp out/bios.bin rpm.bin/bios-qemu-256k.bin
cp .config rpm.doc/bios-qemu-256k.config
do_build %{SOURCE12} out/bios.bin
cp out/bios.bin rpm.bin/bios-qemu-fast.bin
cp .config rpm.doc/bios-qemu-fast.config
mkdir rpm.core.bin
mkdir rpm.core.doc
do_build %{SOURCE15} out/bios.bin.elf
cp out/bios.bin.elf rpm.core.bin/bios-coreboot.elf
cp out/vgabios.bin rpm.core.bin/vgabios-coreboot.bin
cp .config rpm.core.doc/bios-coreboot.config
mkdir rpm.csm.bin
mkdir rpm.csm.doc
do_build %{SOURCE16} out/bios.bin
cp out/bios.bin rpm.csm.bin/bios-csm.bin
cp .config rpm.csm.doc/bios-csm.config
mkdir rpm.vga.bin
mkdir rpm.vga.doc
for config in %{SOURCE20} %{SOURCE21} \
%{SOURCE22} %{SOURCE23} \
%{SOURCE24} %{SOURCE25} \
%{SOURCE26} %{SOURCE27} \
;do
vga="${config##*.}"
do_build $config out/vgabios.bin
cp out/vgabios.bin rpm.vga.bin/vgabios-$vga.bin
cp .config rpm.vga.doc/vgabios-$vga.config
done
%install
mkdir -p %{buildroot}/usr/share/%{name}
cp rpm.bin/* %{buildroot}/usr/share/%{name}
mkdir -p %{buildroot}/usr/share/%{name}-coreboot
cp rpm.core.bin/* %{buildroot}/usr/share/%{name}-coreboot
mkdir -p %{buildroot}/usr/share/%{name}-csm
cp rpm.csm.bin/* %{buildroot}/usr/share/%{name}-csm
mkdir -p %{buildroot}/usr/share/seavgabios.git
cp rpm.vga.bin/* %{buildroot}/usr/share/seavgabios.git
ln -s bios-qemu.bin %{buildroot}/usr/share/%{name}/bios.bin
ln -s bios-qemu-256k.bin %{buildroot}/usr/share/%{name}/bios-256k.bin
mkdir -p %{buildroot}/usr/share/qemu/firmware
%{SOURCE1} "/usr/share/%{name}/bios-qemu-256k.bin" "SeaBIOS (git master, default)" \
> %{buildroot}/usr/share/qemu/firmware/90-seabios-git-default.json
%{SOURCE1} "/usr/share/%{name}/bios-qemu-fast.bin" "SeaBIOS (git master, fastboot)" \
> %{buildroot}/usr/share/qemu/firmware/90-seabios-git-fastboot.json
%files
%doc rpm.doc/*.config
/usr/share/%{name}
/usr/share/qemu/firmware/*
%files coreboot
%doc rpm.core.doc/*.config
/usr/share/%{name}-coreboot
%files csm
%doc rpm.csm.doc/*.config
/usr/share/%{name}-csm
%files -n seavgabios.git
%doc rpm.vga.doc/*.config
/usr/share/seavgabios.git
%changelog
|