Building Linux Kernel Print

 

This application note explains how to build Linux kernel images for the Emcraft STM32MP1 System-On-Module. Step through the following procedure:

  1. Download the Yocto toolchain from the Emcraft website.
  2. Install the toolchain to your development host. The toolchain can be installed to an arbitrary directory:
  3. $ sh ./meta-toolchain-qt5-openstlinux-weston-stm32mp15-som-x86_64-toolchain-4.2.1-snapshot.sh
    ...

  4. Activate the cross-build environment:
  5. $ source /opt/st/stm32mp15-som/4.2.1-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
    $ unset CCACHE_PATH

  6. Clone the Emcraft Linux tree:
  7. $ mkdir build
    $ cd build
    $ git clone -b linux-stm32mp1-4.0.0 https://gitlab.com/emcraft/stm32mp15x/linux-stm32mp.git
    $ cd linux-stm32mp

  8. Configure the kernel tree build:
  9. $ make multi_v7_defconfig

  10. Build the kernel image:
  11. $ make -s -j10 uImage LOADADDR=0xC2000040
    ...
    $ ls -l arch/arm/boot/uImage

  12. Build DTB:
  13. $make stm32mp157a-som.dtb
    $ ls -l arch/arm/boot/dts/stm32mp157a-som.dtb

  14. Build kernel modules:
  15. $ make modules