Fix getting trapped changing folders
This commit is contained in:
parent
3377cb83ab
commit
6c3004d5ee
56
Makefile
56
Makefile
|
@ -95,21 +95,17 @@ static:
|
|||
|
||||
install: verify_spir0
|
||||
# install helper apps
|
||||
# @$(SUDO) rm -r /var/lib/apt/lists/*
|
||||
@$(SUDO) apt update
|
||||
@$(SUDO) apt install -y nano
|
||||
@$(SUDO) apt install -y nload
|
||||
@$(SUDO) apt install -y htop
|
||||
@$(SUDO) apt install -y picocom
|
||||
@$(SUDO) apt install -y sshpass
|
||||
@$(SUDO) apt install -y nano nload htop picocom sshpass
|
||||
|
||||
# install mavlink-router
|
||||
@rm -rf ~/tmp/mavlink-router-source
|
||||
@git clone https://github.com/EchoMAV/mavlink-router-src ~/tmp/mavlink-router-source && cd ~/tmp/mavlink-router-source && git submodule update --init --recursive
|
||||
@$(SUDO) apt -y install git ninja-build pkg-config gcc g++ systemd
|
||||
@$(SUDO) apt -y install python3-pip
|
||||
@$(SUDO) pip3 install meson smbus
|
||||
@cd ~/tmp/mavlink-router-source && meson setup build . && $(SUDO) ninja -C build install
|
||||
@git clone https://github.com/EchoMAV/mavlink-router-src ~/tmp/mavlink-router-source && \
|
||||
cd ~/tmp/mavlink-router-source && git submodule update --init --recursive && \
|
||||
$(SUDO) apt -y install git ninja-build pkg-config gcc g++ systemd && \
|
||||
$(SUDO) apt -y install python3-pip && \
|
||||
$(SUDO) pip3 install meson smbus && \
|
||||
meson setup build . && $(SUDO) ninja -C build install
|
||||
|
||||
# install the config file
|
||||
@$(SUDO) mkdir -p $(SYSCFG)
|
||||
|
@ -119,7 +115,6 @@ install: verify_spir0
|
|||
@$(SUDO) ./ensure-cockpit.sh
|
||||
|
||||
# set up cockpit files
|
||||
|
||||
@$(SUDO) rm -rf /usr/share/cockpit/general/
|
||||
@$(SUDO) mkdir /usr/share/cockpit/general/
|
||||
@$(SUDO) cp -rf ui/general/* /usr/share/cockpit/general/
|
||||
|
@ -127,22 +122,22 @@ install: verify_spir0
|
|||
@$(SUDO) cp -rf ui/static/* /usr/share/cockpit/static/
|
||||
@$(SUDO) cp -rf ui/base1/* /usr/share/cockpit/base1/
|
||||
@[ -d $(LOCAL)/echopilot ] || $(SUDO) mkdir $(LOCAL)/echopilot
|
||||
@$(SUDO) install -Dm755 version.txt $(LOCAL)/echopilot/.
|
||||
@for s in $(LOCAL_SCRIPTS) ; do $(SUDO) install -Dm755 $${s} $(LOCAL)/echopilot/$${s} ; done
|
||||
@for s in $(LOCAL_SCRIPTS); do $(SUDO) install -Dm755 $${s} $(LOCAL)/echopilot/$${s}; done
|
||||
|
||||
# install modified 8812EU drivers
|
||||
|
||||
@git clone https://github.com/libc0607/rtl88x2eu-20230815 ~/tmp/rtl88x2eu && cd ~/tmp/rtl88x2eu && git submodule update --init --recursive
|
||||
@$(SUDO) sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
|
||||
@$(SUDO) sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
|
||||
@$(SUDO) apt -y install dkms
|
||||
@$(SUDO) ./dkms-install.sh
|
||||
@git clone https://github.com/libc0607/rtl88x2eu-20230815 ~/tmp/rtl88x2eu && \
|
||||
cd ~/tmp/rtl88x2eu && git submodule update --init --recursive && \
|
||||
$(SUDO) sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile && \
|
||||
$(SUDO) sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile && \
|
||||
$(SUDO) apt -y install dkms && \
|
||||
$(SUDO) ./dkms-install.sh
|
||||
|
||||
# Install WFB-NG dependencies and compile deb
|
||||
@git clone -b stable https://github.com/svpcom/wfb-ng.git ~/tmp/wfb-ng && cd ~/tmp/wfb-ng
|
||||
@$(SUDO) apt -y install python3-all libpcap-dev libsodium-dev python3-pip python3-pyroute2 python3-future python3-twisted python3-serial python3-all-dev iw virtualenv debhelper dh-python build-essential
|
||||
@$(SUDO) make deb
|
||||
@$(SUDO) dpkg -i /deb_dist/wfb*.deb
|
||||
@git clone -b stable https://github.com/svpcom/wfb-ng.git ~/tmp/wfb-ng && \
|
||||
cd ~/tmp/wfb-ng && \
|
||||
$(SUDO) apt -y install python3-all libpcap-dev libsodium-dev python3-pip python3-pyroute2 python3-future python3-twisted python3-serial python3-all-dev iw virtualenv debhelper dh-python build-essential && \
|
||||
$(SUDO) make deb && \
|
||||
$(SUDO) dpkg -i /deb_dist/wfb*.deb
|
||||
|
||||
# create initial WFB-NG config file
|
||||
@$(SUDO) cp wifibroadcast.cfg /etc/
|
||||
|
@ -151,13 +146,12 @@ install: verify_spir0
|
|||
@$(SUDO) cp drone.key /etc/
|
||||
|
||||
# stop any running services we care about
|
||||
@for c in stop disable ; do $(SUDO) systemctl $${c} $(SERVICES) ; done ; true
|
||||
@for c in stop disable; do $(SUDO) systemctl $${c} $(SERVICES); done; true
|
||||
|
||||
# install and enable services
|
||||
@for s in $(SERVICES) ; do $(SUDO) install -Dm644 $${s%.*}.service $(LIBSYSTEMD)/$${s%.*}.service ; done
|
||||
@if [ ! -z "$(SERVICES)" ] ; then $(SUDO) systemctl daemon-reload ; fi
|
||||
@for s in $(SERVICES) ; do $(SUDO) systemctl enable $${s%.*} ; done
|
||||
|
||||
@for s in $(SERVICES); do $(SUDO) install -Dm644 $${s%.*}.service $(LIBSYSTEMD)/$${s%.*}.service; done
|
||||
@if [ ! -z "$(SERVICES)" ]; then $(SUDO) systemctl daemon-reload; fi
|
||||
@for s in $(SERVICES); do $(SUDO) systemctl enable $${s%.*}; done
|
||||
|
||||
# set up the system permissions, stop/disable nvgetty etc
|
||||
@$(SUDO) systemctl stop nvgetty
|
||||
|
@ -175,5 +169,5 @@ serial:
|
|||
|
||||
uninstall:
|
||||
@$(MAKE) --no-print-directory disable
|
||||
@( for s in $(SERVICES) ; do $(SUDO) rm $(LIBSYSTEMD)/$${s%.*}.service ; done ; true )
|
||||
@if [ ! -z "$(SERVICES)" ] ; then $(SUDO) systemctl daemon-reload ; fi
|
||||
@for s in $(SERVICES); do $(SUDO) rm $(LIBSYSTEMD)/$${s%.*}.service; done; true
|
||||
@if [ ! -z "$(SERVICES)" ]; then $(SUDO) systemctl daemon-reload; fi
|
||||
|
|
Loading…
Reference in New Issue