From 51c6cb7c1b39b4aa48eb5f9e6a4d6dd383a37583 Mon Sep 17 00:00:00 2001 From: Eduard Kaverinskyi Date: Fri, 31 Jan 2025 12:12:04 +0100 Subject: [PATCH 1/4] 3mdeb-rtectrl/: import config from repo Signed-off-by: Eduard Kaverinskyi --- .../3mdeb-rtectrl/3mdeb-rtectrl/RteCtrl.cfg | 153 ------------------ recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb | 7 +- .../3mdeb-rtectrl/3mdeb-rtectrl_git.bbappend | 5 - 3 files changed, 6 insertions(+), 159 deletions(-) delete mode 100644 recipes-go/3mdeb-rtectrl/3mdeb-rtectrl/RteCtrl.cfg diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl/RteCtrl.cfg b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl/RteCtrl.cfg deleted file mode 100644 index 50148d6..0000000 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl/RteCtrl.cfg +++ /dev/null @@ -1,153 +0,0 @@ -{ - "server_address" : ":8000", - "web_directory" : "/usr/share/RteWeb", - "flashrom_bin" : "/usr/sbin/flashrom", - "sys_gpio_path" : "/sys/class/gpio", - "cmd_id" : { - "power" : 9, - "reset" : 8, - "relay" : 0 - }, - "gpios" : [ - { - "id" : 0, - "description" : "relay", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 199 - }, - { - "id" : 1, - "description" : "oc3", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 516 - }, - { - "id" : 2, - "description" : "oc2", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 517 - }, - { - "id" : 3, - "description" : "oc1", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 518 - }, - { - "id" : 4, - "description" : "oc6", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 519 - }, - { - "id" : 5, - "description" : "oc5", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 527 - }, - { - "id" : 6, - "description" : "oc4", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 526 - }, - { - "id" : 7, - "description" : "apu_wdt", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 523 - }, - { - "id" : 8, - "description" : "apu_rst", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 524 - }, - { - "id" : 9, - "description" : "apu_pwr", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 522 - }, - { - "id" : 10, - "description" : "apu_modesw", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 523 - }, - { - "id" : 11, - "description" : "apu_clr_cmos", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 524 - }, - { - "id" : 12, - "description" : "apu_wp", - "direction" : "out", - "init_value" : 0, - "sys_gpio" : 525 - }, - { - "id" : 13, - "description" : "ext0", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 512 - }, - { - "id" : 14, - "description" : "ext1", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 513 - }, - { - "id" : 15, - "description" : "ext2", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 514 - }, - { - "id" : 16, - "description" : "ext3", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 515 - }, - { - "id" : 17, - "description" : "led1", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 12 - }, - { - "id" : 18, - "description" : "led2", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 11 - }, - { - "id" : 19, - "description" : "led3", - "direction" : "in", - "init_value" : 0, - "sys_gpio" : 6 - } - ] -} diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb index e25cdef..c79ebc6 100644 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb +++ b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb @@ -13,7 +13,7 @@ DEPENDS += " \ PV = "0.5.3" SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=master" -SRCREV = "9910a7254dae317fdcc0afebf91e3985a0622005" +SRCREV = "24ee0e666fb5ca63b4b65f894c53564f71fdfa79" FILES:${PN} += " \ ${datadir}/RteWeb/* \ @@ -42,4 +42,9 @@ do_install:append() { # rte_ctrl script install -d ${D}{bindir} install -m 0755 ${S}/src/${GO_IMPORT}/scripts/rte_ctrl ${D}${bindir} + + # configuration file + install -d ${D}${sysconfdir}/RteCtrl + install -m 0644 ${S}/src/${GO_IMPORT}/config/RteCtrl.cfg ${D}${sysconfdir}/RteCtrl/ + } diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bbappend b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bbappend index 440f132..7335606 100644 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bbappend +++ b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bbappend @@ -1,7 +1,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI:append = " \ - file://RteCtrl.cfg \ file://RteCtrl.service \ " @@ -11,10 +10,6 @@ FILES:${PN} += " \ " do_install:append() { - # configuration file - install -d ${D}${sysconfdir}/RteCtrl - install -m 0644 ${WORKDIR}/RteCtrl.cfg ${D}${sysconfdir}/RteCtrl/ - install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/RteCtrl.service ${D}${systemd_unitdir}/system/ } From 2aec539d81ea9230550a5ba3a644cdf4faa6fad0 Mon Sep 17 00:00:00 2001 From: Eduard Kaverinskyi Date: Fri, 31 Jan 2025 12:15:48 +0100 Subject: [PATCH 2/4] 3mdeb-rtectrl/: change branch to use-config-from-rtectrl Signed-off-by: Eduard Kaverinskyi --- recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb index c79ebc6..e1ee9a0 100644 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb +++ b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb @@ -12,7 +12,7 @@ DEPENDS += " \ " PV = "0.5.3" -SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=master" +SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=use-config-from-rtectrl" SRCREV = "24ee0e666fb5ca63b4b65f894c53564f71fdfa79" FILES:${PN} += " \ From aa1887d734891b5bc1daf964034f7e1907ead969 Mon Sep 17 00:00:00 2001 From: Eduard Kaverinskyi Date: Fri, 31 Jan 2025 12:21:24 +0100 Subject: [PATCH 3/4] Revert "3mdeb-rtectrl/: change branch to use-config-from-rtectrl" This reverts commit 2aec539d81ea9230550a5ba3a644cdf4faa6fad0. --- recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb index e1ee9a0..c79ebc6 100644 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb +++ b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb @@ -12,7 +12,7 @@ DEPENDS += " \ " PV = "0.5.3" -SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=use-config-from-rtectrl" +SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=master" SRCREV = "24ee0e666fb5ca63b4b65f894c53564f71fdfa79" FILES:${PN} += " \ From 1400aac77463f6cd6cc10a0a0e158266882e941e Mon Sep 17 00:00:00 2001 From: Eduard Kaverinskyi Date: Fri, 31 Jan 2025 12:22:02 +0100 Subject: [PATCH 4/4] 3mdeb-rtectrl/: change branch to update-config-gpio Signed-off-by: Eduard Kaverinskyi --- recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb index c79ebc6..7babd1c 100644 --- a/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb +++ b/recipes-go/3mdeb-rtectrl/3mdeb-rtectrl_git.bb @@ -12,7 +12,7 @@ DEPENDS += " \ " PV = "0.5.3" -SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=master" +SRC_URI = "git://git@github.com/3mdeb/RteCtrl.git;protocol=https;branch=update-config-gpio" SRCREV = "24ee0e666fb5ca63b4b65f894c53564f71fdfa79" FILES:${PN} += " \