vgabios: upgrade to 0.8a and cleanup recipe

Upgrade to 0.8a.

License checksum updated as the FSF street address changed.

Apply a patch to use the correct host compiler when building biossums,
removing the need for a separate biossums-native recipe.

Don't hardcode /usr/share, use ${datadir}.

Install all found firmware (including the new Banshee BIOS in 0.8a) and
the debug files which were not installed but intended to be packaged.

Remove redundant PR and S assignments, as these are the default values.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Ross Burton 2022-04-29 13:11:35 +01:00 committed by Bruce Ashfield
parent 36433bfef3
commit 8386caefb7
4 changed files with 55 additions and 70 deletions

View File

@ -1,37 +0,0 @@
DESCRIPTION = "biossums tool for building Plex86/Bochs LGPL VGABios"
HOMEPAGE = "http://www.nongnu.org/vgabios/"
LICENSE = "LGPL-2.1-only"
SECTION = "firmware"
LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
SRC_URI = "http://savannah.gnu.org/download/vgabios/vgabios-${PV}.tgz"
SRC_URI[md5sum] = "2c0fe5c0ca08082a9293e3a7b23dc900"
SRC_URI[sha256sum] = "9d24c33d4bfb7831e2069cf3644936a53ef3de21d467872b54ce2ea30881b865"
BBCLASSEXTEND = "native"
FILES:${PN} = "${bindir}/biossums"
S = "${WORKDIR}/vgabios-${PV}"
do_configure() {
# Don't override the compiler or its flags:
sed 's,^CC,DISABLED_CC,' -i Makefile
sed 's,^CFLAGS,DISABLED_CFLAGS,' -i Makefile
sed 's,^LDFLAGS,DISABLED_LDFLAGS,' -i Makefile
# Supply the C flags to the compiler:
sed 's,-o biossums,$(CFLAGS) -o biossums,' -i Makefile
}
do_compile() {
# clean removes binaries distributed with source
oe_runmake clean
oe_runmake biossums
}
do_install() {
mkdir -p "${D}${bindir}"
install -m 0755 biossums "${D}${bindir}"
}

View File

@ -0,0 +1,30 @@
Use the host compiler to build the tools we need at runtime.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@arm.com>
Index: Makefile
===================================================================
--- a/Makefile (revision 298)
+++ b/Makefile (working copy)
@@ -5,6 +5,7 @@
SHELL = /bin/sh
CC = gcc
+HOSTCC = gcc
CFLAGS = -g -O2 -Wall -Wstrict-prototypes
LDFLAGS =
@@ -79,10 +80,10 @@
tar czvf ../$(RELEASE).tgz --exclude .svn -C .. $(RELEASE)/
biossums: biossums.c
- $(CC) -o biossums biossums.c
+ $(HOSTCC) -o biossums biossums.c
vbetables-gen: vbetables-gen.c
- $(CC) -o vbetables-gen vbetables-gen.c
+ $(HOSTCC) -o vbetables-gen vbetables-gen.c
vbetables.h: vbetables-gen
./vbetables-gen > $@

View File

@ -1,33 +0,0 @@
DESCRIPTION = "Plex86/Bochs LGPL VGABios"
HOMEPAGE = "http://www.nongnu.org/vgabios/"
LICENSE = "LGPL-2.1-only"
SECTION = "firmware"
DEPENDS = "dev86-native biossums-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
SRC_URI = "http://savannah.gnu.org/download/vgabios/${BPN}-${PV}.tgz"
SRC_URI[md5sum] = "2c0fe5c0ca08082a9293e3a7b23dc900"
SRC_URI[sha256sum] = "9d24c33d4bfb7831e2069cf3644936a53ef3de21d467872b54ce2ea30881b865"
PR = "r0"
FILES:${PN} = "/usr/share/firmware/${PN}-${PV}*.bin"
FILES:${PN}-dbg = "/usr/share/firmware/${PN}-${PV}*.debug.bin"
S = "${WORKDIR}/${PN}-${PV}"
do_configure() {
# Override to use the native-built biossums tool:
sed 's,./biossums,biossums,' -i Makefile
sed 's,$(CC) -o biossums biossums.c,touch biossums,' -i Makefile
}
do_install() {
install -d ${D}/usr/share/firmware
install -m 0644 VGABIOS-lgpl-latest.bin ${D}/usr/share/firmware/${PN}-${PV}.bin
install -m 0644 VGABIOS-lgpl-latest.cirrus.bin ${D}/usr/share/firmware/${PN}-${PV}.cirrus.bin
}

View File

@ -0,0 +1,25 @@
DESCRIPTION = "Plex86/Bochs LGPL VGABios"
HOMEPAGE = "http://www.nongnu.org/vgabios/"
LICENSE = "LGPL-2.1-only"
SECTION = "firmware"
DEPENDS = "dev86-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=fae731a3adbc92fd8bb1730d1f2455bc"
SRC_URI = "http://savannah.gnu.org/download/vgabios/${BP}.tgz \
file://build-cc.patch"
SRC_URI[sha256sum] = "481042240ef0f1c918780c92a6bb42ad4d3f5d989b29502fa7ee7faf13a041b9"
EXTRA_OEMAKE = "HOSTCC="${BUILD_CC}""
do_install() {
install -d ${D}${datadir}/firmware
for file in VGABIOS*.bin; do
target=$(echo $file | sed s/VGABIOS-lgpl-latest/${BP}/)
install -m0644 $file ${D}${datadir}/firmware/$target
done
}
FILES:${PN} = "${datadir}/firmware/${BP}*.bin"
FILES:${PN}-dbg = "${datadir}/firmware/${BP}*.debug.bin"