diff options
| -rw-r--r-- | recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules | 2 | ||||
| -rw-r--r-- | recipes-tools/embedded-hv/hypervisor_git.bb | 79 |
2 files changed, 81 insertions, 0 deletions
diff --git a/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules b/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules new file mode 100644 index 0000000..5edfa11 --- /dev/null +++ b/recipes-tools/embedded-hv/files/81-fsl-embedded-hv.rules | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # Add rule to handle setting up device node for FSL HV mgmt driver | ||
| 2 | SUBSYSTEM=="misc", KERNEL=="fsl-hv", NAME="fsl-hv" | ||
diff --git a/recipes-tools/embedded-hv/hypervisor_git.bb b/recipes-tools/embedded-hv/hypervisor_git.bb new file mode 100644 index 0000000..50697fc --- /dev/null +++ b/recipes-tools/embedded-hv/hypervisor_git.bb | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | DESCRIPTION = "Freescale embedded hypervisor" | ||
| 2 | SECTION = "embedded-hv" | ||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" | ||
| 5 | |||
| 6 | DEPENDS = "u-boot-mkimage-native" | ||
| 7 | |||
| 8 | inherit deploy | ||
| 9 | |||
| 10 | S = "${WORKDIR}/git" | ||
| 11 | SRCREV = "${AUTOREV}" | ||
| 12 | |||
| 13 | # TODO: fix dtc to use the already built package | ||
| 14 | SRC_URI = " \ | ||
| 15 | git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor \ | ||
| 16 | git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig \ | ||
| 17 | git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos \ | ||
| 18 | git://git.freescale.com/ppc/sdk/hypervisor/mux_server.git;name=mux_server;destsuffix=git/mux_server \ | ||
| 19 | git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ | ||
| 20 | file://81-fsl-embedded-hv.rules \ | ||
| 21 | " | ||
| 22 | |||
| 23 | SRCREV_FORMAT="hypervisor" | ||
| 24 | SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" | ||
| 25 | |||
| 26 | EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' | ||
| 27 | |||
| 28 | DEFCONFIG = "defconfig" | ||
| 29 | DEFCONFIG_powerpc64 = "64bit_defconfig" | ||
| 30 | |||
| 31 | do_create_link () { | ||
| 32 | cd ${S}/.. | ||
| 33 | if [ ! -e hv ]; then | ||
| 34 | ln -s ${S} hv | ||
| 35 | fi | ||
| 36 | } | ||
| 37 | addtask create_link before do_compile after do_configure | ||
| 38 | |||
| 39 | inherit cml1 | ||
| 40 | do_configure () { | ||
| 41 | oe_runmake ${DEFCONFIG} | ||
| 42 | } | ||
| 43 | |||
| 44 | do_compile () { | ||
| 45 | oe_runmake | ||
| 46 | oe_runmake partman | ||
| 47 | } | ||
| 48 | |||
| 49 | do_install () { | ||
| 50 | install -d ${D}/${bindir} | ||
| 51 | install ${S}/output/bin/linux/partman ${D}/${bindir}/partman | ||
| 52 | |||
| 53 | install -d ${D}${sysconfdir}/udev/rules.d | ||
| 54 | install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d | ||
| 55 | |||
| 56 | install -d ${D}/boot/hv | ||
| 57 | install ${S}/output/.config ${D}/boot/hv/hypervisor.config | ||
| 58 | install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ | ||
| 59 | ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ | ||
| 60 | ${D}/boot/hv/ | ||
| 61 | } | ||
| 62 | |||
| 63 | do_deploy () { | ||
| 64 | install -d ${DEPLOYDIR}/hv/ | ||
| 65 | install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config | ||
| 66 | install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ | ||
| 67 | ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ | ||
| 68 | ${DEPLOYDIR}/hv/ | ||
| 69 | } | ||
| 70 | addtask deploy before do_build after do_install | ||
| 71 | |||
| 72 | do_deploy_append() { | ||
| 73 | rm -f ${S}/../hv | ||
| 74 | } | ||
| 75 | |||
| 76 | ALLOW_EMPTY_${PN} = "1" | ||
| 77 | PACKAGES_prepend = "${PN}-image ${PN}-partman" | ||
| 78 | FILES_${PN}-image = "/boot/" | ||
| 79 | FILES_${PN}-partman = "${bindir}/partman" | ||
