-
Notifications
You must be signed in to change notification settings - Fork 7
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
Usage instructions #1
Comments
Would appreciate the instructions as well. |
Hello, and thanks for getting in touch! Just to keep you updated - I'm working on a README that should help you get started. Tom |
Great! Thanks for your response. I'll look forward to the document. |
I've uploaded a README that should get you started - let me know if it can be improved, or if you need any help! Tom |
hi! @tspink can you please give some more detailed requirements or steps about ARM userspace? thanks! |
Hi @superDong1998, Probably the easiest way to get started is to use the Arch Linux AArch64 system. You need to do the following:
A typical sequence of commands (you'll need to be root to do most of these) might be:
Note: I'm writing these commands off the top of my head, so YMMV and be very careful when executing commands as root. In particular, make sure the loopback device is correct when you start formatting and mount it. I take no responsibility for erased hard-drives. What's going on here is that we're using Now, the file arm64-linux.img contains an Arch Linux AArch64 userspace, that be used to boot captive. Hope this helps! Let me know if you need further clarification! -- Tom |
hi!
Tom, sorry to bother you again.
Because I was just getting started with full-system simulation, I ran into a problem when running captive. What puzzled me was that I didn't know if it was a machine problem or an environment problem. By the way, my userspace is not ready yet, could you please check this for me, thank you very much!
here is my command:
bin/captive --block-dev-file /root/dbt/buildroot/output/images/rootfs.ext4 --engine arch/aarch64.arch --device-tree ./captive-platform.dtb --kernel /root/dbt/arm64-kernel-image --platform virt
and my machine info:
Intel(R) Xeon(R) CPU E7- 4807 @ 1.87GHz with centos7 linux, kernel version is 5.6
and outputs are:
warning: ?: Unable to find parent logging context 'AIO' for 'LinuxAIO'
warning: ?: Unable to find parent logging context 'AIO' for 'POSIXAIO'
debug: ?: KVM read-only mem: 1
loading arm64 kernel to 0x80080000
*** guest starting
error: CPU: Unable to update SREGS: Invalid argument
--------------------------------------------------------------------
[core 0] instruction count: 0
[core 0] exec time: 0
[core 0] comp time: 0
--------------------------------------------------------------------
device reads:
device writes:
*** guest stopped
在2020-04-07 17:07:33,Tom Spinknotifications@github.com写道:
Hi @superDong1998,
Probably the easiest way to get started is to use the Arch Linux AArch64 system. You need to do the following:
Create a block device file
Format it
Mount it
Downloand and extract the distribution into the filesystem
Unmount it
Load it!
A typical sequence of commands (you'll need to be root to do most of these) might be:
# truncate -s 8G arm64-linux.img
# losetup -f --show arm64-linux.img
/dev/loop0
# mkfs.ext4 /dev/loop0
# mount /dev/loop0 /mnt
# wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
# bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt
# umount /mnt
# losetup -d /dev/loop0
Note: I'm writing these commands off the top of my head, so YMMV and be very careful when executing commands as root. In particular, make sure the loopback device is correct when you start formatting and mount it. I take no responsibility for erased hard-drives.
What's going on here is that we're using truncate to create an 8G sparse file, then losetup is creating a loopback block device, backed by the new file. We then format it (mkfs.ext4) with an ext4 filesystem, mount the resulting filesystem, and extract the Arch Linux AArch64 userspace into it. Finally, we unmount it, and remove the loopback device.
Now, the file arm64-linux.img contains an Arch Linux AArch64 userspace, that be used to boot captive.
Hope this helps! Let me know if you need further clarification!
…-- Tom
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks for the feedback! Could you try commenting out this line: And see if you get any further? |
Hi, tom! Sorry to bother you anther time. -alex |
That's OK - it just means Captive is trying to enable a feature that is not supported on your host CPU. Try also commenting out line 238 - enabling the NX bit. |
hi! Tom, Recently I did some experiments on
I have tested SPEC2006 INT benchmarks both on So I was wondering if I missed some other details during the installation of Many thanks! -alex |
Hi,
@tspink I read your recent Usenix paper about Captive. I would like to build and reproduce the setup described in the paper with ARM VM running on a Linux OS running on bare metal using KVM to get a good understanding of your work.
Can you please provide steps to do so using Captive and Gensim?
Thanks!
The text was updated successfully, but these errors were encountered: