-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
84 lines (57 loc) · 3.58 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
.PHONY: all configure kernel assets bios test_guest run debug
all: run
configure:
meson setup --cross-file=kernel/build/cross.ini build/kernel kernel
git clone https://github.com/limine-bootloader/limine build/limine --branch=v3.4.3-binary --depth=1
make -C build/limine limine-deploy
git clone https://git.seabios.org/seabios.git build/seabios
cd build/seabios && git checkout ef88eeaf052c8a7d28c5f85e790c5e45bcffa45e
cp misc/seabios-config.ini build/seabios/.config
make -C build/seabios -j8 PYTHON=python2
dd if=/dev/zero of=luna.hdd bs=4M count=32
/usr/sbin/parted -s luna.hdd mklabel msdos
/usr/sbin/parted -s luna.hdd mkpart primary 2048s 100%
./build/limine/limine-deploy luna.hdd
git clone https://github.com/torvalds/linux --branch v5.17 --depth 1 build/linux
cp misc/linux-config.ini build/linux/.config
make -C build/linux -j8
git clone https://github.com/qookei/image_create build/image_create
mkdir -p build/linux_sysroot/boot/grub
wget https://tinycorelinux.net/13.x/x86/release/distribution_files/core.gz -O build/linux_sysroot/boot/core.gz
cp build/linux/arch/x86/boot/bzImage build/linux_sysroot/boot/vmlinuz
echo "set default=0\nset timeout=0\nmenuentry \"Linux\" {\n linux /boot/vmlinuz nokaslr debug root=/dev/nvme0n1p1 earlyprintk=serial,ttyS0,9600\n initrd /boot/core.gz\n}" > build/linux_sysroot/boot/grub/grub.cfg
build/image_create/image_create.sh -o build/linux-guest.iso -t ext4 -p mbr -s 64M -l grub -b -c build/linux_sysroot
kernel:
ninja -C build/kernel
echfs-utils -m -p0 luna.hdd format 512