See original article by Thomas Petazzoni at bootlin.com
Important - Preparing Buildroot
For this tutorial to work as outlined in the text below we need to set up a new copy of buildroot and switch to an earlier version of it.a specific earlier version buildroot it. There's
a strong dependence between buildroot, the linux kernel and kernel additions and modifications by ST Microelectronics. On top there's also
a dependency regarding the build tools involved (gcc in particular) on the build host. In case of the current version of Lab Assignment 3 we need
a gcc version not newer than nine (gcc-9). Otherwise we'll run into problems when buildroot tries to compile the device tree parser.
- make sure your on a host with gcc-9 compiler (eda1, zaphod)
- consider using multiple host / spreading across servers - the build process will take a lot of time
- zaphod is faster than eda1 and has more memory
Create a new directory and clone the buildroot repository and switch to version 2020.05.3:
Codeblock | ||
---|---|---|
| ||
mkdir lab3
cd lab3
git clone git://git.buildroot.net/buildroot
cd buildroot
git checkout -b bme280 2020.05.3
make stm32mp157c_dk2_defconfig
make menuconfig
make |
Enabling the I2C bus
An introduction to the Device Tree
...
At this point, our linux/
folder contains the exact same source code as what Buildroot has retrieved. It is time to make our Device Tree change by editing arch/arm/boot/dts/stm32mp157astm32mp157c-dk1dk2.dts
and at the end of it, add:
...
If you look closely at what Buildroot will do, it will do a rsync of the Linux kernel source code from your linux/
Git repository to output/build/linux-custom
in Buildroot, and then do the build. You can check make sure that your I2C5 change is there!output/build/linux-custom/arch/arm/boot/dts/stm32mp157c-dk2.dts
to
...