lbkit 0.9.1__tar.gz → 0.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lbkit-0.9.1/lbkit.egg-info → lbkit-0.9.3}/PKG-INFO +1 -1
- lbkit-0.9.3/lbkit/__init__.py +2 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/idf_interface.py +2 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/public.c.mako +32 -5
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/public.h.mako +9 -1
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/test.py +1 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/ukr/build.py +98 -30
- {lbkit-0.9.1 → lbkit-0.9.3/lbkit.egg-info}/PKG-INFO +1 -1
- lbkit-0.9.1/lbkit/__init__.py +0 -2
- {lbkit-0.9.1 → lbkit-0.9.3}/AUTHORS +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/LICENSE +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/MANIFEST.in +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/README.md +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/build_conan_parallel.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/ci_robot/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/ci_robot/gitee.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/cli.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/codegen.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/ctype_defination.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/renderer.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/client.c.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/client.h.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/interface.c.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/interface.introspect.xml.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/server.c.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/codegen/template/server.h.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/arg_parser.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/build.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/template/conanbase.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/component/template/deploy.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/errors.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/helper.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/lbkit.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/log.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/misc.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/config.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/executor.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/image_maker/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/image_maker/make_image.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/image_maker/make_qemu_image.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/image_maker/make_rockchip_image.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task_build_image.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task_build_manifest.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task_build_prepare.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task_build_rootfs.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/task_download.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/template/conanfile.py.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tasks/template/rootfs.py.mako +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/tools.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/ukr/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/utils/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/utils/env_detector.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/utils/images/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit/utils/images/emmc.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit.egg-info/SOURCES.txt +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit.egg-info/dependency_links.txt +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit.egg-info/entry_points.txt +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit.egg-info/requires.txt +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/lbkit.egg-info/top_level.txt +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/setup.cfg +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/setup.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/test/__init__.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/test/test_codegen.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/test/test_config.py +0 -0
- {lbkit-0.9.1 → lbkit-0.9.3}/test/test_helper.py +0 -0
|
@@ -987,6 +987,8 @@ class IdfPluginAction(IdfMethod):
|
|
|
987
987
|
self.policy = method_data.get("policy", "continue_always")
|
|
988
988
|
super().__init__(intf, method_data)
|
|
989
989
|
self.is_plugin = True
|
|
990
|
+
if self.policy == "continue_always" and method_data.get("returns", []):
|
|
991
|
+
raise Exception(f"The policy of plugin {self.name} is 'continue_always', does't supported 'returns' property, interface {self.intf.name} failed to generate code")
|
|
990
992
|
|
|
991
993
|
|
|
992
994
|
class IdfEnumeration(IdfBase):
|
|
@@ -1218,7 +1218,7 @@ int ${class_name}_${action.name}_register(const gchar *req_signature, const gcha
|
|
|
1218
1218
|
g_mutex_lock(&_${class_name}_${action.name}_lock);
|
|
1219
1219
|
for (GSList *item = _${class_name}_${action.name}_actions; item; item = item->next) {
|
|
1220
1220
|
_${class_name}_${action.name}_PluginAction *old_handler = (_${class_name}_${action.name}_PluginAction *)item->data;
|
|
1221
|
-
if (action == old_handler->action
|
|
1221
|
+
if (action == old_handler->action && user_data == old_handler->user_data) {
|
|
1222
1222
|
g_mutex_unlock(&_${class_name}_${action.name}_lock);
|
|
1223
1223
|
return 0;
|
|
1224
1224
|
}
|
|
@@ -1256,9 +1256,18 @@ void ${class_name}_${action.name}_unregister(${class_name}_${action.name}_action
|
|
|
1256
1256
|
<% REQ_PARA = f', const {class_name}_{action.name}_Req *req' %>\
|
|
1257
1257
|
<% REQ_NAME = f', req' %>\
|
|
1258
1258
|
% endif
|
|
1259
|
+
% if action.policy == "continue_always":
|
|
1260
|
+
void ${class_name}_${action.name}_run(${class_name} obj${REQ_PARA}${RSP_PARA})
|
|
1261
|
+
% else:
|
|
1259
1262
|
int ${class_name}_${action.name}_run(${class_name} obj${REQ_PARA}${RSP_PARA})
|
|
1263
|
+
% endif
|
|
1260
1264
|
{
|
|
1265
|
+
% if action.policy == "return_any_success":
|
|
1266
|
+
gint result = -1;
|
|
1267
|
+
% elif action.policy == "return_any_fail":
|
|
1261
1268
|
gint result = 0;
|
|
1269
|
+
% endif
|
|
1270
|
+
|
|
1262
1271
|
g_mutex_lock(&_${class_name}_${action.name}_lock);
|
|
1263
1272
|
for (GSList *item = _${class_name}_${action.name}_actions; item; item = item->next) {
|
|
1264
1273
|
_${class_name}_${action.name}_PluginAction *handler = (_${class_name}_${action.name}_PluginAction *)item->data;
|
|
@@ -1266,24 +1275,42 @@ int ${class_name}_${action.name}_run(${class_name} obj${REQ_PARA}${RSP_PARA})
|
|
|
1266
1275
|
if (rsp && *rsp) {
|
|
1267
1276
|
${class_name}_${action.name}_Rsp_free(rsp);
|
|
1268
1277
|
}
|
|
1278
|
+
% if action.policy == "continue_always":
|
|
1279
|
+
handler->action(obj${REQ_NAME}, rsp, handler->user_data);
|
|
1280
|
+
% else:
|
|
1269
1281
|
gint ret = handler->action(obj${REQ_NAME}, rsp, handler->user_data);
|
|
1282
|
+
% endif
|
|
1270
1283
|
% else:
|
|
1284
|
+
% if action.policy == "continue_always":
|
|
1285
|
+
handler->action(obj${REQ_NAME}, handler->user_data);
|
|
1286
|
+
% else:
|
|
1271
1287
|
gint ret = handler->action(obj${REQ_NAME}, handler->user_data);
|
|
1288
|
+
% endif
|
|
1272
1289
|
% endif
|
|
1273
|
-
if (ret != 0)
|
|
1274
|
-
result = ret;
|
|
1275
1290
|
% if action.policy == "return_any_success":
|
|
1276
1291
|
/* return when any action success(ret == 0) */
|
|
1277
|
-
if (ret == 0)
|
|
1292
|
+
if (ret == 0) {
|
|
1293
|
+
result = 0;
|
|
1278
1294
|
break;
|
|
1295
|
+
}
|
|
1279
1296
|
% elif action.policy == "return_any_fail":
|
|
1280
1297
|
/* return when any action failed(ret != 0) */
|
|
1281
|
-
if (ret != 0)
|
|
1298
|
+
if (ret != 0) {
|
|
1299
|
+
result = ret;
|
|
1282
1300
|
break;
|
|
1301
|
+
}
|
|
1283
1302
|
% endif
|
|
1284
1303
|
}
|
|
1304
|
+
% if len(action.returns.parameters) > 0:
|
|
1305
|
+
if (result != 0 && *rsp) {
|
|
1306
|
+
${class_name}_${action.name}_Rsp_free(rsp);
|
|
1307
|
+
*rsp = NULL;
|
|
1308
|
+
}
|
|
1309
|
+
% endif
|
|
1285
1310
|
g_mutex_unlock(&_${class_name}_${action.name}_lock);
|
|
1311
|
+
% if action.policy != "continue_always":
|
|
1286
1312
|
return result;
|
|
1313
|
+
% endif
|
|
1287
1314
|
}
|
|
1288
1315
|
|
|
1289
1316
|
% endfor
|
|
@@ -315,18 +315,26 @@ typedef struct {
|
|
|
315
315
|
<% RSP_PARA = f'' %>\
|
|
316
316
|
<% REQ_PARA = f'' %>\
|
|
317
317
|
% if len(action.returns.parameters) > 0:
|
|
318
|
-
<% RSP_PARA = f', {class_name}_{action.name}
|
|
318
|
+
<% RSP_PARA = f', {class_name}_{action.name}_Rsp **rsp' %>\
|
|
319
319
|
% endif
|
|
320
320
|
% if len(action.parameters.parameters) > 0:
|
|
321
321
|
<% REQ_PARA = f', const {class_name}_{action.name}_Req *req' %>\
|
|
322
322
|
% endif
|
|
323
|
+
% if action.policy == "continue_always":
|
|
324
|
+
typedef void (*${class_name}_${action.name}_action)(${class_name} obj${REQ_PARA}${RSP_PARA}, gpointer user_data);
|
|
325
|
+
% else:
|
|
323
326
|
typedef int (*${class_name}_${action.name}_action)(${class_name} obj${REQ_PARA}${RSP_PARA}, gpointer user_data);
|
|
327
|
+
% endif
|
|
324
328
|
|
|
325
329
|
/* Register a new plugin action, can't register repeated with same action and user_data */
|
|
326
330
|
int ${class_name}_${action.name}_register(const gchar *req_signature, const gchar *rsp_signature,
|
|
327
331
|
${class_name}_${action.name}_action action, gpointer user_data);
|
|
328
332
|
void ${class_name}_${action.name}_unregister(${class_name}_${action.name}_action action);
|
|
333
|
+
% if action.policy == "continue_always":
|
|
334
|
+
void ${class_name}_${action.name}_run(${class_name} obj${REQ_PARA}${RSP_PARA});
|
|
335
|
+
% else:
|
|
329
336
|
int ${class_name}_${action.name}_run(${class_name} obj${REQ_PARA}${RSP_PARA});
|
|
337
|
+
% endif
|
|
330
338
|
|
|
331
339
|
% endfor
|
|
332
340
|
% endif
|
|
@@ -2,27 +2,13 @@
|
|
|
2
2
|
import os
|
|
3
3
|
import yaml
|
|
4
4
|
import shutil
|
|
5
|
-
import re
|
|
6
|
-
import json
|
|
7
|
-
import tempfile
|
|
8
5
|
from string import Template
|
|
9
|
-
from multiprocessing import Pool
|
|
10
|
-
import traceback
|
|
11
|
-
from argparse import ArgumentParser
|
|
12
|
-
from jsonschema import validate, ValidationError
|
|
13
|
-
from git import Repo
|
|
14
|
-
from git.exc import InvalidGitRepositoryError
|
|
15
|
-
from mako.lookup import TemplateLookup
|
|
16
|
-
from lbkit.misc import Color, load_yml_with_json_schema_validate, get_json_schema_file, load_json_schema
|
|
17
|
-
from lbkit import errors
|
|
18
|
-
from lbkit.codegen.codegen import CodeGen, history_versions
|
|
19
6
|
from lbkit.tools import Tools
|
|
20
|
-
from lbkit.build_conan_parallel import BuildConanParallel
|
|
21
|
-
from lbkit.codegen.codegen import Version
|
|
22
7
|
from lbkit.tasks.task_download import DownloadTask
|
|
23
8
|
from lbkit.misc import DownloadFlag
|
|
24
9
|
from lbkit.tools import Tools
|
|
25
10
|
from lbkit.utils.env_detector import EnvDetector
|
|
11
|
+
from lbkit.misc import load_yml_with_json_schema_validate
|
|
26
12
|
|
|
27
13
|
|
|
28
14
|
tools = Tools("comp_build")
|
|
@@ -33,10 +19,25 @@ class SourceDest():
|
|
|
33
19
|
def __init__(self, cfg):
|
|
34
20
|
self.source = cfg.get("source")
|
|
35
21
|
self.dest = cfg.get("dest")
|
|
22
|
+
self.pattern = cfg.get("pattern")
|
|
36
23
|
|
|
37
24
|
def copy(self, source_dir, dest_dir, with_template, **kwargs):
|
|
38
25
|
source = os.path.join(source_dir, self.source)
|
|
39
26
|
dest = os.path.join(dest_dir, self.dest)
|
|
27
|
+
if self.pattern and os.path.isdir(source):
|
|
28
|
+
if not source.endswith("/"):
|
|
29
|
+
source += "/"
|
|
30
|
+
files = tools.pipe([f"find {source} -name {self.pattern}"], out_file=None).decode("utf-8").split("\n")
|
|
31
|
+
for file in files:
|
|
32
|
+
file = file.strip()
|
|
33
|
+
if not file:
|
|
34
|
+
continue
|
|
35
|
+
new_dest = os.path.join(dest, file[len(source):])
|
|
36
|
+
self._copy(file, new_dest, with_template, **kwargs)
|
|
37
|
+
else:
|
|
38
|
+
self._copy(source, dest, with_template, **kwargs)
|
|
39
|
+
|
|
40
|
+
def _copy(self, source, dest, with_template, **kwargs):
|
|
40
41
|
if os.path.isfile(dest):
|
|
41
42
|
os.unlink(dest)
|
|
42
43
|
dest_dir = os.path.dirname(dest)
|
|
@@ -86,9 +87,6 @@ class BuildGeneral():
|
|
|
86
87
|
}
|
|
87
88
|
task = DownloadTask(cfg, os.getcwd())
|
|
88
89
|
task.start()
|
|
89
|
-
_, sha = DownloadFlag.read(self.dir_name)
|
|
90
|
-
if sha == sha256:
|
|
91
|
-
return
|
|
92
90
|
cmd = f"tar -xf {task.dst} -C {self.dir_name}"
|
|
93
91
|
if task.strip_components:
|
|
94
92
|
cmd += f" --strip-components={task.strip_components}"
|
|
@@ -101,10 +99,15 @@ class BuildGeneral():
|
|
|
101
99
|
def prepare_defconfig(self):
|
|
102
100
|
defconf = self.cfg.get("defconfig")
|
|
103
101
|
compiler_path=os.path.join(self.work_dir, "toolchain")
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
if isinstance(defconf, list):
|
|
103
|
+
for conf in defconf:
|
|
104
|
+
sd = SourceDest(conf)
|
|
105
|
+
sd.copy(self.cwd, os.path.join(self.work_dir, self.dir_name), True, compiler_path=compiler_path)
|
|
106
|
+
else:
|
|
107
|
+
sd = SourceDest(defconf)
|
|
108
|
+
sd.copy(self.cwd, os.path.join(self.work_dir, self.dir_name), True, compiler_path=compiler_path)
|
|
106
109
|
os.environ["ARCH"] = self.arch
|
|
107
|
-
os.environ["CROSS_COMPILE"] = self.cross_compile + "-"
|
|
110
|
+
os.environ["CROSS_COMPILE"] = os.path.join(compiler_path, "bin", self.cross_compile + "-")
|
|
108
111
|
path = os.environ.get("PATH", "")
|
|
109
112
|
if compiler_path not in path:
|
|
110
113
|
path += ":" + compiler_path + "/bin"
|
|
@@ -113,13 +116,21 @@ class BuildGeneral():
|
|
|
113
116
|
|
|
114
117
|
def build(self):
|
|
115
118
|
os.chdir(self.dir_name)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
cmds = self.cfg.get("cmds", [])
|
|
120
|
+
if cmds:
|
|
121
|
+
for cmd in cmds:
|
|
122
|
+
compiler = os.environ["CROSS_COMPILE"]
|
|
123
|
+
cmd = cmd.replace("${compiler}", compiler)
|
|
124
|
+
cmd = cmd.replace("${workdir}", self.dir_name)
|
|
125
|
+
self.tools.exec(cmd, verbose=True)
|
|
120
126
|
else:
|
|
121
|
-
cmd = f"make
|
|
122
|
-
|
|
127
|
+
cmd = f"make {self.defconfig}"
|
|
128
|
+
self.tools.exec(cmd, verbose=True)
|
|
129
|
+
if self.name == "compiler":
|
|
130
|
+
cmd = f"make sdk -j" + str(os.cpu_count())
|
|
131
|
+
else:
|
|
132
|
+
cmd = f"make -j" + str(os.cpu_count())
|
|
133
|
+
self.tools.exec(cmd, verbose=True)
|
|
123
134
|
|
|
124
135
|
def tar_files(self):
|
|
125
136
|
os.chdir(self.dir_name)
|
|
@@ -139,6 +150,8 @@ class BuildGeneral():
|
|
|
139
150
|
sd.copy(self.dir_name, self.output, False)
|
|
140
151
|
|
|
141
152
|
def run(self):
|
|
153
|
+
if not self.cfg:
|
|
154
|
+
return
|
|
142
155
|
self.download()
|
|
143
156
|
self.prepare_defconfig()
|
|
144
157
|
self.build()
|
|
@@ -181,6 +194,59 @@ class BuildUBoot(BuildGeneral):
|
|
|
181
194
|
super().__init__(config, cwd, "uboot", "uboot")
|
|
182
195
|
|
|
183
196
|
|
|
197
|
+
class PreDownload():
|
|
198
|
+
def __init__(self, config, cwd):
|
|
199
|
+
self.cwd = cwd
|
|
200
|
+
self.cfg = config.get("predownload", [])
|
|
201
|
+
|
|
202
|
+
def run(self):
|
|
203
|
+
if not self.cfg:
|
|
204
|
+
return
|
|
205
|
+
for down in self.cfg:
|
|
206
|
+
url = down.get("url")
|
|
207
|
+
sha256 = down.get("sha256")
|
|
208
|
+
verify = down.get("verify", True)
|
|
209
|
+
destfile = down.get("destfile")
|
|
210
|
+
destfile = os.path.join(self.cwd, ".temp", destfile)
|
|
211
|
+
destfile = os.path.realpath(destfile)
|
|
212
|
+
if not destfile.startswith(self.cwd):
|
|
213
|
+
raise Exception(f"dest file {destfile} not startswith {self.cwd}")
|
|
214
|
+
destdir = os.path.dirname(destfile)
|
|
215
|
+
if not os.path.isdir(destdir):
|
|
216
|
+
os.makedirs(destdir)
|
|
217
|
+
|
|
218
|
+
tmpfile = os.path.join(self.cwd, ".temp", os.path.basename(url))
|
|
219
|
+
|
|
220
|
+
cfg = {
|
|
221
|
+
"url": url,
|
|
222
|
+
"file": tmpfile,
|
|
223
|
+
"decompress": {
|
|
224
|
+
"dirname": self.cwd,
|
|
225
|
+
"strip_components": 0
|
|
226
|
+
},
|
|
227
|
+
"sha256": sha256,
|
|
228
|
+
"verify": verify
|
|
229
|
+
}
|
|
230
|
+
task = DownloadTask(cfg, os.getcwd())
|
|
231
|
+
task.start()
|
|
232
|
+
if tmpfile != destfile:
|
|
233
|
+
shutil.copyfile(tmpfile, destfile)
|
|
234
|
+
decomp = down.get("decompress")
|
|
235
|
+
if not decomp:
|
|
236
|
+
continue
|
|
237
|
+
strip_components = decomp.get("strip_components", 0)
|
|
238
|
+
dirname = decomp.get("dirname")
|
|
239
|
+
if not dirname:
|
|
240
|
+
continue
|
|
241
|
+
dirname = os.path.join(self.cwd, ".temp", dirname)
|
|
242
|
+
if os.path.isdir(dirname):
|
|
243
|
+
shutil.rmtree(dirname)
|
|
244
|
+
os.makedirs(dirname)
|
|
245
|
+
cmd = f"tar -xf {task.dst} -C {dirname}"
|
|
246
|
+
if strip_components:
|
|
247
|
+
cmd += f" --strip-components={strip_components}"
|
|
248
|
+
tools.exec(cmd)
|
|
249
|
+
|
|
184
250
|
class UKRBuild():
|
|
185
251
|
def __init__(self, env_detector: EnvDetector):
|
|
186
252
|
os.chdir(env_detector.ukr.folder)
|
|
@@ -188,8 +254,10 @@ class UKRBuild():
|
|
|
188
254
|
|
|
189
255
|
def run(self):
|
|
190
256
|
cwd = os.getcwd()
|
|
191
|
-
|
|
192
|
-
|
|
257
|
+
|
|
258
|
+
cfg = load_yml_with_json_schema_validate("config.yml", "/usr/share/litebmc/schema/ukr_config.v1.json")
|
|
259
|
+
download = PreDownload(cfg, cwd)
|
|
260
|
+
download.run()
|
|
193
261
|
build = BuildCompiler(cfg, cwd)
|
|
194
262
|
build.run()
|
|
195
263
|
build = BuildRootfs(cfg, cwd)
|
|
@@ -199,4 +267,4 @@ class UKRBuild():
|
|
|
199
267
|
build = BuildUBoot(cfg, cwd)
|
|
200
268
|
build.run()
|
|
201
269
|
cmd = f"tar -czf {cwd}/.temp/output/firmware.tar.gz -C {cwd}/.temp/output/images ."
|
|
202
|
-
tools.exec(cmd)
|
|
270
|
+
tools.exec(cmd)
|
lbkit-0.9.1/lbkit/__init__.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|