-
Notifications
You must be signed in to change notification settings - Fork 109
/
buildimages.sh
executable file
·106 lines (94 loc) · 1.81 KB
/
buildimages.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
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
#
# This script is used to build all ELKS images outside Github CI
# Usage: ./buildimages [fast|ibm]
# The 'fast' option skips initial make clean, pc98-1440 and ibm-all images uncompressed
set -x
set -e
cleanup()
{
make kclean
rm -f bootblocks/*.o
rm -f elkscmd/sys_utils/clock.o
rm -f elkscmd/sys_utils/ps.o
rm -f elkscmd/sys_utils/meminfo.o
rm -f elkscmd/sys_utils/beep.o
rm -f elkscmd/basic/*.o
rm -f elkscmd/nano-X/*/*.o
}
# build PC-98 versions
build_pc98()
{
cleanup
cp pc98-1232.config .config
make
mv image/fd1232.img image/fd1232-pc98.img
}
build_pc98_fast()
{
cleanup
cp pc98-1232-nc.config .config
make
mv image/fd1232.img image/fd1232-pc98.img
}
build_pc98_1440()
{
cleanup
cp pc98-1440.config .config
make
mv image/fd1440.img image/fd1440-pc98.img
}
# build 8018X rom image
build_rom_8018x()
{
cleanup
cp 8018x.config .config
make
cp -p elks/arch/i86/boot/Image image/rom-8018x.bin
mv image/romfs.bin image/romfs-8018x.bin
}
# build 8088 rom image
build_rom_8088()
{
cleanup
cp emu86-rom-full.config .config
make
cp -p elks/arch/i86/boot/Image image/rom-8088.bin
mv image/romfs.bin image/romfs-8088.bin
}
# build IBM PC versions
build_ibm()
{
cleanup
cp ibmpc-1440.config .config
make
}
build_ibm_fast()
{
cleanup
cp ibmpc-1440-nc.config .config
make
}
build_ibm_all()
{
cd image
make images
cd ..
}
# quick kernel-only and specific apps build for dosbox, emu86.sh and qemu.sh testing
if [ "$1" == "fast" ]; then
build_pc98_fast
build_rom_8088
build_ibm_fast
exit
fi
if [ "$1" == "ibm" ]; then
build_ibm_fast
exit
fi
# full (re)build including C library and all applications
make clean
build_pc98
build_8018x
build_8088
build_ibm
build_ibm_all