-
Notifications
You must be signed in to change notification settings - Fork 1
/
prepare.sh
executable file
·43 lines (31 loc) · 1.12 KB
/
prepare.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
#!/bin/bash
set -e
CWD="$(pwd)"
# Clean everything in toolchain
rm -rf toolchain/bin toolchain/build
rm -rf toolchain/i686-elf-7.2.0-epos-x86_64
rm -rf toolchain/autoconf-2.65
rm -rf toolchain/automake-1.12
# extract necessary files
tar xvf toolchain/i686-elf-7.2.0-epos-x86_64.tar.bz2 -C toolchain
#tar xvf toolchain/autoconf-2.65.tar.gz -C toolchain
#tar xvf toolchain/automake-1.12.tar.gz -C toolchain
mkdir -p toolchain/bin toolchain/build
# Build automak and autoconf
#pushd .
#cd toolchain/build;
#${CWD}/toolchain/automake-1.12/configure --prefix="${CWD}/toolchain"
#make && make install
#${CWD}/toolchain/autoconf-2.65/configure --prefix="${CWD}/toolchain"
#make && make install
#popd
ln -sf ${CWD}/kernel/include/uapi/syscall.h ${CWD}/3rd_party/newlib-2.5.0.20170818/newlib/libc/sys/epos/syscall.h
# Create environment file
echo "export EPOS_ROOTDIR=${CWD}" > environment
echo "export TOOLCHAIN_PATH=${CWD}/toolchain" >> environment
echo "export EPOS_SYSROOT=${CWD}/sysroot" >> environment
echo "export PATH=$PATH:${CWD}/toolchain/bin" >> environment
cat _env >> environment
source environment
cd 3rd_party
./build_libc.sh