All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Angelo Dureghello" <angelo@kernel-space.org>
To: meta-freescale@lists.yoctoproject.org
Subject: including firmware sdma-imx6q.bin
Date: Sat, 8 May 2021 10:20:15 +0200	[thread overview]
Message-ID: <f2ade92c-0900-6c3b-a9f9-5ef76bbb4ade@kernel-space.org> (raw)

Hi all,

already had this issue more than one time, and solved
in a way or another, but trying to figure out the most
correct way to do this.

This sdma firmware file on recent kernel > (4.14) could
be needed, generally to be (even if not always) built-in.
I need the kernel build to work both from yocto and
from standalone source tree.

Actually used below solutions:

1) yocto side, in kernel recipe/bbappend i copy the
firmware blob into the kernel source path, in
do_compile_prepend(), by:

defconfig

+CONFIG_EXTRA_FIRMWARE="imx/sdma/sdma-imx6q.bin"
+CONFIG_EXTRA_FIRMWARE_DIR="firmware"

kernel bbappend

+DEPENDS += " \
+    firmware-imx \
+"
...
+do_compile_prepend() {
+     ## fetch the firmware blob
+     rm -rf ${S}/firmware
+     mkdir ${S}/firmware
+     cp -arv 
${TMPDIR}/sysroots-components/all/firmware-imx/lib/firmware/imx 
${S}/firmware/
+}

This works, but if i build the kernel out of yocto, have to
add separately the fw blob in the /firmware path.

2) i include the blob hex in the kernel tree, and modify
makefile, so it get translated to bin, and included.


Looks like there must me more proper solutions, if
any hint, welcome.

Thanks a lot.
-- 
Angelo Dureghello
+E: angelo AT kernel-space.org


                 reply	other threads:[~2021-05-08  8:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2ade92c-0900-6c3b-a9f9-5ef76bbb4ade@kernel-space.org \
    --to=angelo@kernel-space.org \
    --cc=meta-freescale@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.