-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·60 lines (48 loc) · 2.05 KB
/
setup.sh
File metadata and controls
executable file
·60 lines (48 loc) · 2.05 KB
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
#!/bin/bash
# general tools to compile linux, busybox, u-Boot and the x32ctrl software
# ========================================================================
echo "This script will setup a Debian-based environment to allow compilation of the necessary components..."
echo "Installing packages..."
sudo apt update
sudo apt install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm fakeroot build-essential devscripts gcc-arm-none-eabi binutils-arm-none-eabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi u-boot-tools bc cpio dropbear-bin
# extract toolchain to directory /opt/cross
sudo tar -xf toolchains/cross-arm-arm926ej.tar.xz -C /
# download, compile and install libz into /opt/cross
cd /tmp
wget https://zlib.net/zlib-1.3.2.tar.gz
tar -xf zlib-1.3.2.tar.gz
rm zlib-1.3.2.tar.gz
cd zlib-1.3.2
export PATH=/opt/cross/bin:$PATH
export CHOST=arm-openwrt-linux-muslgnueabi
export CC=${CHOST}-gcc
export AR=${CHOST}-ar
export RANLIB=${CHOST}-ranlib
# install in the toolchain-folder
./configure --prefix=/opt/cross/arm-openwrt-linux-muslgnueabi --shared
make
sudo make install
# install individual libraries for some tools
# ========================================================================
#echo "Installing libraries for ARM..."
sudo dpkg --add-architecture armel
sudo apt update
# libz required for openssh-portable
sudo apt install zlib1g-dev:armel libz-dev:armel
# libasound2 required for audio-output
#sudo apt install libasound2:armel
# install Python 3 and pyATK to upload code to the i.MX25 via the USB connection
# ==============================================================================
#echo "Install packages for pyATK"
#sudo apt install python3 python3-pip python3.11-venv
#echo "Configuring pyATK..."
#cp files/usbdev.py pyatk/pyatk/channel/
#cp files/boot.py pyatk/pyatk/
#cd pyatk
#python3 -m venv pyatk_venv
#source pyatk_venv/bin/activate
#pip install pyserial pyusb==1.0.0
#pip install setuptools
#sudo pyatk_venv/bin/python3 setup.py install
#deactivate
#cd ..