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

Update Solo5 to v0.6.6 #29

Merged
merged 9 commits into from
Oct 12, 2020
Merged

Conversation

retrage
Copy link
Contributor

@retrage retrage commented Oct 7, 2020

The current rumprun port uses solo5@120848b, which is committed over 2 years ago. This PR proposes updates Solo5 to the latest tagged version, v0.6.6. There are several differences between the current and v0.6.6.

  1. Commandline option changes:
    The newer version of Solo5 accepts multiple block devices and network devices. This change causes the command line option changes.

  2. manifest.json introduced:
    The newer version of Solo5 requires manifest.json to define attached devices at runtime. This file is compiled to an object file via a C file on compile-time. Thus, the rumprun port has to have predefined manifest.json and the pre-compiled object file before run. I added the "rootfs" block device and the "tap" network device for this PR. The devices cannot be optional, so we have to supply them as run-time arguments even if they are not used in the application.

I think issue #28 can be fixed once this PR merged.

@retrage
Copy link
Contributor Author

retrage commented Oct 7, 2020

Also, I found that the old version of CMake (3.10.2) fails to build the cmake test even it satisfies the version requirement:

cmake_minimum_required(VERSION 2.8.2)

Since Travis CI uses 3.12.4, the version should be updated.

Copy link
Contributor

@ricarkol ricarkol left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! just nits and questions.

platform/solo5/librumpnet_ukvmif/ukvmif_user.c Outdated Show resolved Hide resolved
platform/solo5/rumpukvm_bio.c Outdated Show resolved Hide resolved
platform/solo5/rumpukvm_bio.c Show resolved Hide resolved
[ "$status" -eq 0 ]
[[ "$output" == *"=== main() of \"cwd_test\" returned 0 ==="* ]]
}

@test "cwd hvt" {
touch dummy
dd if=/dev/zero of=dummy bs=512 count=1 > /dev/null 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, do tests fail with an empty file (dummy's size of 0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The spt tender says:

solo5-spt: dummy: Backing storage must be at least 1 block (512 bytes) in size

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, got it

# notyet
# img2=$3

[ -n "${img1}" ] || die runtest without a disk image
case "${STACK}" in
spt)
cookie=$(${SOLO5_SPT} --disk=${img1} ${testprog} '{"cmdline":"testprog __test","blk":{"source":"etfs","path":"ld0d","fstype":"blk"}}')
cookie=$(${SOLO5_SPT} --block:rootfs=${img1} --net:tap=tap100 ${testprog} '{"cmdline":"testprog __test","blk":{"source":"etfs","path":"ld0d","fstype":"blk"}}')
Copy link
Contributor

Choose a reason for hiding this comment

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

question. It won't be possible to run with a disk and not tap right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a current design issue. As I wrote in the comment, the rumprun system creates an object file from pre-defined manifest.json when running build-rr.sh. The gcc wrapper includes it when linking an application. The Solo5 tender expects all defined devices will be attached on run-time (Once a device is defined, it cannot be optional.) This is why the tests supply unnecessary devices.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, thanks for the clarification.

This commit updates solo5 to the tagged latest v0.6.6. The update has
large side effects because of the Solo5 API changes. The following files
are imported from Solo5 for the update.

* kern.ldscript
* mft_abi.h
* solo5.h

The recent version of Solo5 requires manifest.json to define devices at
compile-time. To follow this change, it adds manifest.json that defines
"rootfs" block device and "tap" network device. The naming comes from
my LKL Nabla port.

Signed-off-by: Akira Moroo <[email protected]>
Signed-off-by: Akira Moroo <[email protected]>
@retrage
Copy link
Contributor Author

retrage commented Oct 11, 2020

Thank you for reviewing. I added replies to the comments.

@ricarkol
Copy link
Contributor

all good, merging

@ricarkol ricarkol merged commit 7471b7d into nabla-containers:solo5 Oct 12, 2020
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