[meta-virtualization] [PATCH 4/5] xen: separate the extra steps into their own tasks
Chris Patterson
cjp256 at gmail.com
Mon Jan 25 14:30:59 PST 2016
LGTM, it builds fine, but I'm no expect on addtask usage :)
On Mon, Jan 25, 2016 at 10:29 AM, Doug Goldstein <cardoe at cardoe.com> wrote:
> do_configure() was overloaded with a lot of behaviors that really were
> source code patching so instead make them as extra tasks that happen
> after do_patch() and before do_configure().
>
> Signed-off-by: Doug Goldstein <cardoe at cardoe.com>
> ---
> recipes-extended/xen/xen.inc | 21 ++++++++++++++++++++-
> recipes-extended/xen/xen_4.6.0.bb | 12 ------------
> 2 files changed, 20 insertions(+), 13 deletions(-)
>
> diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
> index 2df7525..3e029ee 100644
> --- a/recipes-extended/xen/xen.inc
> +++ b/recipes-extended/xen/xen.inc
> @@ -729,7 +729,21 @@ python () {
> d.setVar('XSM_ENABLED', '0')
> }
>
> -do_configure() {
> +do_post_patch() {
> + # fixup AS/CC/CCP/etc variable within StdGNU.mk
> + for i in LD CC CPP CXX; do
> + sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk
> + done
> + # fixup environment passing in some makefiles
> + sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile
> +
> + # libsystemd-daemon -> libsystemd for newer systemd versions
> + sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure
> +}
> +
> +addtask post_patch after do_patch before do_configure
> +
> +do_stubs() {
> # no stubs-32.h in our 64-bit sysroot - hack it into tools/include/gnu
> if ! test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-32.h ; then
> if test -f ${STAGING_DIR_TARGET}/usr/include/gnu/stubs-64.h ; then
> @@ -740,6 +754,11 @@ do_configure() {
> echo \#define __stub___kernel_tanl >> ${S}/tools/include/gnu/stubs-32.h
> fi
> fi
> +}
> +
> +addtask stubs after do_patch before do_configure
> +
> +do_configure() {
>
> #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually
> if [ "${XSM_ENABLED}" = "1" ]; then
> diff --git a/recipes-extended/xen/xen_4.6.0.bb b/recipes-extended/xen/xen_4.6.0.bb
> index 92975a0..95570a7 100644
> --- a/recipes-extended/xen/xen_4.6.0.bb
> +++ b/recipes-extended/xen/xen_4.6.0.bb
> @@ -27,18 +27,6 @@ EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin"
> EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom"
> #EXTRA_OEMAKE += "XENGFX_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios.bin"
>
> -do_configure_prepend() {
> - # fixup AS/CC/CCP/etc variable within StdGNU.mk
> - for i in LD CC CPP CXX; do
> - sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk
> - done
> - # fixup environment passing in some makefiles
> - sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile
> -
> - # libsystemd-daemon -> libsystemd for newer systemd versions
> - sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure
> -}
> -
> do_install_append() {
> # fixup default path to qemu-system-i386
> sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons
> --
> 2.4.10
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
More information about the meta-virtualization
mailing list