Message ID | 20190830103350.8273-1-thierry.reding@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Add symlinks for Tegra VIC firmware binaries | expand |
On Fri, 30 Aug 2019 12:33:50 +0200, Thierry Reding wrote: > > I've noticed that the current Link: mechanism completely ignores the > target part of the link. Was this intended to allow creating symlinks > dynamically when copying the firmware, rather than just copying any > existing symlinks themselves? That's a kind of intentional; the script doesn't validate by itself but just installs to the target directory. And the cp -d option preserves the symlink as-is, so it should work as long as the original symlink is correctly set up. thanks, Takashi
On Fri, Aug 30, 2019 at 02:05:15PM +0200, Takashi Iwai wrote: > On Fri, 30 Aug 2019 12:33:50 +0200, > Thierry Reding wrote: > > > > I've noticed that the current Link: mechanism completely ignores the > > target part of the link. Was this intended to allow creating symlinks > > dynamically when copying the firmware, rather than just copying any > > existing symlinks themselves? > > That's a kind of intentional; the script doesn't validate by itself > but just installs to the target directory. And the cp -d option > preserves the symlink as-is, so it should work as long as the original > symlink is correctly set up. Perhaps some code could be added to create the symlinks if the "-> foo" part was specified and no symlink exists. Not a big deal, I just think it's a bit redundant to basically have all the symlink information in the WHENCE file and in the filesystem. That's especially annoying if both get out of sync. I'll volunteer to write that patch if you think it'd be a worthwhile addition. Thierry
On Mon, 02 Sep 2019 09:47:18 +0200, Thierry Reding wrote: > > On Fri, Aug 30, 2019 at 02:05:15PM +0200, Takashi Iwai wrote: > > On Fri, 30 Aug 2019 12:33:50 +0200, > > Thierry Reding wrote: > > > > > > I've noticed that the current Link: mechanism completely ignores the > > > target part of the link. Was this intended to allow creating symlinks > > > dynamically when copying the firmware, rather than just copying any > > > existing symlinks themselves? > > > > That's a kind of intentional; the script doesn't validate by itself > > but just installs to the target directory. And the cp -d option > > preserves the symlink as-is, so it should work as long as the original > > symlink is correctly set up. > > Perhaps some code could be added to create the symlinks if the "-> foo" > part was specified and no symlink exists. Yeah, it sounds like a good idea. > Not a big deal, I just think it's a bit redundant to basically have all > the symlink information in the WHENCE file and in the filesystem. That's > especially annoying if both get out of sync. > > I'll volunteer to write that patch if you think it'd be a worthwhile > addition. I'm for it but leave the decision to Josh :) Thanks! Takashi
On Mon, Sep 2, 2019 at 7:56 AM Takashi Iwai <tiwai@suse.de> wrote: > > On Mon, 02 Sep 2019 09:47:18 +0200, > Thierry Reding wrote: > > > > On Fri, Aug 30, 2019 at 02:05:15PM +0200, Takashi Iwai wrote: > > > On Fri, 30 Aug 2019 12:33:50 +0200, > > > Thierry Reding wrote: > > > > > > > > I've noticed that the current Link: mechanism completely ignores the > > > > target part of the link. Was this intended to allow creating symlinks > > > > dynamically when copying the firmware, rather than just copying any > > > > existing symlinks themselves? > > > > > > That's a kind of intentional; the script doesn't validate by itself > > > but just installs to the target directory. And the cp -d option > > > preserves the symlink as-is, so it should work as long as the original > > > symlink is correctly set up. > > > > Perhaps some code could be added to create the symlinks if the "-> foo" > > part was specified and no symlink exists. > > Yeah, it sounds like a good idea. > > > Not a big deal, I just think it's a bit redundant to basically have all > > the symlink information in the WHENCE file and in the filesystem. That's > > especially annoying if both get out of sync. > > > > I'll volunteer to write that patch if you think it'd be a worthwhile > > addition. > > I'm for it but leave the decision to Josh :) I think this sounds good as well. Would love to have a patch. josh
On Fri, Aug 30, 2019 at 6:33 AM Thierry Reding <thierry.reding@gmail.com> wrote: > > From: Thierry Reding <treding@nvidia.com> > > Create additional symlinks for these firmware binaries so that the Linux > drivers can refer to them by a more consistent name. > > Signed-off-by: Thierry Reding <treding@nvidia.com> > --- > Takashi, > > I've noticed that the current Link: mechanism completely ignores the > target part of the link. Was this intended to allow creating symlinks > dynamically when copying the firmware, rather than just copying any > existing symlinks themselves? > > Thierry > > WHENCE | 5 +++++ > nvidia/tegra124/vic.bin | 1 + > nvidia/tegra186/vic.bin | 1 + > nvidia/tegra210/vic.bin | 1 + > 4 files changed, 8 insertions(+) > create mode 120000 nvidia/tegra124/vic.bin > create mode 120000 nvidia/tegra186/vic.bin > create mode 120000 nvidia/tegra210/vic.bin Applied and pushed out. josh > > diff --git a/WHENCE b/WHENCE > index 20eb4b8c718c..e7b8e40ab190 100644 > --- a/WHENCE > +++ b/WHENCE > @@ -3694,8 +3694,13 @@ Licence: Redistributable. See LICENCE.nvidia for details > Driver: tegra-vic -- NVIDIA Tegra VIC driver > > File: nvidia/tegra124/vic03_ucode.bin > +Link: nvidia/tegra124/vic.bin -> vic03_ucode.bin > + > File: nvidia/tegra210/vic04_ucode.bin > +Link: nvidia/tegra210/vic.bin -> vic03_ucode.bin > + > File: nvidia/tegra186/vic04_ucode.bin > +Link: nvidia/tegra186/vic.bin -> vic04_ucode.bin > > Licence: Redistributable. See LICENCE.nvidia for details > > diff --git a/nvidia/tegra124/vic.bin b/nvidia/tegra124/vic.bin > new file mode 120000 > index 000000000000..968fcd4c9163 > --- /dev/null > +++ b/nvidia/tegra124/vic.bin > @@ -0,0 +1 @@ > +vic03_ucode.bin > \ No newline at end of file > diff --git a/nvidia/tegra186/vic.bin b/nvidia/tegra186/vic.bin > new file mode 120000 > index 000000000000..d785732ba125 > --- /dev/null > +++ b/nvidia/tegra186/vic.bin > @@ -0,0 +1 @@ > +vic04_ucode.bin > \ No newline at end of file > diff --git a/nvidia/tegra210/vic.bin b/nvidia/tegra210/vic.bin > new file mode 120000 > index 000000000000..d785732ba125 > --- /dev/null > +++ b/nvidia/tegra210/vic.bin > @@ -0,0 +1 @@ > +vic04_ucode.bin > \ No newline at end of file > -- > 2.22.0 >
diff --git a/WHENCE b/WHENCE index 20eb4b8c718c..e7b8e40ab190 100644 --- a/WHENCE +++ b/WHENCE @@ -3694,8 +3694,13 @@ Licence: Redistributable. See LICENCE.nvidia for details Driver: tegra-vic -- NVIDIA Tegra VIC driver File: nvidia/tegra124/vic03_ucode.bin +Link: nvidia/tegra124/vic.bin -> vic03_ucode.bin + File: nvidia/tegra210/vic04_ucode.bin +Link: nvidia/tegra210/vic.bin -> vic03_ucode.bin + File: nvidia/tegra186/vic04_ucode.bin +Link: nvidia/tegra186/vic.bin -> vic04_ucode.bin Licence: Redistributable. See LICENCE.nvidia for details diff --git a/nvidia/tegra124/vic.bin b/nvidia/tegra124/vic.bin new file mode 120000 index 000000000000..968fcd4c9163 --- /dev/null +++ b/nvidia/tegra124/vic.bin @@ -0,0 +1 @@ +vic03_ucode.bin \ No newline at end of file diff --git a/nvidia/tegra186/vic.bin b/nvidia/tegra186/vic.bin new file mode 120000 index 000000000000..d785732ba125 --- /dev/null +++ b/nvidia/tegra186/vic.bin @@ -0,0 +1 @@ +vic04_ucode.bin \ No newline at end of file diff --git a/nvidia/tegra210/vic.bin b/nvidia/tegra210/vic.bin new file mode 120000 index 000000000000..d785732ba125 --- /dev/null +++ b/nvidia/tegra210/vic.bin @@ -0,0 +1 @@ +vic04_ucode.bin \ No newline at end of file