-
Notifications
You must be signed in to change notification settings - Fork 8
Add support for User Mode Linux #59
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the latest buildroot LTS release. The RISC-V configuration needed a small update due to the commit linked below. Link: https://buildroot.org/news.html Link: https://git.busybox.net/buildroot/commit/?id=b3c66481e1f1503fcbf193d0c780271e880ad500 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
I have not found a clean way to boot User Mode Linux with our existing cpio rootfs images but it does work with a standard ext4 image. Tell buildroot to build an ext4 image as part of the build process for x86_64, which can be used for UML. This extra image only adds 1.61MB to the repo when compressed. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This script allows us to quickly boot a User Mode Linux image with the existing boot-utils infrastructure, namely the root filesystem images. $ ./boot-uml.sh -k <path_to_kernel_folder> ... Run /sbin/init as init process EXT4-fs (ubda): re-mounted. Quota mode: none. Starting syslogd: OK Starting klogd: OK Running sysctl: OK Saving random seed: OK Starting network: OK Linux version 5.17.0-next-20220322-dirty ... Stopping network: OK Saving random seed: OK Stopping klogd: OK Stopping syslogd: OK EXT4-fs (ubda): re-mounted. Quota mode: none. The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system poweroff reboot: System halted Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Member
Author
|
Using https://gist.github.com/nathanchance/4ef597d4cad53e98e4199e87516ecd4e I am going to see if using Python's |
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Member
Author
|
Comment has been updated and I pushed an additional fix for a small problem I noticed. |
My mainline kernel source is just "linux", which causes problems with boot-uml.sh when passing in that folder via '-k': $ ./boot-uml.sh -k $CBL_SRC/linux /home/nathan/cbl/src/linux does not exist! Don't check that the path ends in the kernel image, just check that it is a file. QEMU will handle a wrong kernel image path just fine. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
nickdesaulniers
approved these changes
Mar 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This series adds support for quickly boot testing User Mode Linux images via
boot-uml.sh, which works in a similar manner toboot-qemu.sh:As I needed an ext4 rootfs image for UML (as opposed to the existing cpio archives), I opted to update Buildroot to the latest release and rebuild all the images to include #42. I can drop the image update if so desired, as it will slightly increase the size of the repo.