-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make it work for weak ubuntu users
Co-authored-by: Noé Tarbouriech <[email protected]> Signed-off-by: Martin Moreira de Jesus <[email protected]>
- Loading branch information
1 parent
b5dbffd
commit 5251a49
Showing
2 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
set shell := ["/bin/bash", "-uc"] | ||
|
||
setup: | ||
pushd tools/rootfs && \ | ||
./mkrootfs.sh | ||
#!/bin/bash | ||
pushd tools/rootfs | ||
./mkrootfs.sh | ||
popd | ||
|
||
pushd tools/kernel && \ | ||
./mkkernel.sh | ||
pushd tools/kernel | ||
./mkkernel.sh | ||
popd | ||
|
||
run: | ||
sudo capsh --keep=1 --user=$USER --inh=cap_net_admin --addamb=cap_net_admin -- -c 'RUST_BACKTRACE=1 cargo run --bin vmm -- --memory 512 --cpus 1 --initramfs=/tools/rootfs/initramfs.img --kernel tools/kernel/linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin --network-host-ip 172.29.0.1 --initramfs=/opt/repositories/virt-do/copies/cloudlet/tools/rootfs/initramfs.img --network-host-netmask 255.255.0.0' | ||
#!/bin/bash | ||
CARGO_PATH=$(which cargo) | ||
sudo -E capsh --keep=1 --user=$USER --inh=cap_net_admin --addamb=cap_net_admin -- -c \ | ||
'RUST_BACKTRACE=1 '$CARGO_PATH' run --bin vmm -- --memory 512 --cpus 1 \ | ||
--kernel tools/kernel/linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin \ | ||
--network-host-ip 172.29.0.1 --network-host-netmask 255.255.0.0 \ | ||
--initramfs=tools/rootfs/initramfs.img' | ||
|
||
build-kernel: | ||
#!/bin/bash | ||
pushd tools/kernel/linux-cloud-hypervisor && \ | ||
KCFLAGS="-Wa,-mx86-used-note=no" make bzImage -j `nproc` | ||
|
||
build-rootfs: | ||
#!/bin/bash | ||
pushd tools/rootfs && \ | ||
./mkrootfs.sh |