Skip to content

Commit 3604176

Browse files
committed
Update build depends, clarify capabilities, and how to set up virbr0
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
1 parent 83c0f3b commit 3604176

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ The build environment currently requires *at least* the following tools,
7070
tested on Ubuntu 16.04 (x86_64):
7171

7272
```sh
73-
sudo apt install build-essential libssl-dev automake autoconf libtool \
74-
pkg-config flex bison wget quilt bc lzop libelf-dev \
75-
gawk device-tree-compiler u-boot-tools \
76-
qemu-system-arm qemu-system-ppc qemu-system-x86
73+
sudo apt install build-essential libssl-dev automake autoconf libtool \
74+
pkg-config flex bison wget quilt bc lzop libelf-dev \
75+
gawk device-tree-compiler u-boot-tools squashfs-tools \
76+
qemu-system-arm qemu-system-ppc qemu-system-x86 \
77+
libpam-cap
7778
```
7879

7980
Install `libvirt-bin` and `virt-manager` as well, the integration of
@@ -92,13 +93,14 @@ GLIBC as Ubuntu 16.04:
9293
* [x86_64-unknown-linux-gnu][5]
9394

9495
For x86_64 you may want to enable KVM. For this to work as a regular
95-
user, add yourself to the kvm group and log out/in again:
96+
user, add yourself to the kvm group and log out/in again to activate
97+
the changes for your account:
9698

9799
sudo adduser $LOGNAME kvm
98100

99101

100-
Qemu Networking
101-
---------------
102+
Capabilities
103+
------------
102104

103105
myLinux uses Qemu to run the resulting kernel + image. For networking
104106
to work you can either `sudo make run`, which is a level of access to
@@ -109,9 +111,17 @@ Internet. Instead you can use capabilities:
109111
sudo /sbin/setcap cap_net_raw,cap_net_admin+ep /usr/bin/qemu-system-arm
110112
sudo /sbin/setcap cap_net_raw,cap_net_admin+ep /usr/bin/qemu-system-aarch64
111113
...
114+
sudo /sbin/setcap cap_net_raw,cap_net_admin+ep /usr/bin/qemu-system-x86_64
112115

113116
Remember, your `$LOGNAME` must be listead as a known user of both above
114-
capabilities in `/etc/security/capability.conf`.
117+
capabilities in `/etc/security/capability.conf`, for example:
118+
119+
cap_net_raw jocke
120+
cap_net_admin jocke
121+
122+
123+
Qemu Networking
124+
---------------
115125

116126
What remains now is to tell Qemu what bridges in your system you are
117127
allowed to connect to, edit/create the file `/etc/qemu/bridge.conf` and
@@ -121,7 +131,11 @@ add:
121131

122132
Assuming you have a `virbr0` interface in your system. If you've run
123133
anything in [virt-manager](http://virt-manager.org/) prior to this then
124-
you're set, otherwise you're unfortunately on your own.
134+
you're set, otherwise install `virt-manager` and:
135+
136+
1. Check that it's running: `sudo systemctl status libvirtd.service`
137+
2. Check networking is up: `sudo virsh net-list --all`
138+
3. Bring networking up: `sudo virsh net-start default`
125139

126140

127141
Troubleshooting

0 commit comments

Comments
 (0)