summaryrefslogtreecommitdiff
path: root/recipes-core/images/mlinux-firmware-upgrade.inc
blob: c3c7c8d34fbafe4ff4b303ed55062b92a8dcfeb9 (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
# generate mlinux firmware upgrade files

FIRMWARE_UPGRADE_FILE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}-upgrade.bin"

do_firmware () {
    cd ${DEPLOY_DIR_IMAGE}
    rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model

    cp at91bootstrap_pmecc_padded.bin bstrap.bin
    cp u-boot-${MACHINE}.bin uboot.bin
    cp uImage-${MACHINE}.bin uImage.bin
    cp ${IMAGE_BASENAME}-${MACHINE}.jffs2 rootfs.jffs2

    cat bstrap.bin | md5sum > bstrap.bin.md5
    cat uboot.bin | md5sum > uboot.bin.md5
    cat uImage.bin | md5sum > uImage.bin.md5
    cat rootfs.jffs2 | md5sum > rootfs.jffs2.md5

    echo "${MACHINE}" > model

    tar cvf ${FIRMWARE_UPGRADE_FILE_NAME} bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model
    rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model
}

addtask firmware after do_rootfs before do_build