1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2025-09-05 09:35:56 +02:00
This commit is contained in:
Geoffrey Frogeye 2018-04-30 16:15:10 +02:00
parent 0eb11d9fc6
commit 13d188e6f4
4 changed files with 42 additions and 10 deletions

View file

@ -3,3 +3,4 @@ output
principalconf.sh
sshconf
sshkey*
gdbcommands

View file

@ -9,6 +9,12 @@ SDCARD=/dev/mmcblk0
CON_MODE=wifi
ETH_IFACE=enp3s0
# Debug
TARGET_DIR=$(PWD)/buildroot/output/target/
EXECDIR=/opt/chef/
EXECPATH=bin/premier
GDBPORT=2346
# SYSTÈME D'EXPLOITATION
# Configuration
@ -109,3 +115,24 @@ upgrade-chef: chef
ssh -F sshconf principal true
rsync --rsh 'ssh -F sshconf' --archive --chown root:root buildroot/output/target/opt/chef principal:/opt/
run:
ssh -F sshconf principal true
ssh -F sshconf principal /etc/init.d/S50chef restart
gdbcommands:
echo "set sysroot $(TARGET_DIR)" > "$@"
echo "exec-file $(TARGET_DIR)$(EXECDIR)$(EXECPATH)" >> "$@"
echo "symbol-file $(TARGET_DIR)$(EXECDIR)$(EXECPATH).debug" >> "$@"
echo "target remote :$(GDBPORT)" >> "$@"
echo "continue" >> "$@"
debug: gdbcommands
ssh -F sshconf principal true
ssh -F sshconf principal /etc/init.d/S50chef stop
ssh -F sshconf principal killall gdbserver; true
ssh -F sshconf principal -L $(GDBPORT):127.0.0.1:$(GDBPORT) 'cd $(EXECDIR); gdbserver 127.0.0.1:$(GDBPORT) $(EXECPATH)' & sleep 1
buildroot/output/host/usr/bin/arm-linux-gnueabihf-gdb -x gdbcommands; \
ssh -F sshconf principal /opt/chef/lcdOff.sh; \
ssh -F sshconf principal killall gdbserver; true
.PHONY: gdbcommands

View file

@ -77,6 +77,9 @@ BR2_PACKAGE_PPPD=y
# Pour faire plaisir à Geoffrey
BR2_PACKAGE_HTOP=y
# Pour debugguer
BR2_PACKAGE_GDB=y
# Pour uploader sur le Arduino
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_SHARED_LIBS=y