How to remove toaster from yocto Project - yocto

I am using yocto to build an image for the Up-Board following this guide: https://github.com/AaeonCM/meta-up-board
I tried to use Toaster for this project but later found out that the Up-Board isn't supported by toaster.
After I ran source toaster start I was no longer able to build form the command line with bitbake.
I get an error when I try to add an existing project by build directory in toaster, I think this is because the board is not supported.
The error I get when I try to use the 'Import command line project' feature in Toaster web browser is:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/toastergui/newproject/
Django Version: 2.2.27
Python Version: 3.6.9
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'bldcollector',
'toastermain',
'bldcontrol',
'toastergui',
'orm')
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware']
Traceback:
File "/home/dave/.local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/dave/.local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/dave/.local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/media/drive2/yocto2/poky/bitbake/lib/toaster/toastergui/views.py" in newproject
1407. management.call_command('buildimport', '--command=import', '--name=%s' % request.POST['projectname'], '--path=%s' % request.POST['importdir'], interactive=False)
File "/home/dave/.local/lib/python3.6/site-packages/django/core/management/__init__.py" in call_command
140. ', '.join(sorted(valid_options)),
Exception Type: TypeError at /toastergui/newproject/
Exception Value: Unknown option(s) for buildimport command: interactive. Valid options are: callback, command, delete_project, force_color, help, name, no_color, path, pythonpath, release, settings, skip_checks, stderr, stdout, traceback, verbosity, version.
The error I get when I try to build my project again from the command line is:
/poky/build$ MACHINE=up-board bitbake upboard-image-sato
Loading cache: 100% |#####################################################################################################################################################################| Time: 0:00:00
Loaded 3393 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "up-board"
DISTRO = "poky"
DISTRO_VERSION = "3.1.14"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "dunfell:c8987e7bca6ab22a166ca13c5d2fe8e02fbb6e23"
meta-intel = "dunfell:8eec569734cb1ff9c0905f4a88f9b4bfc89ed9fc"
meta-up-board = "dunfell:23b0e460c068db2c69d844681a23b8febe9b95a0"
meta-oe
meta-python
meta-networking
meta-filesystems = "dunfell:ec978232732edbdd875ac367b5a9c04b881f2e19"
meta-virtualization = "dunfell:c5f61e547b90aa8058cf816f00902afed9c96f72"
Initialising tasks: 100% |################################################################################################################################################################| Time: 0:00:04
Sstate summary: Wanted 2 Found 0 Missed 2 Current 3705 (0% match, 99% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 9002 tasks of which 9002 didn't need to be rerun and all succeeded.
ERROR: Execution of event handler 'toaster_buildhistory_dump' failed
Traceback (most recent call last):
File "/media/drive2/yocto2/poky/meta/classes/toaster.bbclass", line 273, in toaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fe8e830f6d8>):
files[target]['files'] = []
> with open("%s/installed-package-sizes.txt" % installed_img_path, "r") as fin:
for line in fin:
FileNotFoundError: [Errno 2] No such file or directory: '/media/drive2/yocto2/poky/build/buildhistory/images/up_board/glibc/upboard-image-sato/installed-package-sizes.txt'
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Is there any way to un-do whatever changes toaster did to the project? Uninstall toaster? Or should I start the project over again?

Related

openvino could not compile blob from frozen tensorflow pb, xml or bin model

openvino 2021.1 up and running
downloaded yolov3_tiny.weights and yolov3_tiny.cfg files from https://pjreddie.com/darknet/yolo/
As suggested in this link (https://colab.research.google.com/github/luxonis/depthai-ml-training/blob/master/colab-notebooks/Easy_TinyYolov3_Object_Detector_Training_on_Custom_Data.ipynb#scrollTo=2tojp0Wd-Pdw) downloaded https://github.com/mystic123/tensorflow-yolo-v3
used convert_weights_pb.py file to convert the weights and cfg file to a frozen yolov3 tiny .pb model.
python3 convert_weights_pb.py --class_names /home/user/depthai-python/my_job/coco.names --data_format NHWC --weights_file /home/user/depthai-python/my_job/yolov3-tiny.weights --tiny
used openvino mo.py file to convert yolov3_tiny .pb model to IR files .xml and .bin
python3 mo.py --input_model /home/user/depthai-python/my_job/frozen_darknet_yolov3_model.pb --tensorflow_use_custom_operations_config /home/user/depthai-python/my_job/yolo_v3_tiny.json --batch 1 --data_type FP16 --reverse_input_channel --output_dir /home/user/depthai-python/my_job
used this script as a python file to convert .xml and .bin to .blob file
blob_dir = "./my_job/"
binfile = "./my_job/frozen_darknet_yolov3_model.bin"
xmlfile = "./my_job/frozen_darknet_yolov3_model.xml"
import requests
url = "http://69.164.214.171:8083/compile" # change if running against other URL
payload = {
'compiler_params': '-ip U8 -VPU_NUMBER_OF_SHAVES 8 -VPU_NUMBER_OF_CMX_SLICES 8',
'compile_type': 'myriad'
}
files = {
'definition': open(xmlfile, 'rb'),
'weights': open(binfile, 'rb')
}
params = {
'version': '2021.1', # OpenVINO version, can be "2021.1", "2020.4", "2020.3", "2020.2", "2020.1", "2019.R3"
}
response = requests.post(url, data=payload, files=files, params=params)
print(response.headers)
print(response.content)
blobnameraw = response.headers.get('Content-Disposition')
print('blobnameraw',blobnameraw)
blobname = blobnameraw[blobnameraw.find('='):][1:]
with open(blob_dir + blobname, 'wb') as f:
f.write(response.content)
got the following error
{'Content-Type': 'application/json', 'Content-Length': '564', 'Server': 'Werkzeug/1.0.0 Python/3.6.9', 'Date': 'Fri, 09 Apr 2021 00:25:33 GMT'}
b'{"exit_code":1,"message":"Command failed with exit code 1, command: /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/myriad_compile -m /tmp/blobconverter/b9ea1f9cdb2c44bcb9bb2676ff414bf3/frozen_darknet_yolov3_model.xml -o /tmp/blobconverter/b9ea1f9cdb2c44bcb9bb2676ff414bf3/frozen_darknet_yolov3_model.blob -ip U8 -VPU_NUMBER_OF_SHAVES 8 -VPU_NUMBER_OF_CMX_SLICES 8","stderr":"stoi\n","stdout":"Inference Engine: \n\tAPI version ............ 2.1\n\tBuild .................. 2021.1.0-1237-bece22ac675-releases/2021/1\n\tDescription ....... API\n"}\n'
blobnameraw None
Traceback (most recent call last):
File "converter.py", line 29, in
blobname = blobnameraw[blobnameraw.find('='):][1:]
AttributeError: 'NoneType' object has no attribute 'find'
Alternatively i have tried the online blob converter tool from openvino http://69.164.214.171:8083/ gives the error for both .xm and .bin to .blob or from .pb to .blob
Anyone have idea.. i have tried all versions of openvino
We recommend you to use the myriad_compile.exe or compile_tool to convert your model to blob. Compile tool is a C++ application that enables you to compile a network for inference on a specific device and export it to a binary file. With the Compile Tool, you can compile a network using supported Inference Engine plugins on a machine that doesn't have the physical device connected and then transfer a generated file to any machine with the target inference device available.

Is there any patches for tegra-minimal-initramfs.bb to prevent this error?

I was trying to build core-image-minimal for Jetson TX2 following the instructions from this link
https://developer.ridgerun.com/wiki/index.php?title=Yocto_Support_for_NVIDIA_Jetson_Platforms-Old .
My build configuration is
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "jetson-tx2"
DISTRO = "poky"
DISTRO_VERSION = "3.1.5"
TUNE_FEATURES = "aarch64 armv8a crc"
TARGET_FPU = ""
meta-tegra = "dunfell-l4t-r32.4.3:3b4df1ac05e9f96e0363630c036f5445800af435"
meta
meta-poky
meta-yocto-bsp = "dunfell:6e89d668246fb37b2217aae7ae57390e793696d8"
But I got this error related to tegra-minimal-initramfs recipe.
WARNING: tegra-minimal-initramfs-1.0-r0 do_image_complete: KeyError in .
ERROR: tegra-minimal-initramfs-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_report_unihash(d)
0003:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/classes/sstate.bbclass', lineno: 844, function: sstate_report_unihash
0840: report_unihash = getattr(bb.parse.siggen, 'report_unihash', None)
0841:
0842: if report_unihash:
0843: ss = sstate_state_fromvars(d)
*** 0844: report_unihash(os.getcwd(), ss['task'], d)
0845:}
0846:
0847:#
0848:# Shell function to decompress and prepare a package for installation
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/siggen.py', lineno: 555, function: report_unihash
0551:
0552: if "." in self.method:
0553: (module, method) = self.method.rsplit('.', 1)
0554: locs['method'] = getattr(importlib.import_module(module), method)
*** 0555: outhash = bb.utils.better_eval('method(path, sigfile, task, d)', locs)
0556: else:
0557: outhash = bb.utils.better_eval(self.method + '(path, sigfile, task, d)', locs)
0558:
0559: try:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/utils.py', lineno: 420, function: better_eval
0416: if extraglobals:
0417: ctx = copy.copy(ctx)
0418: for g in extraglobals:
0419: ctx[g] = extraglobals[g]
*** 0420: return eval(source, ctx, locals)
0421:
0422:#contextmanager
0423:def fileslocked(files):
0424: """Context manager for locking and unlocking file locks."""
File: '<string>', lineno: 1, function: <module>
File "<string>", line 1, in <module>
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py', lineno: 593, function: OEOuthashBasic
0589:
0590: update_hash("\n")
0591:
0592: # Process this directory and all its child files
*** 0593: process(root)
0594: for f in files:
0595: if f == 'fixmepath':
0596: continue
0597: process(os.path.join(root, f))
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py', lineno: 553, function: process
0549: add_perm(stat.S_IXOTH, 'x')
0550:
0551: if include_owners:
0552: try:
*** 0553: update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
0554: update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
0555: except KeyError:
0556: bb.warn("KeyError in %s" % path)
0557: raise
Exception: KeyError: 'getpwuid(): uid not found: 1000'
ERROR: Logfile of failure stored in: /home/pc_1175/yocto-tegra/build/tmp/work/jetson_tx2-poky-linux/tegra-minimal-initramfs/1.0-r0/temp/log.do_image_complete.23961
ERROR: Task (/home/pc_1175/yocto-tegra/meta-tegra/recipes-core/images/tegra-minimal-initramfs.bb:do_image_complete) failed with exit code '1'
The problem is that I have built the same image before with the same packages and I didn't get this error.
When I added TEGRA_INITRAMFS_INITRD = "0" to local.conf file I didn't get this error but I'm wondering if it can affect my system.
TLDR;
Just clean image recipe working directory with bitbake -c cleansstate tegra-minimal-initramfs and also bitbake -c cleansstate core-image-minimal just in case. Than build should work, but it may be not reproducible. That is, maybe you'll have to call this two cleansstate commands before building images (tegra-minimal-initramfs and core-image-minimal) every time.
I got same issue when migrated my project (not connected with Tegra) to Yocto 3.2. The issue was with pseudo - it is a fakeroot-tool, that is used in Yocto for generating rootfs with right files permissions (you run bitbake as an ordinary user, not root, but get rootfs with all files belonging to root). Here is bug i've posted with my patch.
But you are using Yocto 3.1.5 as i see, so your issue is different. The core reason is that during some package build (the one that was excluded by TEGRA_INITRAMFS_INITRD = "0") pseudo remembered, that some file should belong to user 1000, but during building tegra-minimal-initramfs (generation of initramfs) user 1000 was not found in initramfs itself... because there are only root and some basic Linux users.
To your question, may anything break if you leave TEGRA_INITRAMFS_INITRD = "0". Likely yes. Here is where this variable is applied. It is used during U-Boot build and looks like it turns off initramfs usage at all. So with TEGRA_INITRAMFS_INITRD = "0" your final image wouldn't include initramfs file. If the device has some fallback mechanism to boot without initramfs, seems you are ok. If not - try cleansstate.

VSCode problem retrieving Bazel build targets

I'm having trouble getting VSCode to load build targets for a Java project. The error message that I get is the following:
Command failed: bazel --output_base=/var/folders/cj/1fv063dx1772zbpnfpzvj_c00000gn/T/5b71fd39758e7fd8e710c281fbbdda92 query ...:* --output=package Loading: 0 packages loaded ERROR: error loading package 'bazel-test/external/rules_jvm_external': cannot load '//:private/versions.bzl': no such file Loading: 12 packages loaded currently loading: bazel-test/external/local_config_cc ... (6 packages) Loading: 12 packages loaded currently loading: bazel-test/external/local_config_cc ... (6 packages)
My WORKSPACE file is as follows:
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_docker",
sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
strip_prefix = "rules_docker-0.14.4",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.14.4/rules_docker-v0.14.4.tar.gz"],
)
load(
"#io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load("#io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
container_deps()
load("#io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
pip_deps()
load(
"#io_bazel_rules_docker//java:image.bzl",
_java_image_repos = "repositories",
)
_java_image_repos()
load(
"#io_bazel_rules_docker//container:container.bzl",
"container_pull",
)
container_pull(
name = "openjdk11_slim",
registry = "index.docker.io",
repository = "library/openjdk",
tag = "11-slim"
)
RULES_JVM_EXTERNAL_TAG = "3.3"
RULES_JVM_EXTERNAL_SHA = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab"
http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
load("#rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
# Accessed as dependency: #maven://io_vertx_vertx_core
"io.vertx:vertx-core:3.9.2",
# Accessed as dependency: #maven://io_vertx_vertx_web
"io.vertx:vertx-web:3.9.2",
# Accessed as dependency: #maven://io_vertx_vertx_rx_java2
"io.vertx:vertx-rx-java2:3.9.2",
],
repositories = [
"https://repo1.maven.org/maven2",
]
)
I don't see anything obviously wrong with my WORKSPACE file, so I'm tempted to assume the problem is with VSCode or in the BUILD files in one of my external dependencies. Other than that the project contains a single Hello.java and its accompanying java_binary rule. If I run myself the same query for all packages I get the following:
% bazel query ...:\* --output=package
src/main/java
Loading: 0 packages loaded
In other words, there's no error. Any ideas how I could try to debug or fix this? I just installed everything on the laptop, so the software versions are:
Bazel version: 3.5.0
VSCode versio: 1.48.2
Following the comment ignoring the convenience symlink solved it for me:
echo bazel-`basename ${PWD}` >> .bazelignore
I got around this issue by changing the Query Expression in Bazel extension Settings from
...:*
to
//< directory name >/...:*

Bazel error: type 'java_common' has no method create_provider()

I've tried to create a hello world for scala project on bazel.
But got an error:
ERROR: /private/var/tmp/_bazel_user/4c70a1cb51cd18a4cc09dc9aa5e6a71b/external/scalac_rules_commons_io/BUILD:9:1: in scala_import rule #scalac_rules_commons_io//:scalac_rules_commons_io:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_user/4c70a1cb51cd18a4cc09dc9aa5e6a71b/external/scalac_rules_commons_io/BUILD", line 9
scala_import(name = 'scalac_rules_commons_io')
File "/private/var/tmp/_bazel_user/4c70a1cb51cd18a4cc09dc9aa5e6a71b/external/io_bazel_rules_scala/scala/scala_import.bzl", line 27, in _scala_import_impl
struct(<2 more arguments>)
File "/private/var/tmp/_bazel_user/4c70a1cb51cd18a4cc09dc9aa5e6a71b/external/io_bazel_rules_scala/scala/scala_import.bzl", line 32, in struct
_create_provider(current_jars, <6 more arguments>)
File "/private/var/tmp/_bazel_user/4c70a1cb51cd18a4cc09dc9aa5e6a71b/external/io_bazel_rules_scala/scala/scala_import.bzl", line 73, in _create_provider
java_common.create_provider(<5 more arguments>)
type 'java_common' has no method create_provider()
Project structure:
WORKSPACE file was copied from here
rules_scala_version="69d3c5b5d9b51537231746e93b4383384c9ebcf4" # update this as needed
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_scala",
strip_prefix = "rules_scala-%s" % rules_scala_version,
type = "zip",
url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip" % rules_scala_version,
)
load("#io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()
protobuf_version="09745575a923640154bcf307fba8aedff47f240a"
protobuf_version_sha256="416212e14481cff8fd4849b1c1c1200a7f34808a54377e22d7447efdf54ad758"
http_archive(
name = "com_google_protobuf",
url = "https://github.com/protocolbuffers/protobuf/archive/%s.tar.gz" % protobuf_version,
strip_prefix = "protobuf-%s" % protobuf_version,
sha256 = protobuf_version_sha256,
)
# bazel-skylib 0.8.0 released 2019.03.20 (https://github.com/bazelbuild/bazel-skylib/releases/tag/0.8.0)
skylib_version = "0.8.0"
http_archive(
name = "bazel_skylib",
type = "tar.gz",
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format (skylib_version, skylib_version),
sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
)
BUILD.bazel file:
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_binary", "scala_test")
scala_library(
name = "pkg1",
srcs = [
"Main.scala"
]
)
bazel version:
$ bazel version
Bazelisk version: v1.0
Build label: 1.1.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Oct 21 08:47:13 2019 (1571647633)
Build timestamp: 1571647633
Build timestamp as int: 1571647633
That version of rules_scala appears appears to be designed for the prior bazel version. rules_scala#876 is about this specific issue, and mentions another commit to try: 3404be0e3b3afda99a12724171d80283eaf2b1e7. You might also try 26cf9b74fc46f1e9a970c97837447549ed7257b6, which is master when I looked just now. You would replace the rules_scala_version value in the first line of the WORKSPACE with one of those commit SHA1 values.
For reference, the java_common v0.29.1 docs mention create_provider, but the java_common v1.0.0 docs don't.

How to integrated mender within lk-bootloader base-on Yocto Project

I am new for yocto ,now I use a MTK-demo-board to build a linux-distro base on Yocto. I want to realize OTA by mender followed this tutorial:https://docs.mender.io/1.0/Devices/Integrating-with-U-Boot.
but Mender support u-boot as bootloader by default, the MTK use lk bootloader,Then how to realize this function?
The AP which I used is MT8183,The steps I have done list below:
1. /meta/meta-mediatek/recipes-bsp/lk/lk_2.0.0.0.bb . add follow code:
require recipes-bsp/u-boot/u-boot-mender.inc
PROVIDES += "u-boot"
RPROVIDES_{PN} += "u-boot"
2.cp lk_2.0.0.0 lk-fw-utils_2.0.0.0,and changed the file as behind:
a. delete do_genkey{} function;
b. add EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
c. add "oe_runmake env" in function do_compile()
d. add PROVIDES_${PN} = "lk-fw-utils"
RPROVIDES_${PN} = "lk-fw-utils"
DEPENDS += "mtd-utils"
3./build/local.conf,add these code
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
MACHINE = "aiv8183m1v2"
PREFERRED_VERSION_pn-mender = "1.0.%"
PREFERRED_VERSION_pn-mender-artifact = "1.0.%"
PREFERRED_VERSION_pn-mender-artifact-native = "1.0.%"
DISTRO_FEATURES_append = "systemd"
VIRTUAL-RUNTIME_init_manager = "systemed"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
IMAGE_FSTYPES = "ext4"
4.execute bitbake-layers add-layer /meta/meta-mender/meta-mender-core
5.bitbake-layers create-layer meta-mylayer,in this layer,I mkdir -p /recipes-mender/mender/files, in directory mender,I touch mender_%.bbappend file as bellow:
FILESEXTARPATHS_prepend := "${THISDIR}/file:"
SRC_URI_append = "file://server.crt"
and put servert.crt in the the file directory.
6.in the mancine.conf(aiv8183m1v2.conf),I have added
PREFERRED_PROVIDER_u-boot-fw-utils = "lk-fw-utils"
PREFERRED_PROVIDER_u-boot = "lk"
IMAGE_INSTALL_append = "kernel-modules"
MENDER_STORAGE_DEVICE = "/dev/mmcblk0"
7./meta-mender/meta-mender-core/classes/mender-full.bbclass
MENDER_FEATURES_ENABLE_append_arm = ""
MENDER_FEATURES_ENABLE_append_aarch64 = ""
the result I expected is the linux can OTA over mender.
But,actual results is the project can't cross build.the log says:
DEBUG: Executing shell function soft_link_to_rootfs
| ln: target ‘mender.bmap’ is not a directory
| WARNING: /home/yewkui/yocto-linux/build/tmp/work/aiv8183m1v2-poky-linux/mtk-image-openmm-aiv/1.0-r0/temp/run.soft_link_to_rootfs.1347217:1 exit 1 from 'ln -nfs mtk-image-openmm-aiv-aiv8183m1v2-20181224064735.rootfs.ext4 mender mender.bmap /home/yewkui/yocto-linux/build/tmp/deploy/images/aiv8183m1v2/rootfs.ext4 mender mender.bmap'
| DEBUG: Python function do_rootfs finished
| ERROR: Function failed: soft_link_to_rootfs (log file is located at /home/yewkui/yocto-linux/build/tmp/work/aiv8183m1v2-poky-linux/mtk-image-openmm-aiv/1.0-r0/temp/log.do_rootfs.1347217)
ERROR: Task (/home/yewkui/yocto-linux/meta/poky/../meta-mediatek-mt8183/recipes-aiv/images/mtk-image-openmm-aiv.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2392 tasks of which 2391 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
Maybe I am wrong at first step,but how to realize the OTA by yocto base on MTK lk-bootloader,please help! thanks a lot!