Skip to contentSkip to conversation

Fix xen-image-minimal build

PATCH New [email protected] 1 participant 5 messages Aug 23, 2017

lore
Share & tools
lore
#0 lore raw

v2 cover Fix xen-image-minimal build

From: Christopher Clark <[email protected]>

Second version of a short series of small patches to enable xen-image-minimal to build to completion with

    MACHINE = "genericx86-64".

v2 changes:
* dropped "PR" variable from new biossums recipe
* updated commit message to explain "make clean" in compile step.
* added code comment to explain "make clean" in compile step.
* added original change info to commit message for SYSLINUX_CFG change

Compile-tested on debian jessie 64-bit with:
BBLAYERS ?= " \
.../poky/meta \
.../poky/meta-poky \
.../poky/meta-yocto-bsp \
.../poky/meta-openembedded/meta-oe \
.../poky/meta-openembedded/meta-networking \
.../poky/meta-openembedded/meta-python \
.../poky/meta-virtualization \
"

Christopher Clark (4):
vgabios : extract biossums tool and build it separately, native
ipxe: fetch using https rather than git protocol
xen : cp long-double-64.h long-double-32.h to fix hvmloader build xen-image-minimal : change SYSLINUXCFG to SYSLINUX_CFG

 recipes-extended/images/xen-image-minimal.bb | 14 +++++------
 recipes-extended/ipxe/ipxe_git.bb            |  2 +-
 recipes-extended/vgabios/biossums_0.7a.bb    | 37 ++++++++++++++++++++++++++++
 recipes-extended/vgabios/vgabios_0.7a.bb     |  6 +++--
 recipes-extended/xen/xen.inc                 |  1 +
 5 files changed, 50 insertions(+), 10 deletions(-)
 create mode 100644 recipes-extended/vgabios/biossums_0.7a.bb
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/4 vgabios : extract biossums tool and build it separately, native

From: Christopher Clark <[email protected]>

The biossums tool is used to generate the vgabios build product.

This patch:
* adds a separate recipe "biossums" for the tool
* makes the vgabios recipe depend upon biossums-native
* makes the vgabios recipe use the native binary rather than a locally built one

The upstream source tarball contains binaries so these are removed before compiling proceeds.

---
v2: updated commit message to explain "clean" in compile step.
also added code comment to explain "clean" in the recipe. removed 'PR' from the recipe.

 recipes-extended/vgabios/biossums_0.7a.bb | 37 +++++++++++++++++++++++++++++++
 recipes-extended/vgabios/vgabios_0.7a.bb  |  6 +++--
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 recipes-extended/vgabios/biossums_0.7a.bb
recipes-extended/vgabios/biossums_0.7a.bb new file +36 -0
new file mode 100644
index 0000000..276d037
@@ -0,0 +1,36 @@
+DESCRIPTION = "biossums tool for building Plex86/Bochs LGPL VGABios"
+HOMEPAGE = "http://www.nongnu.org/vgabios/"
+LICENSE = "LGPLv2.1"
+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
+    # 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}"
+}
recipes-extended/vgabios/vgabios_0.7a.bb +4 -2
index 0ed8bb4..8c89041 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.nongnu.org/vgabios/"
 LICENSE = "LGPLv2.1"
 SECTION = "firmware"
 
-DEPENDS = "dev86-native"
+DEPENDS = "dev86-native biossums-native"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
 
@@ -20,7 +20,9 @@ FILES_${PN}-dbg = "/usr/share/firmware/${PN}-${PV}*.debug.bin"
 S = "${WORKDIR}/${PN}-${PV}"
 
 do_configure() {
-    echo "Skip 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() {
Signature · 1 line
2.1.4
#2 lore raw

PATCH v2 2/4 ipxe: fetch using https rather than git protocol

In reply to [email protected]

From: Christopher Clark <[email protected]>

The git protocol isn't responding at the ipxe fetch source; https is, so use that instead.

---
v2: unchanged

 recipes-extended/ipxe/ipxe_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/ipxe/ipxe_git.bb +1 -1
index d52c567..c0c8a7b 100644
@@ -8,7 +8,7 @@ SRCREV = "8c43891db4eb131d019360ccfb619f235b17eb58"
 PV = "gitr${SRCPV}"
 PR = "r0"
 
-SRC_URI = "git://git.ipxe.org/ipxe.git;protocol=git"
+SRC_URI = "git://git.ipxe.org/ipxe.git;protocol=https"
 
 FILES_${PN} = "/usr/share/firmware/*.rom"
 
Signature · 1 line
2.1.4
#3 lore raw

PATCH v2 3/4 xen : cp long-double-64.h long-double-32.h to fix hvmloader build

In reply to [email protected]

From: Christopher Clark <[email protected]>

Fix the xen build when MACHINE = "genericx86-64" by providing long-double-32.h

Inspired by a similar recent patch to meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb since the contents of the header are minimal:

cp ${STAGING_INCDIR}/bits/long-double-64.h ${STAGING_INCDIR}/bits/long-double-32.h

---
v2: unchanged

 recipes-extended/xen/xen.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-extended/xen/xen.inc +1 -0
index cda737c..b429c81 100644
@@ -912,6 +912,7 @@ do_configure() {
 
     # do configure
     oe_runconf
+    cp ${STAGING_INCDIR}/bits/long-double-64.h ${STAGING_INCDIR}/bits/long-double-32.h
 }
 
 do_compile() {
Signature · 1 line
2.1.4
#4 lore raw

PATCH v2 4/4 xen-image-minimal : change SYSLINUXCFG to SYSLINUX_CFG

In reply to [email protected]

From: Christopher Clark <[email protected]>

The SYSLINUXCFG variable was renamed to SYSLINUX_CFG in poky and openembedded-core with the commits referenced below. This commit makes a corresponding change to fix the build for xen-image-minimal.

git://git.openembedded.org/openembedded-core
commit e38c94d6bf83ed3ca7f046d9503e81b927487bf2
git://git.yoctoproject.org/poky.git
commit bb1c719250cecc8725147cbdd999a9a44a11b549

Author: Robert Yang <[email protected]>
Date: Wed Feb 24 01:23:58 2016 -0800

syslinux.bbclass: make vm and live can be built together

---
v2: no code change but updated the commit message to add
reference to the previous change that made this necessary.

 recipes-extended/images/xen-image-minimal.bb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
recipes-extended/images/xen-image-minimal.bb +7 -7
index b8c2002..94240f6 100644
@@ -50,12 +50,12 @@ SYSLINUX_XEN_ARGS ?= "loglvl=all guest_loglvl=all console=com1,vga com1=115200,8
 SYSLINUX_KERNEL_ARGS ?= "ramdisk_size=32768 root=/dev/ram0 rw console=hvc0 earlyprintk=xen console=tty0 panic=10 LABEL=boot debugshell=5"
 
 build_syslinux_cfg () {
-	echo "ALLOWOPTIONS 1" > ${SYSLINUXCFG}
-	echo "DEFAULT boot" >> ${SYSLINUXCFG}
-	echo "TIMEOUT 10" >> ${SYSLINUXCFG}
-	echo "PROMPT 1" >> ${SYSLINUXCFG}
-	echo "LABEL boot" >> ${SYSLINUXCFG}
-	echo "  KERNEL mboot.c32" >> ${SYSLINUXCFG}
-	echo "  APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUXCFG}
+	echo "ALLOWOPTIONS 1" > ${SYSLINUX_CFG}
+	echo "DEFAULT boot" >> ${SYSLINUX_CFG}
+	echo "TIMEOUT 10" >> ${SYSLINUX_CFG}
+	echo "PROMPT 1" >> ${SYSLINUX_CFG}
+	echo "LABEL boot" >> ${SYSLINUX_CFG}
+	echo "  KERNEL mboot.c32" >> ${SYSLINUX_CFG}
+	echo "  APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUX_CFG}
 }
 
Signature · 1 line
2.1.4