Skip to content

Commit

Permalink
Add devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed May 10, 2024
1 parent 6b963c5 commit b5bb9e2
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/devnet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include $(TOPDIR)/rules.mk

GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . )
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . )

PKG_NAME:=devnet
PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP)

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
TITLE:=DevNet
CATEGORY:=LibreMesh
PKGARCH:=all
endef

define Package/$(PKG_NAME)/description
Napoli development testnet
endef


define Build/Compile
endef

define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/
$(CP) ./files/* $(1)/
endef

$(eval $(call BuildPackage,$(PKG_NAME)))
6 changes: 6 additions & 0 deletions packages/devnet/files/etc/config/lime-5ed6c0c6b61d
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config lime system
option hostname 'falsorouter-kone'

config generic_uci_config location_coord
list uci_set 'location.settings.node_latitude=-31.83469'
list uci_set 'location.settings.node_longitude=-64.41885'
6 changes: 6 additions & 0 deletions packages/devnet/files/etc/config/lime-a840411f73f6
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config lime system
option hostname 'kone-carcassa'

config generic_uci_config location_coord
list uci_set 'location.settings.node_latitude=-31.82346'
list uci_set 'location.settings.node_longitude=-64.38726'
6 changes: 6 additions & 0 deletions packages/devnet/files/etc/config/lime-c04a00be7b0a
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config lime system
option hostname 'konA-base11s'

config generic_uci_config location_coord
list uci_set 'location.settings.node_latitude='-31.81850'
list uci_set 'location.settings.node_longitude='-64.41593'
6 changes: 6 additions & 0 deletions packages/devnet/files/etc/config/lime-c04a00dd691c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config lime system
option hostname 'konB-11s'

config generic_uci_config location_coord
list uci_set 'location.settings.node_latitude='-31.81194'
list uci_set 'location.settings.node_longitude='-64.40151'
1 change: 1 addition & 0 deletions packages/devnet/files/etc/dropbear/authorized_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDqx1QGbn1OYyrnIyrLzVJNqvjEgTzKI3fB7VkzeatVJJS1uvlBFSZEqKxIHbTJxenIEoF4B6CfOCtTPB03OInhFtV5tbo1024oKDgR6DKWPjMuQVVrSTLPeN30TfDx09/VhapAjslWgm5umSrEGu3rtgT3OSu4udlKyiATGh2UPlf1GwuVtQOONKMeRXfMW694j8vr+QEv5VqIm2FxsQqtdZt3SHbWCnsg45WftfQRvjmfEACBh8qINL2KrEKKscmPPYxj+LIuZLWBklgf4se1NyEnFzYCz8cNtpmjoeNuIFC2XCpQVxXr1P6kmCzJ+/U+tnMW0jv59fhYneSGrTAn root@localhost
4 changes: 4 additions & 0 deletions packages/devnet/files/etc/uci-defaults/90_custom-fw-repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
uci set eupgrade.main.custom_api_url='http://10.13.0.2:8081/'
uci commit eupgrade
exit 0
35 changes: 35 additions & 0 deletions packages/devnet/files/usr/lib/lua/mastertest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
local repository = "http://10.13.0.2:8081/"
local lime_mesh_upgrade = require 'lime-mesh-upgrade'
local eupgrade = require 'eupgrade'


local network = require("lime.network")
print(tostring(network.primary_address()))
print(tostring(eupgrade.get_upgrade_api_url()))


local utils = require "lime.utils"
-- Uncoment for qemu
--os.execute('echo librerouter-v1 > /tmp/sysinfo/board_name')

print(eupgrade._get_board_name())
eupgrade.set_custom_api_url(repository)
print(tostring(eupgrade.get_upgrade_api_url()))
utils.printJson(eupgrade.is_new_version_available())

--lime_mesh_upgrade.become_main_node()
--utils.printJson(lime_mesh_upgrade.get_main_node_status())
--
--os.execute("sleep " .. tonumber(1))
--
--utils.printJson(lime_mesh_upgrade.get_main_node_status())
--
--while not (lime_mesh_upgrade.get_main_node_status().code == eupgrade.STATUS_DOWNLOADED) do
--
-- os.execute("sleep " .. tonumber(1))
--
-- utils.printJson(lime_mesh_upgrade.get_main_node_status())
--
--end
--
--utils.printJson(lime_mesh_upgrade.start_firmware_upgrade_transaction())

0 comments on commit b5bb9e2

Please sign in to comment.