Compare commits
2 Commits
257faf426f
...
861da29edf
Author | SHA1 | Date |
---|---|---|
|
861da29edf | |
|
8ce699f35f |
|
@ -20,7 +20,7 @@ FROM base as build
|
|||
WORKDIR /src
|
||||
RUN cargo build ${CARGOFLAGS}
|
||||
WORKDIR /build_cpio
|
||||
RUN cp /src/init/target/${TARGET}/release/nit init
|
||||
RUN cp /src/target/${TARGET}/release/nit init
|
||||
ENV KBUILD_BUILD_TIMESTAMP=1
|
||||
COPY <<-EOF initramfs.list
|
||||
file /init init 0755 0 0
|
||||
|
|
|
@ -26,6 +26,14 @@ extern "C" fn handle_sigchld(_sig: i32) {
|
|||
fn init() -> Result<()> {
|
||||
let config = config::get_config()?;
|
||||
|
||||
for (filename, mode, fd) in [
|
||||
("/dev/console", "r", 0),
|
||||
("/dev/console", "w", 1),
|
||||
("/dev/console", "w", 2),
|
||||
] {
|
||||
system::syscall::freopen(filename, mode, &fd)?;
|
||||
}
|
||||
|
||||
if let Some(platform) = config.platform.as_deref() {
|
||||
platform::init(platform)?;
|
||||
} else if let Some(platform) = platform::get_current_platform(None)?.as_deref() {
|
||||
|
|
Loading…
Reference in New Issue