/meta-security/recipes-core/coreutils/

ef='/favicon.ico'/>
summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc
blob: fa58c56ec6fe6d2ae2c12e9bbc346956cd867894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Integration type support for multi partition with host and guest image.

require recipes-platform/images/agl-lxc-multiconfig-build.inc

# Install out of tree build image support
OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR ??= ""

OUT_OF_TREE_CONTAINER_IMAGES ??= " \
    agl-ivi-demo-platform \
    agl-ivi-demo-platform-flutter \
    agl-ivi-demo-platform-html5 \
"

OUT_OF_TREE_CONTAINER_CONFIGS ??= " \
    cm-config-agl-qt-ivi-demo \
    cm-config-agl-flutter-ivi-demo \
    cm-config-agl-html5-ivi-demo \
"

CONTAINER_EXCHANGE_DEMO_UI ??= "momiweb momikey"

CONTAINER_MULTI_DEMO ??= " \
    ${OUT_OF_TREE_CONTAINER_CONFIGS} \
    ${CONTAINER_EXCHANGE_DEMO_UI} \
"

# Handle modification of IMAGE_LINK_NAME done by ULCB builds with Kingfisher support
MACHINE_SUFFIX = "${@bb.utils.contains('AGL_FEATURES', 'kingfisher', '-kf', '', d)}"

install_container_images() {
    for c in ${CONTAINER_IMAGES}; do
        config=${c%:*}
        image=${c#*:}
        name=${image#guest-image-}
        rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4"
        src="${TOPDIR}/tmp-${config}/deploy/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4"
        bbnote "Installing ${src}"
        ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4"
    done

    if ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', 'false', 'true', d)}; then
        er=0
        for image in ${OUT_OF_TREE_CONTAINER_IMAGES}; do
            rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4"
            src="${OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR}/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4"
            if [ ! -e ${src} ]; then
                bberror "File not found at ${src}."
                er=1
            else
                bbnote "Installing ${src}"
            fi
            ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4"
        done

        if [ $er -eq 1 ]; then
            bbfatal "AGL Demo IVI images install error.  Please check OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR setting and IVI side build status."
        fi
    fi
}

ROOTFS_POSTPROCESS_COMMAND += "install_container_images; "

IMAGE_INSTALL:append = " \
    ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', '', '${CONTAINER_MULTI_DEMO}', d)} \
"

WKS_FILES:prepend = " \
    ${@oe.utils.conditional('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', '', 'agl-ic-container-noloader.wks ', 'agl-ic-container-noloader-demo.wks ', d)} \
"