-
Notifications
You must be signed in to change notification settings - Fork 150
Expand file tree
/
Copy pathbuildimages.sh
More file actions
executable file
·146 lines (131 loc) · 2.51 KB
/
buildimages.sh
File metadata and controls
executable file
·146 lines (131 loc) · 2.51 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#
# 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/romprg/*.o
}
# build PC-98 versions
build_pc98()
{
cleanup
cp pc98-1232.config .config
make
./buildext.sh microwindows_pc98
make
mv image/fd1232.img image/fd1232-pc98.img
}
build_pc98_fast()
{
cleanup
cp pc98-1232-nc.config .config
make
./buildext.sh microwindows_pc98
make
mv image/fd1232.img image/fd1232-pc98.img
}
build_pc98_1200()
{
cleanup
cp pc98-1200.config .config
make
mv image/fd1200.img image/fd1200-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 NEC V25 rom image
build_rom_necv25()
{
cleanup
cp necv25.config .config
make
cp -p elks/arch/i86/boot/Image image/rom-necv25.bin
mv image/romfs.bin image/romfs-necv25.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 Swan rom image
build_rom_swan()
{
cleanup
cp swan.config .config
make
mv image/rom.wsc image/rom-swan.wsc
rm -f image/romfs.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
./buildext.sh all
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_ibm_fast
build_pc98
build_pc98_1200
build_pc98_1440
./buildext.sh microwindows
build_rom_8018x
build_rom_necv25
build_rom_8088
build_rom_swan
build_ibm
build_ibm_all