user: enable dyn-loader
This commit is contained in:
parent
c71984e83e
commit
cdf9243962
9
userspace/Cargo.lock
generated
9
userspace/Cargo.lock
generated
@ -371,6 +371,15 @@ dependencies = [
|
|||||||
"crypto-common",
|
"crypto-common",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dyn-loader"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"elf",
|
||||||
|
"thiserror",
|
||||||
|
"yggdrasil-rt",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ed25519"
|
name = "ed25519"
|
||||||
version = "2.2.3"
|
version = "2.2.3"
|
||||||
|
@ -12,7 +12,7 @@ members = [
|
|||||||
"lib/libterm",
|
"lib/libterm",
|
||||||
"netutils",
|
"netutils",
|
||||||
"netutils",
|
"netutils",
|
||||||
# "dyn-loader",
|
"dyn-loader",
|
||||||
"rdb",
|
"rdb",
|
||||||
"lib/yasync",
|
"lib/yasync",
|
||||||
"rsh",
|
"rsh",
|
||||||
|
@ -8,3 +8,6 @@ yggdrasil-rt.workspace = true
|
|||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|
||||||
elf = "0.7.4"
|
elf = "0.7.4"
|
||||||
|
|
||||||
|
[lints.rust]
|
||||||
|
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] }
|
||||||
|
@ -54,13 +54,13 @@ const PROGRAMS: &[(&str, &str)] = &[
|
|||||||
("rshd", "sbin/rshd"),
|
("rshd", "sbin/rshd"),
|
||||||
// crypt
|
// crypt
|
||||||
("crypt", "bin/crypt"),
|
("crypt", "bin/crypt"),
|
||||||
// ("dyn-loader", "libexec/dyn-loader"),
|
("dyn-loader", "libexec/dyn-loader"),
|
||||||
];
|
];
|
||||||
|
|
||||||
fn build_userspace(env: &BuildEnv, _: AllOk) -> Result<(), Error> {
|
fn build_userspace(env: &BuildEnv, _: AllOk) -> Result<(), Error> {
|
||||||
log::info!("Building userspace");
|
log::info!("Building userspace");
|
||||||
CargoBuilder::Userspace(env).build(env.workspace_root.join("userspace"))?;
|
CargoBuilder::Userspace(env).build(env.workspace_root.join("userspace"))?;
|
||||||
//CargoBuilder::Userspace(env).build(env.workspace_root.join("userspace/dynload-program"))?;
|
CargoBuilder::Userspace(env).build(env.workspace_root.join("userspace/dynload-program"))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,18 +101,18 @@ fn build_rootfs<S: AsRef<Path>, D: AsRef<Path>>(
|
|||||||
|
|
||||||
// TODO this is a temporary hack
|
// TODO this is a temporary hack
|
||||||
fs::create_dir_all(rootfs_dir.join("lib"))?;
|
fs::create_dir_all(rootfs_dir.join("lib"))?;
|
||||||
// util::copy_file(
|
util::copy_file(
|
||||||
// env.workspace_root.join(format!(
|
env.workspace_root.join(format!(
|
||||||
// "userspace/dynload-program/target/{}-unknown-yggdrasil/{}/dynload-program",
|
"userspace/dynload-program/target/{}-unknown-yggdrasil/{}/dynload-program",
|
||||||
// env.arch.name(),
|
env.arch.name(),
|
||||||
// env.profile.name()
|
env.profile.name()
|
||||||
// )),
|
)),
|
||||||
// rootfs_dir.join("dynload-program"),
|
rootfs_dir.join("dynload-program"),
|
||||||
// )?;
|
)?;
|
||||||
// util::copy_file(format!(
|
util::copy_file(format!(
|
||||||
// "/home/alnyan/build/ygg/toolchain/build/host/stage1-std/{}-unknown-yggdrasil/release/libstd.so",
|
"/home/alnyan/build/ygg/toolchain/build/host/stage1-std/{}-unknown-yggdrasil/release/libstd.so",
|
||||||
// env.arch.name()
|
env.arch.name()
|
||||||
// ), rootfs_dir.join("lib/libstd.so"))?;
|
), rootfs_dir.join("lib/libstd.so"))?;
|
||||||
|
|
||||||
log::info!("Installing extras");
|
log::info!("Installing extras");
|
||||||
for (src, dst) in install_extra {
|
for (src, dst) in install_extra {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user