aboutsummaryrefslogtreecommitdiffstats
path: root/main/seabios/APKBUILD
blob: a0458552d94d15087c2b9d59b9b73a00c240a3bd (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=seabios
pkgver=1.10.2
pkgrel=2
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 python2 iasl"
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.virtio
	config.vga.vmware
	"

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

build() {
	cd "$builddir"
	mkdir binaries
	# seabois
	_build_bios "$srcdir"/config.csm Csm16.bin bios-csm.bin
	_build_bios "$srcdir"/config.coreboot bios.bin.elf bios-coreboot.bin
	_build_bios "$srcdir"/config.seabios-128k bios.bin bios.bin
	_build_bios "$srcdir"/config.seabios-256k bios.bin bios-256k.bin

	cp out/src/fw/*dsdt*.aml binaries/ || true

	for i in $source; do
		case $i in
		config.vga.*)
			_build_bios "$srcdir"/$i \
				vgabios.bin \
				vgabios-${i##*.}.bin \
				out/vgabios.bin
			;;
		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/
			;;
		vga*)	
			install -m 0644 "$i" "$pkgdir"/usr/share/seavgabios/
			;;
		esac
	done
}

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

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

sha512sums="ea8396fe247a3bd16b43ab775cf8e23f139673b94e83f450cadb094cc8117ca7e9ef518162d965209d5ab091c96f70ec5cc8ec8d15b638e06c4c8f7a0e1609dc  seabios-1.10.2.tar.gz
dc77f693e2426a8a9b084f22d607d9bf6dfd0776cb86373a55d6e02f154f546b6fd616bb981783e914be51eb843311652a90b111fb573e32b3a8207d66aea218  config.coreboot
a2238723fbbb96184bb52b018633701aeb929bfae43f50659258dee854acaf4f1bdf2c201c65fb46d2712372d11ab345eac1c41068f82d6dcbef91ef9d1d39cd  config.csm
fe469793e66ecb58e1d839bb7e0b3dca0c893783bbb72eb4f6e5b2afcc3b8fe803700bb71fc3b52d908d53ada8c750a71f73814d1b552420427d4686592f0db5  config.seabios-128k
3d41739944da088edafb3ea298c0d3db59ed638b614c258209a30635caccf86a284f03492612694e3a56f40357743a0a36053e8ec11b7d93853b91ba9e5a502f  config.seabios-256k
e9ef2d6bec9419e69bc90adf1a4bb7c174284cd722e53903deea0411f88074cc247069116e03e124715072ec82f153cf6014168febba41369a2569983d3265b6  config.vga.cirrus
aada61232f4834c1e9bec921b1e1365ce5ecb4adf42c659f34cdf051efb56f0ec2e62f0ccf66bb25d9bb0b8601e2df49b712265f19185068d45353c3aacf1cd9  config.vga.isavga
9ebcb6702cf28685daf1821be26bab8ddc791ef2c118217c984c03c5fb77c8b9691c0fa6931367a63b8d97d67c973cd4b620fe9ca9c76da51a9b2ab3b4b5653b  config.vga.qxl
4a1b7fcc729d78dc8fd4e73d1cb6258ed9d49f8a91e6e00cc184e07c89a304f8d38ef5446d1c4ba5e8e929c82693d82c21526e42992ad6e1a008f39bb7c90448  config.vga.stdvga
4d627be11d79f0b8bd814a49e608826375aba6b59a0189dcba9afe24a181347b92e6ab18e0d9199e2f7a78f8fb02f03dad84c63fbbc2ffe9af76777ef28c5f8a  config.vga.virtio
2a82f75ca6dbf48546ffa5a756136dd7085855d9411c3b37a74cc53281027b4916cf628dba784bcad915682d94705b5f8116f7a1b7ec6a99d9b2fb3fffba01c0  config.vga.vmware"