Linux-Firmware Archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@nvidia.com>
To: "mario.limonciello@amd.com" <mario.limonciello@amd.com>,
	"linux-firmware@kernel.org" <linux-firmware@kernel.org>
Subject: Problem with create symlinks code in copy-firmware.sh
Date: Tue, 7 Nov 2023 18:04:10 +0000	[thread overview]
Message-ID: <5f43587a18becaf7b1cf0f6c07d0bca3033cca4c.camel@nvidia.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]

Mario,

I think there's something wrong with the code you added to copy-firmware.sh that uses rdfind to create symlinks.


$verbose rdfind -makesymlinks true "$destdir" -outputname $rdfind_results "$quiet"

find "$destdir" -type l | while read -r l; do

        target="$(realpath "$l")"

        ln -fs "$(realpath --relative-to="$(dirname "$(realpath -s "$l")")" "$target")" "$l"

done


I have a commit that I'm about to submit to linux-firmware:

https://github.com/NVIDIA/linux-firmware/commit/415a5650947396d462033fdf8aa8e6fdf0d9866d

When I run copy-firmware.sh on my tree, everything seems to be okay, until this code is run.

As an example, before your code is run, /lib/firmware/nvida/ad102/gsp looks like this:


# ls -l /lib/firmware/nvidia/ad102/gsp/

total 132

-rw-r--r-- 1 root root 55928 Nov  7 11:51 booter_load-535.113.01.bin

-rw-r--r-- 1 root root 39800 Nov  7 11:51 booter_unload-535.113.01.bin

-rw-r--r-- 1 root root 32876 Nov  7 11:51 bootloader-535.113.01.bin

lrwxrwxrwx 1 root root    34 Nov  7 11:51 gsp-535.113.01.bin -> ../../ga102/gsp/gsp-535.113.01.bin

But your code adds an extra bogus 'gsp' symlink:


-rw-r--r-- 1 root root 55928 Nov  7 11:49 booter_load-535.113.01.bin

-rw-r--r-- 1 root root 39800 Nov  7 11:49 booter_unload-535.113.01.bin

-rw-r--r-- 1 root root 32876 Nov  7 11:49 bootloader-535.113.01.bin

lrwxrwxrwx 1 root root    12 Nov  7 11:49 gsp -> ../ad102/gsp

lrwxrwxrwx 1 root root    34 Nov  7 11:49 gsp-535.113.01.bin -> ../../ga102/gsp/gsp-535.113.01.bin


Can you please take a look at this?

[-- Attachment #2: Type: text/html, Size: 2498 bytes --]

             reply	other threads:[~2023-11-07 18:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 18:04 Timur Tabi [this message]
2023-11-08 23:00 ` Problem with create symlinks code in copy-firmware.sh Limonciello, Mario

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=5f43587a18becaf7b1cf0f6c07d0bca3033cca4c.camel@nvidia.com \
    --to=ttabi@nvidia.com \
    --cc=linux-firmware@kernel.org \
    --cc=mario.limonciello@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).