diff options
Diffstat (limited to 'recipes-virtualization/hypervisor')
3 files changed, 133 insertions, 0 deletions
diff --git a/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch b/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch new file mode 100644 index 0000000..a562273 --- /dev/null +++ b/recipes-virtualization/hypervisor/files/0001-fix-sizeof-pointer-memaccess-error.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 59e68351114a65a1f315ded1ee92f4370b8547e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <b28495@freescale.com> | ||
3 | Date: Mon, 8 Jul 2013 17:03:43 +0800 | ||
4 | Subject: [PATCH] fix sizeof-pointer-memaccess error | ||
5 | |||
6 | build: src/livetree.c | ||
7 | .../hypervisor/git-r3/git/src/devtree.c: In function 'read_intmap': | ||
8 | .../hypervisor/git-r3/git/src/devtree.c:1513:25: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] | ||
9 | memset(ent, 0, sizeof(ent)); | ||
10 | ^ | ||
11 | cc1: all warnings being treated as errors | ||
12 | build: src/ipi_doorbell.c | ||
13 | make[1]: *** [bin/devtree.o] Error 1 | ||
14 | make[1]: *** Waiting for unfinished jobs.... | ||
15 | make[1]: Leaving directory `.../hypervisor/git-r3/git/output' | ||
16 | make: *** [all] Error 2 | ||
17 | ERROR: oe_runmake failed | ||
18 | |||
19 | Signed-off-by: Ting Liu <b28495@freescale.com> | ||
20 | --- | ||
21 | src/devtree.c | 2 +- | ||
22 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
23 | |||
24 | diff --git a/src/devtree.c b/src/devtree.c | ||
25 | index f3710e4..3295e20 100644 | ||
26 | --- a/src/devtree.c | ||
27 | +++ b/src/devtree.c | ||
28 | @@ -1510,7 +1510,7 @@ static void read_intmap(dt_node_t *node) | ||
29 | } | ||
30 | |||
31 | if (imap + ent->parent_naddr + ent->parent_nint > imap_end) { | ||
32 | - memset(ent, 0, sizeof(ent)); | ||
33 | + memset(ent, 0, sizeof(intmap_entry_t)); | ||
34 | break; | ||
35 | } | ||
36 | |||
37 | -- | ||
38 | 1.7.5.4 | ||
39 | |||
diff --git a/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules b/recipes-virtualization/hypervisor/files/81-fsl-embedded-hv.rules new file mode 100644 index 0000000..5edfa11 --- /dev/null +++ b/recipes-virtualization/hypervisor/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-virtualization/hypervisor/hypervisor_git.bb b/recipes-virtualization/hypervisor/hypervisor_git.bb new file mode 100644 index 0000000..318c942 --- /dev/null +++ b/recipes-virtualization/hypervisor/hypervisor_git.bb | |||
@@ -0,0 +1,92 @@ | |||
1 | DESCRIPTION = "Freescale embedded hypervisor" | ||
2 | SECTION = "embedded-hv" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://README;endline=22;md5=0655bbc3b7d7166c30c87208b4e23cf0" | ||
5 | |||
6 | PR = "r3" | ||
7 | |||
8 | DEPENDS = "u-boot-mkimage-native" | ||
9 | |||
10 | inherit deploy | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | # TODO: fix dtc to use the already built package | ||
15 | SRC_URI = " \ | ||
16 | git://git.freescale.com/ppc/sdk/hypervisor/hypervisor.git;name=hypervisor;nobranch=1 \ | ||
17 | git://git.freescale.com/ppc/sdk/hypervisor/kconfig.git;name=kconfig;destsuffix=git/kconfig;nobranch=1 \ | ||
18 | git://git.freescale.com/ppc/sdk/hypervisor/libos.git;name=libos;destsuffix=git/libos;nobranch=1 \ | ||
19 | git://www.jdl.com/software/dtc.git;name=dtc;destsuffix=dtc \ | ||
20 | git://git.freescale.com/ppc/sdk/hypertrk.git;name=hypertrk;destsuffix=git/hypertrk;nobranch=1 \ | ||
21 | file://81-fsl-embedded-hv.rules \ | ||
22 | " | ||
23 | |||
24 | SRCREV_FORMAT="hypervisor" | ||
25 | SRCREV = "acbde15272d46a80bcf4a00d7d18ca4a86e49c16" | ||
26 | SRCREV_t2080qds = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" | ||
27 | SRCREV_t2080qds-64b = "2a430ebaa59841fdb49c0c87f8766cc2ef99123b" | ||
28 | SRCREV_kconfig = "a56025d4da992b856796b0eccac2e410d751dbac" | ||
29 | SRCREV_libos = "4691387e15be78d140142104f30b3f356281c46a" | ||
30 | SRCREV_dtc = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" | ||
31 | SRCREV_hypertrk = "975c98b562186afbd3bbf103ae54b96cf9b3e533" | ||
32 | |||
33 | EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"' | ||
34 | |||
35 | DEFCONFIG = "defconfig" | ||
36 | DEFCONFIG_powerpc64 = "64bit_defconfig" | ||
37 | |||
38 | COMPATIBLE_HOST_fslmachine = ".*" | ||
39 | COMPATIBLE_HOST ?= "(none)" | ||
40 | |||
41 | inherit cml1 | ||
42 | do_configure () { | ||
43 | oe_runmake ${DEFCONFIG} | ||
44 | } | ||
45 | |||
46 | PKG_HV_HYPERTRK_SUPPORT = "n" | ||
47 | do_compile () { | ||
48 | if [ "${PKG_HV_HYPERTRK_SUPPORT}" = "y" ] | ||
49 | then | ||
50 | oe_runmake silentoldconfig | ||
51 | export HV_DIR=$PWD | ||
52 | cd hypertrk | ||
53 | oe_runmake deploy | ||
54 | cd .. | ||
55 | fi | ||
56 | |||
57 | oe_runmake | ||
58 | oe_runmake partman | ||
59 | } | ||
60 | |||
61 | do_install () { | ||
62 | install -d ${D}/${bindir} | ||
63 | install ${S}/output/bin/linux/partman ${D}/${bindir}/partman | ||
64 | |||
65 | install -d ${D}${sysconfdir}/udev/rules.d | ||
66 | install -m 0644 ${WORKDIR}/81-fsl-embedded-hv.rules ${D}${sysconfdir}/udev/rules.d | ||
67 | |||
68 | install -d ${D}/boot/hv | ||
69 | install ${S}/output/.config ${D}/boot/hv/hypervisor.config | ||
70 | install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ | ||
71 | ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ | ||
72 | ${D}/boot/hv/ | ||
73 | } | ||
74 | |||
75 | do_deploy () { | ||
76 | install -d ${DEPLOYDIR}/hv/ | ||
77 | install ${S}/output/.config ${DEPLOYDIR}/hv/hypervisor.config | ||
78 | install -m 644 ${S}/output/bin/hv ${S}/output/bin/hv.map \ | ||
79 | ${S}/output/bin/hv.uImage ${S}/output/bin/hv.bin \ | ||
80 | ${DEPLOYDIR}/hv/ | ||
81 | } | ||
82 | addtask deploy before do_build after do_install | ||
83 | |||
84 | do_deploy_append() { | ||
85 | rm -f ${S}/../hv | ||
86 | } | ||
87 | |||
88 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
89 | ALLOW_EMPTY_${PN} = "1" | ||
90 | PACKAGES_prepend = "${PN}-image ${PN}-partman " | ||
91 | FILES_${PN}-image = "/boot/" | ||
92 | FILES_${PN}-partman = "${bindir}/partman" | ||