forked from AlexAltea/orbital
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·51 lines (45 loc) · 1.14 KB
/
build.sh
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
#!/bin/bash
# Configuration
path_bin='./bin'
path_bios='./orbital-bios'
path_grub='./orbital-grub'
path_qemu='./orbital-qemu'
path_orbital=`pwd`
function build_bios() {
cd ${path_orbital}
cd ${path_bios}
make -j4
mv out/bios.bin ../${path_bin}/ubios.bin
}
function build_grub() {
# Dependencies
sudo apt-get -qq install python
# Building
cd ${path_orbital}
cd ${path_grub}
./autogen.sh
./configure --target=x86_64
make -j4
}
function build_qemu() {
# Dependencies
sudo apt-get -qq install git
sudo apt-get -qq install zlib1g-dev
sudo apt-get -qq install libglib2.0-dev libfdt-dev libpixman-1-dev
# Building
cd ${path_orbital}
cd ${path_qemu}
./configure --target-list=ps4-softmmu \
--enable-sdl --enable-vulkan --enable-debug --disable-capstone \
--enable-hax
make -j4
}
build_bios
build_grub
build_qemu
# Generate GRUB image
cd ${path_orbital}
tar -c -f ${path_bin}/memdisk.tar -C resources boot
${path_grub}/grub-mkimage -d ${path_grub}/grub-core \
-O i386-pc -o bin/boot.img -m bin/memdisk.tar -c resources/boot/grub/boot.cfg \
memdisk biosdisk part_msdos part_gpt gfxterm_menu fat tar bsd memrw configfile