Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-udev-rules
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-udev-rules
Commits
21a3d727
Commit
21a3d727
authored
Dec 13, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sub the long list to rsync
parent
4aa4b436
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
Makefile
Makefile
+2
-1
generate_mknods.py
generate_mknods.py
+0
-22
No files found.
Makefile
View file @
21a3d727
...
@@ -8,7 +8,8 @@ install:generated_include
...
@@ -8,7 +8,8 @@ install:generated_include
@
echo
$(X393_DEVICES)
@
echo
$(X393_DEVICES)
install
-d
$(DESTDIR)
/etc/udev/rules.d
install
-d
$(DESTDIR)
/etc/udev/rules.d
install
-m
644 90-elphel-automount.rules
$(DESTDIR)
/etc/udev/rules.d
install
-m
644 90-elphel-automount.rules
$(DESTDIR)
/etc/udev/rules.d
install
-m
644 50-elphel-static-nodes.rules
$(DESTDIR)
/etc/udev/rules.d
# 100+ seconds to run 50-elphel-static-nodes.rules at boot. Fast if run manually
#install -m 644 50-elphel-static-nodes.rules
$(DESTDIR)
/etc/udev/rules.d
install
-d
$(TARGETDIR)
install
-d
$(TARGETDIR)
$(mknodes)
$(mknodes)
...
...
generate_mknods.py
View file @
21a3d727
...
@@ -35,21 +35,6 @@ __maintainer__ = "Andrey Filippov"
...
@@ -35,21 +35,6 @@ __maintainer__ = "Andrey Filippov"
__email__
=
"andrey@elphel.com"
__email__
=
"andrey@elphel.com"
__status__
=
"Development"
__status__
=
"Development"
def
create_udev_rules_file
(
contents
):
c
=
"# --- This is an auto-generated file, see "
+
sys
.
argv
[
0
]
+
"
\n
"
c
+=
"ACTION!=
\"
add
\"
, GOTO=
\"
static_nodes_end
\"\n\n
"
c
+=
contents
c
+=
"
\n
LABEL=
\"
static_nodes_end
\"
"
f
=
open
(
'50-elphel-static-nodes.rules'
,
'w'
)
f
.
write
(
c
)
f
.
close
()
def
get_udev_rule
(
mode
,
name
,
devtype
,
major
,
minor
,
comment
):
tmpstr
=
comment
.
strip
()
+
"
\n
"
tmpstr
+=
"ACTION==
\"
add
\"
, RUN+=
\"
/bin/mknod -m "
+
mode
+
" /dev/"
+
name
+
" "
+
devtype
+
" "
+
major
+
" "
+
minor
+
"
\"\n
"
return
tmpstr
def
process_header
():
def
process_header
():
rulestr
=
""
rulestr
=
""
...
@@ -71,14 +56,7 @@ def process_header():
...
@@ -71,14 +56,7 @@ def process_header():
comment
=
" # "
+
comment
comment
=
" # "
+
comment
print
(
"mknod -m
%
s $(TARGETDIR)/
%-20
s
%
s
%3
s
%3
s
%
s"
%
(
print
(
"mknod -m
%
s $(TARGETDIR)/
%-20
s
%
s
%3
s
%3
s
%
s"
%
(
fs
.
group
(
6
),
fs
.
group
(
2
),
fs
.
group
(
7
),
fs
.
group
(
4
),
fs
.
group
(
5
),
comment
))
fs
.
group
(
6
),
fs
.
group
(
2
),
fs
.
group
(
7
),
fs
.
group
(
4
),
fs
.
group
(
5
),
comment
))
rulestr
+=
get_udev_rule
(
fs
.
group
(
6
),
fs
.
group
(
2
),
fs
.
group
(
7
),
fs
.
group
(
4
),
fs
.
group
(
5
),
comment
)
line
=
f
.
readline
()
line
=
f
.
readline
()
if
rulestr
!=
""
:
create_udev_rules_file
(
rulestr
)
print
(
"endef"
)
print
(
"endef"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
process_header
()
process_header
()
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