2012-10-02 14:53:27 +02:00
|
|
|
VANCOUVER_REV = a7f4c2de42247e7a7c6ddb27a48f8a7d93d469ba
|
|
|
|
VANCOUVER = vancouver-git
|
2012-10-29 17:16:49 +01:00
|
|
|
VANCOUVER_URL = https://github.com/TUD-OS/NUL.git
|
2012-10-02 14:53:27 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for tools
|
|
|
|
#
|
|
|
|
$(call check_tool,git)
|
2011-12-22 16:19:25 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# Interface to top-level prepare Makefile
|
|
|
|
#
|
|
|
|
PORTS += $(VANCOUVER)
|
|
|
|
|
2012-10-11 14:41:29 +02:00
|
|
|
#
|
|
|
|
# We need to execute some python scripts for preparing the i82576vf
|
|
|
|
# device model.
|
|
|
|
#
|
|
|
|
PYTHON2 := $(notdir $(lastword $(shell which python2 python2.{4,5,6,7,8})))
|
|
|
|
ifeq ($(PYTHON2),)
|
|
|
|
prepare: python_not_installed
|
|
|
|
python_not_installed:
|
|
|
|
$(ECHO) "Error: Vancouver needs Python 2 to be installed"
|
|
|
|
@false;
|
|
|
|
endif
|
|
|
|
|
2011-12-22 16:19:25 +01:00
|
|
|
prepare:: $(CONTRIB_DIR)/$(VANCOUVER)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Port-specific local rules
|
|
|
|
#
|
2012-10-02 14:53:27 +02:00
|
|
|
$(DOWNLOAD_DIR)/$(VANCOUVER)/.git:
|
|
|
|
$(VERBOSE)git clone $(VANCOUVER_URL) $(DOWNLOAD_DIR)/$(VANCOUVER) && \
|
|
|
|
cd download/vancouver-git && \
|
|
|
|
git reset --hard $(VANCOUVER_REV) && \
|
|
|
|
cd ../.. && touch $@
|
2011-12-22 16:19:25 +01:00
|
|
|
|
2012-10-11 14:41:29 +02:00
|
|
|
I82576VF_DIR = $(CONTRIB_DIR)/$(VANCOUVER)/julian/model/82576vf
|
|
|
|
|
2012-10-02 14:53:27 +02:00
|
|
|
$(CONTRIB_DIR)/$(VANCOUVER)/.git: $(DOWNLOAD_DIR)/$(VANCOUVER)/.git
|
|
|
|
$(VERBOSE)git clone $(DOWNLOAD_DIR)/$(VANCOUVER) $(CONTRIB_DIR)/$(VANCOUVER)
|
2012-10-11 14:41:29 +02:00
|
|
|
$(VERBOSE)patch -d $(CONTRIB_DIR)/$(VANCOUVER) -N -p1 < src/vancouver/rename-82576-i82576.patch
|
|
|
|
@# fix python version in code generator scripts
|
|
|
|
$(VERBOSE)sed -i "s/env python2/env $(PYTHON2)/" $(I82576VF_DIR)/genreg.py
|
|
|
|
$(VERBOSE)sed -i "s/env python2/env $(PYTHON2)/" $(I82576VF_DIR)/genreg2.py
|
|
|
|
@# call code generators
|
|
|
|
$(VERBOSE)cd $(I82576VF_DIR); \
|
|
|
|
./genreg.py reg_pci.py ../../../vancouver/include/model/82576vfpci.inc
|
|
|
|
$(VERBOSE)cd $(I82576VF_DIR); \
|
|
|
|
./genreg.py reg_mmio.py ../../../vancouver/include/model/82576vfmmio.inc
|
|
|
|
$(VERBOSE)cd $(I82576VF_DIR); \
|
|
|
|
./genreg2.py reg_mmio.py ../../../vancouver/include/model/82576vfmmio_vnet.inc
|
2011-12-22 16:19:25 +01:00
|
|
|
|
2012-10-02 14:53:27 +02:00
|
|
|
$(CONTRIB_DIR)/$(VANCOUVER): $(CONTRIB_DIR)/$(VANCOUVER)/.git
|