1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # ostool
//!
//! A comprehensive toolkit for operating system development.
//!
//! `ostool` provides utilities for building, running, and debugging operating systems,
//! with special support for embedded systems and bootloader interaction.
//!
//! ## Features
//!
//! - **Build System**: Cargo-based build configuration with customizable options
//! - **QEMU Integration**: Easy QEMU launching with various architectures support
//! - **U-Boot Support**: Serial communication and file transfer via YMODEM
//! - **TFTP Server**: Built-in TFTP server for network booting
//! - **Menu Configuration**: TUI-based configuration editor (like Linux kernel's menuconfig)
//! - **Serial Terminal**: Interactive serial terminal for device communication
//!
//! ## Modules
//!
//! - [`build`] - Build system configuration and Cargo integration
//! - [`ctx`] - Application context and state management
//! - [`menuconfig`] - TUI-based menu configuration
//! - [`run`] - QEMU, TFTP, and U-Boot runners
//! - [`sterm`] - Serial terminal implementation
//! - [`utils`] - Common utilities and helper functions
//!
//! ## Example
//!
//! ```rust,no_run
//! // ostool is primarily used as a CLI tool
//! // See the binary targets for usage examples
//! ```
/// Build system configuration and Cargo integration.
///
/// Provides functionality for configuring and executing Cargo builds
/// with custom options and target specifications.
/// ostool-server board client and remote terminal integration.
/// Application context and state management.
/// Custom file logger for ostool.
///
/// Provides a file-based logger that writes all log output to
/// `{workspace_root}/target/ostool.ans`.
/// TUI-based menu configuration system.
///
/// Similar to Linux kernel's menuconfig, allows users to configure
/// build options through an interactive terminal interface.
/// Runtime execution modules for QEMU, TFTP, and U-Boot.
///
/// Contains implementations for launching QEMU instances,
/// running TFTP servers, and communicating with U-Boot.
/// Serial terminal implementation.
///
/// Provides an interactive serial terminal for communication
/// with embedded devices and development boards.
/// Common utilities and helper functions.
extern crate log;
extern crate anyhow;
pub use ;