mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-08-22 23:15:40 +00:00
- make kata-uart-client use dependent on a new "sparrow_uart_support" feature; this is needed for headless operation and for platforms without a working uart driver - add a mechanism where an "autostart.repl" file is fetched from the builtins (if present) and passed through the shell; output goes to the uart if configured, otherwise the kernel or /dev/nnull - add a new "source" shell command that interprets the contents of a builtins file as console input - rework the command interpreter to support autostart & source - move the logging hookup to kata-debug-console so the system builds when no uart support is conffigured (need to add fallback to debug syscalls in case that works when no driver is present) Change-Id: I5e6725c93488a48d212dfaca425ede37cbdb72e5 GitOrigin-RevId: 6f360cab71ea103af52e3c68ca240fc16e0f20bb
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
// Copyright 2022 Google LLC
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
import <LoggerInterface.camkes>;
|
|
import <ProcessControlInterface.camkes>;
|
|
import <PackageManagementInterface.camkes>;
|
|
import <MlCoordinatorInterface.camkes>;
|
|
import <MemoryInterface.camkes>;
|
|
import <SecurityCoordinatorInterface.camkes>;
|
|
import <TimerServiceInterface.camkes>;
|
|
import <SDKManagerInterface.camkes>;
|
|
|
|
component DebugConsole {
|
|
control;
|
|
|
|
dataport Buf(0x1000000) cpio_archive;
|
|
|
|
dataport Buf tx_dataport;
|
|
maybe uses rust_write_inf uart_write;
|
|
|
|
dataport Buf rx_dataport;
|
|
maybe uses rust_read_inf uart_read;
|
|
|
|
provides LoggerInterface logger;
|
|
uses MemoryInterface memory;
|
|
maybe uses MlCoordinatorInterface mlcoord;
|
|
uses PackageManagementInterface pkg_mgmt;
|
|
uses ProcessControlInterface proc_ctrl;
|
|
// TODO(b/200707300): for debugging
|
|
maybe uses SecurityCoordinatorInterface security;
|
|
maybe uses SDKManagerInterface sdk_manager;
|
|
|
|
uses Timer timer;
|
|
|
|
// Enable KataOS CAmkES support.
|
|
attribute int kataos = true;
|
|
|
|
// Install requires enough slots to hold dynamically allocated
|
|
// memory for package contents. Size this to handle up to 4MB
|
|
// (at 4KB / page) though that exceeds our target memory config.
|
|
attribute int cnode_headroom = 1024;
|
|
|
|
// Copyregions for zmodem upload and for loading bundle images.
|
|
// Could do this with one region since upload never happens
|
|
// concurrently with bundle image loading.
|
|
has copyregion BUNDLE_IMAGE;
|
|
has copyregion UPLOAD;
|
|
}
|