-
Notifications
You must be signed in to change notification settings - Fork 132
/
autobuild.sh
executable file
·46 lines (40 loc) · 1.37 KB
/
autobuild.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
#!/bin/bash
pushd `dirname $0` > /dev/null
source autotest.config
cd ucore
# Remove previous builds first
rm -rf $BUILD_DIR_I386
rm -rf $BUILD_DIR_ARM
rm -rf $BUILD_DIR_AMD64
# Build uCore for i386
make O=$BUILD_DIR_I386 ARCH=i386 defconfig > /dev/null && \
make O=$BUILD_DIR_I386 kernel > /dev/null && \
UCORE_TEST=xx make O=$BUILD_DIR_I386 sfsimg > /dev/null
if [ $? -ne 0 ]; then
echo "build uCore for i386 failed!"
exit 1
fi
echo "build uCore for i386: OK"
# Build uCore for arm on goldfishv7
# Disable DDE at present as it violates the checks after all user-mode processes quit
mkdir -p $BUILD_DIR_ARM > /dev/null && \
grep -v DDE src/kern-ucore/arch/arm/configs/goldfishv7_defconfig > $BUILD_DIR_ARM/.defconfig && \
echo "HAVE_LINUX_DDE_BASE=n" >> $BUILD_DIR_ARM/.defconfig && \
make O=$BUILD_DIR_ARM ARCH=arm BOARD=goldfishv7 defconfig > /dev/null && \
UCORE_TEST=xx make O=$BUILD_DIR_ARM sfsimg > /dev/null && \
make O=$BUILD_DIR_ARM kernel > /dev/null
if [ $? -ne 0 ]; then
echo "build uCore for arm failed!"
exit 1
fi
echo "build uCore for arm: OK"
# Build uCore for amd64
make O=$BUILD_DIR_AMD64 ARCH=amd64 defconfig > /dev/null && \
make O=$BUILD_DIR_AMD64 kernel > /dev/null && \
UCORE_TEST=xx make O=$BUILD_DIR_AMD64 sfsimg > /dev/null
if [ $? -ne 0 ]; then
echo "build uCore for amd64 failed!"
exit 1
fi
echo "build uCore for amd64: OK"
popd > /dev/null