Skip to contentSkip to conversation

do_install(), do_install_append() in qemu.inc

DISCUSSION Robert P. J. Day 2 participants 2 messages Jan 9, 2015

lore
Share & tools
lore
#0 lore raw

just a curiosity ... i notice the following snippet in qemu.inc:

do_install () {
        export STRIP="true"
        autotools_do_install
        install -d ${D}${datadir}/qemu
        install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
}

# The following fragment will create a wrapper for qemu-mips user emulation

# binary in order to work around a segmentation fault issue. Basically, by
# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
# This will trigger a MMU access fault in the virtual CPU. With this change,
# the qemu-mips works fine.
# IMPORTANT: This piece needs to be removed once the root cause is fixed!
do_install_append() {
        if [ -e "${D}/${bindir}/qemu-mips" ]; then
                create_wrapper ${D}/${bindir}/qemu-mips \
                        QEMU_RESERVED_VA=0x0
        fi
}
# END of qemu-mips workaround

it's kind of odd to see both a do_install() and do_install_append()
in the same file. is this workaround still necessary?

BTW, the only reason i tripped over this is that the YP dev manual
discourages one from defining both do_install() and do_install_append() in the same file, so i thought i would do a quick check under poky to see which files were doing just that, and there are a few others. should they be adjusted? it does seem weird to explicitly define do_install() then, immediately, append to it in the same file.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 8 lines · Robert P. J. Day

BTW, the only reason i tripped over this is that the YP dev manual
discourages one from defining both do_install() and do_install_append() in the same file, so i thought i would do a quick check under poky to see which files were doing just that, and there are a few others. should they be adjusted? it does seem weird to explicitly define do_install() then, immediately, append to it in the same file.

It's certainly redundant if not harmful, when I come across instances like that I tend to merge them.

Ross