Ruby integration part 4 (#1340)

pull/1341/head
Petru Soroaga 2024-03-10 19:29:08 +02:00 committed by GitHub
parent 5a2e3329ae
commit 9d0e4924fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 27 additions and 20 deletions

View File

@ -20,7 +20,18 @@ define LINUX_PATCHER_CONFIG_ATHEROS
endef
endif
ifeq ($(OPENIPC_VARIANT),rubyfpv)
define LINUX_PATCHER_CONFIG_TIMERS
$(call KCONFIG_DISABLE_OPT,CONFIG_HZ_100)
$(call KCONFIG_ENABLE_OPT,CONFIG_HZ_1000)
$(call KCONFIG_ENABLE_OPT,CONFIG_HZ)
$(call KCONFIG_SET_OPT,CONFIG_HZ,1000)
$(call KCONFIG_SET_OPT,CONFIG_HZ_1000,y)
endef
endif
define LINUX_PATCHER_LINUX_CONFIG_FIXUPS
$(LINUX_PATCHER_CONFIG_TIMERS)
$(LINUX_PATCHER_CONFIG_ATHEROS)
endef

View File

@ -1,9 +1,7 @@
config BR2_PACKAGE_RUBYFPV
bool "rubyfpv"
select BR2_PACKAGE_LIBPCAP
select BR2_PACKAGE_LIBSODIUM
select BR2_PACKAGE_IW
select BR2_PACKAGE_DATALINK
default n
help
Ruby package

View File

@ -5,6 +5,10 @@
chip=$(ipcinfo -c)
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
echo "Chip: " > /tmp/ruby_boot.log
echo ${chip} >> /tmp/ruby_boot.log
echo "Firmware: " >> /tmp/ruby_boot.log
echo ${fw} >> /tmp/ruby_boot.log
case "$1" in
start)
@ -13,11 +17,12 @@ case "$1" in
fi
echo "Starting Ruby..."
echo "Starting Ruby..." >> /tmp/ruby_boot.log
/usr/sbin/ruby_start
;;
stop)
echo "Stopping Ruby..."
echo "Stopping Ruby..." >> /tmp/ruby_boot.log
/usr/sbin/ruby_stop.sh
;;
*)

View File

@ -1,7 +1,5 @@
kill -9 `pidof ruby_start`
kill -9 `pidof ruby_vehicle`
kill -9 `pidof ruby_rx_rc`
kill -9 `pidof ruby_rx_commands`
kill -9 `pidof ruby_tx_telemetry`
kill -9 `pidof ruby_rt_vehicle`
kill -9 `pidof ruby_logger`
pidof ruby_start | xargs kill -9 2>/dev/null
pidof ruby_rx_commands | xargs kill -9 2>/dev/null
pidof ruby_tx_telemetry | xargs kill -9 2>/dev/null
pidof ruby_rt_vehicle | xargs kill -9 2>/dev/null
pidof ruby_logger | xargs kill -9 2>/dev/null

View File

@ -0,0 +1,2 @@
8.3

View File

@ -6,14 +6,10 @@ endef
define RUBYFPV_BUILD_CMDS
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_start)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_initradio)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_logger)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_timeinit)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_rt_vehicle)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_tx_telemetry)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_rx_rc)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_rx_commands)
(cd $(@D); $(TARGET_CC) -s ruby_start.c -o ruby_vehicle)
endef
define RUBYFPV_INSTALL_TARGET_CMDS
@ -22,23 +18,20 @@ define RUBYFPV_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/root/ruby
cp $(RUBYFPV_PKGDIR)/files/S99ruby $(TARGET_DIR)/etc/init.d
chmod 755 $(TARGET_DIR)/etc/init.d/S99ruby
cp $(RUBYFPV_PKGDIR)/files/S73ruby $(TARGET_DIR)/etc/init.d
chmod 755 $(TARGET_DIR)/etc/init.d/S73ruby
install -m 0755 -D $(@D)/ruby_start $(TARGET_DIR)/usr/sbin/ruby_start
install -m 0755 -D $(@D)/ruby_initradio $(TARGET_DIR)/usr/sbin/ruby_initradio
install -m 0755 -D $(@D)/ruby_logger $(TARGET_DIR)/usr/sbin/ruby_logger
install -m 0755 -D $(@D)/ruby_timeinit $(TARGET_DIR)/usr/sbin/ruby_timeinit
install -m 0755 -D $(@D)/ruby_rt_vehicle $(TARGET_DIR)/usr/sbin/ruby_rt_vehicle
install -m 0755 -D $(@D)/ruby_tx_telemetry $(TARGET_DIR)/usr/sbin/ruby_tx_telemetry
install -m 0755 -D $(@D)/ruby_rx_rc $(TARGET_DIR)/usr/sbin/ruby_rx_rc
install -m 0755 -D $(@D)/ruby_rx_commands $(TARGET_DIR)/usr/sbin/ruby_rx_commands
install -m 0755 -D $(@D)/ruby_vehicle $(TARGET_DIR)/usr/sbin/ruby_vehicle
cp $(RUBYFPV_PKGDIR)/files/ruby_stop.sh $(TARGET_DIR)/usr/sbin
chmod 755 $(TARGET_DIR)/usr/sbin/ruby_stop.sh
cp $(RUBYFPV_PKGDIR)/files/tweaksys $(TARGET_DIR)/usr/bin
cp -r $(RUBYFPV_PKGDIR)/files/licences $(TARGET_DIR)/root/ruby/
cp $(RUBYFPV_PKGDIR)/files/version_ruby_base.txt $(TARGET_DIR)/usr/sbin
endef
$(eval $(generic-package))