-
Notifications
You must be signed in to change notification settings - Fork 4
/
build
executable file
·104 lines (85 loc) · 2.52 KB
/
build
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
#!/bin/bash
IMG_DIR=build_img
ISO_DIR=build_iso
KERNEL_DIR="src/kernel"
FASMX_DIR="src/programs/develop/fasmx"
KOSJS_DIR="src/programs/develop/kosjs"
LUA_DIR="src/programs/develop/lua"
TCC_DIR="build_iso/kolibrios/develop/tcc"
######### DOWNLOAD KERNEL ###########
echo -e "\n====Download Kernel====\n"
wget https://builds.kolibrios.org/eng/data/kernel/trunk/kernel.mnt
wget https://builds.kolibrios.org/eng/data/kernel/trunk/bootloader/boot_fat12.bin
mv kernel.mnt build_img/KERNEL.MNT
: << COMMENTBLOCK
########### BUILD KERNEL ############
echo -e "\n====Build Kernel====\n"
svn co svn://kolibrios.org/kernel/trunk/ $KERNEL_DIR
cd $KERNEL_DIR
env lang=en make
cp -f bin/boot_fat12.bin ../..
../../tools/kerpack bin/kernel.mnt ../../$IMG_DIR/KERNEL.MNT
cd ../..
COMMENTBLOCK
########## BUILD FASMX #############
echo -e "\n====Build FasmX====\n"
cd $FASMX_DIR
make
make install
make clean
cd ../../../..
########## BUILD KOSJS #############
echo -e "\n====Build KosJS====\n"
cd $KOSJS_DIR
make
make install
make clean
cd ../../../..
: << COMMENTBLOCK
########## BUILD LUA #############
echo -e "\n==== Build LUA ====\n"
cd $LUA_DIR
#make
#make install
#make clean
cd ../../../..
COMMENTBLOCK
########## UPDATE TCC ###############
echo -e "\n==== Update TCC ====\n"
cd $TCC_DIR
rm -rf *
svn co svn://kolibrios.org/programs/develop/ktcc/trunk/bin .
svn co svn://kolibrios.org/programs/develop/ktcc/trunk/libc/include
svn co svn://kolibrios.org/programs/develop/ktcc/trunk/samples
rm -rf kos32-tcc.exe kos32-tcc .svn include/.svn samples/.svn samples/Makefile
cd ../../../../
########## CHECK IMG SIZE ###########
size=$(du -shb build_img | cut -f1)
if (( $size > 1474560 )); then
echo -e "\033[0;31m Error! Files do not fit into the image! \033[0;0m"
read -s -n 1
exit
fi
############# BUILD IMG #############
echo -e "\n====Build IMG====\n"
mkdir tmp
dd if=/dev/zero of=$ISO_DIR/kolibri.img bs=1k count=1440
mkfs.vfat -F12 $ISO_DIR/kolibri.img
dd if=boot_fat12.bin of=$ISO_DIR/kolibri.img conv=notrunc bs=512 count=1
sudo mount -o loop,rw,sync $ISO_DIR/kolibri.img tmp
echo "Copying..."
sudo cp -rf $IMG_DIR/* tmp
sync
sudo umount tmp
sudo rm -rf tmp
############# BUILD ISO #############
echo -e "\n====Build ISO====\n"
cd $ISO_DIR
mkisofs -R -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -graft-points -A "KolibriDE AutoBuilder" -publisher "KolibriDE Team" -o ../kolibri.iso ./
cd ..
############# CLEAN ##############
./clean > /dev/null
read -s -n 1
#
# THIS FILE WAS WRITTEN BY TURBOCAT2001, MAXCODEHACK, RGIMAD
#