-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
80 lines (45 loc) · 2.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Minimal qemu dev environment, Vlad Dogaru, 21.01.2014
Slightly modified from an earlier version by Octavian Purdilă.
19.02.2017, tavi: get rid of the iso dependencies and switch to using
virtio as for infrastructure stuff (console, block, net) to free the
emulation ports for development (e.g. 8250 serial ports, e100).
Dev environment is 32bit, even if host machine is 64bit.
== Required files ==
You need a `bzImage' link in the current directory as well as a few
binaries (like busybox) that are already provided. You can use:
make setup-bzImage
to download the kernel, build bzImage and create the required link.
== Consoles ==
There are two consoles activated: one in the default SDL display an
one spawned as a pty. Looks for messages like:
char device redirected to /dev/pts/20 (label virtiocon0)
to determine the pty path and then you can use minicom or screen to
connect to it:
minicom -D /dev/pts/20
== Disable SDL ==
Run as
QEMU_DISPLAY=none make
to disable the SDL mode. In this case you can connect to the VM via
the pty port described above.
== To rebuild busybox ==
Grab busybox_config, stick it in a busybox config, run
LDFLAGS=-m32 make
There is an `extra LDFLAGS' option in busybox, but it does not seem to
work.
== To build modules (homework) ==
Grab kernel_config, stick it in a kernel tree, run
make olddefconfig
Modules should then have the following line at the top:
KDIR=/usr/src/linux-so2
This saves students the burdain of having a full kernel tree on their
disk. Of course, if you have such a tree (e.g. you compiled a bzImage
earlier), you can use that one.
But you might get in trouble if your tree is not at the exact version
students should use (currently tentatively set at 3.13, as it's the most
recent at the time of this writing).
== To put files in the virtual machine ==
Best stick anything you need (modules and test programs) in fsimg/root.
You will need to statically link non-trivial programs. Additionally,
make sure you specify -m32 when compiling everything except modules
(kernel build system takes care of that).
Direct all questions to the list.