diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-09-28 17:02:54 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-10-01 09:20:35 +0000 |
commit | 1d7a1b9784aabb69babecf2a47a809cad6c9bb28 (patch) | |
tree | 921ed2344957ce49208e2b0cdcc57c8a670cc756 /meta-fsl-extras | |
parent | 0d7ea04f33c2914a094c38d4810b1d1382d621d8 (diff) | |
download | meta-boot2qt-1d7a1b9784aabb69babecf2a47a809cad6c9bb28.tar.gz |
imx8: adapt to sumo
Use WIC to create the image.
Change-Id: I0413f60f96f2f4d3300dc84fdd2baabcc9bb120d
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'meta-fsl-extras')
5 files changed, 135 insertions, 1 deletions
diff --git a/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx.inc b/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx.inc new file mode 100644 index 0000000..5407a5a --- /dev/null +++ b/meta-fsl-extras/recipes-bsp/firmware-imx/firmware-imx.inc | |||
@@ -0,0 +1,81 @@ | |||
1 | SUMMARY = "Freescale IMX firmware" | ||
2 | DESCRIPTION = "Freescale IMX firmware such as for the VPU" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "Proprietary" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=8cf95184c220e247b9917e7244124c5a" | ||
6 | |||
7 | PE = "1" | ||
8 | |||
9 | #BRCM firmware git | ||
10 | SRCBRANCH ?= "master" | ||
11 | |||
12 | SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \ | ||
13 | git://git.freescale.com/imx/imx-firmware.git;branch=${SRCBRANCH};destsuffix=${S}/git " | ||
14 | |||
15 | inherit fsl-eula-unpack allarch | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${base_libdir}/firmware/imx | ||
19 | install -d ${D}${base_libdir}/firmware/bcm | ||
20 | install -d ${D}${sysconfdir}/firmware | ||
21 | |||
22 | cp -rfv firmware/* ${D}${base_libdir}/firmware/ | ||
23 | |||
24 | #1BW_BCM43340 | ||
25 | install -d ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 | ||
26 | cp -rfv git/brcm/1BW_BCM43340/*.bin ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 | ||
27 | cp -rfv git/brcm/1BW_BCM43340/*.cal ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 | ||
28 | cp -rfv git/brcm/1BW_BCM43340/*.hcd ${D}${sysconfdir}/firmware/ | ||
29 | |||
30 | #1DX_BCM4343W | ||
31 | install -d ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W | ||
32 | cp -rfv git/brcm/1DX_BCM4343W/*.bin ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W | ||
33 | cp -rfv git/brcm/1DX_BCM4343W/*.cal ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W | ||
34 | cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/ | ||
35 | |||
36 | #SN8000_BCM43362 | ||
37 | install -d ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 | ||
38 | cp -rfv git/brcm/SN8000_BCM43362/*.bin ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 | ||
39 | cp -rfv git/brcm/SN8000_BCM43362/*.cal ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 | ||
40 | cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/ | ||
41 | |||
42 | #ZP_BCM4339 | ||
43 | install -d ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 | ||
44 | cp -rfv git/brcm/ZP_BCM4339/*.bin ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 | ||
45 | cp -rfv git/brcm/ZP_BCM4339/*.cal ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 | ||
46 | cp -rfv git/brcm/ZP_BCM4339/*.hcd ${D}${sysconfdir}/firmware/ | ||
47 | |||
48 | mv ${D}${base_libdir}/firmware/epdc/ ${D}${base_libdir}/firmware/imx/epdc/ | ||
49 | mv ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw | ||
50 | |||
51 | find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';' | ||
52 | find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';' | ||
53 | |||
54 | # Remove files not going to be installed | ||
55 | find ${D}${base_libdir}/firmware/ -name '*.mk' -exec rm '{}' ';' | ||
56 | } | ||
57 | |||
58 | python populate_packages_prepend() { | ||
59 | vpudir = bb.data.expand('${base_libdir}/firmware/vpu', d) | ||
60 | do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin', | ||
61 | output_pattern='firmware-imx-vpu-%s', | ||
62 | description='Freescale IMX Firmware %s', | ||
63 | extra_depends='', | ||
64 | prepend=True) | ||
65 | |||
66 | sdmadir = bb.data.expand('${base_libdir}/firmware/sdma', d) | ||
67 | do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin', | ||
68 | output_pattern='firmware-imx-sdma-%s', | ||
69 | description='Freescale IMX Firmware %s', | ||
70 | extra_depends='', | ||
71 | prepend=True) | ||
72 | } | ||
73 | |||
74 | ALLOW_EMPTY_${PN} = "1" | ||
75 | |||
76 | PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*" | ||
77 | |||
78 | PACKAGES =+ "${PN}-epdc ${PN}-brcm" | ||
79 | |||
80 | FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/" | ||
81 | FILES_${PN}-brcm = "${base_libdir}/firmware/bcm/*/*.bin ${base_libdir}/firmware/bcm/*/*.cal ${sysconfdir}/firmware/" | ||
diff --git a/meta-fsl-extras/recipes-bsp/imx-vpu/imx-vpu.inc b/meta-fsl-extras/recipes-bsp/imx-vpu/imx-vpu.inc new file mode 100644 index 0000000..7b33956 --- /dev/null +++ b/meta-fsl-extras/recipes-bsp/imx-vpu/imx-vpu.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | # Copyright (C) 2013-2017 O.S. Systems Software LTDA. | ||
2 | # Copyright (C) 2013 Freescale Semiconductor | ||
3 | # Copyright 2017 NXP | ||
4 | |||
5 | DESCRIPTION = "Freescale VPU library" | ||
6 | LICENSE = "Proprietary" | ||
7 | LIC_FILES_CHKSUM = "file://vpu/EULA.txt;md5=b063366b066c9f10037c59756a9ced54" | ||
8 | DEPENDS = "virtual/kernel" | ||
9 | |||
10 | PROVIDES = "virtual/imxvpu" | ||
11 | |||
12 | inherit fsl-eula-unpack | ||
13 | |||
14 | PLATFORM_mx6 = "IMX6Q" | ||
15 | |||
16 | SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" | ||
17 | |||
18 | do_compile () { | ||
19 | INCLUDE_DIR="-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include" | ||
20 | |||
21 | oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all | ||
22 | } | ||
23 | |||
24 | do_install () { | ||
25 | oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install | ||
26 | } | ||
27 | |||
28 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/meta-fsl-extras/recipes/linux/linux-imx_4.%.bbappend b/meta-fsl-extras/recipes/linux/linux-imx_4.%.bbappend index eb5364d..9b4cc9b 100644 --- a/meta-fsl-extras/recipes/linux/linux-imx_4.%.bbappend +++ b/meta-fsl-extras/recipes/linux/linux-imx_4.%.bbappend | |||
@@ -30,6 +30,9 @@ | |||
30 | # kernel image files are not needed in the image | 30 | # kernel image files are not needed in the image |
31 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" | 31 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" |
32 | 32 | ||
33 | # remove from imx8 kernel build | ||
34 | SRC_URI_remove = " file://Install-dma-buf-h.patch" | ||
35 | |||
33 | do_preconfigure_prepend() { | 36 | do_preconfigure_prepend() { |
34 | # FunctionFS for qdbd | 37 | # FunctionFS for qdbd |
35 | echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig | 38 | echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig |
diff --git a/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend b/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend index 9298747..df39774 100644 --- a/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend +++ b/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend | |||
@@ -1,6 +1,6 @@ | |||
1 | ############################################################################ | 1 | ############################################################################ |
2 | ## | 2 | ## |
3 | ## Copyright (C) 2016 The Qt Company Ltd. | 3 | ## Copyright (C) 2018 The Qt Company Ltd. |
4 | ## Contact: https://www.qt.io/licensing/ | 4 | ## Contact: https://www.qt.io/licensing/ |
5 | ## | 5 | ## |
6 | ## This file is part of the Boot to Qt meta layer. | 6 | ## This file is part of the Boot to Qt meta layer. |
@@ -29,6 +29,9 @@ | |||
29 | 29 | ||
30 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-devicetree" | 30 | RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image ${KERNEL_PACKAGE_NAME}-devicetree" |
31 | 31 | ||
32 | # remove from imx8 kernel build | ||
33 | SRC_URI_remove = " file://Install-dma-buf-h.patch" | ||
34 | |||
32 | do_preconfigure_prepend () { | 35 | do_preconfigure_prepend () { |
33 | # FunctionFS for qdbd | 36 | # FunctionFS for qdbd |
34 | echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig | 37 | echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig |
diff --git a/meta-fsl-extras/wic/imx8-uboot-bootpart.wks b/meta-fsl-extras/wic/imx8-uboot-bootpart.wks new file mode 100644 index 0000000..33de776 --- /dev/null +++ b/meta-fsl-extras/wic/imx8-uboot-bootpart.wks | |||
@@ -0,0 +1,19 @@ | |||
1 | # short-description: Create SD card image with a boot partition | ||
2 | # long-description: | ||
3 | # Create an image that can be written onto a SD card using dd for use | ||
4 | # with i.MX SoC family | ||
5 | # It uses u-boot | ||
6 | # | ||
7 | # The disk layout used is: | ||
8 | # - --------- -------------- -------------- | ||
9 | # | | u-boot | boot | rootfs | | ||
10 | # - --------- -------------- -------------- | ||
11 | # ^ ^ ^ ^ | ||
12 | # | | | | | ||
13 | # 0 33kiB 4MiB 32MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) | ||
14 | # | ||
15 | part u-boot --source rawcopy --sourceparams="file=imx-boot-sd.bin" --ondisk mmcblk --no-table --align 33 | ||
16 | part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 32 | ||
17 | part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 | ||
18 | |||
19 | bootloader --ptable msdos | ||