aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/firmware-imx/firmware-imx.inc
blob: ee6a043b90b83172305fcd2b61bddb806d82fe96 (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
SUMMARY = "Freescale IMX firmware"
DESCRIPTION = "Freescale IMX firmware such as for the VPU"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://licenses/vpu/EULA;md5=6469a8514eed615d6bf8c09f41846d8f"

INC_PR = "r5"

SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true"

inherit fsl-eula-unpack

do_install() {
	install -d ${D}/lib/firmware
    cp -rfv firmware/* ${D}/lib/firmware/
    find ${D}/lib/firmware -type f -exec chmod 644 '{}' ';'

    # Remove files not going to be installed
    find ${D}/lib/firmware/ -name Android.mk -exec rm '{}' ';'
    rm ${D}/lib/firmware/LICENCE.atheros_firmware \
       ${D}/lib/firmware/README
}

PACKAGES += "${PN}-ath6k ${PN}-ar3k"

FILES_${PN}-ath6k = "/lib/firmware/ath6k/*"
FILES_${PN}-ar3k  = "/lib/firmware/ar3k/*"

python populate_packages_prepend() {
    vpudir = bb.data.expand('/lib/firmware/vpu', d)
    do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
                      output_pattern='firmware-imx-vpu-%s',
                      description='Freescale IMX Firmware %s',
                      extra_depends='',
                      prepend=True)

    sdmadir = bb.data.expand('/lib/firmware/sdma', d)
    do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
                      output_pattern='firmware-imx-sdma-%s',
                      description='Freescale IMX Firmware %s',
                      extra_depends='',
                      prepend=True)
}

ALLOW_EMPTY_${PN} = "1"

PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*"

PACKAGE_ARCH = "${MACHINE_ARCH}"