aboutsummaryrefslogblamecommitdiffstats
path: root/main/seabios/APKBUILD
blob: 9626e44085244be1e49a3db67b1916719afe71bb (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                   
            
        





                                                                       
                                       


                                                                               

                     







                           
                         



                         
                                  










                                                            
                      









                                                                              
 














                                                           
                      

















                                                                              
                





                                                                          
                



                                                                             
                                                               
                                               

                                                 
                                                     




                                                     
                                                   
                                                    
                                                                                                  
                                                                               

                                                                                 
                                                                                     




                                                                                     
                                                                                   
                                                                                    
                                                                                                                                                                  
                                                                                                                                               

                                                                                                                                                 
                                                                                                                                                     




                                                                                                                                                     
                                                                                                                                                   
                                                                                                                                                    
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=seabios
pkgver=1.9.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"
install=""
subpackages="$pkgname-bin:_seabios seavgabios-bin:_seavgabios"
source="http://code.coreboot.org/p/seabios/downloads/get/seabios-$pkgver.tar.gz
	fix-pie.patch

	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 || 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"
	depends=
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/seabios "$subpkgdir"/usr/share/ || return 1
}

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

md5sums="32201f54c5fb478914d0bb2449b18454  seabios-1.9.2.tar.gz
7e18d418e3e10a4a8c6ab5ae4f205c80  fix-pie.patch
e2e4c8e2bbc9e6250bccb7754e714534  config.coreboot
446b2e19edbd1db3bb30f550ce705838  config.csm
8e2ab836b50e93804098a7dd19023802  config.seabios-128k
3170da5d37660b9bf5792103b3796f26  config.seabios-256k
0958ef6ea9a61af57ad8132400f66386  config.vga.cirrus
4c9895f9c5fe7a2d45bd570afa9a05ee  config.vga.isavga
8c3d5ebdd98f736143ccd4456f79e125  config.vga.qxl
19dcddeb5aa9e8fbdf6975205e867c8e  config.vga.stdvga
7ea773f6b9bf5bdaaac2699403f185b3  config.vga.virtio
c2d2b8d0f7b9024f9d157f8db100fec3  config.vga.vmware"
sha256sums="f01d459b0e50996fdfa021eea5010776c26f739adba73957af519233165ebbe5  seabios-1.9.2.tar.gz
0961d04d80c160fcfe1eb6c051cec8ca1d2c47013cae7a1120a674ac757a0082  fix-pie.patch
562c285883d803b415fc5836367ae919ab34a6d09001a84970f464887a03fe2c  config.coreboot
a046a73392f449f106de918a82c51c99225212d9d253b9011475d0eaa41e6180  config.csm
5e4dbe993d4fd7cf4895e55fda55c65dcf4c86cdfe853e5df05c2c59624490a7  config.seabios-128k
8b14f70d5cf5e9fbe3b81a051149bb6d89e1786bae7fb6e6ed78bbe699a30834  config.seabios-256k
888ad874052d301981a8cc6fa4bc72b1edd14ba937e7de113f71ce3fd2f8c253  config.vga.cirrus
5826ec704d4e4bb57089e0cbb72e7e5ccd31b7192d81084665cd4faeecb60b04  config.vga.isavga
26e43ea5e98615d11573b2619f3fb3c1933d5f810e6a2c44218d99465cc3ae77  config.vga.qxl
ca7367ae57665fa01e0ebb741ba5823d646f4b65a9a87657ea163cc9f362a8a8  config.vga.stdvga
afa7d59e1c18ed770cf0e83e3d5dc70866f75fdde83064fbea6e115f79504066  config.vga.virtio
1bd31f16dd43fb25aa92f9816cbfaae4a19a8faf29ff52bd02429fbaafb78f57  config.vga.vmware"
sha512sums="ffd2db044e4ca42b3de4cea9bc8092840ac8b641169b0a6151b40a732f6f8cfd84a18716f086c36619debb911b95b3bd7f7a7dbdc79cd6b01aaa8ea2a9737325  seabios-1.9.2.tar.gz
bd25bfe842d9eb12052ecbed9f908e0991b743aafaea51a41c5fbf6a9e1ff85aef655fdef2d512a74bfc7dc1af3d7d19b6b6310265db46c27b27f26662602a7f  fix-pie.patch
dc77f693e2426a8a9b084f22d607d9bf6dfd0776cb86373a55d6e02f154f546b6fd616bb981783e914be51eb843311652a90b111fb573e32b3a8207d66aea218  config.coreboot
a2238723fbbb96184bb52b018633701aeb929bfae43f50659258dee854acaf4f1bdf2c201c65fb46d2712372d11ab345eac1c41068f82d6dcbef91ef9d1d39cd  config.csm
fd9e323e2249cb5334ebe5f5e0badc3868edf254c9f8221f99cf1dcb9ef35b738739bc972185013743d1b3629e0f03fd309cee08f005fd280180652e5445550d  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"