This repository was archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathhack.mk
More file actions
80 lines (66 loc) · 4.11 KB
/
hack.mk
File metadata and controls
80 lines (66 loc) · 4.11 KB
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
# -------------------------------------------------------------------------- #
# Apache 2.0 License Copyright © 2022 The Aurae Authors #
# #
# +--------------------------------------------+ #
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | #
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | #
# | ███████║██║ ██║██████╔╝███████║█████╗ | #
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | #
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | #
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | #
# +--------------------------------------------+ #
# #
# Distributed Systems Runtime #
# #
# -------------------------------------------------------------------------- #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# -------------------------------------------------------------------------- #
SHELL := /bin/bash
empty:
build-container:
cd hack/build-container && ./mk-build-container
mkdir -p target
touch hack/build-container
container-release:
docker run -it --rm -u $${UID} -v "`pwd`:/aurae/auraed" -v "`pwd`/../api:/aurae/api" aurae-builder bash -c "cd /aurae/auraed && make release"
kernel:
mkdir -p target/rootfs/boot
docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/kernel && ./mk-kernel"
qemu:
docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/qemu && ./mk-qemu"
menuconfig:
docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/kernel && ./mk-menuconfig"
initramfs: container-release qemu
mkdir -p target/rootfs/bin
mkdir -p target/rootfs/etc/aurae
cp target/release/auraed target/rootfs/bin/auraed
cp -r ../pki target/rootfs/etc/aurae/
cd target/rootfs && rm -f init && ln -s bin/auraed init
docker run -it --rm -u $${UID} -v "`pwd`:/aurae" aurae-builder bash -c "cd hack/initramfs && ./mk-initramfs"
virsh-init:
./hack/libvirt/init.sh
virsh-start: virsh-init
virsh --connect qemu:///system create target/libvirt.xml
virsh-stop:
virsh --connect qemu:///system destroy aurae
virsh-console:
virsh --connect qemu:///system console aurae
virsh-shutdown:
virsh --connect qemu:///system shutdown aurae --mode acpi
network:
sudo brctl addbr vm-br0
sudo ip link set up dev vm-br0
sudo ip addr add fe80::1/64 dev vm-br0
sudo ip addr add 169.254.42.1/24 dev vm-br0