-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
136 lines (112 loc) · 3.24 KB
/
Makefile
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
qemu-test:
qemu-system-x86_64 \
-enable-kvm -no-reboot \
-kernel linux/arch/x86/boot/bzImage \
-nographic -nodefaults -serial stdio \
-device virtio-blk-pci,id=blk0,drive=hd0,scsi=off \
-drive "file=./lat_syscall.ext2,format=raw,if=none,id=hd0" \
-append "panic=-1 console=ttyS0 root=/dev/vda rw loglevel=15 nokaslr init=/bin/sh"
build-env-image:
cd docker && \
docker build . -t linuxbuild:latest -f build-env.Dockerfile
setup-osv:
git submodule update --init --recursive
pushd osv && \
sudo ./scripts/setup.py
patch-linux:
cd linux && \
git apply ../kml_4.0_001.diff
build-linux:
docker run -it -v "$(PWD)/linux":/linux-volume --rm linuxbuild:latest \
bash -c "make -j8 -C /linux-volume"
build-linux-lto:
docker run -it -v "$(PWD)/linux-misc":/linux-volume --rm linuxbuild:latest \
bash -c "make -j8 -C /linux-volume"
run-hello:
make -C hello
qemu-system-x86_64 \
-kernel linux/arch/x86_64/boot/bzImage \
-initrd hello/initramfs-hello.cpio.gz \
-nographic -enable-kvm \
-append "init=/trusted/hello console=ttyS0"
debuggable:
cd linux; \
./scripts/config --enable DEBUG_KERNEL; \
./scripts/config --enable DEBUG_INFO; \
./scripts/config --disable DEBUG_INFO_REDUCED; \
./scripts/config --enable DEBUG_INFO_SPLIT; \
./scripts/config --enable DEBUG_INFO_DWARF4; \
./scripts/config --enable GDB_SCRIPTS
ext4-fs:
cd linux; \
./scripts/config --enable EXT4_FS; \
./scripts/config --enable BLOCK;
ide-drive:
cd linux; \
./scripts/config --enable BLOCK; \
./scripts/config --enable BLK_DEV_SD; \
./scripts/config --enable ATA_PIIX; \
./scripts/config --enable ATA; \
./scripts/config --enable SATA_AHCI; \
./scripts/config --enable SCSI_CONSTANTS; \
./scripts/config --enable SCSI_SPI_ATTRS; \
serial:
cd linux; \
./scripts/config --enable SERIAL_8250; \
./scripts/config --enable SERIAL_8250_CONSOLE; \
printk:
cd linux; \
./scripts/config --enable EXPERT; \
./scripts/config --enable PRINTK;
tty:
cd linux; \
./scripts/config --enable EXPERT; \
./scripts/config --enable TTY;
exe:
cd linux; \
./scripts/config --enable BINFMT_ELF; \
./scripts/config --enable BINFMT_SCRIPT;
64bit:
cd linux; \
./scripts/config --enable 64BIT;
network:
cd linux; \
./scripts/config --enable NET; \
./scripts/config --enable INET;
futex:
cd linux; \
./scripts/config --enable EXPERT; \
./scripts/config --enable FUTEX;
epoll:
cd linux; \
./scripts/config --enable EXPERT; \
./scripts/config --enable EPOLL; \
./scripts/config --enable SIGNALFD;
audit:
cd linux; \
./scripts/config --enable AUDIT; \
./scripts/config --enable AUDITSYSCALL; \
./scripts/config --eanble AUDIT_WATCH; \
./scripts/config --enable AUDIT_TREE; \
./scripts/config --enable INTEGRITY_AUDIT;
proc:
cd linux; \
./scripts/config --enable PROC_FS;
smp:
cd linux; \
./scripts/config --enable SMP; \
./scripts/config --enable X86_64_SMP;
unix-socket:
cd linux; \
./scripts/config --enable UNIX;
multiuser:
cd linux; \
./scripts/config --enable MULTIUSER;
ftrace:
cd linux; \
./scripts/config --enable DEBUG_FS; \
./scripts/config --enable FTRACE; \
./scripts/config --enable FUNCTION_TRACER; \
./scripts/config --enable FUNCTION_GRAPH_TRACER; \
./scripts/config --enable FUNCTION_STACK_TRACER; \
./scripts/config --enable FUNCTION_DYNAMIC_TRACER;