Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
1e408186
Commit
1e408186
authored
Nov 24, 2023
by
Jai Luthra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linux: autopatch: Better logs for find_bytecode.sh
parent
4d06da0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
tools/autopatch/find_bytecode.sh
tools/autopatch/find_bytecode.sh
+5
-2
No files found.
tools/autopatch/find_bytecode.sh
View file @
1e408186
...
@@ -13,19 +13,22 @@ driver_url=$2
...
@@ -13,19 +13,22 @@ driver_url=$2
driver_file
=
NVIDIA-Linux-x86_64-
$driver_version
.run
driver_file
=
NVIDIA-Linux-x86_64-
$driver_version
.run
download_driver
()
{
download_driver
()
{
wget
-c
$driver_url
-O
$driver_file
1>&2
wget
-
nv
-
c
$driver_url
-O
$driver_file
1>&2
chmod
+x
$driver_file
chmod
+x
$driver_file
>
&2
echo
"Successfully Downloaded Driver
$driver_file
"
}
}
extract_driver
()
{
extract_driver
()
{
if
[[
!
-e
${
driver_file
%
".run"
}
]]
;
then
if
[[
!
-e
${
driver_file
%
".run"
}
]]
;
then
./
$driver_file
-x
./
$driver_file
-x
fi
fi
>
&2
echo
"Successfully Extracted Driver
$driver_file
"
}
}
search_bytecode
()
{
search_bytecode
()
{
nvenc_file
=
${
driver_file
%
".run"
}
/libnvidia-encode.so.
$driver_version
nvenc_file
=
${
driver_file
%
".run"
}
/libnvidia-encode.so.
$driver_version
bytecode
=
$(
xxd
-c0
-ps
$nvenc_file
|
grep
-oP
".{0,6}
$MATCH_STR
"
)
bytecode
=
$(
xxd
-c10000000
-ps
$nvenc_file
|
grep
-oP
".{0,6}
$MATCH_STR
"
)
>
&2
echo
"Found bytecode
$bytecode
"
echo
$bytecode
echo
$bytecode
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment