Browse Source

Add compiling instructions for Ubuntu.

Mathias Gottschlag 5 years ago
parent
commit
362169b74e
1 changed files with 22 additions and 2 deletions
  1. 22
    2
      README.md

+ 22
- 2
README.md View File

9
 
9
 
10
     rustup target add thumbv6m-none-eabi
10
     rustup target add thumbv6m-none-eabi
11
 
11
 
12
-Compiling the base station software depends on the targeted board. The following steps can be used to cross-compile the software for an ARMv7 target from a Fedora host:
12
+Compiling the base station software depends on the targeted board. The following steps can be used to cross-compile the software for an ARMv7 target running Armbian from a Fedora host:
13
 
13
 
14
 1. Install the toolchain:
14
 1. Install the toolchain:
15
 
15
 
19
 
19
 
20
 2. Configure Rust to use the ARM GCC:
20
 2. Configure Rust to use the ARM GCC:
21
 
21
 
22
-        cat > ~/.cargo/config
22
+        cat > ~/.cargo/config <<_EOF
23
         [target.arm-unknown-linux-gnueabi]
23
         [target.arm-unknown-linux-gnueabi]
24
         linker = "arm-linux-gnueabi-gcc"
24
         linker = "arm-linux-gnueabi-gcc"
25
+        rustflags = ["-Clink-args=-Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3"]
26
+        _EOF
25
 
27
 
26
 3. Compile the software using the newly installed toolchain:
28
 3. Compile the software using the newly installed toolchain:
27
 
29
 
28
         cargo build --target=arm-unknown-linux-gnueabi
30
         cargo build --target=arm-unknown-linux-gnueabi
29
 
31
 
32
+For an Ubuntu host, the following steps can be used:
33
+
34
+1. Install the toolchain:
35
+
36
+        sudo apt-get install gcc-arm-linux-gnueabihf
37
+        rustup target add arm-unknown-linux-gnueabihf
38
+
39
+2. Configure Rust to use the ARM GCC:
40
+
41
+        cat > ~/.cargo/config <<_EOF
42
+        [target.arm-unknown-linux-gnueabihf]
43
+        linker = "arm-linux-gnueabihf-gcc"
44
+        _EOF
45
+
46
+3. Compile the software using the newly installed toolchain:
47
+
48
+        cargo build --target=arm-unknown-linux-gnueabihf
49
+
30
 # License
50
 # License
31
 
51
 
32
 The hardware contained in this repository is licensed under the [CERN Open Hardware Licence Version 2 - Weakly Reciprocal](cern_ohl_w_v2.txt), and the software is licensed under the [GNU General Public License v3](gpl-3.0.md).
52
 The hardware contained in this repository is licensed under the [CERN Open Hardware Licence Version 2 - Weakly Reciprocal](cern_ohl_w_v2.txt), and the software is licensed under the [GNU General Public License v3](gpl-3.0.md).

Loading…
Cancel
Save