Commit 72d95d0a authored by Stefan Lankes's avatar Stefan Lankes
Browse files

remove dependencies from hermit-playground

parent 046a2df7
......@@ -15,16 +15,3 @@ before_install:
- sudo docker pull ${OS_TYPE}:${OS_VERSION}
script:
- docker run -ti -v ${TRAVIS_BUILD_DIR}:/work:rw ${OS_TYPE}:${OS_VERSION} /bin/bash -c "cd /work; ./tests.sh ${OS_TYPE} ${OS_NAME}"
before_deploy:
- cd ${TRAVIS_BUILD_DIR}
- dpkg-deb -b tmp libhermit-rs-0.3.7-all.deb
deploy:
provider: bintray
on:
branch: master
skip_cleanup: true
file: ".bintray_descriptor.json"
key:
secure: IMPuol32nJP+MS+R0xTC8FRR2BC5GPVjrGJDKQQTsuNFSp1KRDhqotHTEoeDWaS2s6/vfJ/CjEHQWqkh7Dg+oL1KTVg90cPIk8ha3obKx+QT3/zZT/MQfrMvrrSrAR/W/Rjh74Y+aYObYrIU74K8r3KxZWJYOk9dYyXo+yq3nWYuOUNryltTHHxBTWUodmD4/e3VgyKlxo80qQ48k+OtA0xTej3QWhFpAqVk+Y6yUZRIqXyOfMZ6iNCKT7OvQb9Hhn/guN63GIGnN6rWpvQxeWkz/h9U3Smx/Fsewzg0RLqsO/Gjk6L989wTSgDQ5FsgAG7LMG2Oywd39VG5/I8pZclsthlvVkfD1gVthgFktQFh7LStHDzgAq0rshBGnlPWvs3lFZNBvRaKm4QlPKIoqdc2K9uxNsEFazANE3bXmy3g2PWGvXWuNnXdP1AKNDkouDCnRlk4ul4vXYXQclvxFox4AVrSUmDv1EOkmyXXazerpywqe00ZCTDq8z7I1gWfqKEAdf7rMnA0IAjf6jeA5msMuCMxIcxWFYGO5guHJ+fBj8tE7WiR2ELPqiCkFErAXyjSPgEMwPX7BPDhQ+eQhbj1XQ3h/qX5VCCc4dfMyqCVBcZ2HPQjs597HXuAqfDRa6R2J4gdQbHMBXLsDUpX/5cg37IfshxgsAP/OfsZ/Vg=
user:
secure: vydSyB/dCo6TAcHqQ5EhSiOMXlX5Ups/SjH+CTkYXbICA1CT2jZp5F90giojQqT7q87orYPq5JViXA9XuuYHwQli5BeHrBOiRjgDwF+g0FQpn8eXD4IqbhPKK4ZIvQrzHY11o0m1tbZuYwe+BCI9mNK6Srrj2ak1uB84ZMbiy5vX+OVmh0tSerNqzApWP5FiE+ChE21GTXZYaHUZbUChrPmGDjEvsTUNmHjdbWzzQEPHoI2Agh7DZgeSNk2UaRRZ0IO42jvMELNIlm3ZbRj2PUvsbbYe/EVgKgnOXFPKY74Fnfnzs/yyx0SUaG9FqBKwEcLpUW2vZlc3TjFLxbv8wrxbggM7778NcK33XI0wWss2xHpZJ0cL0xoRPcLD+V74yUmeJElRSlY/EWAwtsUGdJUfBrSOciNbOSabKRMlEqZSormwHfQFJ6ZkOtQKaCfEx8Yz7QzSztmkkOUvDTtLJQu+NK+fZr3E+sjZr0Pl1ieYVebf0UDTk2kQXMpSW9VouoE2EBdFPR1AR07Jz8Q7xj7jLhQpL2t0EB4H4UpVpe0Wp2A7w2llyWn8QrGKV73a1N6Vkge8Lb0jOmZBAPNo72ZTj07kUVpj8j1eI8TAHaEivvzc4XlM7l+4Ip8Ht9Bm0ZHuzt5Casf3/3WmnKTJkzIkKwdODVjm7LPeq6kM6pU=
......@@ -16,8 +16,6 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
endif()
endif()
configure_file(config.rs.in ${CMAKE_BINARY_DIR}/hermit_rs/config.rs)
# Add the Cargo project to build the Rust library.
set(HERMIT_RS "${CMAKE_BINARY_DIR}/hermit_rs/${HERMIT_ARCH}-unknown-hermit-kernel/${CARGO_BUILDTYPE_OUTPUT}/libhermit_rs.a")
add_custom_target(hermit_rs
......@@ -38,8 +36,8 @@ add_custom_target(doc
# arch
if("${HERMIT_ARCH}" STREQUAL "aarch64")
add_subdirectory(src/arch/aarch64)
elseif("${HERMIT_ARCH}" STREQUAL "x86_64")
add_subdirectory(src/arch/x86_64/kernel)
#elseif("${HERMIT_ARCH}" STREQUAL "x86_64")
# add_subdirectory(src/arch/x86_64/kernel)
endif()
# Build all kernel modules into a single static library.
......
......@@ -5,6 +5,7 @@ authors = [
"Stefan Lankes <slankes@eonerc.rwth-aachen.de>",
"Colin Finck <colin.finck@rwth-aachen.de>"
]
build = "build.rs"
license = "MIT/Apache-2.0"
readme = "README.md"
categories = ["no-std"]
......
use std::process::Command;
fn main() {
// create boot code for application processors
/*let _ = Command::new("nasm").args(&["-f", "bin", "-o", "src/arch/x86_64/kernel/boot.bin", "src/arch/x86_64/kernel/boot.asm"]).output().unwrap();
let _ = Command::new("sh").args(&["-c", "echo -n \"pub static SMP_BOOT_CODE: [u8; \" > src/arch/x86_64/kernel/smp_boot_code.rs"]).output().unwrap();
let _ = Command::new("sh").args(&["-c", "stat -c %s src/arch/x86_64/kernel/boot.bin >> src/arch/x86_64/kernel/smp_boot_code.rs"]).output().unwrap();
let _ = Command::new("sh").args(&["-c", "echo -n \"] = [\" >> src/arch/x86_64/kernel/smp_boot_code.rs"]).output().unwrap();
let _ = Command::new("sh").args(&["-c", "hexdump -v -e \"1/1 \\\"0x%02X,\\\"\" src/arch/x86_64/kernel/boot.bin >> src/arch/x86_64/kernel/smp_boot_code.rs"]).output().unwrap();
let _ = Command::new("sh").args(&["-c", "echo -n \"];\" >> src/arch/x86_64/kernel/smp_boot_code.rs"]).output().unwrap();
// build pci ids as rust file
let _ = Command::new("pci_ids_parser").args(&["src/arch/x86_64/kernel/pci.ids", "src/arch/x86_64/kernel/pci_ids.rs"]).output().unwrap();*/
// determine git revision
let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
}
\ No newline at end of file
#[allow(dead_code)]
const COMMIT_HASH: &'static str = "@COMMIT_HASH@";
#[allow(dead_code)]
const KERNEL_STACK_SIZE: usize = @KERNEL_STACK_SIZE@;
#[allow(dead_code)]
const DEFAULT_STACK_SIZE: usize = @DEFAULT_STACK_SIZE@;
......@@ -5,9 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
include!(concat!(env!("CARGO_TARGET_DIR"), "/smp_boot_code.rs"));
use config::*;
use alloc::boxed::Box;
use alloc::vec::Vec;
use arch;
......@@ -20,6 +18,7 @@ use arch::x86_64::mm::virtualmem;
use arch::x86_64::kernel::percore::*;
use arch::x86_64::kernel::processor;
use arch::x86_64::kernel::KERNEL_HEADER;
use arch::x86_64::kernel::smp_boot_code::SMP_BOOT_CODE;
use core::sync::atomic::spin_loop_hint;
use core::{cmp, fmt, mem, ptr, u32};
use environment;
......
......@@ -6,8 +6,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
use config::*;
use alloc::boxed::Box;
use arch::x86_64::kernel::percore::*;
use arch::x86_64::kernel::KERNEL_HEADER;
......
......@@ -6,8 +6,6 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
pub mod acpi;
pub mod apic;
pub mod gdt;
......@@ -22,10 +20,13 @@ pub mod scheduler;
pub mod serial;
pub mod systemtime;
pub mod switch;
mod pci_ids;
mod smp_boot_code;
mod start;
#[cfg(feature = "vga")]
mod vga;
use config::KERNEL_STACK_SIZE;
use arch::x86_64::kernel::percore::*;
use arch::x86_64::kernel::serial::SerialPort;
......
This diff is collapsed.
......@@ -5,12 +5,11 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/pcidata.rs"));
use alloc::vec::Vec;
use core::{fmt, u8, u32};
use synch::spinlock::Spinlock;
use x86::io::*;
use arch::x86_64::kernel::pci_ids::{CLASSES,VENDORS};
const PCI_MAX_BUS_NUMBER: u8 = 32;
const PCI_MAX_DEVICE_NUMBER: u8 = 32;
......
This diff is collapsed.
......@@ -8,8 +8,6 @@
//! Architecture dependent interface to initialize a task
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
use alloc::rc::Rc;
use arch::x86_64::kernel::apic;
use arch::x86_64::kernel::gdt;
......@@ -20,6 +18,7 @@ use arch::x86_64::kernel::processor;
use core::cell::RefCell;
use core::{mem, ptr};
use scheduler::task::{Task, TaskFrame, TaskTLS};
use config::*;
extern "C" {
static tls_start: u8;
......
pub static SMP_BOOT_CODE: [u8; 207
] = [0xEB,0x12,0x90,0x90,0x90,0x90,0x90,0x90,0xDE,0xC0,0xAD,0xDE,0x00,0x00,0x00,0x00,0xEF,0xBE,0xAD,0xDE,0xFA,0x0F,0x01,0x16,0x40,0x80,0x0F,0x20,0xC0,0x0C,0x01,0x0F,0x22,0xC0,0x66,0xEA,0x2C,0x80,0x00,0x00,0x08,0x00,0x90,0x90,0x31,0xC0,0x66,0xB8,0x10,0x00,0x8E,0xD8,0x8E,0xC0,0x8E,0xE0,0x8E,0xE8,0x8E,0xD0,0xEB,0x46,0xEB,0xFE,0x17,0x00,0x46,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x9A,0xCF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x92,0xCF,0x00,0x90,0x90,0x17,0x00,0x6A,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9A,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0x00,0x00,0x90,0x90,0x0F,0x20,0xE0,0x83,0xC8,0x20,0x0F,0x22,0xE0,0xA1,0x10,0x80,0x00,0x00,0x0F,0x22,0xD8,0xB9,0x80,0x00,0x00,0xC0,0x0F,0x32,0x0D,0x00,0x09,0x00,0x00,0x0F,0x30,0x0F,0x20,0xC0,0x0D,0x00,0x00,0x00,0x80,0x0F,0x22,0xC0,0x0F,0x01,0x15,0x60,0x80,0x00,0x00,0x66,0xB8,0x10,0x00,0x8E,0xD0,0x8E,0xD8,0x8E,0xC0,0xEA,0xC8,0x80,0x00,0x00,0x08,0x00,0x90,0x90,0xFF,0x24,0x25,0x08,0x80,0x00,0x00,];
......@@ -5,12 +5,11 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
use arch::x86_64::kernel::KERNEL_HEADER;
use boot_processor_main;
use application_processor_main;
use core::ptr;
use config::KERNEL_STACK_SIZE;
#[cfg(not(test))]
#[inline(never)]
......
#[allow(dead_code)]
pub const COMMIT_HASH: &'static str = env!("GIT_HASH");
#[allow(dead_code)]
pub const KERNEL_STACK_SIZE: usize = 32768;
#[allow(dead_code)]
pub const DEFAULT_STACK_SIZE: usize = 262144;
......@@ -26,8 +26,6 @@
#![allow(unused_macros)]
#![no_std]
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
// EXTERNAL CRATES
#[macro_use]
extern crate alloc;
......@@ -61,10 +59,12 @@ mod scheduler;
mod synch;
mod syscalls;
mod drivers;
mod config;
// IMPORTS
pub use arch::*;
pub use syscalls::*;
pub use config::*;
use arch::percore::*;
use mm::allocator::LockedHeap;
......
......@@ -6,8 +6,6 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
include!(concat!(env!("CARGO_TARGET_DIR"), "/config.rs"));
use alloc::rc::Rc;
use arch;
use arch::mm::paging::{BasePageSize, PageSize};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment