-
Notifications
You must be signed in to change notification settings - Fork 2
/
get-sources.sh
executable file
·69 lines (60 loc) · 1.47 KB
/
get-sources.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
#!/bin/bash
source "config/config.cfg"
#
# Get buildroot
#
if [ ! -d "${BUILDROOT_DIR}" ]; then
git clone "${BUILDROOT_GIT}" "${BUILDROOT_DIR}" || exit -1
cd "${BUILDROOT_DIR}" || exit -1
git checkout "${BUILDROOT_BRANCH}" || exit -1
cd .. || exit -1
fi
#
# Get kernelloader
#
if [ ! -d "${KERNELLOADER_DIR}" ]; then
git clone "${KERNELLOADER_GIT}" "${KERNELLOADER_DIR}" || exit -1
cd "${KERNELLOADER_DIR}" || exit -1
git checkout "${KERNELLOADER_BRANCH}" || exit -1
cd .. || exit -1
fi
#
# Get linux
#
if [ ! -d "${LINUX_DIR}" ]; then
git clone "${LINUX_GIT}" "${LINUX_DIR}" || exit -1
cd "${LINUX_DIR}" || exit -1
git checkout "${LINUX_BRANCH}" || exit -1
cd .. || exit -1
fi
#
# Get linux-firmware-ps2
#
if [ ! -d "${FIRMWARE_DIR}" ]; then
git clone "${FIRMWARE_GIT}" "${FIRMWARE_DIR}" || exit -1
cd "${FIRMWARE_DIR}" || exit -1
git checkout "${FIRMWARE_BRANCH}" || exit -1
cd .. || exit -1
fi
# Make toolchain dir
if [ ! -d "${TOOLCHAIN_DIR}" ]; then
mkdir "${TOOLCHAIN_DIR}" || exit -1
fi
#
# Get binutils
#
if [ ! -d "${TOOLCHAIN_DIR}/${BINUTILS_DIR}" ]; then
git clone "${BINUTILS_GIT}" "${TOOLCHAIN_DIR}/${BINUTILS_DIR}" || exit -1
cd "${TOOLCHAIN_DIR}/${BINUTILS_DIR}" || exit -1
git checkout "${BINUTILS_BRANCH}" || exit -1
cd ../..
fi
#
# Get gcc
#
if [ ! -d "${TOOLCHAIN_DIR}/${GCC_DIR}" ]; then
git clone "${GCC_GIT}" "${TOOLCHAIN_DIR}/${GCC_DIR}" || exit -1
cd "${TOOLCHAIN_DIR}/${GCC_DIR}" || exit -1
git checkout "${GCC_BRANCH}" || exit -1
cd ../..
fi