2024-01-03 03:22:36 +00:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-08-16 02:41:25 +00:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
2023-12-25 07:27:41 +00:00
|
|
|
// The `export_name` attribute for the `aster_main` entrypoint requires the removal of safety check.
|
2023-11-04 09:01:12 +00:00
|
|
|
// Please be aware that the kernel is not allowed to introduce any other unsafe operations.
|
2023-03-06 06:19:23 +00:00
|
|
|
// #![forbid(unsafe_code)]
|
2023-12-25 03:12:25 +00:00
|
|
|
extern crate aster_frame;
|
2022-08-16 02:41:25 +00:00
|
|
|
|
2023-12-25 03:12:25 +00:00
|
|
|
use aster_frame::early_println;
|
2022-08-16 02:41:25 +00:00
|
|
|
|
2023-12-25 07:27:41 +00:00
|
|
|
#[export_name = "aster_main"]
|
2023-11-04 16:14:28 +00:00
|
|
|
pub fn main() -> ! {
|
2023-12-25 03:12:25 +00:00
|
|
|
aster_frame::init();
|
|
|
|
early_println!("[kernel] finish init aster_frame");
|
2023-02-27 10:41:52 +00:00
|
|
|
component::init_all(component::parse_metadata!()).unwrap();
|
2024-02-05 07:58:10 +00:00
|
|
|
aster_nix::init();
|
|
|
|
aster_nix::run_first_process();
|
2022-08-16 02:41:25 +00:00
|
|
|
}
|