aboutsummaryrefslogtreecommitdiff
path: root/recipes-bsp/zaurus-utils/zaurus-installer.bb
blob: 5351ada6c120daea754271571426f31f8a6dafd2 (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
DESCRIPTION = "Installkit for kexecboot-kernel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
DEPENDS = "${@base_conditional('MACHINE', 'collie', 'linux-kexecboot', 'zaurus-updater linux-kexecboot', d)}"
DEPENDS += "${@base_conditional('MACHINE', 'spitz', 'zaurus-legacy-tar', '', d)}"
PR = "r7"

INHIBIT_DEFAULT_DEPS = "1"

do_compile() {
        :
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES = ""

COMPATIBLE_MACHINE = "collie|poodle|c7x0|spitz|akita|tosa"

inherit deploy

addtask deploy before do_populate_sysroot after do_compile

do_deploy() {
        cd ${DEPLOYDIR}
        rm -rf ${DEPLOYDIR}/installkit-${MACHINE}/
        mkdir installkit-${MACHINE}/
        [ -f "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin" ] && cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin installkit-${MACHINE}/${KERNEL_IMAGETYPE}
        if [ ! "${MACHINE}" = "collie" ]; then
                cp ${DEPLOY_DIR_IMAGE}/updater.sh installkit-${MACHINE}/updater.sh
        fi
        if [ "${MACHINE}" = "spitz" ]; then
                cp ${DEPLOY_DIR_IMAGE}/gnu-tar installkit-${MACHINE}/gnu-tar
        fi
        tar czf ${DEPLOYDIR}/installkit-${MACHINE}.tar.gz installkit-${MACHINE}/
        md5sum ${DEPLOYDIR}/installkit-${MACHINE}.tar.gz > ${DEPLOYDIR}/installkit-${MACHINE}.tar.gz.md5
        rm -rf ${DEPLOYDIR}/installkit-${MACHINE}/
}