-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmakefile
54 lines (41 loc) · 1.86 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
TARGET ?= liamd
BOOT_DEVICE ?= virtual
update-pkgs-debian:
sudo apt update
sudo apt upgrade
update-pkgs-arch:
sudo pacman -Syu
install-ninja-debian:
sudo apt install wget
sudo wget -qO /usr/local/bin/ninja.gz https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
sudo gunzip /usr/local/bin/ninja.gz
sudo chmod a+x /usr/local/bin/ninja
deps-debian: update-pkgs-debian install-ninja-debian
sudo apt install nasm build-essential rsync parted qemu-utils qemu-system-x86 meson python3 python3-pip python3-setuptools python3-wheel ninja-build cmake sed m4 texinfo libgmp-dev bison flex curl -y
sudo pip3 install --upgrade pip
sudo pip3 install --break-system-packages pillow
sudo pip3 install --break-system-packages meson
sudo pip3 install --break-system-packages xbstrap
deps-arch: update-pkgs-arch
sudo pacman -S nasm ninja parted qemu-full meson python python-pip python-setuptools python-wheel cmake sed m4 texinfo gmp bison flex curl unzip
sudo pip3 install --break-system-packages meson
sudo pip3 install --break-system-packages xbstrap
init:
@ xbstrap init .
@ mkdir -m 777 -p sysroot
build:
@ cd target && BOOT_DEVICE=$(BOOT_DEVICE) LC_ALL=C make $(TARGET)/build
configure:
@ cd target && BOOT_DEVICE=$(BOOT_DEVICE) LC_ALL=C make $(TARGET)/configure
update:
@ cd target && BOOT_DEVICE=$(BOOT_DEVICE) LC_ALL=C make $(TARGET)/update
run:
@ cd target && BOOT_DEVICE=$(BOOT_DEVICE) LC_ALL=C make $(TARGET)/run
clean_build:
@ rm -f target/$(TARGET)/boot-kot.img
@ cd target && BOOT_DEVICE=$(BOOT_DEVICE) LC_ALL=C PACKAGE=all make $(TARGET)/build
@ cp target/$(TARGET)/boot-kot.img target/$(TARGET)/clean-boot-kot.img
all: init build run
github-action: deps-debian init build
qemu-img convert -f raw -O vdi target/liamd/boot-kot.img target/liamd/boot-kot.vdi
qemu-img convert -f raw -O vmdk target/liamd/boot-kot.img target/liamd/boot-kot.vmdk