diff --git a/Cargo.lock b/Cargo.lock index 480d3f0..82b03c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,7 +262,7 @@ dependencies = [ [[package]] name = "libertyos_kernel" -version = "0.16.0" +version = "0.17.0" dependencies = [ "acpi", "aml", diff --git a/Dockerfile b/Dockerfile index a358693..df024c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,23 @@ -# podman build -t los:latest -f Dockerfile . +FROM rust:1.55-alpine as builder -#FROM rust:1.57-alpine -FROM rust:alpine +run apk add --no-cache musl-dev bash -RUN apk add --no-cache musl-dev +RUN adduser --disabled-password --gecos "" liberty +USER liberty +WORKDIR /home/liberty +COPY rust-toolchain.toml . RUN rustup target add x86_64-unknown-linux-gnu -RUN rustup default nightly -RUN rustup component add \ - rust-src \ - llvm-tools-preview +RUN rustup component add rust-src +RUN rustup component add llvm-tools-preview RUN cargo install bootimage +RUN rustup default nightly +RUN rustup update nightly -# bring in the code from your git clone COPY . . -# put the image in a known location -RUN cargo install --debug --root /usr/local --path . +RUN cargo build + +RUN touch copy.sh +RUN echo -e "#!/bin/sh\ncp -r ./target/* /mnt/target" > copy.sh -# A container must be created before extracting the kernel. -# los=$(podman create --name mylos los:latest) -# podman cp $los:/usr/local/bin/libertyos_kernel . +CMD ["/bin/sh", "/home/liberty/copy.sh"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fd541b4..23aeb78 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2022-01-07" +channel = "nightly-2023-01-07" components = [ "rust-src", "clippy", "rustfmt", "rustc", "rust-std", "llvm-tools-preview" ] targets = [ "x86_64-unknown-linux-gnu" ] diff --git a/src/lib.rs b/src/lib.rs index 2ac86e2..086d887 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,8 +6,6 @@ #![allow(unused_variables)] #![feature(abi_x86_interrupt)] #![feature(alloc_error_handler)] -#![feature(asm_sym)] -#![feature(const_fn_fn_ptr_basics)] #![feature(const_mut_refs)] #![feature(core_intrinsics)] #![feature(custom_test_frameworks)]