summaryrefslogtreecommitdiff
path: root/recipes/zaurus-utils/zaurus-installer.bb
blob: 16fa43a982f0936397b7e3e0330ca033628fa57b (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
DESCRIPTION = "Installkit for kexecboot-kernel"
DEPENDS = "${@base_conditional('MACHINE', 'collie', 'linux-kexecboot', 'zaurus-updater linux-kexecboot', d)}"
DEPENDS += "${@base_conditional('MACHINE', 'spitz', 'zaurus-legacy-tar', '', d)}"
LICENSE = "zaurus-installer"
PR = "r3"

PACKAGES = ""
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = '(collie|poodle|c7x0|spitz|akita|tosa)'

do_compile() {
}

do_deploy() {

        cd ${DEPLOY_DIR_IMAGE}
        rm -rf ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}/
        mkdir installkit-${MACHINE}/

        [ -f "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin" ] && cp ${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin installkit-${MACHINE}/${KERNEL_IMAGETYPE}

        if [ ! "${MACHINE}" = "collie" ]; then
                cp updater.sh installkit-${MACHINE}/updater.sh
        fi

        if [ "${MACHINE}" = "spitz" ]; then
                cp ${DEPLOY_DIR_IMAGE}/gnu-tar installkit-${MACHINE}/gnu-tar
        fi

        tar czf ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz installkit-${MACHINE}/
        md5sum ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz > ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz.md5
        rm -rf ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}/
}

addtask deploy before do_build after do_compile