aboutsummaryrefslogtreecommitdiffstats
path: root/main/seabios/APKBUILD
blob: 7bf2d60c1b48a69e7cab922f957d6ab57c3036c9 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=seabios
pkgver=1.8.1
pkgrel=0
pkgdesc="Open-source legacy BIOS implementation"
url="http://www.coreboot.org/SeaBIOS"
arch="x86 x86_64"
license="LGPLv3"
depends="$pkgname-bin=$pkgver-r$pkgrel seavgabios-bin=$pkgver-r$pkgrel"
depends_dev=""
makedepends="$depends_dev python iasl"
install=""
subpackages="$pkgname-bin:_seabios seavgabios-bin:_seavgabios"
source="http://code.coreboot.org/p/seabios/downloads/get/seabios-$pkgver.tar.gz
	config.coreboot
	config.csm
	config.seabios-128k
	config.seabios-256k
	config.vga.cirrus
	config.vga.isavga
	config.vga.qxl
	config.vga.stdvga
	config.vga.vmware
	"

_debug_level=1
_builddir="$srcdir"/seabios-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

_build_bios() {
	msg "building $3"
	make clean distclean
	cp "$1" .config
	echo "CONFIG_DEBUG_LEVEL=${_debug_level}" >> .config
	make oldnoconfig || return 1
	make $4 || return 1
	cp out/"$2" binaries/"$3"
}

build() {
	cd "$_builddir"
	mkdir binaries || return 1
	# seabois
	_build_bios "$srcdir"/config.csm Csm16.bin bios-csm.bin \
		|| return 1
	_build_bios "$srcdir"/config.coreboot bios.bin.elf bios-coreboot.bin \
		|| return 1
	_build_bios "$srcdir"/config.seabios-128k bios.bin bios.bin \
		|| return 1
	_build_bios "$srcdir"/config.seabios-256k bios.bin bios-256k.bin \
		|| return 1
	
	cp out/src/fw/*dsdt*.aml binaries/ || return 1

	for i in $source; do
		case $i in
		config.vga.*)
			_build_bios "$srcdir"/$i \
				vgabios.bin \
				vgabios-${i##*.}.bin \
				out/vgabios.bin || return 1
			;;
		esac
	done
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/usr/share/seabios \
		"$pkgdir"/usr/share/seavgabios
	for i in binaries/*; do
		case ${i#*/} in
		bios*|*.aml) \
			install -m 0644 "$i" "$pkgdir"/usr/share/seabios/ \
				|| return 1
			;;
		vga*)	
			install -m 0644 "$i" "$pkgdir"/usr/share/seavgabios/ \
				|| return 1
			;;
		esac
	done
}

_seabios() {
	pkgdesc="Seabios for x86"
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/seabios "$subpkgdir"/usr/share/ || return 1
}

_seavgabios() {
	pkgdesc="Seavgabios for x86"
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/seavgabios "$subpkgdir"/usr/share/ || return 1
}

md5sums="581c3c5f19434e7835d893c3b71c47ae  seabios-1.8.1.tar.gz
e2e4c8e2bbc9e6250bccb7754e714534  config.coreboot
446b2e19edbd1db3bb30f550ce705838  config.csm
13126e6f8ebb936e468ede4bb21675a7  config.seabios-128k
3170da5d37660b9bf5792103b3796f26  config.seabios-256k
0958ef6ea9a61af57ad8132400f66386  config.vga.cirrus
4c9895f9c5fe7a2d45bd570afa9a05ee  config.vga.isavga
8c3d5ebdd98f736143ccd4456f79e125  config.vga.qxl
19dcddeb5aa9e8fbdf6975205e867c8e  config.vga.stdvga
c2d2b8d0f7b9024f9d157f8db100fec3  config.vga.vmware"
sha256sums="283bd848f5ce9d4bc52add973a856347e02c9ce89a9e6bc92c99359b87c9871d  seabios-1.8.1.tar.gz
562c285883d803b415fc5836367ae919ab34a6d09001a84970f464887a03fe2c  config.coreboot
a046a73392f449f106de918a82c51c99225212d9d253b9011475d0eaa41e6180  config.csm
e25892b3f9b59f2bd3cd5191f19cd7ee3072788a2c43fe9c9950b0b2bf8c415b  config.seabios-128k
8b14f70d5cf5e9fbe3b81a051149bb6d89e1786bae7fb6e6ed78bbe699a30834  config.seabios-256k
888ad874052d301981a8cc6fa4bc72b1edd14ba937e7de113f71ce3fd2f8c253  config.vga.cirrus
5826ec704d4e4bb57089e0cbb72e7e5ccd31b7192d81084665cd4faeecb60b04  config.vga.isavga
26e43ea5e98615d11573b2619f3fb3c1933d5f810e6a2c44218d99465cc3ae77  config.vga.qxl
ca7367ae57665fa01e0ebb741ba5823d646f4b65a9a87657ea163cc9f362a8a8  config.vga.stdvga
1bd31f16dd43fb25aa92f9816cbfaae4a19a8faf29ff52bd02429fbaafb78f57  config.vga.vmware"
sha512sums="252e360d699d8da8c09dac3b7867c45510a7c99376693dbe87170b91f947ef5e61794088d52bd737dab83332cb6d66192a7c5bb9a59a05471b54481fa92e4f7c  seabios-1.8.1.tar.gz
dc77f693e2426a8a9b084f22d607d9bf6dfd0776cb86373a55d6e02f154f546b6fd616bb981783e914be51eb843311652a90b111fb573e32b3a8207d66aea218  config.coreboot
a2238723fbbb96184bb52b018633701aeb929bfae43f50659258dee854acaf4f1bdf2c201c65fb46d2712372d11ab345eac1c41068f82d6dcbef91ef9d1d39cd  config.csm
7dc04b1dcf7ecd30f7b4d05040f490eb81914a6a7f8997033e0c4903aaaee99cbd5c071631969bf7edd3713c0f3c5d3c9483d973b3cc9b280dcf8bd7866c196e  config.seabios-128k
3d41739944da088edafb3ea298c0d3db59ed638b614c258209a30635caccf86a284f03492612694e3a56f40357743a0a36053e8ec11b7d93853b91ba9e5a502f  config.seabios-256k
e9ef2d6bec9419e69bc90adf1a4bb7c174284cd722e53903deea0411f88074cc247069116e03e124715072ec82f153cf6014168febba41369a2569983d3265b6  config.vga.cirrus
aada61232f4834c1e9bec921b1e1365ce5ecb4adf42c659f34cdf051efb56f0ec2e62f0ccf66bb25d9bb0b8601e2df49b712265f19185068d45353c3aacf1cd9  config.vga.isavga
9ebcb6702cf28685daf1821be26bab8ddc791ef2c118217c984c03c5fb77c8b9691c0fa6931367a63b8d97d67c973cd4b620fe9ca9c76da51a9b2ab3b4b5653b  config.vga.qxl
4a1b7fcc729d78dc8fd4e73d1cb6258ed9d49f8a91e6e00cc184e07c89a304f8d38ef5446d1c4ba5e8e929c82693d82c21526e42992ad6e1a008f39bb7c90448  config.vga.stdvga
2a82f75ca6dbf48546ffa5a756136dd7085855d9411c3b37a74cc53281027b4916cf628dba784bcad915682d94705b5f8116f7a1b7ec6a99d9b2fb3fffba01c0  config.vga.vmware"