Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-init
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-init
Commits
360cb1a1
Commit
360cb1a1
authored
Oct 25, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added interfaces generation to makefile
parent
a268273f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
Makefile
src/Makefile
+15
-5
generate_default_network_interfaces.py
src/generate_default_network_interfaces.py
+1
-1
No files found.
src/Makefile
View file @
360cb1a1
...
@@ -8,10 +8,14 @@ STATEDIR = $(DESTDIR)/var/volatile/state
...
@@ -8,10 +8,14 @@ STATEDIR = $(DESTDIR)/var/volatile/state
STATELINK
=
$(DESTDIR)
/var/state
STATELINK
=
$(DESTDIR)
/var/state
LINK
=
ln
LINK
=
ln
NETWORKDIR
=
$(DESTDIR)
/etc/network
PYTHON
=
python
OWN
=
-o
root
-g
root
OWN
=
-o
root
-g
root
INSTALL
=
install
INSTALL
=
install
INSTMODE
=
0755
INSTMODE
=
0755
INSTDOCS
=
0644
SCRIPT1
=
init_elphel393.py
SCRIPT1
=
init_elphel393.py
SCRIPT2
=
init_elphel393
SCRIPT2
=
init_elphel393
...
@@ -23,6 +27,8 @@ SCRIPT2=init_elphel393
...
@@ -23,6 +27,8 @@ SCRIPT2=init_elphel393
all
:
all
:
@
echo
"make all in src"
@
echo
"make all in src"
# expect a file: generated/interfaces
$(PYTHON)
generate_default_network_interfaces.py
$(REMOTE_IP)
$(REMOTE_NETMASK)
$(REMOTE_GATEWAY)
install
:
install
:
@
echo
"make install in src"
@
echo
"make install in src"
...
@@ -42,25 +48,29 @@ install:
...
@@ -42,25 +48,29 @@ install:
#$(INSTALL) $(OWN) -d $(CONFDIR)
#$(INSTALL) $(OWN) -d $(CONFDIR)
#$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT4).tmp $(CONFDIR)/$(SCRIPT4)
#$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT4).tmp $(CONFDIR)/$(SCRIPT4)
#rm $(SCRIPT4).tmp
#rm $(SCRIPT4).tmp
#sed -e 's/192.168.0.9/$(REMOTE_IP)/' $(SCRIPT5) > $(SCRIPT5).tmp
#sed -e 's/192.168.0.9/$(REMOTE_IP)/' $(SCRIPT5) > $(SCRIPT5).tmp
#$(INSTALL) $(OWN) -d $(CONFDIR)
#$(INSTALL) $(OWN) -d $(CONFDIR)
#$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT5).tmp $(CONFDIR)/$(SCRIPT5)
#$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT5).tmp $(CONFDIR)/$(SCRIPT5)
#rm $(SCRIPT5).tmp
#rm $(SCRIPT5).tmp
#INITSTRING default is defined in local.conf, weak default - meta-core/init/init.bb
#INITSTRING default is defined in local.conf, weak default - meta-core/init/init.bb
sed
-e
's/init_elphel393.py/$(INITSTRING)/'
$(SCRIPT2)
>
$(SCRIPT2).tmp
sed
-e
's/init_elphel393.py/$(INITSTRING)/'
$(SCRIPT2)
>
$(SCRIPT2).tmp
$(INSTALL)
$(OWN)
-d
$(INITDIR)
$(INSTALL)
$(OWN)
-d
$(INITDIR)
$(INSTALL)
$(OWN)
-m
$(INSTMODE)
$(SCRIPT2).tmp
$(INITDIR)/$(SCRIPT2)
$(INSTALL)
$(OWN)
-m
$(INSTMODE)
$(SCRIPT2).tmp
$(INITDIR)/$(SCRIPT2)
rm
$(SCRIPT2).tmp
rm
$(SCRIPT2).tmp
# blacklist AHCI driver to prevent it from loading before FPGA is configured
# blacklist AHCI driver to prevent it from loading before FPGA is configured
$(INSTALL)
$(OWN)
-d
$(MODPROBEDIR)
$(INSTALL)
$(OWN)
-d
$(MODPROBEDIR)
echo
"blacklist $(DRIVER_NAME)"
>>
$(MODPROBEDIR)/blacklist.conf
echo
"blacklist $(DRIVER_NAME)"
>>
$(MODPROBEDIR)/blacklist.conf
# create directories to support legacy scripts
# create directories to support legacy scripts
$(INSTALL)
$(OWN)
-d
$(STATEDIR)
$(INSTALL)
$(OWN)
-d
$(STATEDIR)
$(LINK)
-s
-r
$(STATEDIR)
$(STATELINK)
$(LINK)
-s
-r
$(STATEDIR)
$(STATELINK)
# install src/interfaces to /etc/network/interfaces
$(INSTALL)
$(OWN)
-d
$(NETWORKDIR)
$(INSTALL)
$(OWN)
-m
$(INSTDOCS)
generated/interfaces
$(NETWORKDIR)/interfaces
clean
:
clean
:
@
echo
"make clean in src"
@
echo
"make clean in src"
src/generate_default_network_interfaces.py
View file @
360cb1a1
...
@@ -31,7 +31,7 @@ from __future__ import print_function
...
@@ -31,7 +31,7 @@ from __future__ import print_function
'''
'''
__copyright__
=
"Copyright (C) 2018 Elphel, Inc."
__copyright__
=
"Copyright (C) 2018 Elphel, Inc."
__license__
=
"GPL-3.0
+
"
__license__
=
"GPL-3.0
-or-later
"
__maintainer__
=
"Oleg Dzhimiev"
__maintainer__
=
"Oleg Dzhimiev"
__email__
=
"oleg@elphel.com"
__email__
=
"oleg@elphel.com"
...
...
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