Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added command line and environment to the hermit entry parameters #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jounathaen
Copy link
Member

I'd like to get rid of the hypercalls in uhyve just to retrieve the env and argv. I think it makes sense to add them to the boot information, as they are available at boot time anyway.

(Once implemented in uhyve and hermit, this would solve hermit-os/uhyve#35)

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are slowly moving away from raw structs and towards device trees (#5), this should be done via the already available HardwareInfo::device_tree.

I think /chosen/bootargs would fit quite well:

chosen {
    bootargs = "env=RUST_LOG=info env=FOO=bar [OTHER_KERNEL_ARGS] -- [APP_ARGS]";
}

@jounathaen
Copy link
Member Author

I think that is a good approach, but it should be considered that we potentially pass hundreds of environment variables.

As changing uhyve to use device trees is a bigger project, maybe we can still go with this approach as an intermediate step? (To at get rid of the hypercall first)

@mkroening
Copy link
Member

I'd like to avoid having to do a entry version jump for this.

I think gradual migration should be easy. I'll open a draft PR tomorrow for initial device tree support for Uhyve, just for bootargs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants