ucentral: development update

* update ucentral-client
* update ucentral-schema
* rework CI file deployment
* fix firmware version reporting

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-05-06 07:52:56 +02:00
parent c596a66f26
commit e54a3d7db0
18 changed files with 36 additions and 13 deletions

View File

@@ -36,3 +36,8 @@ jobs:
ls openwrt/bin/targets/
tar cfz "$TAR_NAME" -C openwrt/bin/targets/ .
curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "$TAR_NAME" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$TAR_NAME""
IMG_NAME="$(date +%Y%m%d)-$LOWERCASE_TARGET-$BRANCH-$HASH-upgrade.bin";
#echo "$IMG_NAME" > lastet-upgrade.bin
ln -s "$IMG_NAME" > lastet-upgrade.bin
[ -f openwrt/image-file ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "openwrt/$(cat openwrt/image-file)" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/"$IMG_NAME""
[ -f lastet-upgrade.bin ] && curl -u $GH_BUILD_USERNAME:$GH_BUILD_PASSWORD -T "lastet-upgrade.bin" "https://tip.jfrog.io/artifactory/tip-wlan-ap-firmware/uCentral/$LOWERCASE_TARGET/lastet-upgrade.bin"

View File

@@ -3,7 +3,8 @@
START=80
boot() {
DESC=$(cat /etc/openwrt_release | grep DISTRIB_DESCRIPTION= | cut -d\' -f2)
HASH=$(cat /etc/openwrt_release | grep DISTRIB_TIP= | cut -d\' -f2)
VERSION=$(cat /etc/openwrt_release | grep DISTRIB_TIP_VERSION= | cut -d\' -f2)
echo "$VERSION-$HASH" > /tmp/ucentral.version
echo "$DESC / TIP-$VERSION-$HASH" > /tmp/ucentral.version
}

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/ucentral-client.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-02-15
PKG_SOURCE_VERSION:=a32aeff57960bceb3fd55f140528b46f1c391821
PKG_SOURCE_VERSION:=45b2e27d238d5366a3ef0a291ae2194d1db9c496
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=John Crispin <john@phrozen.org>

View File

@@ -33,7 +33,7 @@ start_service() {
[ -n "$reporting" ] && procd_append_param command -r $reporting
[ "$debug" -eq 0 ] || procd_append_param command -d
[ "$insecure" -eq 0 ] || procd_append_param command -i
procd_append_param command -f $(cat /tmp/ucentral.version)
procd_append_param command -f "$(cat /tmp/ucentral.version)"
procd_set_param respawn 3600 5 0
procd_close_instance
}

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-02-15
PKG_SOURCE_VERSION:=82c6dfe61218a015c95c0ba320d72ecac2d85f24
PKG_SOURCE_VERSION:=81d44d33b3edd2ea2dfcbd7abc058565de2a0383
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -1,22 +1,22 @@
From 3eeb1949584e930fb4e3b9d5369c32e58ed40ab2 Mon Sep 17 00:00:00 2001
From 79dadbe5f9d74b3bca49e50a51f1a62be71b17a5 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Fri, 19 Jun 2020 10:45:22 +0200
Subject: [PATCH 03/21] pending: scripts: add gen_config.py
Subject: [PATCH 01/31] pending: scripts: add gen_config.py
This script is used to setup the tree based on the profiles/.
Signed-off-by: John Crispin <john@phrozen.org>
---
scripts/gen_config.py | 188 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 188 insertions(+)
scripts/gen_config.py | 193 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 193 insertions(+)
create mode 100755 scripts/gen_config.py
diff --git a/scripts/gen_config.py b/scripts/gen_config.py
new file mode 100755
index 0000000000..5bc7068ae7
index 0000000000..124dfd596a
--- /dev/null
+++ b/scripts/gen_config.py
@@ -0,0 +1,188 @@
@@ -0,0 +1,193 @@
+#!/usr/bin/env python3
+
+from os import getenv
@@ -63,7 +63,7 @@ index 0000000000..5bc7068ae7
+
+ new = yaml.safe_load(profile_file.read_text())
+ for n in new:
+ if n in {"profile", "target", "subtarget", "external_target"}:
+ if n in {"profile", "target", "subtarget", "external_target", "image"}:
+ if profile.get(n):
+ die(f"Duplicate tag found {n}")
+ profile.update({n: new.get(n)})
@@ -115,7 +115,7 @@ index 0000000000..5bc7068ae7
+ for p in profile.get("feeds", []):
+ try:
+ f = profile["feeds"].get(p)
+ if all(k in f for k in ("branch", "revision", "path")):
+ if all(k in f for k in ("branch", "revision", "path", "tag")):
+ die(f"Please specify either a branch, a revision or a path: {f}")
+ if "path" in f:
+ feeds.append(
@@ -125,6 +125,10 @@ index 0000000000..5bc7068ae7
+ feeds.append(
+ f'{f.get("method", "src-git")},{f["name"]},{f["uri"]}^{f.get("revision")}'
+ )
+ elif "tag" in f:
+ feeds.append(
+ f'{f.get("method", "src-git")},{f["name"]},{f["uri"]};{f.get("tag")}'
+ )
+ else:
+ feeds.append(
+ f'{f.get("method", "src-git")},{f["name"]},{f["uri"]};{f.get("branch", "master")}'
@@ -201,7 +205,8 @@ index 0000000000..5bc7068ae7
+ clean_tree()
+ setup_feeds(profile)
+ generate_config(profile)
+
+ if profile["image"]:
+ Path("image-file").write_text(profile["image"])
+ print("Running make defconfig")
+ if run(["make", "defconfig"]).returncode:
+ die(f"Error running make defconfig")

View File

@@ -3,6 +3,7 @@ profile: cig_wf610d
target: ipq40xx
subtarget: generic
description: Build image for the CIG WF160D
image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-cig_wf610d-squashfs-sysupgrade.bin
include:
- ucentral-ap
packages:

View File

@@ -3,6 +3,7 @@ profile: cig_wf188n
target: ipq807x
subtarget: ipq60xx
description: Build image for the Cigtech WF188n
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-cig_wf188n-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x

View File

@@ -3,6 +3,7 @@ profile: cig_wf194
target: ipq807x
subtarget: ipq807x
description: Build image for the CIG WF194C
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-cig_wf194-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x

View File

@@ -3,6 +3,7 @@ profile: edgecore_eap101
target: ipq807x
subtarget: ipq60xx
description: Build image for the EdgeCore EAP101
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-edgecore_eap101-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x

View File

@@ -3,6 +3,7 @@ profile: edgecore_eap102
target: ipq807x
subtarget: ipq807x
description: Build image for the Edgecore EAP102
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-edgecore_eap102-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x

View File

@@ -3,6 +3,7 @@ profile: edgecore_ecs4100-12ph
target: realtek
subtarget: generic
description: Build image for the EdgeCore ECS4100-12ph
image: bin/targets/realtek/generic/openwrt-realtek-generic-edgecore_ecs4100-12ph-squashfs-sysupgrade.bin
include:
- realtek
- ucentral-switch

View File

@@ -3,6 +3,7 @@ profile: edgecore_ecw5211
target: ipq40xx
subtarget: generic
description: Build image for the Edgecore ECW5211
image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-edgecore_ecw5211-squashfs-nand-sysupgrade.bin
include:
- ucentral-ap
packages:

View File

@@ -3,6 +3,7 @@ profile: linksys_e8450-ubi
target: mediatek
subtarget: mt7622
description: Build image for the Linksys E8450
image: bin/targets/mediatek/mt7622/openwrt-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
include:
- ucentral-ap
diffconfig: |

View File

@@ -3,6 +3,7 @@ profile: linksys_ea8300
target: ipq40xx
subtarget: generic
description: Build image for the Linksys ea8300
image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-edgecore_ecw5211-squashfs-nand-sysupgrade.bin
include:
- ucentral-ap
packages:

View File

@@ -3,5 +3,6 @@ profile: tplink_cpe210-v3
target: ath79
subtarget: generic
description: Build image for the TPLink CPE 210 v3
image: bin/targets/ath79/generic/openwrt-ath79-generic-tplink_cpe210-v3-squashfs-sysupgrade.bin
include:
- ucentral-ap-light

View File

@@ -3,6 +3,7 @@ profile: tplink_ex227
target: ipq807x
subtarget: ipq807x
description: Build image for the TP-Link EX227
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-tplink_ex227-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x

View File

@@ -3,6 +3,7 @@ profile: tplink_ex447
target: ipq807x
subtarget: ipq807x
description: Build image for the TP-Link EX447
image: bin/targets/ipq807x/ipq807x/openwrt-ipq807x-tplink_ex447-squashfs-sysupgrade.tar
feeds:
- name: ipq807x
path: ../../feeds/ipq807x