Skip to content

Commit 4e02af9

Browse files
authored
Use distro cross-compilers in kernel build (raspberrypi#1660)
* Use distro cross-compilers in kernel build * Remove binutils requirment already as it is a dep for gcc-arm * Remove zlib1g from instructions as mentioned in comments. * Remove required packages as it is already in meta-package as rec * Revert "Remove required packages as it is already in meta-package as rec" This reverts commit d721932. * remove ccache instructions for when we were using the tools repo * combine dependencies and toolchain install instructions
1 parent f3aa0b8 commit 4e02af9

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

linux/kernel/building.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,37 +99,14 @@ also a Debian distribution, it means many aspects are similar, such as the comma
9999

100100
You can either do this using VirtualBox (or VMWare) on Windows, or install it directly onto your computer. For reference, you can follow instructions online [at Wikihow](http://www.wikihow.com/Install-Ubuntu-on-VirtualBox).
101101

102-
### Install required dependencies
102+
### Install required dependencies and toolchain
103103

104104
To build the sources for cross-compilation, make sure you have the dependencies needed on your machine by executing:
105105
```bash
106-
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
106+
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev crossbuild-essential-armhf
107107
```
108108
If you find you need other things, please submit a pull request to change the documentation.
109109

110-
### Install toolchain
111-
112-
Use the following command to download the toolchain to the home folder:
113-
114-
```bash
115-
git clone https://github.com/raspberrypi/tools ~/tools
116-
```
117-
118-
Updating the $PATH environment variable makes the system aware of file locations needed for cross-compilation.
119-
120-
```bash
121-
echo PATH=\$PATH:~/tools/arm-bcm2708/arm-linux-gnueabihf/bin >> ~/.bashrc
122-
source ~/.bashrc
123-
```
124-
If you are using a 32-bit operating system (for example, our Raspberry Pi Desktop for PC), then you may need to install an additional set of libraries:
125-
126-
`sudo apt install zlib1g-dev:amd64`
127-
128-
If you are using Ccache and a CI environment, instruct Ccache to not use the compiler's mtime for cache ID calculations.
129-
This is because Git intentionally doesn't save file timestamps, so each time you clone the toolchain its file mtimes are different, invalidating Ccache's cache when default settings are used.
130-
131-
`ccache --set-config=compiler_check=content`
132-
133110
### Get sources
134111

135112
To download the minimal source tree for the current branch, run:

0 commit comments

Comments
 (0)