hardknott: firmware-imx: sync with meta-imx hardknott-5.10.72-2.2.0 branch
Update the recipes to v8.14. NXP changed the mechanism used to load the sdma and regulatory firmware (they now use firmwared), so remove our ccimx8mm sdma fw service for now and see if we need a similar workaround with the new mechanism. Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
d62d022375
commit
3c6c9b82a3
|
|
@ -1,15 +0,0 @@
|
|||
# The SDMA firmware needs to be loaded in order for the kernel to carry out
|
||||
# SPI tranfers with DMA. Such transfers are required when probing the mcp25xxfd
|
||||
# module, so make sure the firmware is loaded before the module is by adding
|
||||
# the appropriate dependencies in this service.
|
||||
|
||||
[Unit]
|
||||
Description=User Space SDMA Firmware Loading
|
||||
Before=systemd-modules-load.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/sdma
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# firmware loader script
|
||||
|
||||
MX7_EPDC="/sys/bus/platform/devices/*/firmware/imx!epdc!epdc_ED060XH2C1.fw"
|
||||
|
||||
if [ 0 -lt $(ls $MX7_EPDC 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX7_EPDC}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/epdc/epdc_ED060XH2C1.fw > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=User Space Epdc Firmware Loading
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/epdc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# firmware loader script
|
||||
|
||||
MX8_HDMITX="/sys/bus/platform/devices/*/firmware/hdmitxfw.bin"
|
||||
MX8_HDMIRX="/sys/bus/platform/devices/*/firmware/hdmirxfw.bin"
|
||||
MX8_HDMIDP="/sys/bus/platform/devices/*/firmware/dpfw.bin"
|
||||
|
||||
if [ 0 -lt $(ls $MX8_HDMITX 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX8_HDMITX}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/hdmi/hdmitxfw.bin > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
||||
if [ 0 -lt $(ls $MX8_HDMIRX 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX8_HDMIRX}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/hdmi/hdmirxfw.bin > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
||||
if [ 0 -lt $(ls $MX8_HDMIDP 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX8_HDMIDP}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/hdmi/dpfw.bin > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=User Space HDMI Firmware Loading
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/hdmi
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# firmware loader script
|
||||
|
||||
MX8MM_REGULATORY="/sys/bus/platform/devices/regulatory.0/firmware/regulatory.db"
|
||||
|
||||
if [ 0 -lt $(ls $MX8MM_REGULATORY 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX8MM_REGULATORY}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/regulatory.db > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=User Space Regulatory Firmware Loading
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/regulatory
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# firmware loader script
|
||||
|
||||
MX6_SDMA="/sys/bus/platform/devices/*/firmware/imx!sdma!sdma-imx6q.bin"
|
||||
MX7_SDMA="/sys/bus/platform/devices/*/firmware/imx!sdma!sdma-imx7d.bin"
|
||||
|
||||
if [ 0 -lt $(ls $MX6_SDMA 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX6_SDMA}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/sdma/sdma-imx6q.bin > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
||||
if [ 0 -lt $(ls $MX7_SDMA 2>/dev/null | wc -w) ]; then
|
||||
cd ${MX7_SDMA}
|
||||
echo 1 > loading
|
||||
cat /lib/firmware/imx/sdma/sdma-imx7d.bin > data
|
||||
echo 0 > loading
|
||||
fi
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=User Space SDMA Firmware Loading
|
||||
|
||||
[Service]
|
||||
ExecStart=/etc/sdma
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
# Copyright (C) 2012-2016 Freescale Semiconductor
|
||||
# Copyright 2017-2020 NXP
|
||||
# Copyright 2017-2021 NXP
|
||||
# Copyright (C) 2018 O.S. Systems Software LTDA.
|
||||
SECTION = "base"
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a632fefd1c359980434f9389833cab3a"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=03bcadc8dc0a788f66ca9e2b89f56c6f"
|
||||
|
||||
SRC_URI = " \
|
||||
${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "663942fabdf8808c2aa9cfbd21c48cc2"
|
||||
SRC_URI[sha256sum] = "1a7aaab69cd8c48d10ffb0118c938f4b3daf4c7fd86f0342f4d352906f8e0ecb"
|
||||
SRC_URI[md5sum] = "3357c84e48fdc220984a9642d1e808f6"
|
||||
SRC_URI[sha256sum] = "bfe9c57857e8442e7eb26ba3e1020733b09a7c9b83952ad4822980546c58a7f4"
|
||||
|
||||
S = "${WORKDIR}/firmware-imx-${PV}"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2018-2020 NXP
|
||||
# Copyright 2018-2021 NXP
|
||||
SUMMARY = "Freescale i.MX firmware for 8 family"
|
||||
DESCRIPTION = "Freescale i.MX firmware for 8 family"
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 2018-2020 NXP
|
||||
# Copyright 2018-2021 NXP
|
||||
SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family"
|
||||
DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family"
|
||||
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
# Copyright (C) 2012-2016 Freescale Semiconductor
|
||||
# Copyright 2017-2020 NXP
|
||||
# Copyright (C) 2018 O.S. Systems Software LTDA.
|
||||
SUMMARY = "Freescale i.MX firmware"
|
||||
DESCRIPTION = "Freescale i.MX firmware such as for the VPU"
|
||||
|
||||
require firmware-imx-${PV}.inc
|
||||
|
||||
SRC_URI_append = " \
|
||||
file://sdma \
|
||||
file://epdc \
|
||||
file://regulatory \
|
||||
file://hdmi \
|
||||
file://sdma-firmware.service \
|
||||
"
|
||||
|
||||
PE = "1"
|
||||
|
||||
inherit allarch systemd
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-sdma"
|
||||
SYSTEMD_SERVICE_${PN}-sdma = "sdma-firmware.service"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${base_libdir}/firmware/imx
|
||||
|
||||
# Install loading scripts
|
||||
install -d ${D}${sysconfdir}
|
||||
install -m 0755 ${WORKDIR}/sdma ${D}${sysconfdir}
|
||||
install -m 0755 ${WORKDIR}/epdc ${D}${sysconfdir}
|
||||
install -m 0755 ${WORKDIR}/regulatory ${D}${sysconfdir}
|
||||
install -m 0755 ${WORKDIR}/hdmi ${D}${sysconfdir}
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
# Install SDMA systemd service
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/sdma-firmware.service ${D}${systemd_system_unitdir}
|
||||
fi
|
||||
|
||||
cd firmware
|
||||
for d in *; do
|
||||
case $d in
|
||||
ddr|seco)
|
||||
# These folders are for i.MX 8 and are included in the boot image via imx-boot
|
||||
bbnote Excluding folder $d
|
||||
;;
|
||||
*)
|
||||
cp -rfv $d ${D}${base_libdir}/firmware
|
||||
;;
|
||||
esac
|
||||
done
|
||||
cd -
|
||||
|
||||
# Install SDMA Firmware: sdma-imx6q.bin & sdma-imx7d.bin into lib/firmware/imx/sdma
|
||||
install -d ${D}${base_libdir}/firmware/imx/sdma
|
||||
mv ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
|
||||
mv ${D}${base_libdir}/firmware/sdma/sdma-imx7d.bin ${D}${base_libdir}/firmware/imx/sdma
|
||||
|
||||
mv ${D}${base_libdir}/firmware/epdc/ ${D}${base_libdir}/firmware/imx/epdc/
|
||||
mv ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw
|
||||
|
||||
mv ${D}${base_libdir}/firmware/easrc/ ${D}${base_libdir}/firmware/imx/easrc/
|
||||
|
||||
mv ${D}${base_libdir}/firmware/xcvr/ ${D}${base_libdir}/firmware/imx/xcvr/
|
||||
|
||||
mv ${D}${base_libdir}/firmware/xuvi/ ${D}${base_libdir}/firmware/imx/xuvi/
|
||||
|
||||
# Install HDMI Firmware: hdmitxfw.bin, hdmirxfw.bin & dpfw.bin into lib/firmware/imx/hdmi
|
||||
install -d ${D}${base_libdir}/firmware/imx/hdmi
|
||||
mv ${D}${base_libdir}/firmware/hdmi/cadence/hdmitxfw.bin ${D}${base_libdir}/firmware/imx/hdmi
|
||||
mv ${D}${base_libdir}/firmware/hdmi/cadence/hdmirxfw.bin ${D}${base_libdir}/firmware/imx/hdmi
|
||||
mv ${D}${base_libdir}/firmware/hdmi/cadence/dpfw.bin ${D}${base_libdir}/firmware/imx/hdmi
|
||||
|
||||
find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';'
|
||||
find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';'
|
||||
|
||||
# Remove files not going to be installed
|
||||
find ${D}${base_libdir}/firmware/ -name '*.mk' -exec rm '{}' ';'
|
||||
rm -rf ${D}${base_libdir}/firmware/hdmi
|
||||
}
|
||||
|
||||
python populate_packages_prepend() {
|
||||
vpudir = bb.data.expand('${base_libdir}/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('${base_libdir}/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-*"
|
||||
|
||||
PACKAGES =+ "${PN}-epdc ${PN}-sdma ${PN}-easrc ${PN}-regulatory ${PN}-hdmi ${PN}-xcvr ${PN}-xuvi"
|
||||
|
||||
FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/ ${sysconfdir}/epdc"
|
||||
FILES_${PN}-sdma = "${base_libdir}/firmware/imx/sdma ${sysconfdir}/sdma ${systemd_system_unitdir}/sdma-firmware.service"
|
||||
FILES_${PN}-easrc = "${base_libdir}/firmware/imx/easrc/"
|
||||
FILES_${PN}-regulatory = "${sysconfdir}/regulatory"
|
||||
FILES_${PN}-hdmi = "${base_libdir}/firmware/imx/hdmi/ ${sysconfdir}/hdmi"
|
||||
FILES_${PN}-xcvr = "${base_libdir}/firmware/imx/xcvr/"
|
||||
FILES_${PN}-xuvi = "${base_libdir}/firmware/imx/xuvi/"
|
||||
|
||||
COMPATIBLE_MACHINE = "(imx)"
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
# Copyright (C) 2012-2016 Freescale Semiconductor
|
||||
# Copyright 2017-2020 NXP
|
||||
# Copyright (C) 2018 O.S. Systems Software LTDA.
|
||||
SUMMARY = "Freescale i.MX firmware"
|
||||
DESCRIPTION = "Freescale i.MX firmware such as for the VPU"
|
||||
|
||||
require firmware-imx-${PV}.inc
|
||||
|
||||
PE = "1"
|
||||
|
||||
inherit allarch
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx
|
||||
|
||||
# SDMA Firmware section
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/sdma
|
||||
install -m 0644 ${S}/firmware/sdma/* ${D}${nonarch_base_libdir}/firmware/imx/sdma
|
||||
|
||||
# EASRC Firmware section
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/easrc
|
||||
install -m 0644 ${S}/firmware/easrc/* ${D}${nonarch_base_libdir}/firmware/imx/easrc/
|
||||
|
||||
# XCVR Firmware section
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/xcvr
|
||||
install -m 0644 ${S}/firmware/xcvr/* ${D}${nonarch_base_libdir}/firmware/imx/xcvr/
|
||||
|
||||
# XUVI Firmware section
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/xuvi
|
||||
install -m 0644 ${S}/firmware/xuvi/* ${D}${nonarch_base_libdir}/firmware/imx/xuvi/
|
||||
|
||||
# EPDC Firmware section
|
||||
# NOTE:
|
||||
# epdc_ED060XH2C1.fw file has .nonrestricted suffix in the source archive, hence it should
|
||||
# be installed with a different name
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/imx/epdc
|
||||
install -m 0644 ${S}/firmware/epdc/*.fw ${D}${nonarch_base_libdir}/firmware/imx/epdc/
|
||||
install -m 0644 ${S}/firmware/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${nonarch_base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw
|
||||
|
||||
# HDMI Firmware section
|
||||
# NOTE:
|
||||
# Only install pre-defined list of firmware files, since the source archive contains
|
||||
# also HDMI binary files for imx8m derivatives, which are taken care of by another recipe
|
||||
install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${D}${nonarch_base_libdir}/firmware
|
||||
install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${D}${nonarch_base_libdir}/firmware
|
||||
install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${D}${nonarch_base_libdir}/firmware
|
||||
|
||||
# VPU Firmware section
|
||||
# NOTE:
|
||||
# Do the same thing as above for HDMI - only install a pre-defined list of firmware files,
|
||||
# as some of other files are provided by packages from other recipes.
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/vpu
|
||||
install -m 0644 ${S}/firmware/vpu/vpu_fw_imx*.bin ${D}${nonarch_base_libdir}/firmware/vpu
|
||||
}
|
||||
|
||||
#
|
||||
# This prepend is here to produce separate packages containing firmware,
|
||||
# which could be included separately based on the machine definition.
|
||||
#
|
||||
# It operates similar to the FILES mechanism by travesing through
|
||||
# ${D} + folder supplied as a first parameter, matches the regexp supplied
|
||||
# as second one, and for every file match - it creates a separate package,
|
||||
# which contains only files that matches the pattern.
|
||||
#
|
||||
python populate_packages_prepend() {
|
||||
easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d)
|
||||
do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin',
|
||||
output_pattern='firmware-imx-easrc-%s',
|
||||
description='Freescale IMX EASRC Firmware [%s]',
|
||||
extra_depends='',
|
||||
prepend=True)
|
||||
|
||||
vpudir = bb.data.expand('${nonarch_base_libdir}/firmware/vpu', d)
|
||||
do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
|
||||
output_pattern='firmware-imx-vpu-%s',
|
||||
description='Freescale IMX VPU Firmware [%s]',
|
||||
extra_depends='',
|
||||
prepend=True)
|
||||
|
||||
sdmadir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/sdma', d)
|
||||
do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
|
||||
output_pattern='firmware-imx-sdma-%s',
|
||||
description='Freescale IMX SDMA Firmware [%s]',
|
||||
extra_depends='',
|
||||
prepend=True)
|
||||
|
||||
xcvrdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xcvr', d)
|
||||
do_split_packages(d, xcvrdir, '^xcvr-([^_]*).*\.bin',
|
||||
output_pattern='firmware-imx-xcvr-%s',
|
||||
description='Freescale IMX XCVR Firmware [%s]',
|
||||
extra_depends='',
|
||||
prepend=True)
|
||||
|
||||
xuvidir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xuvi', d)
|
||||
do_split_packages(d, xuvidir, '^vpu_fw_([^_]*).*\.bin',
|
||||
output_pattern='firmware-imx-xuvi-%s',
|
||||
description='Freescale IMX XUVI Firmware [%s]',
|
||||
extra_depends='',
|
||||
prepend=True)
|
||||
}
|
||||
|
||||
# Declare a contract that we would provide packages produced by prepend above
|
||||
PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-* ${PN}-easrc-* ${PN}-xcvr-* ${PN}-xuvi-*"
|
||||
|
||||
#
|
||||
# Deal with the rest of Firmware packages here
|
||||
#
|
||||
# Provide EPDC and HDMI Firmware in common packages as they tend to be special in
|
||||
# terms of the content.
|
||||
#
|
||||
# NOTE: PACKAGES are defined explicitly here in order to remove the auto-generated
|
||||
# complimentary packages (-dev and -dbg).
|
||||
# This is done in order to be able to keep the main package empty and fail when
|
||||
# somebody tries to install it in the image.
|
||||
# If -dev package is present in that setup, and dev-pkgs is enabled in
|
||||
# IMAGE_FEATURES - this leads to a failure during do_rootfs() while all -dev
|
||||
# packages would be installed, and -dev package would fail because the main one
|
||||
# is empty.
|
||||
# Therefore, we opt-out from producing -dev package here, since also for firmware
|
||||
# files it makes no sense.
|
||||
PACKAGES = "${PN} ${PN}-epdc ${PN}-hdmi"
|
||||
|
||||
FILES_${PN}-epdc = "${nonarch_base_libdir}/firmware/imx/epdc/"
|
||||
FILES_${PN}-hdmi = " \
|
||||
${nonarch_base_libdir}/firmware/hdmitxfw.bin \
|
||||
${nonarch_base_libdir}/firmware/hdmirxfw.bin \
|
||||
${nonarch_base_libdir}/firmware/dpfw.bin \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "(imx)"
|
||||
Loading…
Reference in New Issue