summaryrefslogtreecommitdiffstats
path: root/common/recipes-bsp/rmc/rmc.bb
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-bsp/rmc/rmc.bb')
-rw-r--r--common/recipes-bsp/rmc/rmc.bb46
1 files changed, 46 insertions, 0 deletions
diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb
new file mode 100644
index 00000000..d8e538b2
--- /dev/null
+++ b/common/recipes-bsp/rmc/rmc.bb
@@ -0,0 +1,46 @@
1SUMMARY = "RMC (Runtime Machine Configuration)"
2
3DESCRIPTION = "RMC project provides a tool and libraries to identify types \
4of hardware boards and access any file-based data specific to the board's \
5type at runtime in a centralized way. Software (clients) can have a generic \
6logic to query board-specific data from RMC without knowing the type of board. \
7This make it possible to have a generic software work running on boards which \
8require any quirks or customizations at a board or product level. \
9"
10
11LICENSE = "MIT"
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=838c366f69b72c5df05c96dff79b35f2"
14
15SRC_URI = "git://git.yoctoproject.org/rmc"
16
17SRCREV = "9bc0f645729bb41e050395fbfac170fca351b3b8"
18
19S = "${WORKDIR}/git"
20
21DEPENDS_class-target = "gnu-efi"
22
23# from gnu-efi, we should align arch-mapping with it.
24def rmc_efi_arch(d):
25 import re
26 arch = d.getVar("TARGET_ARCH", True)
27 if re.match("i[3456789]86", arch):
28 return "ia32"
29 return arch
30
31do_compile_class-target() {
32 oe_runmake
33 oe_runmake RMC_EFI_HEADER_PREFIX=${STAGING_INCDIR}/efi RMC_EFI_ARCH="${@rmc_efi_arch(d)}" -f Makefile.efi
34}
35
36do_install() {
37 oe_runmake RMC_EFI_ARCH="${@rmc_efi_arch(d)}" RMC_INSTALL_PREFIX=${D}/usr install
38 oe_runmake RMC_EFI_ARCH="${@rmc_efi_arch(d)}" RMC_INSTALL_PREFIX=${D}/usr -f Makefile.efi install
39}
40
41do_install_class-native() {
42 install -d ${D}${STAGING_BINDIR_NATIVE}
43 install -m 0755 ${S}/src/rmc ${D}${STAGING_BINDIR_NATIVE}
44}
45
46BBCLASSEXTEND = "native"